Commit graph

17491 commits

Author SHA1 Message Date
Geoff Levand
d4d7f1f911 net/ps3: Cleanup gelic enums
Cleanup of the gelic driver enumerations:

 o Add some missing commas.
 o Add an Ether port post fix (PS3 currently only supports PORT_0).
 o Add a new enum gelic_lv1_phy to use when interacting with the PHY.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:52:30 -08:00
Ajit Khaparde
0dffc83e5b be2net: fix unnecessary access to hardware to get link, port info
Every time while doing ethtool->get_settings we are accessing
the hardware to get link status and port information.
This is not necessary.  We now use the cached copy for this info
and update it when the link status changes.

From: Suresh R <sureshr@serverengines.com>

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:26 -08:00
Ajit Khaparde
b7b83ac39a be2net: Add be_rx_polls counter
Add be_rx_polls to count number of times NAPI called rx poll function.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:26 -08:00
Ajit Khaparde
ca66ef500b be2net: fix to allow port beacon when device is closed
port identification/beaconing is failing if device open has not been done.
Fixing it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:25 -08:00
Ajit Khaparde
ca9e4988cc be2net: check for valid ether address
Allow only valid ether addresses to be assigned and used for the interface.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:25 -08:00
Ajit Khaparde
35a652859a be2net: initialize netdev->perm_addr
patch to initialize netdev->perm_addr

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:24 -08:00
Ajit Khaparde
51c59870f3 be2net: set netdev->vlan_features appropriately
patch to initialize netdev->vlan_features appropriately.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:50:24 -08:00
Roel Kluin
8528b016d6 e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()
Don't use the sizeof the pointer to clear the result

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 00:35:56 -08:00
Bruce Allan
07f025e6ba e1000e: PHY type cleanups in e1000e_check_downshift()
Remove the case for 82577 because it does not support the ability to check
for downshift.  Add case for e1000_phy_bm which can do this.

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>
2009-12-02 00:35:55 -08:00
Bruce Allan
9b71b419a6 e1000e: add debug messages
Add some helpful debug messages.

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>
2009-12-02 00:35:54 -08:00
Bruce Allan
5ff5b66435 e1000e: comment corrections
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>
2009-12-02 00:35:54 -08:00
Bruce Allan
9e135a2e62 e1000e: enable new 82567V-3 device
This new PCI device ID is for a new combination of MAC and PHY both of
which already have supporting code in the driver, just not yet in this
combination.  During validation of the device, an intermittent issue was
discovered with waking it from a suspended state which can be resolved with
the pre-existing workaround to disable gigabit speed prior to suspending.

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>
2009-12-02 00:35:53 -08:00
Bruce Allan
1a40d5c170 e1000e: ensure the link state is correct for serdes links
This patch ensures that the link state (as reported in
mac->serdes_has_link) will transition to false when autoneg fails to
complete but valid codewords were detected.

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>
2009-12-02 00:35:53 -08:00
Bruce Allan
17f208deb9 e1000e: provide family-specific PHY power up/down operations
The different families (80003es2lan, 8257x, ICHx/PCH) supported by the
driver each have their own conditions when the PHY can be powered down.
This patch rewrites the PHY power up/down code to fit with the family-
specific style used in the driver.  All pre-existing calls to power up or
down the PHY remain untouched.  A new call to power down the PHY when
removing the driver when the interface is down replaces the current call
to reset the PHY in order to reduce power consumption.

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>
2009-12-02 00:35:52 -08:00
Bruce Allan
eb656d4552 e1000e: guard against buffer overflow in cable length tables
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>
2009-12-02 00:35:52 -08:00
Bruce Allan
caaddaf835 e1000e: provide family-specific functions to manage VLAN filter arrays
The two MAC-families that have VLAN filter table register arrays manage
each a bit differently from one another, so provide family-specific
functions for managing the register arrays and function pointers to access
the appropriate function.  Also make sure attempts to access these
register arrays are not done on parts not supporting that feature.

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>
2009-12-02 00:35:51 -08:00
David S. Miller
ff9c38bba3 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/mac80211/ht.c
2009-12-01 22:13:38 -08:00
Eric W. Biederman
aaab3405e0 net: Simplify pppol2tp pernet operations.
Take advantage of the new pernet automatic storage management,
and stop using compatibility network namespace functions.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 16:15:57 -08:00
Eric W. Biederman
c879a6fcd6 net: Simplify pppoe pernet operations.
Take advantage of the new pernet automatic storage management,
and stop using compatibility network namespace functions.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 16:15:56 -08:00
Eric W. Biederman
741a6fa210 net: Simplify ppp_generic pernet operations.
Take advantage of the new pernet automatic storage management,
and stop using compatibility network namespace functions.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 16:15:56 -08:00
Eric W. Biederman
15449745e5 net: Simplify the bond drivers pernet operations.
Take advantage of the new pernet automatic storage management,
and stop using compatibility network namespace functions.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 16:15:53 -08:00
Eric W. Biederman
999b6d39ab net: Simplify loopback and improve batching.
Defer calling unregister_netdevice_queue to cleanup_net.  It's simpler
and it allows the loopback device to land in the same batch as other
network devices.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 16:15:52 -08:00
Linus Torvalds
29e553631b Merge branch 'security' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
* 'security' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6:
  mac80211: fix spurious delBA handling
  mac80211: fix two remote exploits
