aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-11-29corral some wayward N/A fw_version dust bunniesRick Jones2-3/+3
Round-up some wayward "N/A" fw_version dust bunnies as part of that clean-up. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-29net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()Axel Lin31-416/+32
This patch converts the drivers in drivers/net/ethernet/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: "David S. Miller" <davem@davemloft.net> Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com> Cc: Vitaly Bordug <vbordug@ru.mvista.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jiri Pirko <jpirko@redhat.com> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Richard Cochran <richard.cochran@omicron.at> Cc: Jonas Bonn <jonas@southpole.se> Cc: Sebastian Poehn <sebastian.poehn@belden.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28tg3: Scale back code that modifies MRRSMatt Carlson1-17/+10
Tg3 normally gets a performance boost by increasing the PCI Maximum Read Request Size (MRRS) to 4k. Unfortunately, this is causing some problems on particular hardware platforms. This patch removes all code that modifies the MRRS except for one case. As part of a solution to fix an internal FIFO problem on the 5719, the driver artificially capped the MRRS to 2k for the entire 5719, and later 5720, ASIC revs. This was overly aggressive and only really needed to be done for the 5719 A0. In the spirit of the rest of this patch, the driver will only reprogram the MRRS for this device if the value exceeds the 2k cap. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28tg3: Fix TSO CAP for 5704 devs w / ASF enabledMatt Carlson1-2/+12
On the earliest TSO capable devices, TSO was accomplished through firmware. The TSO cannot coexist with ASF management firmware though. The tg3 driver determines whether or not ASF is enabled by calling tg3_get_eeprom_hw_cfg(), which checks a particular bit of NIC memory. Commit dabc5c670d3f86d15ee4f42ab38ec5bd2682487d, entitled "tg3: Move TSO_CAPABLE assignment", accidentally moved the code that determines TSO capabilities earlier than the call to tg3_get_eeprom_hw_cfg(). As a consequence, the driver was attempting to determine TSO capabilities before it had all the data it needed to make the decision. This patch fixes the problem by revisiting and reevaluating the decision after tg3_get_eeprom_hw_cfg() is called. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Change value comparison orderYaniv Rosner1-23/+23
Change comparison order such that the variable will come before the compared value. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Cosmetic changesYaniv Rosner2-216/+199
Fix spelling, alignment, empty lines, relocate the is_4_port_mode function, and split bnx2x_link_status_update function. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Fix self test of BCM57800Yaniv Rosner1-2/+12
Fix the MAC test of the 1G port of the BCM57800 to use the UMAC instead of the XMAC. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Add known PHY type checkYaniv Rosner1-0/+4
The populate function will fail in case an unknown external PHY is detected. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Change Warpcore MDIO work around modeYaniv Rosner1-1/+3
This patch enables the usage of simpler MDC/MDIO work-around when accessing Warpcore registers. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Fix BCM84833 link and LED behaviorYaniv Rosner2-184/+223
This patch contain several fixes for the BCM84833. This PHY is still not in bnx2x production, hence this patch can be considered as enhancement. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: Warpcore HW reset following fan failureYaniv Rosner2-0/+17
Put Warpcore in low power mode in case of fan failure to reduce heat. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: ETS changesYaniv Rosner2-4/+17
Fix a problem when new traffic class is created with 0% BW, the ETS is not conforming. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-28bnx2x: PFC changesYaniv Rosner2-76/+179
Change BRB to work in per class guaranteed mode and handle cases for BW 0%. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4_en: bug fix for the case of vlan id 0 and UP 0Amir Vadai1-2/+4
When using vlan 0 and UP 0, vlan header wasn't placed. Signed-off-by: Amir Vadai <amirv@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4_en: adding loopback supportAmir Vadai3-2/+21
Device must be in promiscuous mode or DMAC must be same as the host MAC, or else packet will be dropped by the HW rx filtering. Signed-off-by: Amir Vadai <amirv@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4_en: fix WOL handlers were always looking at port2 capability bitOren Duer1-2/+18
There are 2 capability bits for WOL, one for each port. WOL handlers were looking only on the second bit, regardless of the port. Signed-off-by: Oren Duer <oren@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4_en: using non collapsed CQ on TXYevgeny Petrilin2-38/+36
Moving to regular Completion Queue implementation (not collapsed) Completion for each transmitted packet is written to new entry. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4_en: fix sparse warning on a cast which truncates bits from constant valueOr Gerlitz1-1/+1
the MLX4_EN_WOL_DO_MODIFY flag which is defined through enum targets bit 63, this triggers a "cast truncate bits from constant value (8000000000000000 becomes 0)" warning from sparse, fix that by using define instead of enum. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4: fix UDP RSS related settingsOr Gerlitz1-3/+5
Using RSS which takes into account UDP headers is controlled by a module param, fix the setting of the HW RSS context to align with that scheme. So far it was uncoditionally allowing hashing on the UDP headers. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-27net/mlx4: move RSS related definitions to be globalOr Gerlitz3-15/+7
Towards adding RSS support for IB drivers/application who use the mlx4 HW, make the RSS related definitions global and change the mlx4_en driver to use them. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26KSZ8851-SNL: Add ethtool support for EEPROM via eeprom_93cx6Ben Dooks3-320/+120
Add ethtool EEPROM read/write support using the eeprom_93cx6 library instead of open-coding the functions. Depends on eeprom_93cx6 driver getting EEPROM write support. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> [sboyd@codeaurora.org: Removed previous eeprom implementation] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26KSZ8851-SNL: Fix MAC address change problemTristram Ha2-21/+28
When device is off it is under power saving mode. Changing the MAC address in that situation will result in the device not communicating as the first write to the MAC address register is not executed. Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com> [ben@simtec.co.uk: cleaned up header] Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26KSZ8851-SNL: Add support for EEPROM MAC addressBen Dooks1-7/+34
Add support for reading the MAC address from the system registers if there is an EEPROM present. This involves caching the KS_CCR register for later use (will also be useful for ETHTOOL support) and adding a print to say that there is an EEPROM present. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26be2net: Fix non utilization of RX queuesPadmanabh Ratnakar1-6/+10
When non power of two MSIX vectors are given to driver, some RX queues are not utilized. Program RSS table in such a way that all queues are utilized. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26be2net: Use new hash keyPadmanabh Ratnakar1-2/+3
This new hash key gives better distribution of packets across RX queues. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26be2net: Add error handling for LancerPadmanabh Ratnakar1-49/+106
Detect error in Lancer by polling a HW register and recover from this error if it is recoverable. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26be2net: Fix error recovery pathsPadmanabh Ratnakar1-1/+4
When TX queues are created again after error recovery, netif_set_real_num_tx_queues() is invoked to update number of real TX queues created. rtnl lock needs to be held when invoking this routine. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26be2net: Move to new SR-IOV implementation in LancerPadmanabh Ratnakar3-25/+200
SR-IOV implementation is Lancer has changed in following ways - 1)PF driver assigns one MAC addresses for VF using COMMON_SET_IFACE_MAC_LIST. 2)VF driver queries its MAC address using COMMON_GET_IFACE_MAC_LIST command and assigns it to its interface. Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller8-17/+59
Conflicts: net/ipv4/inet_diag.c
2011-11-24net: mv643xx_eth: fix build errorAxel Lin1-4/+5
Fix below build error: CC drivers/net/ethernet/marvell/mv643xx_eth.o drivers/net/ethernet/marvell/mv643xx_eth.c: In function 'mv643xx_eth_get_drvinfo': drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: 'info' undeclared (first use in this function) drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: (Each undeclared identifier is reported only once drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: for each function it appears in.) make[4]: *** [drivers/net/ethernet/marvell/mv643xx_eth.o] Error 1 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23ehea: Use round_jiffies_relative to align workqueueAnton Blanchard1-2/+4
Use round_jiffies_relative to align the ehea workqueue and avoid extra wakeups. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23ehea: Reduce memory usage in buffer poolsAnton Blanchard1-2/+2
Now that we enable multiqueue by default the ehea driver is using quite a lot of memory for its buffer pools. With 4 queues we consume 64MB in the jumbo packet ring, 16MB in the medium packet ring and 16MB in the tiny packet ring. We should only fill the jumbo ring once the MTU is increased but for now halve it's size so it consumes 32MB. Also reduce the tiny packet ring, with 4 queues we had 16k entries which is overkill. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23qlge: fix size of external list for TX address descriptorsThadeu Lima de Souza Cascardo1-5/+3
When transmiting a fragmented skb, qlge fills a descriptor with the fragment addresses, after DMA-mapping them. If there are more than eight fragments, it will use the eighth descriptor as a pointer to an external list. After mapping this external list, called OAL to a structure containing more descriptors, it fills it with the extra fragments. However, considering that systems with pages larger than 8KiB would have less than 8 fragments, which was true before commit a715dea3c8e, it defined a macro for the OAL size as 0 in those cases. Now, if a skb with more than 8 fragments (counting skb->data as one fragment), this would start overwriting the list of addresses already mapped and would make the driver fail to properly unmap the right addresses on architectures with pages larger than 8KiB. Besides that, the list of mappings was one size too small, since it must have a mapping for the maxinum number of skb fragments plus one for skb->data and another for the OAL. So, even on architectures with page sizes 4KiB and 8KiB, a skb with the maximum number of fragments would make the driver overwrite its counter for the number of mappings, which, again, would make it fail to unmap the mapped DMA addresses. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23bnx2x: Fix 5461x LEDYaniv Rosner2-1/+39
Fix port identify test on 5461x PHY by driving LEDs through MDIO. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23net: treewide use of RCU_INIT_POINTEREric Dumazet4-7/+7
rcu_assign_pointer(ptr, NULL) can be safely replaced by RCU_INIT_POINTER(ptr, NULL) (old rcu_assign_pointer() macro was testing the NULL value and could omit the smp_wmb(), but this had to be removed because of compiler warnings) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23b44: Use dev_kfree_skb_irq() in b44_tx()Xander Hover1-1/+1
Reported issues when using dev_kfree_skb() on UP systems and systems with low numbers of cores. dev_kfree_skb_irq() will properly save IRQ state before freeing the skb. Tested on 3.1.1 and 3.2_rc2 Example of reproducible trace of kernel 3.1.1 ------------[ cut here ]------------ WARNING: at kernel/softirq.c:159 local_bh_enable+0x32/0x79() ... Pid: 0, comm: swapper Not tainted 3.1.1-gentoo #1 Call Trace: [<c1022970>] warn_slowpath_common+0x65/0x7a [<c102699e>] ? local_bh_enable+0x32/0x79 [<c1022994>] warn_slowpath_null+0xf/0x13 [<c102699e>] local_bh_enable+0x32/0x79 [<c134bfd8>] destroy_conntrack+0x7c/0x9b [<c134890b>] nf_conntrack_destroy+0x1f/0x26 [<c132e3a6>] skb_release_head_state+0x74/0x83 [<c132e286>] __kfree_skb+0xb/0x6b [<c132e30a>] consume_skb+0x24/0x26 [<c127c925>] b44_poll+0xaa/0x449 [<c1333ca1>] net_rx_action+0x3f/0xea [<c1026a44>] __do_softirq+0x5f/0xd5 [<c10269e5>] ? local_bh_enable+0x79/0x79 <IRQ> [<c1026c32>] ? irq_exit+0x34/0x8d [<c1003628>] ? do_IRQ+0x74/0x87 [<c13f5329>] ? common_interrupt+0x29/0x30 [<c1006e18>] ? default_idle+0x29/0x3e [<c10015a7>] ? cpu_idle+0x2f/0x5d [<c13e91c5>] ? rest_init+0x79/0x7b [<c15c66a9>] ? start_kernel+0x297/0x29c [<c15c60b0>] ? i386_start_kernel+0xb0/0xb7 ---[ end trace 583f33bb1aa207a9 ]--- Signed-off-by: Xander Hover <LKML@hover.be> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22net: remove netdev_alloc_page and use __GFP_COLDEric Dumazet5-9/+8
Given we dont use anymore the struct net_device *dev argument, and this interface brings litle benefit, remove netdev_{alloc|free}_page(), to debloat include/linux/skbuff.h a bit. (Some drivers used a mix of these interfaces and alloc_pages()) When allocating a page given to device for DMA transfer (device to memory), it makes sense to use a cold one (__GFP_COLD) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of driversRick Jones14-24/+7
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to fw_version in various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22net: remove ipv6_addr_copy()Alexey Dobriyan1-1/+1
C assignment can handle struct in6_addr copying. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22tg3: Add MDI-X reportingMatt Carlson2-1/+28
This patch adds MDI-X state reporting. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22tg3: Restrict large prod ring cap devicesMatt Carlson1-5/+4
Future devices may or may not be capable of supporting larger rx producer rings. This patch changes the code so that this flag is set on an ASIC rev to ASIC rev basis. Also, this patch changes a place where the LRG_PROD_RING_CAP flag was not controlling how the rx standard producer ring size was set. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22tg3: Adjust BD replenish thresholdsMatt Carlson1-5/+3
The BD replenish thresholds for the 57765 and newer ASIC revs are a little strict. They were tuned for a mode that is currently unused. This patch relaxes the thresholds so that they are set to values more inline with the resources available. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22tg3: Make 1000Base-X FC resolution look like 1000TMatt Carlson1-12/+6
This patch changes tg3's 1000Base-X flow control resolution to look like the 1000Base-T flow control resolution code. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-22tg3: Fix advertisement handlingHiroaki SHIMODA1-4/+3
Commit 28011cf19b (net: Add ethtool to mii advertisment conversion helpers) added a helper function ethtool_adv_to_mii_100bt() and tg3_copper_is_advertising_all(), tg3_phy_autoneg_cfg() were modified to use this. Before that commit, ethtool to mii advertisement conversion was done wrt speed, but now pause operation is also taken account. So, in tg3_copper_is_advertising_all(), below condition becomes true and this makes link up fails. if ((adv_reg & ADVERTISE_ALL) != all_mask) return 0; To fix this add ADVERTISE_ALL bit and operation to cap speed, and change default advertisement not including ADVERTISED_Pause. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21tg3: switch to build_skb() infrastructureEric Dumazet2-55/+66
This is very similar to bnx2x conversion, but simpler since no special alignement is required, so goal was not to reduce skb truesize. Using build_skb() reduces cache line misses in the driver, since we use cache hot skb instead of cold ones. Number of in-flight sk_buff structures is lower, they are more likely recycled in SLUB caches while still hot. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Matt Carlson <mcarlson@broadcom.com> CC: Michael Chan <mchan@broadcom.com> CC: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21stmmac: mask mmc interruptsGiuseppe CAVALLARO1-5/+9
We need to mask the MMC irq otherwise if we raise the mmc interrupts that are not handled the driver loops in the handler. In fact, by default all mmc counters (only used for stats) are managed in SW and registers are cleared on each READ. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21net: Change mii to ethtool advertisement function namesMatt Carlson3-17/+17
This patch implements advice by Ben Hutchings to change the mii side of the function names to look more like the register whose values they convert. New LPA translation functions have been added as well. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21gianfar: Use kmemdup rather than duplicating its implementationThomas Meyer1-2/+1
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21ksz884x: Use kzalloc rather than kmalloc followed by memset with 0Thomas Meyer1-4/+2
This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21ks8*/ksz8*: Casting (void *) value returned by kmalloc is uselessThomas Meyer1-2/+1
The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>