platform/kernel/linux-rpi.git
15 years agonet: Cleanup redundant tests on unsigned
roel kluin [Fri, 23 Oct 2009 05:59:21 +0000 (05:59 +0000)]
net: Cleanup redundant tests on unsigned

optlen is unsigned so the `< 0' test is never true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Cleanup redundant tests on unsigned
roel kluin [Fri, 23 Oct 2009 05:21:56 +0000 (05:21 +0000)]
net: Cleanup redundant tests on unsigned

If there is data, the unsigned skb->len is greater than 0.

rt.sigdigits is unsigned as well, so the test `>= 0' is
always true, the other part of the test catches wrapped
values.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogigaset: convert strcmp chain to table lookup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:57 +0000 (09:30 +0000)]
gigaset: convert strcmp chain to table lookup

Replace the sequence of strcmp calls for interpreting ZSAU parameter
strings by a table of known strings and lookup loop to improve
readability.

Impact: readability improvement, no functional change
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogigaset: checkpatch cleanup of ev-layer.c
Tilman Schmidt [Sun, 25 Oct 2009 09:30:47 +0000 (09:30 +0000)]
gigaset: checkpatch cleanup of ev-layer.c

On more step towards the holy grail of checkpatch.pl silence.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobas_gigaset: checkpatch cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:37 +0000 (09:30 +0000)]
bas_gigaset: checkpatch cleanup

On the quest for the holy grail of checkpatch.pl silence.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoser_gigaset: checkpatch cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:27 +0000 (09:30 +0000)]
ser_gigaset: checkpatch cleanup

Duly uglified as demanded by checkpatch.pl.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogigaset: checkpatch cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:17 +0000 (09:30 +0000)]
gigaset: checkpatch cleanup

Dum sanctis checkpatch.pl'ae legibus obsequimur.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agousb_gigaset: code cleanup
Tilman Schmidt [Sun, 25 Oct 2009 09:30:07 +0000 (09:30 +0000)]
usb_gigaset: code cleanup

Reorganize the code of the Gigaset M10x driver to make it more
readable, less redundant, better aligned to the style of other
parts of the driver, and cause fewer checkpatch.pl complaints.

Impact: code reorganization, no functional change
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogigaset: fix bad assumptions about CAPI skbuffs
Tilman Schmidt [Sun, 25 Oct 2009 09:29:57 +0000 (09:29 +0000)]
gigaset: fix bad assumptions about CAPI skbuffs

The CAPI interface incorrectly assumed that CAPI messages would always
start at the beginning of the data buffer: fix by treating DATA_B3
messages as the link layer header to their payload data. This fix
changes the way acknowledgement information is propagated through the
hardware specific modules and thereby impacts the ISDN4Linux variant
of the driver, too.

Also some assumptions about methods not being called from interrupt
context turned out to be unwarranted; fix by using dev_kfree_skb_any()
wherever non-interrupt context isn't guaranteed.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogigaset: fix format string typo in CAPI dial command
Tilman Schmidt [Sun, 25 Oct 2009 09:29:47 +0000 (09:29 +0000)]
gigaset: fix format string typo in CAPI dial command

A missing dot lead to garbage characters being included in the
dial command generated from a CAPI CONNECT_REQ message, which
interestingly enough worked anyway, illustrating the resilience
of the device.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogigaset: CAPI module readability improvements
Tilman Schmidt [Sun, 25 Oct 2009 09:29:37 +0000 (09:29 +0000)]
gigaset: CAPI module readability improvements

Replace the "ignoring Additional Info" warning message by better
readable ones citing the specific subparameters being ignored.
Make parts of the code more readable by using a local cmsg
pointer variable.

Impact: readability improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAllow disabling of DSACK TCP option per route
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:27 +0000 (04:15 +0000)]
Allow disabling of DSACK TCP option per route

Add and use no DSCAK bit in the features field.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAllow to turn off TCP window scale opt per route
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:26 +0000 (04:15 +0000)]
Allow to turn off TCP window scale opt per route

Add and use no window scale bit in the features field.

Note that this is not the same as setting a window scale of 0
as would happen with window limit on route.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAllow disabling TCP timestamp options per route
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:25 +0000 (04:15 +0000)]
Allow disabling TCP timestamp options per route

Implement querying and acting upon the no timestamp bit in the feature
field.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAdd the no SACK route option feature
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:24 +0000 (04:15 +0000)]
Add the no SACK route option feature