2009-11-30 16:47:16 -08:00
Johannes Berg
827d42c9ac mac80211: fix spurious delBA handling
Lennert Buytenhek noticed that delBA handling in mac80211
was broken and has remotely triggerable problems, some of
which are due to some code shuffling I did that ended up
changing the order in which things were done -- this was

  commit d75636ef9c
  Author: Johannes Berg <johannes@sipsolutions.net>
  Date:   Tue Feb 10 21:25:53 2009 +0100

    mac80211: RX aggregation: clean up stop session

and other parts were already present in the original

  commit d92684e660
  Author: Ron Rindjunsky <ron.rindjunsky@intel.com>
  Date:   Mon Jan 28 14:07:22 2008 +0200

      mac80211: A-MPDU Tx add delBA from recipient support

The first problem is that I moved a BUG_ON before various
checks -- thereby making it possible to hit. As the comment
indicates, the BUG_ON can be removed since the ampdu_action
callback must already exist when the state is != IDLE.

The second problem isn't easily exploitable but there's a
race condition due to unconditionally setting the state to
OPERATIONAL when a delBA frame is received, even when no
aggregation session was ever initiated. All the drivers
accept stopping the session even then, but that opens a
race window where crashes could happen before the driver
accepts it. Right now, a WARN_ON may happen with non-HT
drivers, while the race opens only for HT drivers.

For this case, there are two things necessary to fix it:
 1) don't process spurious delBA frames, and be more careful
    about the session state; don't drop the lock

 2) HT drivers need to be prepared to handle a session stop
    even before the session was really started -- this is
    true for all drivers (that support aggregation) but
    iwlwifi which can be fixed easily. The other HT drivers
    (ath9k and ar9170) are behaving properly already.

Reported-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-30 13:55:51 -05:00
David S. Miller
0cae200eec b44: Fix wedge when using netconsole.
Fixes kernel bugzilla #14691

Due to the way netpoll works, it is perfectly legal to see
NAPI already scheduled when new device events are pending
in b44_interrupt().

So logging a message about it is wrong and in fact harmful.

Based upon a patch by Andreas Mohr.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-30 00:13:28 -08:00
Dan Carpenter
40be261dfd wan: cosa: drop chan->wsem on error path
The other paths all drop chan->wsem.  This was found by a static
checker (smatch).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-30 00:06:51 -08:00
Florian Fainelli
3c91c7ae84 ep93xx-eth: check for zero MAC address on probe, not on device open
If we happen to have registered the driver without passing
a MAC address, we will print a zero MAC address and register
the interface with this invalid address, this is confusin. This
patch moves the checking of a valid ethernet address and the
generation of a random one down from the open function to
the probe function.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 23:50:32 -08:00
Russell King - ARM Linux
d5ccd67bb7 NET: smc91x: Fix irq flags
smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt
flags to be taken from the resource structure.  However, d280ead
changed this to checking for non-zero resource flags.

Unfortunately, this means that on some platforms, we end up passing
'-1' to request_irq rather than the desired result.  Combine the two
conditions into one so that the IRQ flags are taken from the resource
if either SMC_IRQ_FLAGS is -1 or the resource flags specify an
interrupt trigger.

