When using larger MTU's sky2 driver changes from allocating one
data area, to using multiple pages. The threshold for this was based on
a heuristic where the cost of a single allocation is bigger than one
page. Since the allocator has changed, this heuristic is now incorrect;
instead just make the threshold be when the total size of the allocation
is greater than one page.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
The sky2 driver was not aligning the IP header on receive buffers.
This workaround is only needed on hardware with broken FIFO, newer chips
without FIFO can just DMA to unaligned address.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Francois Romieu [Wed, 28 Nov 2007 22:02:33 +0000 (23:02 +0100)]
r6040: cleanups
- whitespaces vs tabs
- use 80 cols
- use if_mii
- use netdev_priv
- remove useless cast to void *
- PCI device id does not need to be globally available
Francois Romieu [Wed, 28 Nov 2007 20:36:22 +0000 (21:36 +0100)]
r6040: compile error
drivers/net/r6040.c: In function 'rx_buf_alloc':
drivers/net/r6040.c:262: warning: passing argument 2 of 'pci_map_single' makes pointer from integer without a cast
Adrian Bunk [Wed, 21 Nov 2007 23:02:55 +0000 (15:02 -0800)]
drivers/net/chelsio/: #if 0 unused functions
This patch #if 0's the following unused functions:
- espi.c:t1_espi_set_misc_ctrl()
- sge.c:t1_sched_set_max_avail_bytes()
- sge.c:t1_sched_set_drain_bits_per_us()
Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Patrick McHardy [Wed, 14 Nov 2007 04:54:59 +0000 (20:54 -0800)]
[E1000]: Secondary unicast address support
Add support for configuring secondary unicast addresses. Unicast
addresses take precendece over multicast addresses when filling
the exact address filters to avoid going to promiscous mode.
When more unicast addresses are present than filter slots,
unicast filtering is disabled and all slots can be used for
multicast addresses.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
formerly e1000/e1000e only updated traffic counters once every
2 seconds with the register values of bytes/packets. With newer
code however in the interrupt and polling code we can real-time
fill in these values in the netstats struct for users to see.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
formerly e1000/e1000e only updated traffic counters once every
2 seconds with the register values of bytes/packets. With newer
code however in the interrupt and polling code we can real-time
fill in these values in the netstats struct for users to see.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jay Vosburgh [Wed, 14 Nov 2007 04:25:48 +0000 (20:25 -0800)]
[BONDING]: Documentation update
Update the bonding documentation: more discussion on
initialization and configuration, changes to discussion of packet
reordering in balance-rr, update some out of date information.
Based in part on input from Rick Jones <rick.jones2@hp.com>
and Andy Gospodarek <andy@greyhouse.net>.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Acked-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: David S. Miller <davem@davemloft.net>
David Acker [Thu, 8 Nov 2007 18:17:41 +0000 (10:17 -0800)]
Fix e100 on systems that have cache incoherent DMA
On the systems that have cache incoherent DMA, including ARM, there
is a race condition between software allocating a new receive buffer
and hardware writing into a buffer. The two race on touching the last
Receive Frame Descriptor (RFD). It has its el-bit set and its next
link equal to 0. When hardware encounters this buffer it attempts to
write data to it and then update Status Word bits and Actual Count in
the RFD. At the same time software may try to clear the el-bit and
set the link address to a new buffer.
Since the entire RFD is once cache-line, the two write operations can
collide. This can lead to the receive unit stalling or interpreting
random memory as its receive area.
The fix is to set the el-bit on and the size to 0 on the next to last
buffer in the chain. When the hardware encounters this buffer it stops
and does not write to it at all. The hardware issues an RNR interrupt
with the receive unit in the No Resources state. Software can write
to the tail of the list because it knows hardware will stop on the
previous descriptor that was marked as the end of list.
Once it has a new next to last buffer prepared, it can clear the el-bit
and set the size on the previous one. The race on this buffer is safe
since the link already points to a valid next buffer and the software
can handle the race setting the size (assuming aligned 16 bit writes
are atomic with respect to the DMA read). If the hardware sees the
el-bit cleared without the size set, it will move on to the next buffer
and skip this one. If it sees the size set but the el-bit still set,
it will complete that buffer and then RNR interrupt and wait.
Signed-off-by: David Acker <dacker@roinet.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Francois Romieu [Thu, 1 Nov 2007 07:52:13 +0000 (00:52 -0700)]
sundance: SIOCDEVPRIVATE pollution
To quote one of my favorite contemporary author:
[include/linux/sockios.h]
* THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
*/
#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */
[...]
Gentoo's snmpd trips up over this code when trying to figure if the driver
supports the non-SIOCDEVPRIVATE API or not. One can argue over its choice
of heuristic but there no reason to make ioctl more ugly than needed.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Jesse Huang <jesse@icplus.com.tw> Tested-by: Volker Sauer <vsauer@dvs.tu-darmstadt.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Adrian Bunk [Mon, 5 Nov 2007 17:07:31 +0000 (18:07 +0100)]
drivers/net/netxen/: cleanups
This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- #if 0 unused code
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Auke Kok [Wed, 31 Oct 2007 22:22:10 +0000 (15:22 -0700)]
ixgbe: Fix copper PHY initialization code
While cleaning up the internal API focussing on Fiber and CX4 code
we found that I had broken the copper PHY initialization code. This
patch restores the PHY-specific code. This is mostly uninteresting
since no copper PHY boards are yet available. The changes have been
tested against Fiber only as I do not even have copper PHY versions
of 82598 macs.
This change actually cleans up the API code a bit more and we
lose some initialization code. A few PHY link detection helper
lines of code have been snuck into this patch, as well as a
read flush where it was suspected that this might cause issues.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Auke Kok [Wed, 31 Oct 2007 22:22:05 +0000 (15:22 -0700)]
e1000/e1000e: Move PCI-Express device IDs over to e1000e
e1000e will from now on support the PCI-Express adapters that
previously were supported by e1000. This support means better
performance and easier debugging from now on for both the old
PCI-X/PCI hardware and PCI-Express adapters.
This patch also moves 3 recently merged device IDs over to e1000e
that are identical to quad-port versions of already existing
dual port versions. With this last bit every former e1000 pci-e
device should work now with e1000e.
Here is a brief list of which gigabit driver to use with which
adapter:
Auke Kok [Wed, 31 Oct 2007 22:22:00 +0000 (15:22 -0700)]
e1000e: Disable L1 ASPM power savings for 82573 mobile variants
L1 ASPM link (pci-e link power savings) has significant benefits
(~1W savings when link is active) but unfortunately does not work
correctly on any of the chipsets that have 82573 on mobile platforms
which causes various nuisances:
- eeprom reads return garbage information leading to bad eeprom
checksums
- long ping times (up to 2 seconds)
- complete system hangs (freeze/lockup)
A lot of T60 owners have been plagued by this, but other mobile
solutions also suffer from these symptoms.
Disabling L1 ASPM before we activate the PCI-E link fixes all of
these issues at the cost of some power consumption.
Remove a workaround RDTR adjustment that is no longer needed with
this new one.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
sk98lin: kill bogus check and convert to use ARRAY_SIZE()
This converts uses of ARRAY_SIZE(), and while at it also kills
unreachable code as far as I can say. I can't tell what was the author
trying to do with the following check. First we have:
Holger Schurig [Fri, 26 Oct 2007 08:12:14 +0000 (10:12 +0200)]
libertas: move wlan_*_association_work from header to c file
Move wlan_postpone_association_work() and wlan_cancel_association_work()
from a assoc.h file to the sole user, into wext.c.
Renamed those two functions to to libertas_XXX as well.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jes Sorensen [Fri, 26 Oct 2007 14:10:39 +0000 (16:10 +0200)]
iwlwifi: disable interrupts before calling request_irq
Disable interrupts in the iwl4965 before calling request_irq() for
the case that the previous OS or the BIOS left a pending interrupt in
the chip. This behavior has been observed on some laptops such as T61
Thinkpads and Toshiba Portege R500
Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dmitry Torokhov [Fri, 2 Nov 2007 05:55:36 +0000 (01:55 -0400)]
P54: use temporary variables to reduce size of generated code
When there are 2 linked structures, using a temporary variable to hold a pointer
to the often used structure usually produces better code (smaller and faster)
since compiler does not have to constantly re-fetch data from the first structure.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Thu, 11 Oct 2007 03:56:25 +0000 (23:56 -0400)]
orinoco: more reliable scan handling
Bring scan result handling more in line with drivers like ipw. Scan
results are aggregated and a BSS dropped after 15 seconds if no beacon
is received. This allows the driver to interact better with userspace
where more than one process may request scans or results at any time.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 11 Oct 2007 05:05:57 +0000 (00:05 -0500)]
b43legacy: Rewrite pwork locking
Implement much easier and more lightweight locking for
the periodic work. This also removes the last big busywait
loop and replaces it by a sleeping loop.
This patch for b43legacy is patterned aftar the same patch
for b43 by Michael Buesch <mb@bu3sch.de>.
Signed-off-by: Larry Finger <larry.finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
Currently the iwl3945 & iwl4965 drivers share some common Kconfig
symbols. This split it up into options for the individual drivers
and gets rid of all the CONFIG_IWLWIFI cruft.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The iwl3945 and iwl4965 devices share some common structure, but with a
lot of difference split all over. Currently the two drivers share a lot
of headers and use ugly preprocessor magic to manage the difference.
This patch keeps two entirely separate copies of the headers to get rid
of these hacks an ease future development.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mabbas [Thu, 25 Oct 2007 09:15:42 +0000 (17:15 +0800)]
iwl4965: exclude 60M rate from probe request
This patch do the following 2 things:
1. Make sure we don't add rate 60M part of supported rate in proble request,
some AP does not like that.
2. It is wrong to set priv->active_rate in this function, this will set
it to all avialable rates which might overwrite the mode supported rate.
priv->active_rate should be set by only from iwl_set_rate.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:41 +0000 (17:15 +0800)]
iwlwifi: Renames struct fw_image_desc to struct fw_desc
This patche shortens the name of struct fw_image_desc to be struct
fw_desc.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch moves 3945 SCD registers to iwl-prph.h. These registers
are assigned from the periphery bus
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch moves 4965 SCD registers to iwl-prph.h. These registers
are assigned from the periphery bus
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:37 +0000 (17:15 +0800)]
iwlwifi: replacing wording restricted to nic access in iwl-io
This patch replaces wording 'restricted' with more appropriate 'nic access'
NIC access is grabbed to prevent NIC entering power save mode
General cleanup of iwl-io.h
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mabbas [Thu, 25 Oct 2007 09:15:34 +0000 (17:15 +0800)]
iwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame
The driver drops any Rx frame larger than 2332 bytes, but with A-MSDU
frame, it could be up to 4K. This patch makes sure we can process larger
A-MSDU frame.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:32 +0000 (17:15 +0800)]
iwlwifi: using PCI_DEVICE macro
PCI_DEVICE macro is more concise when using defualt values
in device definitions
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:31 +0000 (17:15 +0800)]
iwlwifi: remove cck_power_index_compensation
cck_power_index_compensation variable was never used
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ian Schram [Thu, 25 Oct 2007 09:15:30 +0000 (17:15 +0800)]
iwlwifi: remove late null-check and duplicate bug_on
These pieces of code appear to be useless. The BUG_ON is also performed in
iwl_send_cmd_async.
Serious karma would be needed to enter iwl_ativate_qos with a null priv.
I had a deja vu when patching this, but for the life of me I couldn't track
down a similar patch.
Signed-off-by: Ian Schram <ischram@telenet.be> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ian Schram [Thu, 25 Oct 2007 09:15:29 +0000 (17:15 +0800)]
iwlwifi: Beautify by removing superfluous newlines and code
Moving code around, lindent, and whatnot created several places where
there appeared to be an 75 column "rule" instead of 80. This patch removes
those that I can spot, hopefully increasing readability.
Signed-off-by: Ian Schram <ischram@telenet.be> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:27 +0000 (17:15 +0800)]
iwlwifi: remove cck_flag from iwl_driver_hw_info
This patch remove cck_flag from iwl_driver_hw_info, this flag
is unused after spliting the iwl-base.c
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:26 +0000 (17:15 +0800)]
iwlwifi: add TGN flag to qos parameters
This patch adds TGN flag to QoS parameters. This flag governs enablement of
NAV shortening with CF-End and filters in 4 or 8K RX AMSDU packets
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:25 +0000 (17:15 +0800)]
iwlwifi: rs-4965 fix return values
This patch cleans up style of 'return' of rate scale 4965 functions.
It renames return name variables rc to ret, change functions to void if no
meaningful value was returned it add return of -EINVAL for checks of wrong
arguments.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 25 Oct 2007 09:15:24 +0000 (17:15 +0800)]
iwlwifi: renaming last_used and first_empty
This patch renames queue pointers to write_ptr and read_ptr
instead of first_empty and last_used. This is closer to technical
terminology we everyday use
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sat, 27 Oct 2007 11:44:08 +0000 (13:44 +0200)]
rt2x00: Release rt2x00 2.0.12
Version bump.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mattias Nissler [Sat, 27 Oct 2007 11:43:49 +0000 (13:43 +0200)]
rt2x00: Correctly set ACK bit in tx descriptors
Add a flag to struct txdata_entry_desc that specifies whether an ack for the
frame is to be expected. Use this flag to set the ACK bit in the tx descriptor.
Previously, the ACK bit could be set incorrectly on CTS-to-self frames, so they
caused retries and were reported to be failed in the txdone handlers.
Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Adam Baker [Sat, 27 Oct 2007 11:43:29 +0000 (13:43 +0200)]
rt2x00: Place mutex around USB register access
There is a buffer, csr_cache which is used to hold copies of data being passed
to the USB stack which can get corrupted if multiple threads attempt to access
CSR registers simultaneously. There is also the possibility if multiple
threads try to access BBP or RF registers for the multiple USB operations
needed to get interleaved leading to incorrect results. This patch introduces
a mutex to prevent such simultaneous access. The interleaved access problem
may also affect the PCI devices but if so that will be handled in a follow-up
patch.
Signed-off-by: Adam Baker <linux@baker-net.org.uk> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>