Implement querying and acting upon the no sack bit in the features
field.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAdd dst_feature to query route entry features
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:23 +0000 (04:15 +0000)]
Add dst_feature to query route entry features

Adding an accessor to existing  dst_entry feautres field and
refactor the only supported feature (allfrag) to use it.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAllow tcp_parse_options to consult dst entry
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:22 +0000 (04:15 +0000)]
Allow tcp_parse_options to consult dst entry

We need tcp_parse_options to be aware of dst_entry to
take into account per dst_entry TCP options settings

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoOnly parse time stamp TCP option in time wait sock
Gilad Ben-Yossef [Wed, 28 Oct 2009 04:15:21 +0000 (04:15 +0000)]
Only parse time stamp TCP option in time wait sock

Since we only use tcp_parse_options here to check for the exietence
of TCP timestamp option in the header, it is better to call with
the "established" flag on.

Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Signed-off-by: Ori Finkelman <ori@comsleep.com>
Signed-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoip6mr: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 04:48:11 +0000 (04:48 +0000)]
ip6mr: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6 sit: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 04:37:43 +0000 (04:37 +0000)]
ipv6 sit: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipmr: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 05:21:38 +0000 (05:21 +0000)]
ipmr: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoip6tnl: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 05:16:51 +0000 (05:16 +0000)]
ip6tnl: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobridge: Optimize multiple unregistration
Eric Dumazet [Wed, 28 Oct 2009 05:35:35 +0000 (05:35 +0000)]
bridge: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobe2net: Add the new PCI IDs to PCI_DEVICE_TABLE.
Ajit Khaparde [Thu, 29 Oct 2009 08:11:06 +0000 (01:11 -0700)]
be2net: Add the new PCI IDs to PCI_DEVICE_TABLE.

This patch adds the PCI IDs for the next generation chip to the
PCI_DEVICE_ID table.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: flow control doesn't re-enable
Bruce Allan [Wed, 28 Oct 2009 18:28:30 +0000 (18:28 +0000)]
e1000e: flow control doesn't re-enable

When changing flow control (pause) parameters, the flow control thresholds
(i.e. when to send XON/XOFF frames) may not be setup correctly on parts
with copper media.  Call the existing e1000_set_fc_watermarks()
function to set these thresholds.

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>
15 years agovlan: Add support to netdev_ops.ndo_fcoe_get_wwn for VLAN device
Yi Zou [Wed, 28 Oct 2009 18:25:16 +0000 (18:25 +0000)]
vlan: Add support to netdev_ops.ndo_fcoe_get_wwn for VLAN device

Implements the netdev_ops.ndo_fcoe_get_wwn for VLAN device.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Add support for netdev_ops.ndo_fcoe_get_wwn to 82599
Yi Zou [Wed, 28 Oct 2009 18:24:56 +0000 (18:24 +0000)]
ixgbe: Add support for netdev_ops.ndo_fcoe_get_wwn to 82599

Implements the netdev_ops.ndo_fcoe_get_wwn in 82599 if it finds valid
prefix for the World Wide Node Name (WWNN) or World Wide Port Name (WWPN),
as well as valid SAN MAC address.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add ndo_fcoe_get_wwn to net_device_ops
Yi Zou [Wed, 28 Oct 2009 18:24:35 +0000 (18:24 +0000)]
net: Add ndo_fcoe_get_wwn to net_device_ops

Add ndo_fcoe_get_wwn so Fiber Channel over Ethernet (FCoE) can make use of
the provided World Wide Port Name (WWPN) and World Wide Node Name (WWNN)
from the underlying network interface driver.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Add support for 82599 alternative WWNN/WWPN prefix
Yi Zou [Wed, 28 Oct 2009 18:23:57 +0000 (18:23 +0000)]
ixgbe: Add support for 82599 alternative WWNN/WWPN prefix

The 82599 EEPROM supports alternative prefix for World Wide Node Name
(WWNN) and World Wide Port Name (WWPN). The prefixes can be used together
with the SAN MAC address to form the WWNN and WWPN, which can be used by
upper layer drivers such as Fiber Channel over Ethernet (FCoE).

Signed-off-by: Yi Zou <yi.zou@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>
15 years agovmxnet3: remove duplicate #include
Shreyas Bhatewara [Thu, 29 Oct 2009 05:28:26 +0000 (22:28 -0700)]
vmxnet3: remove duplicate #include

