Commit Graph

16099 Commits

Author SHA1 Message Date
Ajit Khaparde
6dc3494183 myri10ge: Use the instance of net_device_stats from net_device.
Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private myri10ge_priv structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 22:00:25 -07:00
Ajit Khaparde
5a4d631154 netxen: Use the instance of net_device_stats from net_device.
Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 22:00:25 -07:00
Ajit Khaparde
7274c20f7b e1000e: Use the instance of net_device_stats from net_device.
Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 22:00:24 -07:00
Nicolas de Pesloüan
49b4ad92d1 bonding: remove useless assignment
The variable old_active is first set to bond->curr_active_slave.
Then, it is unconditionally set to new_active, without being used in between.

The first assignment, having no side effect, is useless.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 14:11:00 -07:00
Nicolas de Pesloüan
3c6aaa2461 bonding: fix a parameter name in error message
When parsing module parameters, bond_check_params() erroneously use
'xor_mode' as the name of a module parameter in an error message.

The right name for this parameter is 'xmit_hash_policy'.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 14:10:36 -07:00
Ajit Khaparde
78122a52b3 be2net: Get rid of net_device_stats from adapter.
adapter doesnot need to maintain a copy of net_device_stats.
Use the one already available in net_device. This patch takes care of the same.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 03:11:20 -07:00
Stephen Hemminger
3295354322 dcb: data center bridging ops should be r/o
The data center bridging ops structure can be const

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 01:10:47 -07:00
Stephen Hemminger
ec1b4cf74c net: mark net_proto_ops as const
All usages of structure net_proto_ops should be declared const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 01:10:46 -07:00
Tilman Schmidt
92d326f61b net/ppp: fix comments - ppp_{sync,asynctty}_receive() may sleep
The receive_buf methods of the N_PPP and N_SYNC_PPP line disciplines,
ppp_asynctty_receive() and ppp_sync_receive(), call tty_unthrottle()
which may sleep. Fix the comments claiming otherwise.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 01:07:41 -07:00
Jiri Pirko
a549952ad3 bonding: introduce primary_reselect option
In some cases there is not desirable to switch back to primary interface when
it's link recovers and rather stay with currently active one. We need to avoid
packetloss as much as we can in some cases. This is solved by introducing
primary_reselect option. Note that enslaved primary slave is set as current
active no matter what.

Patch modified by Jay Vosburgh as follows: fixed bug in action
after change of option setting via sysfs, revised the documentation
update, and bumped the bonding version number.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 01:07:39 -07:00
David S. Miller
7ecc59c1b7 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-06 22:43:16 -07:00
Ajit Khaparde
583e3f34eb be2net: Bug fix to properly update ethtool tx-checksumming after ethtool -K <ifname> tx off
This is a fix for a bug which was a result of wrong use of checksum offload flag.
The status of tx-checksumming was not changed from on to off
after a 'ethtool -K <ifname> tx off' operation.
Use the proper checksum offload flag NETIF_F_HW_CSUM instead of
NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM.
Patch is against net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 17:33:41 -07:00
Ajit Khaparde
49643848f9 be2net: Fix a typo in be_cmds.h
MCC_STATUS_NOT_SUPPORTED should be decimal 66 not hex 66.
This patch fixes this typo. Patch against net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 17:33:39 -07:00
Ajit Khaparde
c5b9b92e07 be2net: Bug Fix while accounting of multicast frames during netdev stats update
While updating the statistics to be passed via the get_stats,
tx multicast frames were being accounted instead of rx multicast frames.
This patch fixes the bug. This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 17:33:38 -07:00
Ron Mercer
86aaf9ad82 qlge: Fix lock/mutex warnings.
Get rid of spinlock and private mutex usage for exclusive access to the
HW semaphore register.  rtnl_lock already creates exclusive access to
this register in all driver API.
Add rtnl to firmware worker threads that also use the HW semaphore register.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 17:33:37 -07:00
Ron Mercer
5ee22a5aa9 qlge: Fix queueing of firmware handler in ISR.
Check that we are not already polling firmware events before we queue the
firmware event worker, then disable firmware interrupts.
Otherwise we can queue the same event multiple times.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 17:33:36 -07:00
Ron Mercer
d799bbfbe2 qlge: Fix some bit definitions for reset register.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 17:33:35 -07:00
Sreenivasa Honnur
bd32cafc47 vxge: Version update.
- Version Update.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:55 -07:00
Sreenivasa Honnur
eb5f10c21b vxge: Allow multiple functions with INTA.
- Allow multiple functions with INTA.
- Removed the condition to allow only one vpath with INTA
- Ensure that the alarm bit in titan_mask_all_int register is cleared when
  driver exits.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:55 -07:00
Sreenivasa Honnur
fa41fd1003 vxge: Check if FCS stripping is disabled by the firmware.
- Added a function to check if FCS stripping is disabled by the firmware, if
  it is not disabled fail driver load.

