aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-17qlcnic: fix internal loopback testSucheta Chakraborty1-0/+2
Reset/set DEV_UP bit during allocation and deallocation of resources. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17qlcnic: module param for firmware load optionAmit Kumar Salecha1-1/+8
By default fw is loaded from flash, user can change this priority using load_fw_file module param. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17qlcnic: fix rx bytes statisticsSucheta Chakraborty1-1/+1
Added lrobytes to it. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17qlcnic: change adapter name displaySucheta Chakraborty1-1/+6
Append mac address to adapter name. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17qlcnic: fix memory leaksAnirban Chakraborty2-3/+4
Fixes memory leak in error path when memory allocation for adapter data structures fails. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: check for mii_bus platform dataSonic Zhang1-0/+6
If the platform data for the mii_bus is missing, gracefully error out rather than deference NULL pointers. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: handle timeouts with the MDIO registers gracefullyMike Frysinger1-19/+34
Have the low level MDIO functions pass back up timeout information so we don't waste time polling them multiple times when there is a problem, and so we don't let higher layers think the device is available when it isn't. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: use promiscuous flag for promiscuous modeSonic Zhang1-1/+1
Rather than using the Receive All Frames (RAF) bit to enable promiscuous mode, use the Promiscuous (PR) bit. This lowers overhead at runtime as we let the hardware process the packets that should actually be checked. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: add support for wake-on-lan magic packetsMichael Hennerich2-4/+75
Note that WOL works only in PM Suspend Standby Mode (Sleep Mode). Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: clear RXCKS if hardware generated checksum is not enabledSonic Zhang1-2/+3
Otherwise we might be get a setting mismatch from a previous module or bootloader and what the driver currently expects. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: deduce Ethernet FCS from hardware IP payload checksumSonic Zhang1-2/+33
IP checksum is based on 16-bit one's complement algorithm, so to deduce a value from checksum is equal to add its complement. Unfortunately, the Blackfin on-chip MAC checksum logic only works when the IP packet has a header length of 20 bytes. This is true for most IPv4 packets, but not for IPv6 packets or IPv4 packets which use header options. So only use the hardware checksum when appropriate. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Jon Kowal <jon.kowal@dspecialists.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: invalid data cache only once for each new rx skb bufferSonic Zhang1-5/+8
The skb buffer isn't actually used until we finish transferring and pass it up to higher layers, so only invalidate the range once before we start receiving actual data. This also avoids the problem with data invalidating on Blackfin systems -- there is no invalidate-only, just invalidate+flush. So when running in writeback mode, there is the small (but not uncommon) possibility of the flush overwriting valid DMA-ed data from the cache. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: handler RX status errorsPeter Meerwald1-3/+14
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17netdev: bfin_mac: add support for IEEE 1588 PTPBarry Song3-1/+362
Newer on-chip MAC peripherals support IEEE 1588 PTP in the hardware, so extend the driver to support this functionality. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17drivers/net/usb/asix.c: Fix unaligned accessesNeil Jones1-1/+33
Using this driver can cause unaligned accesses in the IP layer This has been fixed by aligning the skb data correctly using the spare room left over by the 4 byte header inserted between packets by the device. Signed-off-by: Neil Jones <NeilJay@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17ibmveth: Add suspend/resume supportBrian King1-0/+12
Adds support for resuming from suspend for IBM virtual ethernet devices. We may have lost an interrupt over the suspend, so we just kick the interrupt handler to process anything that is outstanding. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-16net: congestion notifications are not dropped packetsEric Dumazet1-1/+1
vlan/macvlan start_xmit() can inform caller of congestion with NET_XMIT_CN return value. This doesnt mean packet was dropped. Increment normal stat counters instead of tx_dropped. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-15net: adjust handle_macvlan to pass port struct to hookJiri Pirko1-6/+2
Now there's null check here and also again in the hook. Looking at bridge bits which are simmilar, port structure is rcu_dereferenced right away in handle_bridge and passed to hook. Looks nicer. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-15skge: use the DMA state API instead of the pci equivalentsFUJITA Tomonori2-18/+18
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-15Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimaxDavid S. Miller10-116/+479
2010-05-15rndis_host: Poll status channel before control channelBen Hutchings1-6/+12
Some RNDIS devices don't respond on the control channel until polled on the status channel. In particular, this was reported to be the case for the 2Wire HomePortal 1000SW. This is roughly based on a patch by John Carr <john.carr@unrouted.co.uk> which is reported to be needed for use with some Windows Mobile devices and which is currently applied by Mandriva. Reported-by: Mark Glassberg <vzeeaxwl@myfairpoint.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Mark Glassberg <vzeeaxwl@myfairpoint.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: add idc debug registersSucheta Chakraborty2-0/+23
When ever driver changes the device state, it should write pci-func number and timestamp in debug registers. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: support quisce modeSucheta Chakraborty1-2/+26
Device can go to quiescent state, during which drivers should refrain from using the device. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: check device classSucheta Chakraborty3-8/+18
pci-func class can be other than ethernet in Qlogic CNA device. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: check IDC versionSucheta Chakraborty2-2/+19
Warn user if IDC version mismatch with different class of drivers. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: cleanup unused codeAmit Kumar Salecha4-61/+10
LRO ring, cut-thru mode and specific fw version are not valid to Qlogic CNA device. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: cleanup dma mask settingAmit Kumar Salecha2-70/+24
Device support 64 bit dma mask. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: fix caching window registerAmit Kumar Salecha3-18/+0
o Window register is not per pci-func, so caching can result in expected result. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: remove obsolete registerAmit Kumar Salecha3-16/+1
MSI_MODE, CAPABILITIES_FW and SCRATCHPAD registers are obsolete. Driver should not use them. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14qlcnic: fix context cleanupAmit Kumar Salecha1-3/+1
Before going for recovery, every pci-func should check fw state, irrespective of device state. This to avoid unnecssary sending of command for ctx destroy. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14sky2: version 1.28stephen hemminger1-1/+1
Version 1.28 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14sky2: Avoid allocating memory in sky2_resumeMike McCormack1-15/+5
Allocating memory can fail, and since we have the memory we need in sky2_resume when sky2_suspend is called, just stop the hardware without freeing the memory it's using. This avoids the possibility of failing because we can't allocate memory in sky2_resume(), and allows sharing code with sky2_restart(). Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14sky2: Refactor down/up code out of sky2_restart()Mike McCormack1-7/+19
Code to bring down all sky2 interfaces and bring it up again can be reused in sky2_suspend and sky2_resume. Factor the code to bring the interfaces down into sky2_all_down and the up code into sky2_all_up. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14sky2: Shut off interrupts before NAPIMike McCormack1-2/+2
Interrupts should be masked, then synchronized, and finally NAPI should be disabled. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14sky2: Avoid race in sky2_change_mtuMike McCormack1-1/+1
netif_stop_queue does not ensure all in-progress transmits are complete, so use netif_tx_disable() instead. Secondly, make sure NAPI polls are disabled before stopping the tx queue, otherwise sky2_status_intr might trigger a TX queue wakeup between when we stop the queue and NAPI is disabled. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14sky2: Restore multicast after restartMike McCormack1-0/+1
Multicast settings will be lost on reset, so restore them. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14ixgb and e1000: Use new function for copybreak testsJoe Perches2-41/+58
There appears to be an off-by-1 defect in the maximum packet size copied when copybreak is speified in these modules. The copybreak module params are specified as: "Maximum size of packet that is copied to a new buffer on receive" The tests are changed from "< copybreak" to "<= copybreak" and moved into new static functions for readability. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14e1000: cleanup unused parametersJesse Brandeburg1-8/+0
During the cleanup pass after the removal of e1000e hardware from e1000 some parameters were missed. Remove them because it is just dead code. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14e1000: fix WARN_ON with mac-vlanJesse Brandeburg1-2/+0
When adding more than 14 mac-vlan adapters on e1000 the driver would fire a WARN_ON when adding the 15th. The WARN_ON in this case is completely un-necessary, as the code below the WARN_ON is directly handling the value the WARN_ON triggered on. CC: Jiri Pirko <jpirko@redhat.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14drivers/net: Remove unnecessary returns from void function()sJoe Perches171-631/+0
This patch removes from drivers/net/ all the unnecessary return; statements that precede the last closing brace of void functions. It does not remove the returns that are immediately preceded by a label as gcc doesn't like that. It also does not remove null void functions with return. Done via: $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \ xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }' with some cleanups by hand. Compile tested x86 allmodconfig only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-13ixgbe: Refactor common code between 82598 & 82599 to accommodate new hardwareMallikarjuna R Chilakala5-421/+557
Some of the following MAC functions are moved from 82598 & 82599 specific hardware files to common.[ch] to accommodate new silicon changes. Also fixed some white space issues * get_san_mac_addr, check_link, set_vmdq, clear_vmdq, clear_vfta, * set_vfta, fc_enable, init_uta_tables Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-13ixgbe: Use bool flag to see if the packet unmapping is delayed in HWRSCMallikarjuna R Chilakala1-6/+11
We can't use zero magic "bad" value to check if IXGBE_RSC_CB(skb)->dma is valid. It is only valid in x86/arm/m68k/alpha architectures and in spark, powerPC and other architectures it should be ~0. As per Benjamin Herrenschmidt feedback use a bool flag to decide if the packet unmapping is delayed in hardware RSC till EOP is reached Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-13ixgbe: fix setting of promisc mode when using mac-vlansEmil Tantilov3-4/+8
Introduce uc_set_promisc flag to fix enabling of promisc mode when exceeding the number of supported RAR entries. Issue discovered by Ben Greear when using mac-vlans. Reported-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12cxgb4: report GRO stats with ethtool -SDimitris Michailidis1-0/+6
Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12cxgb4: report the PCIe link speedDimitris Michailidis1-2/+8
Report the PCIe link speed (2.5 or 5 Gbps). Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12cxgb4: configure HW VLAN extraction through FWDimitris Michailidis4-28/+20
HW VLAN extraction needs to be configured through FW to work correctly in virtualization environments. Remove the direct register manipulation and rely on FW. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12e1000e: add PCI device id to enable support for 82567V-4Bruce Allan2-0/+2
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12e1000e: Fix/cleanup PHY reset code for ICHx/PCHxBruce Allan1-74/+75
i) Fixes a bug where e1000_sw_lcd_config_ich8lan() was calling e1000_lan_init_done_ich8lan() to poll the STATUS.LAN_INIT_DONE bit to make sure the MAC had completed the PHY configuration. However, e1000_lan_init_done_ich8lan() had already been called in one of the two places where PHY reset occurs for ICHx/PCHx parts, which caused the second call to busy-wait for 150 msec because the LAN_INIT_DONE bit had already been checked and cleared. ii) Cleanup the two separate PHY reset code paths, i.e. the full-chip reset in e1000_reset_hw_ich8lan() and the PHY-only reset in e1000_phy_hw_reset_ich8lan(). There was duplicate code in both paths to be performed post-reset that are now combined into one new function - e1000_post_phy_reset_ich8lan(). This cleanup also included moving the clearing of the PHY Reset Asserted bit in the STATUS register (now done for all ICH/PCH parts) and the check for the indication from h/w that basic configuration has completed back to where it previously was in e1000_get_cfg_done_ich8lan(). iii) Corrected a few comments Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12e1000e: move settting of flow control refresh timer to link setup codeBruce Allan3-4/+4
The flow control refresh timer value needs to be saved off so that it can be programmed into the approrpiate register when applicable but without a reset, e.g. when changing flow control parameters via ethtool. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-12e1000e: fix checks for manageability enabled and management pass-throughBruce Allan6-16/+52
The mac->arc_subsystem was being incorrectly used to flag whether or not manageability was enabled when it should only be used to state whether the ARC (Host interface) subsystem is available on a particular MAC _and_ only valid when any manageability is enabled. The ARC subsystem is currently only available on 80003es2lan and 82573 parts supported by the driver. A new flag, has_fwsm, is introduced to be used when checking if manageability is enabled but only on parts that acutally have an FWSM register. While the above parts have an FWSM register, there are other parts that have FWSM but do not have support for the ARC subsystem, namely 82571/2 and ICHx/PCH. And then there are parts that have manageability, but do not have either FWSM register or support for the ARC subsystem - these are 82574 and 82583. For 80003es2lan, 82571/2/3 and ICH/PCH parts, this patch makes no functional changes, it only corrects the usage of the manageability flags. For 82574 and 82583, it fixes the incorrect accesses of the non-existent FWSM register and ARC subsystem as well as corrects the check for management pass-through. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>