Remove duplicate headerfile includes from vmxnet3_int.h

Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobe2net: Changes to update ethtool get_settings function to return appropriate values.
Sarveshwar Bandi [Wed, 28 Oct 2009 11:15:20 +0000 (04:15 -0700)]
be2net: Changes to update ethtool get_settings function to return appropriate values.

Update ethtool get_settings function to:
- get current link speed settings from controller
- get port transceiver type from controller
- fill appropriate values for supported, phy_address

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe100: Fix to allow systems with FW based cards to resume from STD
David Graham [Wed, 28 Oct 2009 11:13:57 +0000 (04:13 -0700)]
e100: Fix to allow systems with FW based cards to resume from STD

Devices with loadable firmware must have their firmware reloaded
after the system resumes from sleep, but the request_firmare()
API is not available at this point in the resume flow because
tasks are not yet running, and the system will hang if it is
called. Work around this issue by only calling request_firmware()
for a device's first firmware load, and cache a copy of the pointer
to the firmware blob for that device, so that we may reload firmware
images even during resume.

Signed-off-by: David Graham <david.graham@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: update version to 4.0.65
Dhananjay Phadke [Sat, 24 Oct 2009 16:04:03 +0000 (16:04 +0000)]
netxen: update version to 4.0.65

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: module firmware hints
Dhananjay Phadke [Sat, 24 Oct 2009 16:04:02 +0000 (16:04 +0000)]
netxen: module firmware hints

Add MODULE_FIRMWARE hints for various firmware file types,
required by different chip revisions.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: update module info
Dhananjay Phadke [Wed, 28 Oct 2009 11:11:04 +0000 (04:11 -0700)]
netxen: update module info

Update module info with QLogic signature.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: add PCI IDs for new chip
Dhananjay Phadke [Sat, 24 Oct 2009 16:04:00 +0000 (16:04 +0000)]
netxen: add PCI IDs for new chip

Add PCI vendor and device IDs for QLE8240 and QLE8242
CNA devices.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: refactor indirect register access
Dhananjay Phadke [Sat, 24 Oct 2009 16:03:59 +0000 (16:03 +0000)]
netxen: refactor indirect register access

Refactor code to calculate and set indirect access
window for control registers in 2MB address space
(NX3031 or newer). Use void __iomem * data type for
absolute pci addresses.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: support for new firmware file format
Amit Kumar Salecha [Sat, 24 Oct 2009 16:03:58 +0000 (16:03 +0000)]
netxen: support for new firmware file format

Add support for extracting firmware from a unified
file format which embeds firmware images for all chip
revisions. Fallback to orginal file formats if new
image is not found.

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovia-velocity: Remove private device list
Ben Hutchings [Wed, 28 Oct 2009 11:01:46 +0000 (04:01 -0700)]
via-velocity: Remove private device list

via-velocity maintains a list of its devices in order to determine
whether a netdev notification applies to one of them.  That can be
determined simply by checking the netdev_ops pointer, so the list can
be removed.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Corrected spelling error heurestics->heuristics
Andreas Petlund [Tue, 27 Oct 2009 03:27:21 +0000 (03:27 +0000)]
net: Corrected spelling error heurestics->heuristics

Corrected a spelling error in a function name.

Signed-off-by: Andreas Petlund <apetlund@simula.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sysfs: ethtool_ops can be NULL
Eric Dumazet [Mon, 26 Oct 2009 01:23:33 +0000 (01:23 +0000)]
net: sysfs: ethtool_ops can be NULL

commit d519e17e2d01a0ee9abe083019532061b4438065
(net: export device speed and duplex via sysfs)
made the wrong assumption that netdev->ethtool_ops was always set.

This makes possible to crash kernel and let rtnl in locked state.

modprobe dummy
ip link set dummy0 up
(udev runs and crash)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotc35815: Enable NAPI
Atsushi Nemoto [Mon, 26 Oct 2009 03:46:22 +0000 (03:46 +0000)]
tc35815: Enable NAPI

This driver has NAPI code but it has been disabled.  Enable it now.
The non-napi code will be removed lator.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotc35815: Fix return value of tc35815_do_interrupt when NAPI enabled
Atsushi Nemoto [Mon, 26 Oct 2009 03:46:21 +0000 (03:46 +0000)]
tc35815: Fix return value of tc35815_do_interrupt when NAPI enabled

Return received count correctly even if tx completed at the same time.
Currently NAPI is disabled for this driver so this patch does not fix
any real problem.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoNET/KS8695: add support NAPI for Rx
Figo.zhang [Wed, 28 Oct 2009 10:55:24 +0000 (03:55 -0700)]
NET/KS8695: add support NAPI for Rx

