- Jun 20, 2011
-
-
Richard Cochran authored
This patch enables software (and phy device) transmit time stamping. Compile tested only. Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com> Cc: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by:
Richard Cochran <richard.cochran@omicron.at> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 17, 2011
-
-
Clive Stubbings authored
The RIPTR and TIPTR (receive/transmit internal temporary data pointer), used by microcode as a temporary buffer for data, must be 32-byte aligned according to the RM for MPC8247. Tested on mgcoge. Signed-off-by:
Clive Stubbings <clive.stubbings@xentech.co.uk> Signed-off-by:
Holger Brunck <holger.brunck@keymile.com> cc: Pantelis Antoniou <pantelis.antoniou@gmail.com> cc: Vitaly Bordug <vbordug@ru.mvista.com> cc: netdev@vger.kernel.org Signed-off-by:
David S. Miller <davem@conan.davemloft.net>
-
- Jun 10, 2011
-
-
Joe Perches authored
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- May 18, 2011
-
-
Grant Likely authored
Commit b826291c, "drivercore/dt: add a match table pointer to struct device" added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because matching is not an atomic operation with probing a driver. If two or more drivers are attempted to be matched to a driver at the same time, then the cached matching entry pointer could get overwritten. This patch reverts the of_match cache pointer and reworks all users to call of_match_device() directly instead. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Apr 21, 2011
-
-
Andrea Galbusera authored
mac-fec.c was setting individual UDP address registers instead of multicast group address registers when joining a multicast group. This prevented from correctly receiving UDP multicast packets. According to datasheet, replaced hash_table_high and hash_table_low with grp_hash_table_high and grp_hash_table_low respectively. Also renamed hash_table_* with grp_hash_table_* in struct fec declaration for 8xx: these registers are used only for multicast there. Tested on a MPC5121 based board. Build tested also against mpc866_ads_defconfig. Signed-off-by:
Andrea Galbusera <gizero@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 10, 2011
-
-
Michał Mirosław authored
Remove offload changing ethtool ops which drivers don't really support: - fs_enet - ucc_geth Signed-off-by:
Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 28, 2011
-
-
Grant Likely authored
Get rid of users of of_platform_driver in drivers/net. The of_platform_{,un}register_driver functions are going away, so the users need to be converted to using the platform_bus_type directly. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Oct 31, 2010
-
-
David Daney authored
There are two identical implementations of of_get_mac_address(), one each in arch/powerpc/kernel/prom_parse.c and arch/microblaze/kernel/prom_parse.c. Move this function to a new common file of_net.{c,h} and adjust all the callers to include the new header. Signed-off-by:
David Daney <ddaney@caviumnetworks.com> [grant.likely@secretlab.ca: protect header with #ifdef] Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Sep 06, 2010
-
-
Julia Lawall authored
In this case, a device_node structure is stored in another structure that is then freed without first decrementing the reference count of the device_node structure. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @r exists@ expression x; identifier f; position p1,p2; @@ x@p1->f = \(of_find_node_by_path\|of_find_node_by_name\|of_find_node_by_phandle\|of_get_parent\|of_get_next_parent\|of_get_next_child\|of_find_compatible_node\|of_match_node\|of_find_node_by_type\|of_find_node_with_property\|of_find_matching_node\|of_parse_phandle\|of_node_get\)(...); ... when != of_node_put(x) kfree@p2(x) @script:python@ p1 << r.p1; p2 << r.p2; @@ cocci.print_main("call",p1) cocci.print_secs("free",p2) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 06, 2010
-
-
Grant Likely authored
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Reviewed-by:
David S. Miller <davem@davemloft.net>
-
- Jul 18, 2010
-
-
Richard Cochran authored
The phy_mii_ioctl() function unnecessarily throws away the original ifreq. We need access to the ifreq in order to support PHYs that can perform hardware time stamping. Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl(). This is unnecessary since phylib will check the command in any case. Signed-off-by:
Richard Cochran <richard.cochran@omicron.at> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 02, 2010
-
-
Anatolij Gustschin authored
Fixes build error caused by the OF device_node pointer being moved into struct device Signed-off-by:
Anatolij Gustschin <agust@denx.de> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- May 29, 2010
-
-
Mark Ware authored
This patch fixes an occasional transmit lockup in the mac-fcc which occurs after a tx error. The test scenario had the local port set to autoneg and the other end fixed at 100FD, resulting in a large number of late collisions. According to the MPC8280RM 30.10.1.3 (also 8272RM 29.10.1.3), after a tx error occurs, TBPTR may sometimes point beyond BDs still marked as ready. This patch walks back through the BDs and points TBPTR to the earliest one marked as ready. Tested on a custom board with a MPC8280. Signed-off-by:
Mark Ware <mware@elphinstone.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 22, 2010
-
-
Grant Likely authored
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Sean MacLennan <smaclennan@pikatech.com>
-
- May 18, 2010
-
-
Grant Likely authored
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- May 10, 2010
-
-
Eric Dumazet authored
Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by:
Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 03, 2010
-
-
Jiri Pirko authored
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by:
Jiri Pirko <jpirko@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 30, 2010
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by:
Tejun Heo <tj@kernel.org> Guess-its-ok-by:
Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- Feb 27, 2010
-
-
Anatolij Gustschin authored
MPC5121 FEC requeries 4-byte alignmnent for TX data buffers. This patch is a work around that copies misaligned tx packets to an aligned skb before sending. Signed-off-by:
John Rigby <jcrigby@gmail.com> Signed-off-by:
Piotr Ziecik <kosmo@semihalf.com> Signed-off-by:
Wolfgang Denk <wd@denx.de> Signed-off-by:
Anatolij Gustschin <agust@denx.de> Acked-by:
Grant Likely <grant.likely@secretlab.ca> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Anatolij Gustschin authored
Extend the fs_enet driver to support MPC512x FEC. Enable it with CONFIG_FS_ENET_MPC5121_FEC option. Signed-off-by:
John Rigby <jcrigby@gmail.com> Signed-off-by:
Piotr Ziecik <kosmo@semihalf.com> Signed-off-by:
Wolfgang Denk <wd@denx.de> Signed-off-by:
Anatolij Gustschin <agust@denx.de> Acked-by:
Grant Likely <grant.likely@secretlab.ca> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Anatolij Gustschin authored
Signed-off-by:
Anatolij Gustschin <agust@denx.de> Acked-by:
Grant Likely <grant.likely@secretlab.ca> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 22, 2010
-
-
Jiri Pirko authored
Signed-off-by:
Jiri Pirko <jpirko@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 12, 2010
-
-
Jiri Pirko authored
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by:
Jiri Pirko <jpirko@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 14, 2009
-
-
Anton Vorontsov authored
Some OF platform drivers are missing module device tables, so they won't load automatically on boot. This patch fixes the issue by adding proper MODULE_DEVICE_TABLE() macros to the drivers. Signed-off-by:
Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 22, 2009
-
-
Anton Vorontsov authored
Since commit aa73832c ("Rework fs_enet driver to use of_mdio infrastructure") the fixed-link support is broken in the fs_enet driver. This patch fixes the support by removing a check for phy_node, and adding a call to of_phy_connect_fixed_link(). Also set netdev parent device via SET_NETDEV_DEV() call, this is needed so that OF MDIO core could find a node pointer for a device. Plus, fix "if (IS_ERR(phydev))" check, in case of errors, of_phy_connect() returns NULL, not ERR_PTR as phy_connect(). Signed-off-by:
Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 17, 2009
-
-
Wolfgang Denk authored
The MII speed calculation was based on the CPU clock (ppc_proc_freq), but for MPC512x we must use the bus clock instead. This patch makes it use the correct clock and makes sure we don't clobber reserved bits in the MII_SPEED register. Signed-off-by:
Wolfgang Denk <wd@denx.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: <netdev@vger.kernel.org> Acked-by:
Grant Likely <grant.likely@secretlab.ca> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 28, 2009
-
-
Kumar Gala authored
CONFIG_DUET doesn't exist anymore, remove all the code that exists to support it. [ Simplify fs_init() even further -DaveM ] Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 27, 2009
-
-
Grant Likely authored
This patch simplifies the driver by making use of more common code. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Andy Fleming <afleming@freescale.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 13, 2009
-
-
Alexander Beregalov authored
Signed-off-by:
Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 11, 2009
-
-
Alexander Beregalov authored
Reported-by:
Subrata Modak <subrata@linux.vnet.ibm.com> Signed-off-by:
Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 21, 2009
-
-
Ben Hutchings authored
Following the removal of the unused struct net_device * parameter from the NAPI functions named *netif_rx_* in commit 908a7a16, they are exactly equivalent to the corresponding *napi_* functions and are therefore redundant. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com> Acked-by:
Neil Horman <nhorman@tuxdriver.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 14, 2009
-
-
Mike Ditto authored
If something goes wrong attaching to phy driver, we weren't freeing the IRQ. Signed-off-by:
Mike Ditto <mditto@consentry.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Dec 22, 2008
-
-
Neil Horman authored
When the napi api was changed to separate its 1:1 binding to the net_device struct, the netif_rx_[prep|schedule|complete] api failed to remove the now vestigual net_device structure parameter. This patch cleans up that api by properly removing it.. Signed-off-by:
Neil Horman <nhorman@tuxdriver.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 03, 2008
-
-
Alexey Dobriyan authored
1. compile fix for irqreturn_t type change 2. restore ->poll_controller after CONFIG_PPC_CPM_NEW_BINDING transition Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Jeff Garzik <jgarzik@redhat.com>
-
- Oct 27, 2008
-
-
Johannes Berg authored
A number of places still use %02x:...:%02x because it's in debug statements or for no real reason. Make a few of them use %pM. Signed-off-by:
Johannes Berg <johannes@sipsolutions.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 08, 2008
-
-
Lennert Buytenhek authored
This patch introduces mdiobus_alloc() and mdiobus_free(), and makes all mdio bus drivers use these functions to allocate their struct mii_bus'es dynamically. Signed-off-by:
Lennert Buytenhek <buytenh@marvell.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Acked-by:
Andy Fleming <afleming@freescale.com>
-
Lennert Buytenhek authored
In preparation of giving mii_bus objects a device tree presence of their own, rename struct mii_bus's ->dev argument to ->parent, since having a 'struct device *dev' that points to our parent device conflicts with introducing a 'struct device dev' representing our own device. Signed-off-by:
Lennert Buytenhek <buytenh@marvell.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Acked-by:
Andy Fleming <afleming@freescale.com>
-
- Sep 24, 2008
-
-
Kumar Gala authored
Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore remove the dead code associated with !CONFIG_PPC_MERGE. With this change the pre_request_irq() and post_free_irq() calls became nops so they have been removed. Also removed fs_request_irq() and fs_free_irq() and just called request_irq() and free_irq(). Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Jeff Garzik <jgarzik@redhat.com>
-
- Aug 27, 2008
-
-
Heiko Schocher authored
Signed-off-by:
Heiko Schocher <hs@denx.de> Signed-off-by:
Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Signed-off-by:
Jeff Garzik <jgarzik@redhat.com>
-
- Aug 07, 2008
-
-
Li Yang authored
Currently when we do a packet flood to the Ethernet port, the console reports error every time when a packet is dropped. This is too redundant and cost performance. Remove message for this type of event. Signed-off-by:
Li Yang <leoli@freescale.com> Signed-off-by:
Jeff Garzik <jgarzik@redhat.com>
-