summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2010-09-14e1000e: Simplify MSI interrupt testingJean Delvare
The code is quite convoluted, simplify it. This also avoids calling e1000_request_irq() without testing the value it returned, which was bad. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Bruce Allan <bruce.w.allan@intel.com> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13uwb: use '%pM' format to print MAC addressAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13bnx2x: Spread rx buffers between allocated queuesDmitry Kravkov
Default number of rx buffers will be divided equally between allocated queues. This will decrease amount of pre-allocated buffers on systems with multiple CPUs. User can override this behavior with ethtool -G. Minimum amount of rx buffers per queue set to 128. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13cx82310_eth: allow empty URBsOndrej Zary
Empty received URBs are currently counted as errors but the device sends them sometimes as part of regular traffic - so remove this check. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13cx82310_eth: check usb_string() return value for errorOndrej Zary
Fix that usb_string() return value is not checked for error (negative value). Also change the ignore message a bit and lower its level to info. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13drivers/net/skfp: Remove pr_<level> uses of KERN_<level>Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13net/cxgb3: remove undefined operationsAndreas Schwab
Modifying an object twice without an intervening sequence point is undefined. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13net/de4x5: remove undefined operationsAndreas Schwab
Modifying an object twice without an intervening sequence point is undefined. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13sundance: Add power management hooksDenis Kirjanov
This patch to adds support for PM hooks into sundance driver Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13sfc: Fix order of channel_name array dimensionsBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-12bna: Check for NULL before deref in bnad_cb_tx_cleanupDavid S. Miller
Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Allow changing the DMA ring sizes dynamically via ethtoolBen Hutchings
This requires some reorganisation of channel setup and teardown to ensure that we can always roll-back a failed change. Based on work by Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Make the dmaq size a run-time setting (rather than compile-time)Steve Hodgson
- Allow the ring size to be specified in non power-of-two sizes (for instance to limit the amount of receive buffers). - Automatically size the event queue. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Allocate each channel separately, along with its RX and TX queuesBen Hutchings
This will allow for reallocation of channel structures and rings. Change module parameter separate_tx_channels to be read-only, since we now require its value to be constant. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Refactor channel and queue lookup and iterationBen Hutchings
In preparation for changes to the way channels and queue structures are allocated, revise the macros and functions used to look up and iterator over them. - Replace efx_for_each_tx_queue() with iteration over channels then TX queues - Replace efx_for_each_rx_queue() with iteration over channels then RX queues (with one exception, shortly to be removed) - Introduce efx_get_{channel,rx_queue,tx_queue}() functions to look up channels and queues by index - Introduce efx_channel_get_{rx,tx}_queue() functions to look up a channel's queues Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Abstract channel and index lookup for RX queuesBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Allocate DMA and event rings using GFP_KERNELBen Hutchings
Currently we allocate DMA descriptor rings and event rings using pci_alloc_consistent() which selects non-blocking behaviour from the page allocator (GFP_ATOMIC). This is unnecessary, and since we currently allocate a single contiguous block for each ring (up to 32 pages!) these allocations are likely to fail if there is any significant memory pressure. Use dma_alloc_coherent() and GFP_KERNEL instead. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Fix failure paths in efx_probe_port()Ben Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Remove declarations of functions that no longer existBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Accumulate RX_NODESC_DROP count in rx_dropped, not rx_over_errorsBen Hutchings
rx_over_errors appears to be intended as a count of packets that overflow a packet buffer in the NIC. Given that we implement a cut-through receive path, this should always be 0. rx_dropped appears to be the correct counter for packets dropped due to lack of host buffers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Use MCDI RX_BAD_FCS_PKTS count as MAC rx_bad countBen Hutchings
Calculating rx_bad as rx_packets - rx_good is unnecessary and incorrect, since rx_good does not include control frames (e.g. pause frames) and rx_packets does. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/mac80211/main.c
2010-09-09Merge branch 'vhost-net' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
2010-09-09drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.cNikitas Angelinas
Replace sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0]) with ARRAY_SIZE(bnx2x_parity_mask) in drivers/net/bnx2x/bnx2x_main.c Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09ipheth: remove incorrect devtype to WWANDan Williams
The 'wwan' devtype is meant for devices that require preconfiguration and *every* time setup before the ethernet interface can be used, like cellular modems which require a series of setup commands on serial ports or other mechanisms before the ethernet interface will handle packets. As ipheth only requires one-per-hotplug pairing setup with no preconfiguration (like APN, phone #, etc) and the network interface is usable at any time after that initial setup, remove the incorrect devtype wwan. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: change multi-line comments styleFlorian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: remove volatiles, switch to I/O accessorsFlorian Fainelli
Remove all the volatile keywords where they were used, switch to using the proper readl/writel accessors. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: fix asm -> linux headers inclusionFlorian Fainelli
Replace asm/io.h and asm/cpu.h wih linux/io.h and linux/cpu.h Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: fix bad printk usagesFlorian Fainelli
Use pr_(info|err) and pr_cont where required instead of calls to printk. Add missing pr_fmt to the driver. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: fix all but one "line over 80 characters warnings"Florian Fainelli
One line has not been changed because it would not improve readability. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: stylistic fixesFlorian Fainelli
This patch fixes the following checkpatch.pl warnings: - spaces after tabs - space between function and arguments - one-line statement braces - tabs instead of spaces Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09au1000-eth: typedefs removalFlorian Fainelli
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-09ixgbevf: remove private net_device_statsEric Dumazet
Use the net_device provided net_device_stats structure. Remove ixgbevf_get_stats() now its not needed. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
2010-09-08KS8851: Correct RX packet allocationEric Dumazet
Use netdev_alloc_skb_ip_align() helper and do correct allocation Tested-by: Abraham Arce <x0066660@ti.com> Signed-off-by: Abraham Arce <x0066660@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08atlx: make strings constStephen Hemminger
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Chris Snook <chris.snook@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08cxacru: ignore cx82310_eth devicesOndrej Zary
Ignore ADSL routers, which can have the same vendor and product IDs as ADSL modems but should be handled by the cx82310_eth driver. This intentionally ignores device IDs that aren't currently handled by cx82310_eth. There may be other device IDs that perhaps shouldn't be claimed by cxacru. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08ixgbevf: Removed unneeded HW struct membersGreg Rose
The VF has no flash and can only do memory mapped I/O. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08drivers/net/ixgbe/ixgbe_main.c: Add ixgbe_psumJoe Perches
Reduce indentation in a couple of places Add static function ixgbe_psum Add temporary for adapter->stats 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-09-08drivers/net/ixgbe/ixgbe_main.c: Use pr_<level>Joe Perches
Did not add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt because no printk in this module used message prefixing. 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-09-08drivers/net/ixgbe/ixgbe_main.c: Checkpatch cleanupsJoe Perches
Whitespace cleanups. Move inline keyword after function type declarations. 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-09-08ixgbe: fix TX ring enable issues seen when VMDQ is enabledAlexander Duyck
The ordering of operations was messed up in the init and as a result when VMDQ was enabled we were trying to enable TX rings before setting the VFTE bits. This resulted in a ring that appeared to fail to enable when in fact it was blocked because the VFTE bits were cleared after the reset. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08qeth: NAPI support for l2 and l3 disciplineFrank Blaschka
This patch adds NAPI support to the qeth layer 2 and layer 3 discipline. It is important to understand that we can not enable/disable IRQs as usual, we have to use the corresponding new QDIO interface. Also to not overdraw the budget we have to stop and restart buffer processing at any point during processing a bulk of QDIO buffers. Having the driver NAPI enabled it is possible to turn on GRO for the layer 3 discipline. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08Kconfig: have CCWGROUP depend on CLAWMike Frysinger
Since the claw code calls ccwgroup_remove_ccwdev(), we need to make sure CCWGROUP is enabled when CLAW is enabled. Otherwise we hit fun undefined references at build time: ERROR: "ccwgroup_remove_ccwdev" [drivers/s390/net/claw.ko] undefined! ERROR: "ccwgroup_probe_ccwdev" [drivers/s390/net/claw.ko] undefined! ERROR: "ccwgroup_driver_register" [drivers/s390/net/claw.ko] undefined! ERROR: "ccwgroup_driver_unregister" [drivers/s390/net/claw.ko] undefined! ERROR: "ccwgroup_create_from_string" [drivers/s390/net/claw.ko] undefined! Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08qeth: Use %pI6Joe Perches
Format an ipv6 address using vsprintf extensions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08qdio: extend API to allow pollingJan Glauber
Extend the qdio API to allow polling in the upper-layer driver. This is needed by qeth to use NAPI. To use the new interface the upper-layer driver must specify the queue_start_poll(). This callback is used to signal the upper-layer driver that is has initiative and must process the inbound queue by calling qdio_get_next_buffers(). If the upper-layer driver wants to stop polling it calls qdio_start_irq(). Since adapter interrupts are not completely stoppable qdio implements a software bit QDIO_QUEUE_IRQS_DISABLED to safely disable interrupts for an input queue. The old interface is preserved and will be used as is by zfcp. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08e1000: fix Tx hangs by disabling 64-bit DMAJesse Brandeburg
Several users report issues with 32-bit adapters when plugged into PCI slots in machines with >= 4GB ram. In particular AMD systems with HyperTransport to PCI bridges seem to trigger the issue, but it isn't limited to only them. This issue is not easily reproducible here, yet still continues to occur in the field. For e1000 on PCI devices, just disable DMA addresses over the 4GB boundary when in PCI (not PCI-X) mode, to prevent the issue from continuing to pop up. The performance impact for this is negligible. The code was refactored to move the init of the hw struct to its own function. This allows the init to be called very early in probe, which then allows using hw-> members for this fix. A slight refactor to the DMA mask code was done for minor correctness based on the instructions in DMA-API-HOWTO. 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-09-08drivers: isdn: capi: use simple_strtol to convert numbersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Tilman Schmidt <tilman@imap.cc> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08niu: Fix kernel buffer overflow for ETHTOOL_GRXCLSRLALLBen Hutchings
niu_get_ethtool_tcam_all() assumes that its output buffer is the right size, and warns before returning if it is not. However, the output buffer size is under user control and ETHTOOL_GRXCLSRLALL is an unprivileged ethtool command. Therefore this is at least a local denial-of-service vulnerability. Change it to check before writing each entry and to return an error if the buffer is already full. Compile-tested only. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-08introduce cx82310_eth: Conexant CX82310-based ADSL router USB ethernet driverOndrej Zary
This patch introduces cx82310_eth driver - driver for USB ethernet port of ADSL routers based on Conexant CX82310 chips. Such routers usually have ethernet port(s) too which are bridged together with the USB ethernet port, allowing the USB-connected machine to communicate to the network (and also internet through the ADSL, of course). This is my first driver, so please check thoroughly. As there's no protocol documentation, it was done with usbsnoop dumps from Windows driver, some parts (the commands) inspired by cxacru driver and also other usbnet drivers. The driver passed my testing - some real work and also pings sized from 0 to 65507 B. The only problem I found is the ifconfig error counter. When I return 0 (or 1 but empty skb) from rx_fixup(), usbnet increases the error counter although it's not an error condition (because packets can cross URB boundaries). Maybe the usbnet should be fixed to allow rx_fixup() to return empty skbs (or some other value, e.g. 2)? The USB ID of my device is 0x0572:0xcb01 which conflicts with some ADSL modems using cxacru driver (they probably use the same chipset but simpler firmware). The modems seem to use bDeviceClass 0 and iProduct "ADSL USB MODEM", my router uses bDeviceClass 255 and iProduct "USB NET CARD". The driver matches only devices with class 255 and checks for the iProduct string during init. I already posted a patch for the cxacru driver to ignore these devices. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: David S. Miller <davem@davemloft.net>