Add support NAPI Rx API for KS8695NET driver.

v2, change the Rx function to NAPI.

in <KS8695X Integrated Multi-port Gateway Solution Register Description
 v1.0>:

Interrupt Enable Register (offset 0xE204)
Bit29 : WAN MAC Receive Interrupt Enable
Bit16 : LAN MAC Receive Interrupt Enable

Interrupt Status Register (Offset 0xF208)
Bit29: WAN MAC Receive Status
Bit16: LAN MAC Receive Status

see arch/arm/mach-ks8695/devices.c:
ks8695_wan_resources[] and ks8695_lan_resources[]
have IORESOURCE_IRQ , it have define the RX irq,
for wan, irq = 29; for lan ,irq = 16.
so we can do this read the interrupt status:

unsigned long mask_bit = 1 << ksp->rx_irq;
status = readl(KS8695_IRQ_VA + KS8695_INTST);

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: Fix warnings in igb_set_ringparam()
David S. Miller [Wed, 28 Oct 2009 10:38:54 +0000 (03:38 -0700)]
igb: Fix warnings in igb_set_ringparam()

drivers/net/igb/igb_ethtool.c: In function â€˜igb_set_ringparam’:
drivers/net/igb/igb_ethtool.c:744: warning: comparison of distinct pointer types lacks a cast
drivers/net/igb/igb_ethtool.c:748: warning: comparison of distinct pointer types lacks a cast

Casts were to u16 on the constant, but the type of new_{r,t}x_count is
u32.  Cast to u32 instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: cleanup whitespace issues in igb_main.c
Alexander Duyck [Tue, 27 Oct 2009 23:52:50 +0000 (23:52 +0000)]
igb: cleanup whitespace issues in igb_main.c

This patch goes through and cleans up whitespace issues in igb_main.c
to help improve readability.

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>
15 years agoigb: open up SCTP checksum offloads to all MACs 82576 and newer
Alexander Duyck [Tue, 27 Oct 2009 23:52:31 +0000 (23:52 +0000)]
igb: open up SCTP checksum offloads to all MACs 82576 and newer

Going forward the plan is to have the MACs support SCTP checksum offloads
so change the check from == to >=.

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>
15 years agoigb: limit minimum mtu to 68 to keep ip bound to interface
Alexander Duyck [Tue, 27 Oct 2009 23:52:13 +0000 (23:52 +0000)]
igb: limit minimum mtu to 68 to keep ip bound to interface

Limit the minimum mtu to 68 in order to prevent ip from being unbound from
the interface.

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>
15 years agoigb: add pci_dev in few spots to clean up use of dev_err/info/warn
Alexander Duyck [Tue, 27 Oct 2009 23:51:55 +0000 (23:51 +0000)]
igb: add pci_dev in few spots to clean up use of dev_err/info/warn

This patch relpaces several references to adapter->pdev->dev with just
pdev->dev.  This allows for cleanup of several multiline dev_err/info
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>
15 years agoigb: replace unecessary &adapter->hw with just hw where applicable
Alexander Duyck [Tue, 27 Oct 2009 23:51:35 +0000 (23:51 +0000)]
igb: replace unecessary &adapter->hw with just hw where applicable

This patch just cleans up some unecessary references to the adapter->hw
member when it has already been placed in a local variable named hw.

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>
15 years agoigb: cleanup clean_rx_irq_adv and alloc_rx_buffers_adv
Alexander Duyck [Tue, 27 Oct 2009 23:51:16 +0000 (23:51 +0000)]
igb: cleanup clean_rx_irq_adv and alloc_rx_buffers_adv

This patch cleans up some whitespace issues in clean_rx_irq_adv.  It also
adds NUMA aware page allocation and dma error handling to
alloc_rx_buffers_adv.

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>
15 years agoigb: cleanup igb xmit frame path
Alexander Duyck [Tue, 27 Oct 2009 23:50:57 +0000 (23:50 +0000)]
igb: cleanup igb xmit frame path

This patch cleans up the xmit frame path for igb to better handle xmit
frame errors and avoid null pointer exceptions.  It also cleans up some
whitespace issues found in the xmit frame path.

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>
15 years agoigb: cleanup igb.h header whitespace and some structure formatting
Alexander Duyck [Tue, 27 Oct 2009 23:50:38 +0000 (23:50 +0000)]
igb: cleanup igb.h header whitespace and some structure formatting