This restores network on at least the Versatile platform.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 23:47:14 -08:00
Rudy Matela
6f7ad1e3a2 wan: Coding style correction in HDLC/Frame Relay support routines
Added a space separating some if keywords from the following
parenthesis to conform to the CodingStyle.

Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 23:42:42 -08:00
Rudy Matela
48b3d3efbd wan: Frame Relay/DLCI coding style corrections.
Added a space separating some keywords (if/while) from the following
parenthesis to conform to the CodingStyle.

Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 23:42:14 -08:00
Steve Glendinning
6c53b1b15e smsc9420: prevent BUG() if ethtool is called with interface down
This patch fixes a null pointer dereference BUG() if ethtool is used on
an smsc9420 interface while it is down, because the phy_dev is only
allocated while the interface is up.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 23:14:45 -08:00
Ivan Vecera
cc098dc705 r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
The newer chipsets (all PCI-E) are known that they need full power cycle
(AC or battery removal) to reset MAC address to a  hardwired one. Previous
patch to address this problem loads the original MAC address from EEPROM.
But it brought other problem for which it is necessary to introduce a new
module parameter.
However, it might suffice to restore the initial MAC address before
shutdown/reboot/kexec and when removing the module.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 23:12:52 -08:00
Amit Kumar Salecha
e7473f12be netxen: fix merge 9b963e5d0e
Patch "fix memory initialization:5d521fd36de4e61" didn't got merge.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 21:54:55 -08:00
Ben Hutchings
906bb26c06 sfc: Update version, copyright dates, authors
This driver has been mostly rewritten since Michael Brown's initial
work, so swap the order of the authors.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:58 -08:00
Ben Hutchings
738a8f4b0c sfc: Implement TSO for TCP/IPv6
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:57 -08:00
Ben Hutchings
8880f4ec21 sfc: Add support for SFC9000 family (2)
This integrates support for the SFC9000 family of 10G Ethernet
controllers and LAN-on-motherboard chips, starting with the SFL9021
'Siena' and SFC9020 'Bethpage'.

Credit for this code is largely due to my colleagues at Solarflare:

   Guido Barzini
   Steve Hodgson
   Kieran Mansley
   Matthew Slattery
   Neil Turton

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:57 -08:00
Ben Hutchings
afd4aea03f sfc: Add support for SFC9000 family (1)
This adds support for the SFC9000 family of 10G Ethernet controllers
and LAN-on-motherboard chips, starting with the SFL9021 'Siena' and
SFC9020 'Bethpage'.

The SFC9000 family is based on the SFC4000 'Falcon' architecture, but
with some significant changes:

- Two ports are associated with two independent PCI functions
  (except SFC9010)
- Integrated 10GBASE-T PHY(s) (SFL9021/9022)
- MAC, PHY and board peripherals are managed by firmware
  - Driver does not require board-specific code
  - Firmware supports wake-on-LAN and lights-out management through NC-SI
- IPv6 checksum offload and RSS
- Filtering by MAC address and VLAN (not included in this code)
- PCI SR-IOV (not included in this code)

Credit for this code is largely due to my colleagues at Solarflare:

   Guido Barzini
   Steve Hodgson
   Kieran Mansley
   Matthew Slattery
   Neil Turton

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:56 -08:00
Steve Hodgson
f0d37f4228 sfc: Add firmware protocol definitions (MCDI)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:56 -08:00
Ben Hutchings
8e730c15e1 sfc: Move shared NIC code from falcon.c to new source file nic.c
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:55 -08:00
Ben Hutchings
744093c983 sfc: Rename falcon.h to nic.h
nic.h is no longer specific to Falcon.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:55 -08:00
Ben Hutchings
c383b53729 sfc: Allow for additional checksum offload features
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:54 -08:00
Ben Hutchings
7688483568 sfc: Extend MTD driver for use with new NICs
In new NICs flash is managed by firmware and we will use high-level
operations on partitions rather than direct SPI commands.  Add support
for multiple MTD partitions per flash device and remove the direct
link between MTD and SPI devices.  Maintain a list of MTD partitions
in struct efx_nic.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:54 -08:00
Ben Hutchings
c1c4f453b6 sfc: Remove static PHY data and enumerations
New NICs have firmware managing the PHY, and we will discover the PHY
capabilities at run-time.  Replace the static data with probe() and
test_name() operations.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:53 -08:00
Ben Hutchings
e58f69f408 sfc: Extend loopback mode enumeration
New NICs and PHYs support a wider variety of loopback modes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:53 -08:00
Ben Hutchings
5784946068 sfc: Fold falcon_probe_nic_variant() into falcon_probe_nic()
falcon_probe_nic_variant() does a lot less than it used to, and a
lot less than it claims to.  Fold the remainder into its caller.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:23:52 -08:00
Roger Oksanen
98468efddb e100: Use pci pool to work around GFP_ATOMIC order 5 memory allocation failure
pci_alloc_consistent uses GFP_ATOMIC allocation that may fail on some systems
with limited memory (Bug #14265). pci_pool_alloc allows waiting with
GFP_KERNEL.

Tested-by: Karol Lewandowski <karol.k.lewandowski@gmail.com>
Signed-off-by: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:17:29 -08:00
Denis Kirjanov
0ccfe64d3f mv643xx: convert to netdev_tx_t
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 17:04:31 -08:00
Ben Hutchings
152b6a62ae sfc: Separate shared NIC code from Falcon-specific and rename accordingly
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 16:46:32 -08:00
Ben Hutchings
06629f0724 sfc: Add efx_nic_type operation for identity LED control
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 16:46:31 -08:00
Ben Hutchings
0aa3fbaa3f sfc: Add efx_nic_type operation for NVRAM self-test
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29 16:46:31 -08:00