aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* e1000e: avoid duplicated output of device name in kernel warningFrans Pop2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-24
| | | | | | | | | 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-24
| | | | | | | | | | | | | 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-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-24
| | | | | | | | | | | | | | | | | | | 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-24
| | | | | | | | | | | | | 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-24
| | | | | | | | | | | 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-24
| | | | | | | | 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-24
| | | | | | | | | | | | | 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-24
| | | | | | | | | 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-24
| | | | | | | | | 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>
* qeth: avoid qeth recovery problemsUrsula Braun2008-09-24
| | | | | | | | | | | | | Do not touch IFF_UP flag during qeth recovery, but invoke dev_close() in case of failing recovery. Cancel outstanding control commands in case of Data Checks or Channel Checks. Do not invoke qeth_l2_del_all_mc() in case of a hard stop to speed up removal of qeth devices. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* qeth: use firmware MAC-address for layer2 hsi-devicesUrsula Braun2008-09-24
| | | | | | | | | | Real HiperSocket devices in layer2 mode have a firmware-created MAC-address. This change enables the qeth driver to use this firmware MAC-address for layer2 HiperSocket devices. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> 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-24
|\ | | | | | | upstream-next
| * mv643xx_eth: bump version to 1.4Lennert Buytenhek2008-09-19
| | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: convert to phylibLennert Buytenhek2008-09-19
| | | | | | | | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: transmit multiqueue supportLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | | | | | As all the infrastructure for multiple transmit queues already exists in the driver, this patch is entirely trivial. The individual transmit queues are still serialised by the driver's per-port private spinlock, but that will disappear (i.e. be replaced by the per-subqueue ->_xmit_lock) in a subsequent patch. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: delete unused and uninteresting interrupt source mask bitsLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete a couple of unused and uninteresting interrupt source mask bits: - The receive resource underrun interrupt sources are uninteresting because if we are in out-of-memory mode, we are already dealing with the issue, and we don't need the hardware to remind us again that we are out of memory. - The LINK and PHY interrupt sources can be coalesced into one define, since we always use them together. - The transmit resource underrun interrupt source can be disabled since we never activate the head descriptor of a paged skb until the fragments are all activated, so transmit underrun during a packet should never happen. - The INT_EXT_TX_0 define is never used. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: get rid of netif_{stop,wake}_queue() calls on link down/upLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | There is no need to call netif_{stop,wake}_queue() when the link goes down/up, as the networking already takes care of this internally. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: remove force_phy_addr fieldLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there are two different fields in the mv643xx_eth_platform_data struct that together describe the PHY address -- one field (phy_addr) has the address of the PHY, but if that address is zero, a second field (force_phy_addr) needs to be set to distinguish the actual address zero from a zero due to not having filled in the PHY address explicitly (which should mean 'use the default PHY address'). If we are a bit smarter about the encoding of the phy_addr field, we can avoid the need for a second field -- this patch does that. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: smi sharing is a per-unit property, not a per-port oneLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | Which top-level unit's SMI interface to use should be a property of the top-level unit, not of the individual ports. This patch moves the ->shared_smi pointer from the per-port platform data to the global platform data. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: require contiguous receive and transmit queue numberingLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | Simplify receive and transmit queue handling by requiring the set of queue numbers to be contiguous starting from zero. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: get rid of compile-time configurable transmit checksummingLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | Get rid of the mv643xx_eth-internal MV643XX_ETH_CHECKSUM_OFFLOAD_TX compile-time option. Using transmit checksumming is the sane default, and anyone wanting to disable it should use ethtool(8) instead of recompiling their kernels. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: get rid of receive-side lockingLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | | | | | By having the receive out-of-memory handling timer schedule the napi poll handler and then doing oom processing from the napi poll handler, all code that touches receive state moves to napi context, letting us get rid of all explicit locking in the receive paths since the only mutual exclusion we need anymore at that point is protection against reentering ourselves, which is provided by napi synchronisation. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: make napi unconditionalLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | Make napi unconditional on the receive side, so that we can get rid of all the locking and local interrupt disabling in the receive path. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: use the SMI done interrupt to wait for SMI access completionLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | If the platform code has passed us the IRQ number of the mv643xx_eth top-level error interrupt, use the error interrupt to wait for SMI access completion instead of polling the SMI busy bit, since SMI bus accesses can take up to tens of milliseconds. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: switch ->phy_lock from a spinlock to a mutexLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | | | | | | | Since commit 81600eea98789da09a32de69ca9d3be8b9503c54 ("mv643xx_eth: use auto phy polling for configuring (R)(G)MII interface"), mv643xx_eth no longer does SMI accesses from interrupt context. The only other callers that do SMI accesses all do them from process context, which means we can switch the PHY lock from a spinlock to a mutex, and get rid of the extra locking in some ethtool methods. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: get rid of modulo operationsLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | Get rid of the modulo operations that are currently used for computing successive TX/RX descriptor ring indexes. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: get rid of IRQF_SAMPLE_RANDOMLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | Using IRQF_SAMPLE_RANDOM for the mv643xx_eth interrupt handler significantly increases interrupt processing overhead, so get rid of it. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: fix receive buffer DMA unmappingLennert Buytenhek2008-09-05
| | | | | | | | | | | | | | | | When tearing down a DMA mapping for a receive buffer, we should pass dma_unmap_single() the exact same address that dma_map_single() gave us when we originally set up the mapping. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: fix 'netdev_priv(dev) == dev->priv' assumptionLennert Buytenhek2008-09-05
| | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
* | Merge branch 'davem-next' of ↵David S. Miller2008-09-24
|\ \ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
| * | bonding: add more ethtool supportStephen Hemminger2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows reporting the link, checksum, and feature settings of bonded device by using generic hooks. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | netxen: enable msi-x for quad-gig boardsDhananjay Phadke2008-09-24
| | | | | | | | | | | | | | | | | | | | | NX3031 firmware now supports MSI-X interrupts on Quad GbE boards. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | sundance: set carrier status on link change eventsDan Nicholson2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if the link is available when a changed interrupt has been received and set the carrier status appropriately. The code is copied nearly verbatim from the dl2k module. The link status could be used in more places in the driver, but this is enough to get the carrier status reported to userspace. Fixes kernel bug #7487: http://bugzilla.kernel.org/show_bug.cgi?id=7487 [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | drivers/net: replace __FUNCTION__ with __func__Harvey Harrison2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ehea: Enable DLPAR memory removeHannes Hering2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the capability flag to the capability list for dynamic LPAR memory remove to enable this feature. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | [netdrvr] usb/hso: throttle to prevent loss of serial dataDenis Joseph Barrow2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch to stop loss of characters on the hso modems, this patch throttles & unthrottles the modem by not putting out urbs until the tty/line discipline layer has enough space for newly received packets. serial ports. This is required for firmware diagnostics being done at Option. Signed-off-by: Denis Joseph Barrow <D.Barow@option.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | myri10ge: use DCA if DCA is compiled as a moduleBrice Goglin2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use DCA in myri10ge when CONFIG_DCA_MODULE is set as well. And thus force INTEL_IOATDMA to =y so that DCA=y if we are =y. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>