This patch changes the layout of the ring and adapter structs to fill a few
holes in the structure.  It also cleans up some whitespace and formatting
issues.

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>
15 years agoigb: Remove invalid stats counters
Alexander Duyck [Tue, 27 Oct 2009 23:50:18 +0000 (23:50 +0000)]
igb: Remove invalid stats counters

There are several counters being used like they are static when in fact
they are clear on read.  In order to prevent the values from being
incorrect I am removing the defunct counters.

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>
15 years agoigb: cleanup interrupt enablement in regards to msix_other
Alexander Duyck [Tue, 27 Oct 2009 23:49:59 +0000 (23:49 +0000)]
igb: cleanup interrupt enablement in regards to msix_other

This patch changes a few things so that instead of firing a link status
interrupt directly the get_link_status bit is set and the watchdog is
scheduled.  In addition the mailbox bit is now only enabled if VFs are
enabled.

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>
15 years agoigb: change queue ordering for 82576 based adapters
Alexander Duyck [Tue, 27 Oct 2009 23:49:40 +0000 (23:49 +0000)]
igb: change queue ordering for 82576 based adapters

This patch changes the queue ordering for 82576 adapters so that if VFs are
enabled the queues will first be allocated out of the PF pool.  Any
remaining queues will be allocated out of other VMDq pools.

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>
15 years agoigb: cleanup code related to ring resource allocation and free
Alexander Duyck [Tue, 27 Oct 2009 23:49:20 +0000 (23:49 +0000)]
igb: cleanup code related to ring resource allocation and free

This patch cleans up some of the ring alloc and free code to better handle
exceptions such as attempting to free resources on an already freed ring.

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>
15 years agoigb: make tx hang check multiqueue, check eop descriptor
Alexander Duyck [Tue, 27 Oct 2009 23:48:51 +0000 (23:48 +0000)]
igb: make tx hang check multiqueue, check eop descriptor

This change makes the tx hang check run over all tx queues instead of just
queue 0.  Also have hang display info on EOP descriptor instead of the
descriptor at the start of the chain.

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>
15 years agoigb: move global_quad_port_a from global into local static define
Alexander Duyck [Tue, 27 Oct 2009 23:48:31 +0000 (23:48 +0000)]
igb: move global_quad_port_a from global into local static define

This change moves global_quad_port_a into igb_probe as a static define
since it doesn't actually need to be global.

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>
15 years agoigb: only process global stats in igb_update_stats
Alexander Duyck [Tue, 27 Oct 2009 23:48:12 +0000 (23:48 +0000)]
igb: only process global stats in igb_update_stats

This patch moves the update of adapter->net_stats.rx/tx values out of the
interrupt routine and into igb_update_stats by just adding together the
tx/rx byte/packet counts for the rings.

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>
15 years agoigb: move vf init into a seperate function
Alexander Duyck [Tue, 27 Oct 2009 23:47:53 +0000 (23:47 +0000)]
igb: move vf init into a seperate function

This patch moves VF initialization into a seperate function to help improve
the readability of igb_probe.

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>
15 years agoigb: rework handling of the vfta and vlvf registers in relation to mng_vlan
Alexander Duyck [Tue, 27 Oct 2009 23:47:35 +0000 (23:47 +0000)]
igb: rework handling of the vfta and vlvf registers in relation to mng_vlan

This patch corrects some errors in how vlans are being handled when vfs
start interacting with the management vlans.

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>
15 years agoigb: rework use of VMOLR in regards to PF and VFs
Alexander Duyck [Tue, 27 Oct 2009 23:47:16 +0000 (23:47 +0000)]
igb: rework use of VMOLR in regards to PF and VFs

This patch updates the use of the VMOLR to include enabling multicast
promiscous for the VFs should they attempt to send over 30 multicast
addresses or if they use the new message type to enable multicast
promiscuous.

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>
15 years agoigb: replace the VF clear_to_send with a flags value
Alexander Duyck [Tue, 27 Oct 2009 23:46:57 +0000 (23:46 +0000)]
igb: replace the VF clear_to_send with a flags value

In order to support future features it is easiest to replace the
clear_to_send boolean with a flag value.

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>
15 years agoigb: use packet buffer sizes from RXPBS register
Alexander Duyck [Tue, 27 Oct 2009 23:46:38 +0000 (23:46 +0000)]
igb: use packet buffer sizes from RXPBS register

