summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵David S. Miller2008-09-2535-444/+331Star
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * iwlwifi: don't fail if scan is issued too earlyTomas Winkler2008-09-242-11/+12
| | | | | | | | | | | | | | | | | | | | This patch returns success and empty scan on scans requests that were rejected because issued too early. The cached bss list from previous scanning will be returned by mac80211. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlagn: downgrade BUG_ON in interruptJohannes Berg2008-09-241-4/+3Star
| | | | | | | | | | | | | | | | | | | | This BUG_ON really shouldn't trigger, but if it does, as on my machine, it leaves you wondering what happened because you won't see it. Let's instead leak a bit of state and memory and at least make it possible to report it to the kerneloops project to track it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * pcmcia: Fix up legacy driver IRQsAlan Cox2008-09-248-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCMCIA layer obsoleted asking for per device private IRQS some years ago and all the drivers by inspection correctly use dev_id and handle shared interrupts [they get em anyway in most PCI bridged PCMCIA/Cardbus] so can be adjusted. This gets rid of the various bugs reported where there is spewage about conflicting irq types and sometimes the driver won't load. (Note I don't have all of these devices to test each one beyond by inspection) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rt2x00: Fix HW crypto key handlingIvo van Doorn2008-09-243-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | When a crypto key is being removed, rt2x00mac should not reset the key->hw_key_idx value because that will prevent the driver from removing the correct key from the hardware. Furthermore ffz() starts counting at 0 instead of 1, so we don't need to substract 1 from the resulting value. Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Add a few comments about mibeventsLuis R. Rodriguez2008-09-241-2/+16
| | | | | | | | | | Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: clean up rate control APIJohannes Berg2008-09-246-304/+146Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long awaited, hard work. This patch totally cleans up the rate control API to remove the requirement to include internal headers outside of net/mac80211/. There's one internal use in the PID algorithm left for mesh networking, we'll have to figure out a way to clean that one up and decide how to do the peer link evaluation, possibly independent of the rate control algorithm or via new API. Additionally, ath9k is left using the cross-inclusion hack for now, we will add new API where necessary to make this work properly, but right now I'm not expert enough to do it. It's still off better than before. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Fix TSF Adjust usageSujith2008-09-241-1/+2
| | | | | | | | | | | | | | | | | | TSF adjust is needed only for AP mode when staggered beacons are used. Since we support only a single interface in IBSS mode, disable setting the TSF adjust register. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Fix nexttbtt calculationSujith2008-09-242-3/+7
| | | | | | | | | | | | | | | | | | nexttbtt has to be obtained from the timestamp of the beacon obtained from mac80211. Fix this. And <asm/unaligned.h> is not needed anymore. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Whitespace cleanupSujith2008-09-241-76/+60Star
| | | | | | | | | | | | | | Also, remove comments that are not relevant anymore. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: remove HT flags from RXON when not in HT anymoreEmmanuel Grumbach2008-09-242-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the HT flags from RXON when moving from HT to legacy. This avoids keeping those flags set and possibly miss configuring firmware. If we are configured in HT, fat channel: channel 1 above, and move later to legacy channel 11, we need to clear the FAT channel control flags in RXON. If we don't, the firmware will understand this as channel 11 above which is not possible due to regulatory constraints, leading to firmware crash. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * libertas: Reduce the WPA key installation time (fixups)Javier Cardona2008-09-242-3/+24
| | | | | | | | | | | | | | | | | | This patch addresses comments from Dan Williams about the patch committed as "libertas: Reduce the WPA key installation time." Signed-off-by: Javier Cardona <javier@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath5k: Fix bad udelay calls on AR5210 codeNick Kossifidis2008-09-243-10/+14
| | | | | | | | | | | | | | | | | | | | * Fix bad udelay calls (using > 2000us) in AR5210 code and clean up some bits on nic_reset (AR5210 support is still in bad shape) Changes-licensed-under: ISC Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: make PS use named constantsTomas Winkler2008-09-241-7/+12
| | | | | | | | | | | | | | | | | | This patch adds named constants for configuring MIMO power save chain settings. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: don't delay scan in IBSS modeTomas Winkler2008-09-241-2/+4
| | | | | | | | | | | | | | | | | | Scan need to be delayed only after association to allow EAPOL exchange. We don't need the delay for IBSS mode. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * b43: Issue warning when RFKILL_INPUT is not enabledLarry Finger2008-09-241-0/+5
| | | | | | | | | | | | | | | | | | If the system is misconfigured with CONFIG_RFKILL set but CONFIG_RFKILL_INPUT not set, the built-in radio LEDs will not work. In the current code, no warning is issued. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * wireless: Read scan flags correctly on x86-64David Kilroy2008-09-244-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SIOCSIWSCAN handler is passed data in an iw_point structure. Some drivers erronously use an iw_param instead. On 32 bit architectures the difference isn't noticed as the flags parameter tends to be the only one used by scan handlers and is at the same offset. On 64 bit architectures the pointer in the iw_point structure means the flag parameter is at different offsets in these structures. Thanks to Jean Tourrilhes for tracking this down for orinoco, and Pavel Roskin for confirming the fix and identifying other suspect handlers. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Revert "ehea: fix mutex and spinlock use"David S. Miller2008-09-251-4/+22
| | | | | | | | | | | | | | | | This reverts commit 2eefbd63d0c85daa1317636474c226e236beba81. On request by driver author and Jeff Garzik. Signed-off-by: David S. Miller <davem@davemloft.net>
* | e1000: remove unused Kconfig option for disabling packet splitBrandeburg, Jesse2008-09-253-433/+9Star
| | | | | | | | | | | | | | | | | | Since the e1000/e1000e split, no hardware supported by e1000 supports packet split, just remove the Kconfig option and associated code from the driver. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | drivers/net/bonding: sparse fixes for exported tablesBen Dooks2008-09-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following sparse warnings are being generated because bonding.h is missing definitons for items declared in bond_main.c but also used in bond_sysfs.h Also export bond_dev_list as this is also declared in bond_main but used elsewhere in drivers/net/bonding. bond_main.c:105:20: warning: symbol 'bonding_defaults' was not declared. Should it be static? bond_main.c:148:1: warning: symbol 'bond_dev_list' was not declared. Should it be static? bond_main.c:162:22: warning: symbol 'bond_lacp_tbl' was not declared. Should it be static? bond_main.c:168:22: warning: symbol 'bond_mode_tbl' was not declared. Should it be static? bond_main.c:179:22: warning: symbol 'xmit_hashtype_tbl' was not declared. Should it be static? bond_main.c:186:22: warning: symbol 'arp_validate_tbl' was not declared. Should it be static? bond_main.c:194:22: warning: symbol 'fail_over_mac_tbl' was not declared. Should it be static? Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | [netdrvr] convert sbmac tx to spin_lock_irqsave to prevent early IRQ enableWeiwei Wang2008-09-251-5/+7
| | | | | | | | | | | | | | | | | | | | Netpoll will call the interrupt handler with interrupts disabled when using kgdboe, so spin_lock_irqsave() should be used instead of spin_lock_irq() to prevent interrupts from being incorrectly enabled. Signed-off-by: Weiwei Wang <weiwei.wang@windriver.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | fs-enet: remove code associated with !CONFIG_PPC_MERGEKumar Gala2008-09-255-89/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | netdev: drop CONFIG_PPC_MERGE from KconfigKumar Gala2008-09-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that arch/ppc is dead CONFIG_PPC_MERGE is always defined for all powerpc platforms so we don't need to depend on it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | atl2: add tx bytes statisticJay Cliburn2008-09-251-1/+3
| | | | | | | | | | Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | forcedeth fix: take phy out of reset during power upAyaz Abdulla2008-09-251-1/+1
| | | | | | | | | | | | | | | | | | This patch will add the phy reset bit into the power up mask which is used during power up. Certain BIOSes will place the phy in reset and therefore the driver must take the phy out of reset when it loads. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | e1000e: avoid duplicated output of device name in kernel warningFrans Pop2008-09-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 2.6.27-rc3 I noticed the following messages in my boot log: 0000:01:00.0: 0000:01:00.0: Warning: detected DSPD enabled in EEPROM 0000:01:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:76:04:ff:09 The second seems correct, but the first has a silly repetition of the PCI device before the actual message. The message originates from e1000_eeprom_checks in e1000e/netdev.c. With this patch below the first message becomes e1000e 0000:01:00.0: Warning: detected DSPD enabled in EEPROM which makes it similar to directly preceding messages. Use dev_warn instead of e_warn in e1000_eeprom_checks() as the interface name has not yet been assigned at that point. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | atl1e: remove the unneeded (struct atl1e_adapter *)Jie Yang2008-09-251-3/+3
| | | | | | | | | | | | | | | | | | Remove the unneeded (struct atl1e_adapter *) casts, for hw->adapter already has type atl1e_adapter *. Signed-off-by: Jie Yang <jie.yang@atheros.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | gianfar: free/iounmap memory after an error in mii bus initializationAndy Fleming2008-09-251-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes to MII bus initialization code added exit points which didn't free or iounmap the bus before returning. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11372. Signed-off-by: Andy Fleming <afleming@freescale.com> Reported-by: Daniel Marjamki <danielm77@spray.se> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | ne.c: fix rmmod, platform driver improvementsDavid Fries2008-09-251-108/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing the module would cause a kernel oops as platform_driver_probe failed to detect a device and unregistered the platform driver on module init, and cleanup_module would unregister the already unregistered driver. The suspend and resume functions weren't being called. platform_driver support was added earlier, but without any platform_device_register* calls I don't think it was being used. Now all devices are registered using platform_device_register_simple and pointers are kept to unregister the ones that the probe failed for or unregister all devices on module shutdown. init_module no longer calls ne_init to reduce confusion (and multiple unregister paths that caused the rmmod oops). With the devices now registered they are added to the platform driver and get suspend and resume events. netif_device_detach(dev) was added before unregister_netdev(dev) when removing the region as occationally I would see a race condition where the device was still being used in unregister_netdev. Signed-off-by: David Fries <david@fries.net> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | gianfar: Fix error in mdio reset timeoutTrent Piepho2008-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop with the timeout used "while (... && timeout--)", which means than when the timeout occurs, "timeout" will be -1 after the loop has exited. The code that checks if the looped exited because of a timeout used "if (timeout <= 0)". Seems ok, except timeout is unsigned, and (unsigned)-1 isn't less than zero! Using "--timeout" in the loop fixes this problem, as now "timeout" will be 0 when the loop times out. This also fixes a bug in the existing code, where it will erroneously think a timeout occurred if the condition the loop was waiting for is satisfied on the final iteration before a timeout. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | e1000e: remove failed request for sw/fw/hw flagBruce Allan2008-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When the driver fails to acquire the control flag used to serialize NVM and PHY accesses between the driver, firmware and hardware, remove the request for the flag otherwise the hardware might grant the flag when it becomes available but the driver will not release the flag. This could cause the firmware to prevent the driver getting the flag for all future attempts. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | enic: bug fix: don't set netdev->name too earlyScott Feldman2008-09-252-76/+47Star
| | | | | | | | | | | | | | | | | | | | | | Bug fix: don't set netdev->name early before netdev registration. Setting netdev->name early with dev_alloc_name() would occasionally cause netdev registration to fail returning error that device was already registered. Since we're using netdev->name to name MSI-X vectors, we now need to move the request_irq after netdev registartion, so move it to ->open. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | enic: Bug fix: Free MSI intr with correct data handleScott Feldman2008-09-251-3/+5
| | | | | | | | | | | | | | | | Bug fix: Free MSI intr with correct data handle Use davem proposed naming for MSI-X tx/rx vectors (ethX-tx-0, ethX-rx-0) Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | enic: fixes for review items from Ben HutchingsScott Feldman2008-09-252-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for review items from Ben Hutchings: - use netdev->net_stats rather than private net_stats - use ethtool op .get_sset_count rather than .get_stats_count - err out if setting Tx/Rx csum or TSO using ethtool and setting is not enabled for device. - pass in jiffies + constant to round_jiffies - return err if new MTU is out-of-bounds Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | enic: Don't indicate IPv6 pkts using soft-LROScott Feldman2008-09-251-2/+2
| | | | | | | | | | | | | | | | | | LRO is only applied to IPv4 pkts, so don't use the LRO indication functions for anything other IPv4 pkts. Every non-IPv4 pkt is indicated using non- LRO functions. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | r6040: fix wrong assignment in r6040_free_txbufsFlorian Fainelli2008-09-251-1/+1
| | | | | | | | | | | | | | | | | | This patch fixes a wrong assignment in r6040_free_txbufs on a receive skb pointer while we should actually do this on the transmit skb pointer. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | Merge branch 'for-2.6.28' of git://git.marvell.com/mv643xx_eth into ↵Jeff Garzik2008-09-253-744/+785
|\ \ | | | | | | | | | upstream-next
| * | mv643xx_eth: bump version to 1.4Lennert Buytenhek2008-09-191-1/+1
| | | | | | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: convert to phylibLennert Buytenhek2008-09-192-145/+105Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch mv643xx_eth from using drivers/net/mii.c to using phylib. Since the mv643xx_eth hardware does all the link state handling and PHY polling, the driver will use phylib in the "Doing it all yourself" mode described in the phylib documentation. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com>
| * | phylib: allow incremental scanning of an mii busLennert Buytenhek2008-09-191-41/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits the bus scanning code in mdiobus_register() off into a separate function, and makes this function available for calling from external code. This allows incrementally scanning an mii bus, e.g. as information about which addresses are 'safe' to scan becomes available. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com>
| * | mv643xx_eth: enforce frequent hardware statistics pollingLennert Buytenhek2008-09-191-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | If we don't poll the hardware statistics counters at least once every ~34 seconds, overflow might occur without us noticing. So, set up a timer to poll the statistics counters at least once every 30 seconds. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: deal with unexpected ethernet header sizesLennert Buytenhek2008-09-191-48/+47Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the IP header doesn't start 14, 18, 22 or 26 bytes into the packet (which are the only four cases that the hardware can deal with if asked to do IP checksumming on transmit), invoke the software checksum helper instead of letting the packet go out with a corrupt checksum inserted into the packet in the wrong place. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: fix receive checksummingLennert Buytenhek2008-09-191-6/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to explicitly tell the hardware to include the pseudo-header when doing receive checksumming, otherwise hardware checksumming will fail for every received packet and we'll end up setting CHECKSUM_NONE on every received packet. While we're at it, when skb->ip_summed is set to CHECKSUM_UNNECESSARY on received packets, skb->csum is supposed to be undefined, and thus there is no need to set it. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: add support for chips without transmit bandwidth controlLennert Buytenhek2008-09-141-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | Add support for mv643xx_eth versions that have no transmit bandwidth control registers at all, such as the ethernet block found in the Marvell 88F6183 ARM SoC. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: avoid reading ->byte_cnt twice during receive processingLennert Buytenhek2008-09-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the receive processing reads ->byte_cnt twice (once to update interface statistics and once to properly size the data area of the received skb), but since receive descriptors live in uncached memory, caching this value in a local variable saves one uncached access, and increases routing performance a tiny little bit more. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: shrink default receive and transmit queue sizesLennert Buytenhek2008-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the size of the receive queue is directly related to the data cache footprint of the driver (between refilling a receive ring entry with a fresh skb and receiving a packet in that entry, queue_size - 1 other skbs will have been touched), shrink the default receive queue size to a saner number of entries, as 400 is definite overkill for almost all workloads. While we are at it, trim the default transmit queue size a bit as well. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: replace array of skbs awaiting transmit completion with a queueLennert Buytenhek2008-09-141-29/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the skb pointer array that we currently use for transmit reclaim, and replace it with an skb queue, to which skbuffs are appended when they are passed to the xmit function, and removed from the front and freed when we do transmit queue reclaim and hit a descriptor with the 'owned by device' bit clear and 'last descriptor' bit set. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: avoid dropping tx lock during transmit reclaimLennert Buytenhek2008-09-141-15/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By moving DMA unmapping during transmit reclaim back under the netif tx lock, we avoid the situation where we read the DMA address and buffer length from the descriptor under the lock and then not do anything with that data after dropping the lock on platforms where the DMA unmapping routines are all NOPs (which is the case on all ARM platforms that mv643xx_eth is used on at least). This saves two uncached reads, which makes a small but measurable performance difference in routing benchmarks. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: switch to netif tx queue lock, get rid of private spinlockLennert Buytenhek2008-09-141-30/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since our ->hard_start_xmit() method is already called under spinlock protection (the netif tx queue lock), we can simply make that lock cover the private transmit state (descriptor ring indexes et al.) as well, which avoids having to use a private lock to protect that state. Since this was the last user of the driver-private spinlock, it can be killed off. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * | mv643xx_eth: move all work to the napi poll handlerLennert Buytenhek2008-09-141-246/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move link status handling, transmit reclaim and TX_END handling from the interrupt handler to the napi poll handler. This allows switching ->lock over to a non-IRQ-safe lock and removes all explicit interrupt disabling from the driver. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>