- By default FCS stripping is disabled by the firmware. With this assumption
  driver decrements the indicated packet length by 4 bytes(FCS length).

- This patch ensures that FCS stripping is disabled during driver load time.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:54 -07:00
Sreenivasa Honnur
f0dfebafcc vxge: Removed unused functions.
- Removed the wrr_rebalance function

- This feature is not supported by the ASIC, hence removing the related code.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:53 -07:00
Sreenivasa Honnur
a4a987d822 vxge: Fixed crash in PAE system due to wrong typecasting.
- Fix a crash in PAE system due to wrong typecasting.

- On PAE system size_t is unsigned int which is 32bit. Avoid casting
  64 bit address to 32 bit

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:52 -07:00
Sreenivasa Honnur
0f8f7d58eb vxge: Removed accessing non-supported registers.
- Removed accessing GENDMA_INT register
 - This allowed the firmware to perform a generic DMA write to host memory.
   This feature is not supported by the ASIC, this patch removes access to
   GENDMA_INT register.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:52 -07:00
Sreenivasa Honnur
657205bdd7 vxge: Update driver_config->vpath_per_dev for each function in probe.
- Update driver_config->vpath_per_dev for each function in probe.

- vpath_per_device specifies number of vpaths supported for each function/device. The
  current code was updating vpath_per_device only for physical device, however this has
  to be updated for each function also in case of a MF(Multi function) device.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:51 -07:00
Sreenivasa Honnur
92cdd7c377 vxge: Modify __vxge_hw_device_is_privilaged() to not assume function-0 as the privileged function: Resubmit#1
- vxge driver was assuming function-0 is always the privilaged function. Now that
  restriction has been removed any function can act as a privilaged function.

- This patch modifies the __vxge_hw_device_is_privilaged routine to not assume
  function-0 as the privileged function.

- Recreated the patch by incorporating review comments from Dave Miller to
  remove double slash in path names.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06 15:22:51 -07:00
Alexander Duyck
6deac6f2b4 igb: add flushes between RAR writes when setting mac address
There are some switches that will do write combining when they see two
sequential regions written. In order to avoid any possible write combining
issues it is necessary to add a flush after writing each piece of a rar
register.

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>
2009-10-06 14:59:24 -07:00
Alexander Duyck
2553bb2681 igb: add additional error handling to the phy code
This update adds additional exception handling to the phy code to handle
situations where it may be called incorrectly.  In addition it adds some
bounds checking to the cable length checks to prevent an array overrun in
the event that the hardware returned a different value than expected.

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>
2009-10-06 14:59:24 -07:00
Alexander Duyck
ab576389b7 igb: add code to retry a phy read in the event of failure on link check
This patch adds a retry to phy reads in the event of failure.  The original
code broke out of the loop on failure and this is a mistake as we should be
trying to do the read twice.

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>
2009-10-06 14:59:23 -07:00
Alexander Duyck
81fadd81a5 igb: move the generic copper link setup code into e1000_phy.c
This patch moves the generic portion of the copper link setup into a
seperate function in e1000_phy.c.  This helps to reduce the size of
copper_link_setup_82575 and make it a bit more readable.

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>
2009-10-06 14:59:23 -07:00
Alexander Duyck
285b416745 igb: remove microwire support from igb
igb doesn't have any devices that use a microwire interface for NVM.  As
such the code related to this can be removed.

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>
2009-10-06 14:59:22 -07:00
Alexander Duyck
22896639af igb: change how we handle alternate mac addresses
This patch allows us to treat the alternate mac address as though it is the
physical address on the adapter.  This is accomplished by letting the
alt_mac_address function to only fail on an NVM error.  If no errors occur
and the alternate mac address is not present then RAR0 is read as the
default mac address.

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>
2009-10-06 14:59:21 -07:00
Alexander Duyck
3272686c98 igb: fix a few items where weren't correctly setup for mbx timeout
The mailbox timeout routines need to be updated as they were not correctly
handling the case of a mailbox timeout and could cause issues with long
delays when used.

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>
2009-10-06 14:59:21 -07:00
Alexander Duyck
0acb6fde5f igb: add function to handle mailbox lock
Both the read and write mailbox functions need to acquire the mailbox lock.
Since that is the case we might as well combine both of the procedures into
one function so it is easier to maintain.

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>
2009-10-06 14:59:20 -07:00
Alexander Duyck
747d49baaf igb: add support for 82576NS SerDes adapter
This patch adds the device ID necessary to support the 82576NS SerDes
adapter.

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>
2009-10-06 14:59:19 -07:00
Alexander Duyck
68d480c4de igb: make use of the uta to allow for promiscous mode filter
In order to support functions such as vlan tag stripping when SR-IOV is
enabled any given packet must match at least one filter.  However in the
case of promiscous mode being enabled on the PF the traffic routed to it
may not match any filters and is just sent to the PF by default.  In order
to make certain that this traffic is processed we can set all bits in the
UTA registers to create a pseudo promiscous mode filter that accepts all
packets.

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>
2009-10-06 14:59:19 -07:00
Alexander Duyck
26ad91783c igb: add combined function for setting rar and pool bits
This patch adds igb_rar_qsel which sets the mac address and pool bits for a
given mac address in the receive address register table.

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>
2009-10-06 14:59:18 -07:00
Alexander Duyck
bf6f7a928d igb: add locking to reads of the i2c interface
The current implementation of sgmii support isn't correctly locking the
interfaces for reads/writes.  This change pulls the read/write
functionality out of 82575.c and moves it to phy.c.  In addition it
replaces the implementation in 82575.c with one that uses locking around
the relocated i2c interface calls.

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>
2009-10-06 14:59:18 -07:00
Alexander Duyck
008c3422d4 igb: update the approach taken to acquiring and releasing the phy lock
The current approach is just using a ?: type mechanism to set the phy
locking bit.  This if fine for now but limits us to only 2.  Switch to a
nested if statement for future compatiblity with more than 2 phys.

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>
2009-10-06 14:59:17 -07:00
Alexander Duyck
70d92f86dc igb: update comments for serdes config and update to handle duplex
This update corrects the driver so that it handles duplex for serdes links
correctly instead of just forcing full duplex always.

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>
2009-10-06 14:59:16 -07:00
Alexander Duyck
cc9073bbc9 igb: remove unused temp variable from stats clearing path
There is a temp variable in the stats clearing path that isn't needed since
the results from the stats read can be immediately discared.  Since it
isn't needed we might as well just drop it from the function call.

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>
2009-10-06 14:59:16 -07:00
Ajit Khaparde
5c6ae5b880 be2net: Fix a bug in preparation of mcc wrb which was causing flash operation to fail
This patch fixes a bug that got introduced in commit 76998bc7.
During preparation of mcc wrb, req was being wrongly overwritten
and the flash operation was failing.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 02:09:40 -07:00
Marcel Holtmann
225794f8c3 usbnet: Set device type for wlan and wwan devices
For usbnet devices with FLAG_WLAN and FLAG_WWAN set the proper device
type so that uevent contains the correct value. This then allows an easy
identification of the actual underlying technology of the Ethernet device.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 00:43:33 -07:00
Marcel Holtmann
e1e499eef2 usbnet: Use wwan%d interface name for mobile broadband devices
Add support for usbnet based devices like CDC-Ether to indicate that they
are actually mobile broadband devices. In that case use wwan%d as default
interface name.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 00:43:33 -07:00
Ken Kawasaki
bf6fda63c4 pcnet_cs: add cis of National Semicondoctor's multifunction pcmcia card
pcnet_cs,serial_cs:
  