This patch changes the configuration for 82576 so that it uses the actual
value of the 82576 rx packet buffer size instead of just assuming the
value.

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>
15 years agoigb: misc cleanups within igb_ethtool.c
Alexander Duyck [Tue, 27 Oct 2009 23:46:20 +0000 (23:46 +0000)]
igb: misc cleanups within igb_ethtool.c

This patch just goes thorugh and does several cleanups on igb_ethtool.c.

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>
15 years agoigb: cleanup some of the code related to hw timestamping
Alexander Duyck [Tue, 27 Oct 2009 23:46:01 +0000 (23:46 +0000)]
igb: cleanup some of the code related to hw timestamping

The code for the hw timestamping is a bit bulky and making some of the
functions difficult to read.  In order to clean things up a bit I am moving
the timestamping operations into seperate functions.

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>
15 years agoigb: add support for seperate tx-usecs setting in ethtool
Alexander Duyck [Tue, 27 Oct 2009 23:45:42 +0000 (23:45 +0000)]
igb: add support for seperate tx-usecs setting in ethtool

This patch adds support for a seperate tx-usecs interrupt moderation setting
in ethtool which is supported when tx and rx interrupt vectors are sperated.

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>
15 years agosfc: Really allow RX checksum offload to be disabled
Ben Hutchings [Wed, 28 Oct 2009 09:50:44 +0000 (02:50 -0700)]
sfc: Really allow RX checksum offload to be disabled

We have never checked the efx_nic::rx_checksum_enabled flag everywhere
we should, and since the switch to GRO we don't check it anywhere.
It's simplest to check it in the one place where we initialise the
per-packet checksummed flag.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovxge: Configure the number of transmit descriptors per packet to MAX_SKB_FRAGS + 1.
Sreenivasa Honnur [Wed, 28 Oct 2009 09:46:54 +0000 (02:46 -0700)]
vxge: Configure the number of transmit descriptors per packet to MAX_SKB_FRAGS + 1.

- Configure the number of transmit descriptors per packet to MAX_SKB_FRAGS + 1.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: fix builds for SYSFS=n or MODULES=n
Randy Dunlap [Mon, 26 Oct 2009 12:09:45 +0000 (12:09 +0000)]
netxen: fix builds for SYSFS=n or MODULES=n

When CONFIG_MODULES=n:
drivers/net/netxen/netxen_nic_main.c:2751: error: dereferencing pointer to incomplete type
drivers/net/netxen/netxen_nic_main.c:2764: error: dereferencing pointer to incomplete type

Also needs addition of <linux/sysfs.h> for sysfs function prototypes or
stubs when CONFIG_SYSFS=n.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogre: Optimize multiple unregistration
Eric Dumazet [Tue, 27 Oct 2009 07:07:16 +0000 (07:07 +0000)]
gre: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipip: Optimize multiple unregistration
Eric Dumazet [Tue, 27 Oct 2009 07:06:59 +0000 (07:06 +0000)]
ipip: Optimize multiple unregistration

Speedup module unloading by factorizing synchronize_rcu() calls

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovlan: Optimize multiple unregistration
Eric Dumazet [Tue, 27 Oct 2009 07:06:49 +0000 (07:06 +0000)]
vlan: Optimize multiple unregistration

Use unregister_netdevice_many() to speedup master device unregister.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: add a list_head parameter to dellink() method
Eric Dumazet [Tue, 27 Oct 2009 07:06:36 +0000 (07:06 +0000)]
net: add a list_head parameter to dellink() method

Adding a list_head parameter to rtnl_link_ops->dellink() methods
allow us to queue devices on a list, in order to dismantle
them all at once.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Introduce unregister_netdevice_many()
Eric Dumazet [Tue, 27 Oct 2009 07:04:19 +0000 (07:04 +0000)]
net: Introduce unregister_netdevice_many()

Introduce rollback_registered_many() and unregister_netdevice_many()

rollback_registered_many() is able to perform necessary steps at device dismantle
time, factorizing two expensive synchronize_net() calls.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Introduce unregister_netdevice_queue()
Eric Dumazet [Tue, 27 Oct 2009 07:03:04 +0000 (07:03 +0000)]
net: Introduce unregister_netdevice_queue()

This patchs adds an unreg_list anchor to struct net_device, and
introduces an unregister_netdevice_queue() function, able to queue
a net_device to a list instead of immediately unregister it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: cleanup "todo" code found in igb_ethtool.c
Alexander Duyck [Tue, 27 Oct 2009 15:55:41 +0000 (15:55 +0000)]
igb: cleanup "todo" code found in igb_ethtool.c

