CC: Joe Perches <joe@perches.com> Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 1 Jul 2010 20:01:05 +0000 (20:01 +0000)]
igb: drop support for UDP hashing w/ RSS
This change removes UDP from the supported protocols for RSS hashing. The
reason for removing this protocol is because IP fragmentation was causing a
network flow to be broken into two streams, one for fragmented, and one for
non-fragmented and this in turn was causing out-of-order 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>
Ben Hutchings [Sat, 3 Jul 2010 09:41:29 +0000 (09:41 +0000)]
IB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()
Following commit 1437ce3983bcbc0447a0dedcd644c14fe833d266 "ethtool:
Change ethtool_op_set_flags to validate flags", ethtool_op_set_flags
takes a third parameter and cannot be used directly as an
implementation of ethtool_ops::set_flags.
Changes nes and ipoib driver to pass in the appropriate value.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sat, 3 Jul 2010 20:42:15 +0000 (20:42 +0000)]
bnx2: Always enable MSI-X on 5709.
Minor change to use MSI-X even if there is only one CPU. This allows
the CNIC driver to always have a dedicated MSI-X vector to handle
iSCSI events, instead of sharing the MSI vector.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Uses %pV and struct va_format
Format arguments are verified before printk
The dev_info macro is converted to _dev_info because there are
existing uses of variables named dev_info in the kernel tree
like drivers/net/pcmcia/pcnet_cs.c
A dev_info macro is created to call _dev_info
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Fri, 2 Jul 2010 07:32:57 +0000 (09:32 +0200)]
bridge: add per bridge device controls for invoking iptables
Support more fine grained control of bridge netfilter iptables invocation
by adding seperate brnf_call_*tables parameters for each device using the
sysfs interface. Packets are passed to layer 3 netfilter when either the
global parameter or the per bridge parameter is enabled.
Acked-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Patrick McHardy <kaber@trash.net>
Both ETH_FLAG_LRO and NETIF_F_LRO have the same value, but NETIF_F_LRO
is intended to use with netdev->features.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Greg Rose [Thu, 1 Jul 2010 13:39:23 +0000 (13:39 +0000)]
igb: Add comment
Add explanatory comment to avoid confusion when a pointer is set
to the second word of an array instead of the customary cast of a
pointer to the beginning of the array.
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>
Alexander Duyck [Thu, 1 Jul 2010 13:39:01 +0000 (13:39 +0000)]
igb: correct link test not being run when link is down
The igb online link test was always reporting pass because instead of
checking for if_running it was checking for netif_carrier_ok.
This change corrects the test so that it is run if the interface is running
instead of checking for netif carrier ok.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Thu, 1 Jul 2010 13:38:40 +0000 (13:38 +0000)]
igb: Fix Tx hangs seen when loading igb with max_vfs > 7.
Check the value of max_vfs at the time of assignment of vfs_allocated_count.
The previous check in igb_probe_vfs was too late as by that time the rx/tx
rings were initialized with the wrong offset.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Greg Rose [Thu, 1 Jul 2010 13:38:16 +0000 (13:38 +0000)]
igb: Use only a single Tx queue in SR-IOV mode
The 82576 expects the second rx queue in any pool to receive L2 switch
loop back packets sent from the second tx queue in another pool. The
82576 VF driver does not enable the second rx queue so if the PF driver
sends packets destined to a VF from its second tx queue then the VF
driver will never see them. In SR-IOV mode limit the number of tx queues
used by the PF driver to one. This patch fixes a bug reported in which
the PF cannot communciate with the VF and should be considered for 2.6.34
stable.
CC: stable@kernel.org Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Nick Nunley [Thu, 1 Jul 2010 13:37:54 +0000 (13:37 +0000)]
igb: fix PHY config access on 82580
82580 NICs can have up to 4 functions. This fixes phy accesses
to use the correct locks for functions 2 and 3.
Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 1 Jul 2010 13:28:27 +0000 (13:28 +0000)]
x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN. It is
based on a suggestion from Andi Kleen. The assumption is that there are
not any x86 cores where unaligned access is really slow, and this change
would allow for a performance improvement to still exist on configurations
that are not necessarily optimized for Core 2.
Cc: Andi Kleen <ak@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Brian King [Wed, 30 Jun 2010 11:59:12 +0000 (11:59 +0000)]
ehea: Allocate stats buffer with GFP_KERNEL
Since ehea_get_stats calls ehea_h_query_ehea_port, which
can sleep, we can also sleep when allocating a page in
this function. This fixes some memory allocation failure
warnings seen under low memory conditions.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Tue, 29 Jun 2010 18:38:00 +0000 (18:38 +0000)]
x86: Align skb w/ start of cacheline on newer core 2/Xeon Arch
x86 architectures can handle unaligned accesses in hardware, and it has
been shown that unaligned DMA accesses can be expensive on Nehalem
architectures. As such we should overwrite NET_IP_ALIGN to resolve
this issue.
Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Tue, 29 Jun 2010 18:30:59 +0000 (18:30 +0000)]
ixgbe: add 1g PHY support for 82599
Add support for 1G SFP+ PHY's to 82599.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Wed, 30 Jun 2010 05:05:23 +0000 (05:05 +0000)]
ethtool: Add support for control of RX flow hash indirection
Many NICs use an indirection table to map an RX flow hash value to one
of an arbitrary number of queues (not necessarily a power of 2). It
can be useful to remove some queues from this indirection table so
that they are only used for flows that are specifically filtered
there. It may also be useful to weight the mapping to account for
user processes with the same CPU-affinity as the RX interrupts.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Wed, 30 Jun 2010 02:47:40 +0000 (02:47 +0000)]
vmxnet3: Remove incorrect implementation of ethtool_ops::get_flags()
Only some netdev feature flags correspond directly to ethtool feature
flags. ethtool_op_get_flags() does the right thing.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Wed, 30 Jun 2010 02:46:56 +0000 (02:46 +0000)]
netdev: Make ethtool_ops::set_flags() return -EINVAL for unsupported flags
The documented error code for attempts to set unsupported flags (or
to clear flags that cannot be disabled) is EINVAL, not EOPNOTSUPP.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Wed, 30 Jun 2010 02:44:32 +0000 (02:44 +0000)]
ethtool: Change ethtool_op_set_flags to validate flags
ethtool_op_set_flags() does not check for unsupported flags, and has
no way of doing so. This means it is not suitable for use as a
default implementation of ethtool_ops::set_flags.
Add a 'supported' parameter specifying the flags that the driver and
hardware support, validate the requested flags against this, and
change all current callers to pass this parameter.
Change some other trivial implementations of ethtool_ops::set_flags to
call ethtool_op_set_flags().
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Casey Leedom [Tue, 29 Jun 2010 12:54:12 +0000 (12:54 +0000)]
cxgb4vf: Use correct shift factor for extracting the SGE DMA Ingress Padding Boundary
Use correct shift factor for extracting the SGE DMA Ingress Padding
Boundary. Was accidentally using the register field's shift which was
close enough (4 instead of the propper value of 5) that it actually
sort of worked for various packet sizes ...
Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Tue, 29 Jun 2010 04:39:37 +0000 (04:39 +0000)]
fragment: add fast path for in-order fragments
add fast path for in-order fragments
As the fragments are sent in order in most of OSes, such as Windows, Darwin and
FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue.
In the fast path, we check if the skb at the end of the inet_frag_queue is the
prev we expect.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
include/net/inet_frag.h | 1 +
net/ipv4/ip_fragment.c | 12 ++++++++++++
net/ipv6/reassembly.c | 11 +++++++++++
3 files changed, 24 insertions(+) Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Tue, 29 Jun 2010 00:11:17 +0000 (00:11 +0000)]
be2net: memory barrier fixes on IBM p7 platform
The ibm p7 architecure seems to reorder memory accesses more
aggressively than previous ppc64 architectures. This requires memory
barriers to ensure that rx/tx doorbells are pressed only after
memory to be DMAed is written.
Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Wed, 30 Jun 2010 20:12:01 +0000 (13:12 -0700)]
cpmac: use resource_size()
The original code is off by one because we should start counting at
zero. So the size of the resource is end - start + 1. I switched it to
use resource_size() to do the calculation.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Helmut Schaa [Wed, 30 Jun 2010 06:48:42 +0000 (08:48 +0200)]
mac82011: Allow selection of minstrel_ht as default rc algorithm
Allow selection of minstrel_ht as default rate control algorithm. At
the moment minstrel_ht can only be requested by the driver code but
not selected as default in make menuconfig. Fix this by using
minstrel_ht when minstrel was selected as default and minstrel_ht
is available.
This change won't affect legacy devices as minstrel_ht falls back to
minstrel in that case.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 30 Jun 2010 00:07:48 +0000 (02:07 +0200)]
ath9k: fix TSF after reset on AR913x
When issuing a reset, the TSF value is lost in the hardware because of
the 913x specific cold reset. As with some AR9280 cards, the TSF needs
to be preserved in software here.
Additionally, there's an issue that frequently prevents a successful
TSF write directly after the chip reset. In this case, repeating the
TSF write after the initval-writes usually works.
This patch detects failed TSF writes and recovers from them, taking
into account the delay caused by the initval writes.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Björn Smedman <bjorn.smedman@venatech.se> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:49:50 +0000 (21:49 +0200)]
rt2x00: Fix compile warning when debug disabled
CC [M] drivers/net/wireless/rt2x00/rt2800lib.o
drivers/net/wireless/rt2x00/rt2800lib.c: In function 'rt2800_ampdu_action':
drivers/net/wireless/rt2x00/rt2800lib.c:2821: warning: unused variable 'rt2x00dev'
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:49:26 +0000 (21:49 +0200)]
rt2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1
Latest rt2870 legacy driver also sets BBP_CSR_CFG_BBP_RW_MODE to 1
when reading or writing the EEPROM. This means we can make the
BBP reading and writing completely equal on all platforms.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:49:05 +0000 (21:49 +0200)]
rt2x00: Fix antenna initialization
Legacy driver indicates that BBP1_TX_ANTENNA must be set
to 0 for TXPATH values of 1 and 3. So the previous statement
that nothing should be done for TXPATH = 3, is false.
Furthermore, remove the false BBP3_RX_ANTENNA initialization
when TXPATH is 1 for PCI and SOC devices. This field will always
be overridden in the next switch statement, making this initialization
bogus. History of this line indicates it was there from the beginning,
and was once caught as typo. Instead of replacing the line with the
correct line, the correct line was added...
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:48:37 +0000 (21:48 +0200)]
rt2x00: Fix IEEE80211_HT_CAP_RX_STBC assignment
IEEE80211_HT_CAP_RX_STBC is a 2 bit flag, and should thus
never be set as normal flag. Instead we must read the number
of RX paths from the EEPROM and set the IEEE80211_HT_CAP_RX_STBC
with the correct value (using the same logic as the number of TX
streams).
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 29 Jun 2010 19:48:06 +0000 (21:48 +0200)]
rt2x00: fix beacon reset on rt2800
When an interface is removed the according beacon entry should be reset.
The current approach to only clear the first word is not enough to stop
the device from sending out the beacon, hence resulting in beacons being
sent out for already removed interfaces.
Fix this by invalidating the entire TXWI in front of the beacon instead
of only the first word.
Also clear all beacons during startup in the same way.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 29 Jun 2010 19:47:37 +0000 (21:47 +0200)]
rt2x00: Disable link tuning in AP mode
Since the link tuning is based on average RSSI values taken from all received
frames it doesn't make sense to enable it in AP mode where every associated
station provides independent RSSI values. Furthermore the legacy drivers
don't enable link tuning in AP mode as well.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 29 Jun 2010 19:47:10 +0000 (21:47 +0200)]
rt2x00: Fix beacon updates in rt61pci
Fix rt61pci beacon updates in the same way as rt2800pci. rt61pci didn't
update the beacon template after each beacon interval, resulting in the
DTIM count being incorrect (if DTIM period > 1). Fix this by calling
rt2x00lib_beacondone after the current beacon was sent out.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 29 Jun 2010 19:46:43 +0000 (21:46 +0200)]
rt2x00: Fix beacon updates in rt2800pci
rt2800pci didn't update the beacon template after each beacon interval,
resulting in the DTIM count being incorrect (if DTIM period > 1). Fix this
by calling rt2x00lib_beacondone after the current beacon was sent out.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:45:31 +0000 (21:45 +0200)]
rt2x00: Enable multiBSS in rt2800
MAC_BSSID_DW1_BSS_ID_MASK must be set to the mask 3, to
enable 8 BSSID's. The MAC_BSSID_DW1_BSS_BCN_NUM is initialized
to 7 to enable the 8 beacons.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Tested-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Align rt2800 EEPROM validation to Ralink vendor driver.
Align with the latest versions of the Ralink legacy driver(s).
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.
Align with the way PCI devices are handled, even though it is not
strictly necessary.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Now that the {usb,pci} specific write_tx_data functions are no longer
present we can rename the write_tx_datadesc callback function back to
its old name.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Move common txdone handling to rt2x00lib_txdone.
Now that the write_tx_data functions are merged, also merge the relevant
parts of the txdone handling into common code, rather than {usb,pci}
specific code.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Merge PCI and USB versions of write_tx_data into single function.
Now that rt2x00pci_write_tx_data and rt2x00usb_write_tx_data are similar
we can merge them in a single function in rt2x00queue.c.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function.
There is no need to fill the TX URB this early, and moving it to the
rt2x00usb_kick_tx_entry function allows us to merge the PCI and USB
variants of the write_tx_data function.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
We forgot to clear the SKBDESC_DESC_IN_SKB when the descriptor was removed
from the front of the skb.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:39:29 +0000 (21:39 +0200)]
rt2x00: Remove unneeded variable
The update_bssid is set only when BSS_CHANGED_BSSID is used,
but the check if that field is true is done later in the function
but also only when BSS_CHANGED_BSSID is set. This makes the
variable useless, as it can never result in a negative check.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 29 Jun 2010 19:38:55 +0000 (21:38 +0200)]
rt2x00: Write the BSSID to register when interface is added
For the Master mode case, we initialized the BSSID as the MAC
address, but never wrote it into the registers. This causes
Hardware crypto to break in Master mode when receiving frames
which require the BSSID to be filled in.
This is safe for STA mode since the BSSID will be initialized
to 00:00:00:00:00 at this point, but will be set to the correct
value later when the device associates.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Tue, 29 Jun 2010 19:38:12 +0000 (21:38 +0200)]
rt2x00: Implement tx mpdu aggregation
In order to implement tx mpdu aggregation we only have to implement
the ampdu_action callback such that mac80211 allows negotiation of
blockack sessions.
The hardware will handle everything on its own as long as the ampdu
flag in the TXWI struct is set up correctly and we translate the tx
status correctly.
For now, refuse requests to start rx aggregation.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Anton Vorontsov [Wed, 30 Jun 2010 06:39:15 +0000 (06:39 +0000)]
gianfar: Implement workaround for eTSEC-A002 erratum
MPC8313ECE says:
"If the controller receives a 1- or 2-byte frame (such as an illegal
runt packet or a packet with RX_ER asserted) before GRS is asserted
and does not receive any other frames, the controller may fail to set
GRSC even when the receive logic is completely idle. Any subsequent
receive frame that is larger than two bytes will reset the state so
the graceful stop can complete. A MAC receiver (Rx) reset will also
reset the state."
This patch implements the proposed workaround:
"If IEVENT[GRSC] is still not set after the timeout, read the eTSEC
register at offset 0xD1C. If bits 7-14 are the same as bits 23-30,
the eTSEC Rx is assumed to be idle and the Rx can be safely reset.
If the register fields are not equal, wait for another timeout
period and check again."
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Wed, 30 Jun 2010 06:39:13 +0000 (06:39 +0000)]
gianfar: Implement workaround for eTSEC76 erratum
MPC8313ECE says:
"For TOE=1 huge or jumbo frames, the data required to generate the
checksum may exceed the 2500-byte threshold beyond which the controller
constrains itself to one memory fetch every 256 eTSEC system clocks.
This throttling threshold is supposed to trigger only when the
controller has sufficient data to keep transmit active for the duration
of the memory fetches. The state machine handling this threshold,
however, fails to take large TOE frames into account. As a result,
TOE=1 frames larger than 2500 bytes often see excess delays before start
of transmission."
This patch implements the workaround as suggested by the errata
document, i.e.:
"Limit TOE=1 frames to less than 2500 bytes to avoid excess delays due to
memory throttling.
When using packets larger than 2700 bytes, it is recommended to turn TOE
off."
To be sure, we limit the TOE frames to 2500 bytes, and do software
checksumming instead.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Wed, 30 Jun 2010 06:39:12 +0000 (06:39 +0000)]
gianfar: Implement workaround for eTSEC74 erratum
MPC8313ECE says:
"If MACCFG2[Huge Frame]=0 and the Ethernet controller receives frames
which are larger than MAXFRM, the controller truncates the frames to
length MAXFRM and marks RxBD[TR]=1 to indicate the error. The controller
also erroneously marks RxBD[TR]=1 if the received frame length is MAXFRM
or MAXFRM-1, even though those frames are not truncated.
No truncation or truncation error occurs if MACCFG2[Huge Frame]=1."
There are two options to workaround the issue:
"1. Set MACCFG2[Huge Frame]=1, so no truncation occurs for invalid large
frames. Software can determine if a frame is larger than MAXFRM by
reading RxBD[LG] or RxBD[Data Length].
2. Set MAXFRM to 1538 (0x602) instead of the default 1536 (0x600), so
normal-length frames are not marked as truncated. Software can examine
RxBD[Data Length] to determine if the frame was larger than MAXFRM-2."
This patch implements the first workaround option by setting HUGEFRAME
bit, and gfar_clean_rx_ring() already checks the RxBD[Data Length].
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Sat, 26 Jun 2010 11:42:55 +0000 (11:42 +0000)]
ipv6: Use interface max_desync_factor instead of static default
max_desync_factor can be configured per-interface, but nothing is
using the value.
Reported-by: Piotr Lewandowski <piotr.lewandowski@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Sat, 26 Jun 2010 11:37:47 +0000 (11:37 +0000)]
ipv6: Clamp reported valid_lft to a minimum of 0
Since addresses are only revalidated every 2 minutes, the reported
valid_lft can underflow shortly before the address is deleted.
Clamp it to a minimum of 0, as for prefered_lft.
Reported-by: Piotr Lewandowski <piotr.lewandowski@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Reported-by: Arne Nordmark <nordmark@mech.kth.se> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Bruce Allan [Tue, 29 Jun 2010 18:13:13 +0000 (18:13 +0000)]
e1000e: disable EEE support by default
Based on community feedback, EEE should be disabled by default until the
IEEE802.3az specification has been finalized.
Cc: bhutchings@solarflare.com Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Bruce Allan [Tue, 29 Jun 2010 18:12:52 +0000 (18:12 +0000)]
e1000e: remove EEE module parameter
As requested by Dave Miller. A follow-on set of patches will allow for
ethtool to enable/disable the feature instead.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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>
Dean Nelson [Tue, 29 Jun 2010 18:12:05 +0000 (18:12 +0000)]
e1000e: don't inadvertently re-set INTX_DISABLE
Should e1000_test_msi() fail to see an msi interrupt, it attempts to
fallback to legacy INTx interrupts. But an error in the code may prevent
this from happening correctly.
Before calling e1000_test_msi_interrupt(), e1000_test_msi() disables SERR
by clearing the SERR bit from the just read PCI_COMMAND bits as it writes
them back out.
Upon return from calling e1000_test_msi_interrupt(), it re-enables SERR
by writing out the version of PCI_COMMAND it had previously read.
The problem with this is that e1000_test_msi_interrupt() calls
pci_disable_msi(), which eventually ends up in pci_intx(). And because
pci_intx() was called with enable set to 1, the INTX_DISABLE bit gets
cleared from PCI_COMMAND, which is what we want. But when we get back to
e1000_test_msi(), the INTX_DISABLE bit gets inadvertently re-set because
of the attempt by e1000_test_msi() to re-enable SERR.
The solution is to have e1000_test_msi() re-read the PCI_COMMAND bits as
part of its attempt to re-enable SERR.
During debugging/testing of this issue I found that not all the systems
I ran on had the SERR bit set to begin with. And on some of the systems
the same could be said for the INTX_DISABLE bit. Needless to say these
latter systems didn't have a problem falling back to legacy INTx
interrupts with the code as is.
Signed-off-by: Dean Nelson <dnelson@redhat.com> CC: stable@kernel.org Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>