add cis of National Semicondoctor's lan&modem mulitifunction pcmcia card,
NE2K, tamarack ethernet card,
and some serial card(COMpad2, COMpad4).

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 00:40:03 -07:00
chaithrika@ti.com
69ef969409 TI DaVinci EMAC: Minor macro related updates
Use BIT for macro definitions wherever possible, remove
unused and redundant macros.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 00:21:55 -07:00
Ben Hutchings
15f0a394c6 net: Convert ethtool {get_stats, self_test}_count() ops to get_sset_count()
These string query operations were supposed to be replaced by the
generic get_sset_count() starting in 2007.  Convert the remaining
implementations.

Also remove calls to these operations to initialise drvinfo->n_stats.
The ethtool core code already does that.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 00:10:10 -07:00
Ben Hutchings
1ddee09ff0 tehuti: Convert ethtool get_stats_count() ops to get_sset_count()
This string query operation was supposed to be replaced by the
generic get_sset_count() starting in 2007.  Convert tehuti's
implementation.

Also remove the dummy self-test name which was not used since tehuti
does not advertise any self-tests.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-05 00:10:10 -07:00
Alexander Duyck
a825e00c98 e1000e: swap max hw supported frame size between 82574 and 82583
There appears to have been a mixup in the max supported jumbo frame size
between 82574 and 82583 which ended up disabling jumbo frames on the 82574
as a result.  This patch swaps the two so that this issue is resolved.

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=14261

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>
2009-10-04 21:08:49 -07:00
Don Skidmore
dbfec662f2 ixgbe: add support for 82599 based X520 10G Dual KX4 Mezz card
This patch adds device support for the 82599 based X520 10GbE
Dual Port KX4 Mezzanine card.

Signed-off-by: Don Skidmore<donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-04 21:08:45 -07:00
Don Skidmore
312eb9316f ixgbe: add support for 82599 Combined Backplane
This patch will add support for the 82599 Dual port Backplane
device (0x10f8).  This device has the ability to link in serial (KR) and
parallel (KX4/KX) modes, depending on what the switch capabilities are in
the blade chassis.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-04 21:08:41 -07:00