This patch moves some defines into the e1000_regs.h file since this is the
correct place for register defines and not inside of igb_ethtool.c

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>
15 years agoigb: add single vector msi-x testing to interrupt test
Alexander Duyck [Tue, 27 Oct 2009 15:55:22 +0000 (15:55 +0000)]
igb: add single vector msi-x testing to interrupt test

This change adds testing of the first msix vector to the interrupt testing.
This should help with determining the cause of interrupt issues when they are
encountered.

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>
15 years agoigb: make ethtool use core xmit map and free functionality
Alexander Duyck [Tue, 27 Oct 2009 15:55:02 +0000 (15:55 +0000)]
igb: make ethtool use core xmit map and free functionality

This change adds a clean_rx/tx_irq type function call to the ethtool loopback
testing which allows us to test the core transmit and receive functionality in
the driver.

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>
15 years agoigb: make tx ring map and free functionality non-static
Alexander Duyck [Tue, 27 Oct 2009 15:54:43 +0000 (15:54 +0000)]
igb: make tx ring map and free functionality non-static

This change makes a minor change to the xmit_frame_ring_adv funcition in that
it moves 2 checks from it into the xmit_frame_adv since the checks were not
ring specific.  In addition it exports the xmit_frame_ring_adv and the
unmap_and_free_tx_resource calls so that they can be used by other code such
as the ethtool loopback testing 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>
15 years agoigb: re-use ring configuration code in ethtool testing
Alexander Duyck [Tue, 27 Oct 2009 15:54:23 +0000 (15:54 +0000)]
igb: re-use ring configuration code in ethtool testing

Since all of the ring code is now specific to the ring instead of the adapter
struct it is possible to cut a large section of code out of the ethtool
testing configuraiton since we can just use the existing functions to
configure the rings.

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>
15 years agoigb: setup vlan tag replication stripping in igb_vmm_control
Alexander Duyck [Tue, 27 Oct 2009 15:54:04 +0000 (15:54 +0000)]
igb: setup vlan tag replication stripping in igb_vmm_control

This update adds vlan tag stripping for inter-vf communications to the
igb_vmm_control configuration function.

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>
15 years agoigb: delay VF reset notification until after interrupts are enabed
Alexander Duyck [Tue, 27 Oct 2009 15:53:45 +0000 (15:53 +0000)]
igb: delay VF reset notification until after interrupts are enabed

This update delays the VF reset notification until after interrupts are
enabled.  Otherwise there is a chance of having the VF try to reset itself too
soon and being ignored by the PF as a result.

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>
15 years agoigb: move the multiple receive queue configuration into seperate function
Alexander Duyck [Tue, 27 Oct 2009 15:53:25 +0000 (15:53 +0000)]
igb: move the multiple receive queue configuration into seperate function

This patch moves the multiple receive queue configuration into a seperate
function from igb_configure_rx.  We can essentially do the configuration for
the multiple receive queues just prior to enabling the RX and this will allow
us to seperate the queue enablement from the receive queue layout
configuration.

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>
15 years agoigb: place a pointer to the netdev struct in the ring itself
Alexander Duyck [Tue, 27 Oct 2009 15:53:06 +0000 (15:53 +0000)]
igb: place a pointer to the netdev struct in the ring itself

This change adds a pointer to the netdev to the ring itself.  The idea being
at some point in the future it will be possible to support multiple netdevs
from a single adapter struct.

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>
15 years agoigb: add a flags value to the ring
Alexander Duyck [Tue, 27 Oct 2009 15:52:46 +0000 (15:52 +0000)]
igb: add a flags value to the ring

This patch adds a flags value to the ring that cleans up some of the last
remaining items from the ring in order to help seperate it from the adapter
struct.  By implementing these flags it becomes possible for different rings
to support different functions such as rx checksumming.

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>
15 years agoigb: move alloc_failed and csum_err stats into per rx-ring stat
Alexander Duyck [Tue, 27 Oct 2009 15:52:27 +0000 (15:52 +0000)]
igb: move alloc_failed and csum_err stats into per rx-ring stat

The allocation failed and checksum error stats are currently kept as a
global stat.  If we end up allocating the queues to multiple netdevs then
the global counter doesn't make much sense.  For this reason I felt it
necessary to move the alloc_rx_buff_failed stat into the rx_stats
portion of the rx_ring.

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>
15 years agoigb: move rx_buffer_len into the ring structure
Alexander Duyck [Tue, 27 Oct 2009 15:52:07 +0000 (15:52 +0000)]
igb: move rx_buffer_len into the ring structure

This patch moves the rx_buffer_len value into the ring structure.  This allows
greater flexibility and the option of doing things such as supporting packet
split only on some queues, or enabling virtualization.

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>
15 years agoigb: add pci device pointer to ring structure
Alexander Duyck [Tue, 27 Oct 2009 15:51:47 +0000 (15:51 +0000)]
igb: add pci device pointer to ring structure

This patch adds a pci device pointer to the ring structure.  The main use of
this pointer is for memory mapping/unmapping of the rings.

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>
15 years agoigb: change the head and tail offsets into pointers
Alexander Duyck [Tue, 27 Oct 2009 15:51:27 +0000 (15:51 +0000)]
igb: change the head and tail offsets into pointers

Since we are writting to the head/tail pointers frequently we might as well
save ourselves some processing time by converting the head and tail offsets
directly to pointers.  This will shave a few cycles off the rx/tx path and
allows us to move one step closer to the rings being a bit more independant of
each other.

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>
15 years agoigb: move SRRCTL register configuration into ring specific config
Alexander Duyck [Tue, 27 Oct 2009 15:51:07 +0000 (15:51 +0000)]
igb: move SRRCTL register configuration into ring specific config

The SRRCTL register exists per ring.  Instead of configuring all of them in
the RCTL configuration which is meant to be global it makes more sense to move
this out into the ring specific configuration.

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>
15 years agoigb: remove rx_ps_hdr_len
Alexander Duyck [Tue, 27 Oct 2009 15:50:48 +0000 (15:50 +0000)]
igb: remove rx_ps_hdr_len

This patch removes the rx_ps_hdr_len which isn't really needed since we can
now use rx_buffer_len less than 1K to indicate that we are in a packet split
mode.  We also don't need it since we always use a half page for the data
buffers when receiving so we always know the size to map/unmap.

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>
15 years agoigb: move the tx and rx ring specific config into seperate functions
Alexander Duyck [Tue, 27 Oct 2009 15:50:29 +0000 (15:50 +0000)]
igb: move the tx and rx ring specific config into seperate functions

This change makes the tx and rx config a bit cleaner by breaking out the ring
specific configuration from the generic rx and tx configuration.

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>
15 years agoigb: increase minimum rx buffer size to 1K
Alexander Duyck [Tue, 27 Oct 2009 15:50:08 +0000 (15:50 +0000)]
igb: increase minimum rx buffer size to 1K

This update increases the minimum rx buffer size to 1K.  The reason for this
change is to support SR-IOV and avoid any conflicts with the rings being able
to set their own MTU sizes.

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>
15 years agoigb: remove rx checksum good counter
Alexander Duyck [Tue, 27 Oct 2009 15:49:49 +0000 (15:49 +0000)]
igb: remove rx checksum good counter

Counting packets with a good checksum can cause a significant amount of cache
line bouncing due to the shared counter being written to by all of the queues.
In order to avoid this I am removing the counter since we still have the
checksum failed counter which will tell us if there are any issues.

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>
15 years agoigb: add new data structure for handling interrupts and NAPI
Alexander Duyck [Tue, 27 Oct 2009 15:49:27 +0000 (15:49 +0000)]
igb: add new data structure for handling interrupts and NAPI

Add a new igb_q_vector data structure to handle interrupts and NAPI.  This
helps to abstract the rings away from the adapter struct.  In addition it
allows for a bit of consolidation since a tx and rx ring can share a
q_vector.

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>
15 years agoatl1c: duplicate atl1c_get_tpd
Jie Yang [Wed, 28 Oct 2009 05:31:19 +0000 (22:31 -0700)]
atl1c: duplicate atl1c_get_tpd

remove duplicate atl1c_get_tpd, it may cause hardware to send wrong packets.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: Remove bond_dev from xmit_hash_policy call.
Jasper Spaans [Fri, 23 Oct 2009 04:09:24 +0000 (04:09 +0000)]
bonding: Remove bond_dev from xmit_hash_policy call.

Now that the bonding device is no longer used in determining the device to
which to send packets, it can be dropped from the argument list of the various
xmit_hash_policy calls.

Signed-off-by: Jasper Spaans <spaans@fox-it.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 27 Oct 2009 08:03:26 +0000 (01:03 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/sh_eth.c