1
0
Fork 0
Commit Graph

58277 Commits (32f3dde55ba1b28863c0f0611d2c9dcf2d728ec8)

Author SHA1 Message Date
Jiri Pirko bda6a15a0d 8139too: allow to set mac address on running device
Similar patch as for 8139cp posted yesterday, so the same comment:

So far there was not a chance to set a mac address on running 8139too device.
This is for example needed when you want to use this NIC as a bonding slave in
bonding device in mode balance-alb. This simple patch allows it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:48:18 -07:00
Jiri Pirko c048aaf4ca 8139cp: allow to set mac address on running device
So far there was not a chance to set a mac address on running 8139cp device.
This is for example needed when you want to use this NIC as a bonding slave in
bonding device in mode balance-alb. This simple patch allows it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:47:48 -07:00
Divy Le Ray 3bcb1255ba cxgb3: update driver version
update driver version to 1.1.1-ko

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:49 -07:00
Divy Le Ray d9507a532a cxgb3: update FW
Update FW to 7.1

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:48 -07:00
Divy Le Ray bf792094ef cxgb3: detect mac link faults.
The driver currently ignores the local or remote link faults
raised at the mac layer. This patch fixes it.
Our mac however only advertizes link events, so wait for the
phy to stabilize the link, then enable mac link events interrupts.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:47 -07:00
Divy Le Ray cd40658a61 cxgb3: Update Rev3 mac workaround
Update the heurstics workaround unlocking a hung mac:
- reduce Tx mac toggling by enabling Tx drain before resetting the mac
- Take Tx (lack of) activity in account only
- Update the monitoring counter range to 64 bits

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:46 -07:00
Divy Le Ray fc88219601 cxgb3: disable high freq non-data interrupts
Under RX pressure, The HW might generate a high load of interrupts
to signal mac fifo or free lists overflow.
Disable the interrupts, and poll the relevant status bits
to maintain stats.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:45 -07:00
Divy Le Ray 42c8ea17e8 cxgb3: separate TX and RX reclaim handlers
Separate TX and RX reclaim handlers
Don't disable interrupts in RX reclaim handler.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:45 -07:00
Divy Le Ray b2b964f064 cxgb3: prefetch buffer access in GRO mode
Elmininate a cache miss when accessing the CPL header within
the first aggregated buffer.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:44 -07:00
Divy Le Ray 8f4358044d cxgb3: fix skb truesize in jumbo mode
Update skb truesize correctly for the 2nd buffer from a Jumbo frame

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:44 -07:00
Divy Le Ray 9bb2b31e6f cxgb3: release page ref on mapping error
Release page chunk reference in case we fail to map it.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:43 -07:00
Divy Le Ray 26b3871d2c cxgb3: ring rx door bell less frequently
Ring free lists door bell less frequently,
specifically every quarter of the active FL
size.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:30:43 -07:00
Ron Mercer 855b0993f2 qlge: bugfix: Pad outbound frames smaller than 60 bytes.
With some asic configurations xmit of frames smaller than 60 bytes may
fail.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:25 -07:00
Ron Mercer 6612a6344a qlge: bugfix: Move netif_napi_del() to common call point.
Moving netif_napi_del() up the call chain so it will get called from all
exit points.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:24 -07:00
Ron Mercer a7a655f22c qlge: bugfix: Tell hw to strip vlan header.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:24 -07:00
Ron Mercer c3c6496dc3 qlge: bugfix: Increase filter on inbound csum.
Chip does not do UDP checksum when fragmentation occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 11:27:23 -07:00
Ilya Yanok 9fae6c3f64 dnet: replace obsolete *netif_rx_* functions with *napi_*
*netif_rx_* functions is obsolete and removed in newer kernels so
we need to use corresponding *napi_* functions instead.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13 09:51:46 -07:00
Sathya Perla 6b7c5b947c net: Add be2net driver.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:32:22 -07:00
David S. Miller 2c5849ea38 dnet: Fix warnings on 64-bit.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:28:57 -07:00
Ilya Yanok 4796417417 dnet: Dave DNET ethernet controller driver (updated)
Driver for Dave DNET ethernet controller found on Dave/DENX QongEVB-LITE
FPGA. Heavily based on Dave sources, I've just adopted it to current
kernel version and done some code cleanup.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:26:02 -07:00
Randy Dunlap ff5e2b4732 wimax: fix i2400m printk formats
Fix printk format warnings:

drivers/net/wimax/i2400m/netdev.c:523: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
drivers/net/wimax/i2400m/netdev.c:548: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-11 23:24:03 -07:00
Ayaz Abdulla 3e1a3ce2f1 forcedeth: version bump to 64
This patch bumps up the version to 0.64

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:52 -07:00
Ayaz Abdulla 1b2bb76f57 forcedeth: fix irq clearing and napi spin lock changes
This patch clears the irqstatus register with the exact same events it
has read from it. Since the read-write operation is not atomic, a new
irqstatus bit could have been set in between these operations and would
then be cleared accidentally.

Secondly, we now don't need any spin lock protection when
scheduling/completing napi poll as the isr will not execute anymore (as
we turn off all interrupts now).

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:51 -07:00
Ayaz Abdulla 6cef67a02f forcedeth: performance changes
This patch modifies the throughput mode poll settings to reduce the
number of interrupts. This is only used by older hardware that need a
timer irq in throughput mode.

Secondly, this patch increases the default rx ring from 128 to 512. This
drastically improves bandwidth utilization for small packets sizes i.e
512 bytes.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:50 -07:00
Ayaz Abdulla 4145ade2bb forcedeth: add interrupt moderation logic
This patch adds the logic to moderate the interrupts by changing the
mode between throughput and poll. If there has been a large amount of
time without any burst of network load, the code will transition to pure
throughput mode (where each tx/rx/other will cause an interrupt). If
bursts of network load occurs, it will transition to poll based mode to
help reduce cpu utilization (it will not interrupt on each packet) while
maintaining the optimum network bandwidth utilization.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:49 -07:00
Ayaz Abdulla b67874ac16 forcedeth: remove isr processing loop
This patch is only a subset of changes so that it is easier to see the
modifications. This patch removes the isr 'for' loop and shifts all the
logic to account for new tab spacing.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:49 -07:00
Ayaz Abdulla 9e184767c9 forcedeth: add new optimization mode
A new optimization mode called Dynamic has been added. This will be mode
where interrupt moderation logic will dynamically switch between pure
throughput mode and poll based (called 'cpu') mode.

Also, for newer chipsets, the timer irq is not needed for throughput
mode. Secondly, since we are modifying the irqmask to change between
modes, msix is not supported.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:48 -07:00
Ayaz Abdulla f27e6f39fc forcedeth: napi - handle all processing
The napi poll routine has been modified to handle all interrupt events
and process them accordingly. Therefore, the ISR will now only schedule
the napi poll and disable all interrupts instead of just disabling rx
interrupt.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:48 -07:00
Ayaz Abdulla 33912e72d0 forcedeth: add/modify tx done with limit
There are two tx_done routines to handle tx completion processing. Both
these functions now take in a limit value and return the amount of tx
completions. This will be used by a future patch to determine the total
amount of work done.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:47 -07:00
Ayaz Abdulla 2daac3e8f8 forcedeth: remove overhead
This patch removes unnecessary overhead code. Firstly, there is no nead
to mask off unwanted interrupts as we will be checking against the
irqmask field anyways. Secondly, there has been no value in last few
years from detecting error or unknown interrupts.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:47 -07:00
Ayaz Abdulla 582806be06 forcedeth: save irq events for napi processing
This patch will save the irq events in the driver's context so that the
napi routine knows which interrupts have occurred. Subsequent changes
will be moving all interrupt processing into the napi poll routine.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:46 -07:00
Ayaz Abdulla d41c628c51 forcedeth: remove msix + napi
This patch removes support for msix running in conjunction with napi.
There has been reported issues regarding the behaviour of irqmask and
generation of interrupts by the HW when in MSIX mode. When running napi,
the driver is constantly turning off/on the irqmask. For the time being,
I am going to disable it until I can root cause the issue.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:45 -07:00
Ayaz Abdulla 08d9357574 forcedeth: fix missing napi enable/disable calls
This patch adds missing napi enable/disable calls.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:45 -07:00
Ayaz Abdulla 8ed1454aa8 forcedeth: fix stats version feature
Newer versions of the stats feature would not encompass all older
versions. This would result in only retreiving a subset of all available
stats in HW.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:29:44 -07:00
Stephen Hemminger 7546dd97d2 net: convert usage of packet_type to read_mostly
Protocols that use packet_type can be __read_mostly section for better
locality. Elminate any unnecessary initializations of NULL.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:22:43 -07:00
Paul Bolle 3f612132c7 gigaset: return -ENOTTY for unimplemented functions
A number of functions in the usb_gigaset module will return -EINVAL if
CONFIG_GIGASET_UNDOCREQ is not set. Make these return -ENOTTY as it's
more specific and it might make it easier to see (from userspace) why
these functions actually fail.

Impact: some error return codes changed

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:22:42 -07:00
Tilman Schmidt 3c420f27b7 gigaset: Kconfig cleanup
Streamline dependencies and remove some obsolete or redundant comments
in the Gigaset ISDN driver's Kconfig file. In particular, remove the
strong warning against the GIGASET_UNDOCREQ option, as in seven years
of existence, the code in question has never been reported to cause
any harm.

Impact: Kconfig cleanup, no functional change

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:22:41 -07:00
Dhananjay Phadke 1e2d0059fc netxen: annotate board_config and board_type
Remove huge board config structure from each instance, read
only necessary fields from flash.

Replace board_type with port_type (1G/10G), there's another
board_type field describing card type (SFP/XFP/CX4).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:04 -07:00
Dhananjay Phadke becf46a012 netxen: cleanup superfluous multi-context code
MAX_RCV_CTX was set to 1, there's only rx context per
PCI function.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:03 -07:00
Dhananjay Phadke 9f5bc7f190 netxen: refactor netdev open close
rearrange open and close into hardware attach(), detach() and
nic up() and down(). this will be used for suspend/resume
subsequently.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:02 -07:00
Dhananjay Phadke d32cc3d24e netxen: small xmit optimizations
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:02 -07:00
Dhananjay Phadke 0ddc110c6f netxen: cleanup rx handling
o remove unused rx fragment handling code.
o imporove check for status descriptor ownership.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 05:10:01 -07:00
David S. Miller d5df2a1613 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x_main.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
	drivers/net/wireless/rt2x00/rt73usb.c
2009-03-10 05:04:16 -07:00
Eilon Greenstein db434ac6bf bnx2x: Using DMAE to initialize the chip
There was a bug, which occasionally caused failure in PRAM initialization after
the cold boot.
Also incremented version number to 1.45.27.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:52:03 -07:00
Eilon Greenstein 6dc7d8c843 bnx2x: Casting page alignment
Adding a proper cast to the argument of PAGE_ALIGN macro so that the output
won't depend on its original type. Without this cast aligned value will be
truncated to the size of the argument type.

Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:52:02 -07:00
Eilon Greenstein 916c775ff2 bnx2x: Adding restriction on sge_buf_size
sge_buff_size may not be more than 0xffff.

Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:52:01 -07:00
Ron Mercer d4a4aba617 qlge: bugfix: Fix endian issue related to rx buffers.
This was introduced in an earlier net-next patch.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:58 -07:00
Ron Mercer 74c50b4bae qlge: bugfix: Pad outbound frames smaller than 60 bytes.
With some asic configurations xmit of frames smaller than 60 bytes may
fail.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:58 -07:00
Ron Mercer 6b318cb368 qlge: bugfix: Move netif_napi_del() to common call point.
Moving netif_napi_del() up the call chain so it will get called from all
exit points.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:56 -07:00
Ron Mercer 39a28bc480 qlge: Remove spinlock from asic init path.
There is nothing to contend with it.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:56 -07:00
Ron Mercer b25215d043 qlge: Clear shadow registers before use.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:55 -07:00
Ron Mercer 08b1bc8f4a qlge: Get rid of irqsave/restore in intr disable.
The completion interrupt disable routine is only called from the ISR, so
there is no need for irqsave/restore.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:54 -07:00
Ron Mercer c9cf0a04a0 qlge: bugfix: Tell hw to strip vlan header.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:54 -07:00
Ron Mercer 1e213303d8 qlge: Add tx multiqueue support.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:53 -07:00
Ron Mercer 22bdd4f599 qlge: Add support for GRO.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:53 -07:00
Ron Mercer d555f5921f qlge: Increase filtering for inbound csum settings.
Chip does not do UDP checksum when fragmentation occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:51 -07:00
Ron Mercer a75ee7f1cc qlge: Remove debug junk from asic reset logic.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:49 -07:00
Ron Mercer db98812f6b qlge: Move reset logic into asic_reset_worker func.
Get rid of extraneous ql_cycle_adapter.  It's only called from the one
place.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-10 04:43:48 -07:00
Christian Lamparter c035002472 p54: fix race condition in memory management
This patch fixes a number of race conditions in the driver.
Up until now, "entry" pointer was initialized before acquiring the right lock.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-06 15:54:32 -05:00
Michael Buesch 1a77733ccb b43: Fix compilation for devices without PCI core
This fixes compilation, if the PCI core is disabled.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:48 -05:00
Jouni Malinen 39d89cd34d ath9k: Add a debugfs interface for controlling virtual wiphys
debugfs ath9k/phy#/wiphy can be used to show the current list of
virtual wiphys and to add/remove virtual wiphys. Eventually, this
interface could be replaced with a cfg80211/nl80211 command that is
passed through mac80211.

For example:
# cat /debug/ath9k/phy0/wiphy
primary: phy0
# echo add > /debug/ath9k/phy0/wiphy
# cat /debug/ath9k/phy0/wiphy
primary: phy0
secondary: phy1
# echo del=phy1 > /debug/ath9k/phy0/wiphy
# cat /debug/ath9k/phy0/wiphy
primary: phy0

In addition, following commands can be used to test pausing and
unpausing of the virtual wiphys:
pause=phy1
unpause=phy1
select=phy1
(select pauses and unpauses wiphys automatically based on channel)
schedule=500
(set wiphy scheduling interval in msec; 0 = disable; default value: 500)

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:48 -05:00
Jouni Malinen f98c3bd241 ath9k: Add a simple virtual wiphy scheduler
This is a very simple scheduler that goes through the wiphys and
schedules one at a time every N milliseconds (current default value:
500 ms). This is enough for initial testing, but there are number of
areas where a more complex scheduler can improve operations greatly.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:48 -05:00
Jouni Malinen 8089cc47ed ath9k: Special processing for channel changes during scan
Allow mac80211-controlled channel changes on an active wiphy and
especially during a scan. We need this as long as the scan is
controlled by mac80211. Moving this control into the driver could
allow some optimizations on scanning while using multiple virtual
interfaces, but for now, try to work as well as possible with the
current scan mechanism.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen 7ec3e514d9 ath9k: Add workaround to recover from failed channel changes
It looks like channel change may fail in some cases and end up leaving
the hardware in state where it cannot transmit any frames. Add a
workaround to recover from this state if we detect that wiphy
selection is failing due to wiphys not leaving PAUSING state.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen ee166a0e71 ath9k: Check virtual wiphy state on tx()
mac80211 should not be requesting us to transmit frames on paused
wiphys since we stop the TX queues. Just in case, add debug code to
make sure we catch if this were to happen.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen 18eb62f87a ath9k: Pause other virtual wiphys on channel change
For now, allow channel changes immediately and just force the other
virtual wiphys to paused state. This is needed to allow
mac80211-controlled scan to control channel changes.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 465ca84d95 ath9k: Register larger listen interval
Notify the AP that we may be sleeping longer to allow the AP power
save code to buffer larger number of frames for us when using virtual
wiphys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 9580a222b8 ath9k: Make start/stop operations aware of virtual wiphys
Instead of always going through initialization/deinitialization steps,
do this only for the first/last wiphy to not break the other wiphys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 0e2dedf971 ath9k: Add routines for switching between active virtual wiphys
ath9k_wiphy_select() can be used to select a virtual wiphy to be
activated. Other virtual wiphys will be paused and once that is done,
the operational channel is changed and the wiphys that are on the
selected channel will be unpaused.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen f0ed85c6c7 ath9k: Virtual wiphy pause/unpause functionality
Allow virtual wiphys to be paused/unpaused to allow off-channel
operations. Pause will stop all TX queues for the wiphy and move the
STA into power save mode if in managed mode. Unpause wakes up the TX
queues and notifies the AP that the STA woke up if in managed mode.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen b93bce2a5e ath9k: Configure RX filter for multi-BSSID broadcast
Allow RX filter to pass through all broadcast/multicast frames (i.e.,
no BSSID filtering) if virtual interfaces are used. Software filtering
will be used in this case to drop broadcast/multicast frames for
foreign BSSIDs.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen c52f33d05e ath9k: Add support for multiple secondary virtual wiphys
The new struct ath_softc::sec_wiphy array is used to store information
about virtual wiphys and select which wiphy is used in calls to
mac80211. Each virtual wiphy will be assigned a different MAC address
based on the virtual wiphy index.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen bce048d77d ath9k: Add data structure for supporting virtual radio/wiphy operation
This is the initial step in allowing ath9k to register multiple
virtual radios (wiphys). The goal of virtual radios is to allow the
same radio to be shared for multiple virtual interfaces that may
operate on different channels. The mac80211 virtual interface support
is designed only for single channel operation and as such, it is not
suitable for this type of use. Anyway, it can be used on top of the
virtual radio concept, if desired (e.g., use two virtual radios to
handle two channels and then add multiple mac80211 virtual interfaces
on top of each virtual radio).

The new struct ath_wiphy is now registered as the driver data
structure for wiphy. This structure has a pointer to the shared (among
virtual wiphys of the same physical radio) struct ath_softc data. The
primary wiphy maintains the allocated memory for ath_softc. Secondary
(virtual) wiphys will only allocate the new ath_wiphy structure.

Registration of secondary wiphys is added in a separate patch.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen 8ca21f0185 ath9k: Set BSSID mask based on configured interfaces
Instead of using a hardcoded BSSID mask (mask for own addresses),
iterate through all active interfaces and determine the minimal mask
that covers all local addresses.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen 2c3db3d51e ath9k: Cleanup multiple VIF processing
Replace the internal sc_vaps array and index values by using vif
pointer from mac80211. Allow multiple VIPs to be registered. Though,
number of beaconing VIFs is still limited by ATH_BCBUF (currently
1). Multiple virtual STAs support is not yet complete, but at least
the data structures should now be able to handle this.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Ivo van Doorn 860559fe68 rt2x00: Export all register stats through debugfs
By exporting the register base, and word size to userspace
through debugfs it will be easier to create scripts which
parse the register information. This makes debugging and
register dumps information easier.

This will break my previous scripts which dumped and parsed
all information, but since this is only for debugging purposes
this change should not be a problem.

Dumpfiles created with the old version can be easily manually
edited to make them compatible with this new approach, which
means there will be no problems comparing dumps from the
different versions either.

Also be more consistent with using tabs to seperate different
fields.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen d216aaa674 ath9k: Clean up setkey operations
There is no need to use ath_keyset() wrapper for
ath9k_hw_set_keycache_entry() calls. In addition, improve the comments
describing the key setting operations.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Gabor Juhos aebe2b5624 ath9k: fix AR_TXCFG_DMASZ_MASK value
The current bitmask is invalid, because the tx dma size is a 3 bit wide
value.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Sujith b75bc150af ath9k: Remove unused variables in struct ath_beacon_config
We don't store the beacon timestamp internally, nor
do we do any TIM handling in ath9k.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Sujith 2554935b08 ath9k: Lock config_interface() callback with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith b238e90e99 ath9k: Handle TSF properly for AP mode
The TSF has to be reset only once, upon bringing
the interface up in AP mode. For any beacon reconfigure calls
after that, resetting the TSF results in incorrect beacon generation.
The only exception is a change in the beacon interval,
which is indicated to the driver by mac80211 through
IEEE80211_CONF_CHANGE_BEACON_INTERVAL, handle this properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith 5379c8a266 ath9k: Split beacon configuration into mode specific routines
This makes the code easier to understand.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith 9546aae086 ath9k: Cleanup beacon stuck processing
We never use SC_OP_NO_RESET, it is not configurable at all.
Remove all code that deals with this flag and make beacon
stuck processing simple.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Sujith 9fc9ab0a69 ath9k: Scrub beacon.c
Remove useless comments, fix indentation.
Also, remove all occurrences of ASSERT(vif) which are not needed.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Sujith 0c98de6535 ath9k: Use new scan notifiers from mac80211
The only use case for this right now is ANI calibration,
but more might come up in the future.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Alina Friedrichsen 0ad65bd7e1 ath5k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Alina Friedrichsen b9a1619763 ath9k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Michael Buesch ce4fbdbf16 b43: Pass more RX flags to mac80211
This changes the RX handler to pass more status flags to mac80211.
It also changes part of the drop policy, if bad frames were requested. (Note that
currently mac80211 will throw a WARN_ON in that case. But nothing bad will happen).

This also removes some obsolete unused timestamping code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Alina Friedrichsen 91ed19f5f6 ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
So that a new created IBSS network
doesn't break on the first scan.

It seems to Sujith and me that this
stupid code unnecessary, too.

So remove it...

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Vivek Natarajan 541d8dd5e8 ath9k: Handle power modes in isr for power save.
Restore network sleep mode in isr if power save is enabled.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Sujith 9331ec8060 ath9k: Fill in rate_update mac80211 callback
This callback can be used to handle dynamic 20/40,
and changes in the operating channel's HT parameters.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Jouni Malinen e0caf9eaae ath9k: Remove unused key xoring
This is not used anywhere in ath9k and is just making the code more
confusing.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:38 -05:00
Jouni Malinen 672903b329 ath9k: Document keycache operations
There are number of small details about the keycache operations that
are very easy to miss (and forget), so better include detailed
comments in ath9k_hw_set_keycache_entry() to avoid having to figure
out this every time when having to touch this area.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:38 -05:00
Frank Seidel a412c8040d iwlwifi: reduce stack size
Reduce stack memory footprint of iwlwifi.
(From >1000 bytes for each *_table_read
on i386 down to 32)

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:37 -05:00
Ivo van Doorn 64abd80330 rt2x00: Fix SW antenna diversity
Software antenna tuning is broken because of an function
ordering problem during rt2x00link_tuner().

rt2x00link_precalculate_signal()
rt2x00leds_led_quality()
rt2x00lib_antenna_diversity()

rt2x00link_precalculate_signal() will reset the quality TX/RX counters,
however rt2x00lib_antenna_diversity() requires the RX counter to
see what RSSI value must be used for a particular antenna.
We can't change the ordering since rt2x00lib_antenna_diversity() might
reset other statistics which are needed by the function called earlier.

Move the reset of the quality TX/RX counters into a seperate function
and move the call to after rt2x00lib_antenna_diversity().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:37 -05:00
Abhijeet Kolekar 14d2aac580 iwl3945 : use iwl_activate_qos
3945 can use iwl_activate_qos instead of iwl3945_activate_qos.
Patch does two things
1) Patch adds iwl_activate_qos in core library.
2) 3945 makes use of iwl_activate_qos.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 2a4ddaabe0 iwl3945: add iwl3945_setup_mac
Patch does following,
1) mac80211's shared data is now initialized in iwl3945_setup_mac.
2) Set the rfkill to right state after initialization

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Reinette Chatre c8f16138b5 iwlwifi: fix *pci_probe error flow
for iwlagn:
- Have to free eeprom of version check fails - otherwise we end up with
  memory leak.
- Include removal of workqueue (created in _setup_deferred_work) in error
  handling.

for iwl3945:
- Fix a few places to jump to correct error handling.
- Reorganize error handling to match with code flow.
- Include iwl_free_channel_map as part of error handling.
- Include releasing eeprom as part of error handling.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 6e21f15cac iwl3945: unify set key flow with iwlwifi
unify the set key flow with iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 7c4cbb6ee0 iwl3945: synchronize timestamp with uCode
In IBSS, TSF maintains local clock counters at each station. Network
Synchronization follows a completely distributed scheme where beacon frames
are generated. Each station maintain its own TSF timestamp, extracted from
beacon timestamps they recieved. Following patch synchronize this beacon timestamp
with uCode.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:35 -05:00
Jay Sternberg 39e6d2256b iwlwifi: update 5150 API version to support new firmware
update API to support new numbering that is used for other newer devices.
5150 ucode has not been released yet, so the first released API will be v2.
For those who do have a v1 API the driver does have backward compatibility
support new value of REPLY_TX_POWER_DBM_CMD

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:35 -05:00
Michael Buesch e79c1ba84c ssb: Add SPROM fallback support
This adds SSB functionality to register a fallback SPROM image from the
architecture setup code.

Weird architectures exist that have half-assed SSB devices without SPROM attached to
their PCI busses. The architecture can register a fallback SPROM image that is
used if no SPROM is found on the SSB device.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:32 -05:00
Jiri Slaby db5b4f7ae3 ath5k: fix hw rate index condition
Make sure we print out a warning when the index is out of bounds,
i.e. even on hw_rix == AR5K_MAX_RATES.

Also change to WARN and print text with the reported hw_rix.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:32 -05:00
Jouni Malinen 3f53dd64f1 ath9k: Fix hw crypto configuration for TKIP in AP mode
Incorrect Michael MIC key (RX, should have been TX) was set for the
group key in AP mode. This resulted in all broadcast frames triggering
Michael MIC errors and eventual TKIP countermeasures. The change here
sets the correct Michael MIC key based on whether the local end is the
authenticator (well, AP for now).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Tested-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Frank Seidel 998a5a7d6a airo: reduce stack memory footprint
Applying kernel janitors todos (reduce stack
footprint where possible) to airo wireless driver.
(Before 1124 bytes on i386, now 876)

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Roel Kluin b837e606d1 wireless, wavelan: spin off by 1
spin can reach -1 after the loop, so 0 is still success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Vasanthakumar Thiagarajan fa09632b02 ath9k: Remove ununsed ack duration stuff with long/short preamble
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Vasanthakumar Thiagarajan f40154e7f7 ath9k: Configure Power control register appropriately for h/w with 4k eeprom
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Alina Friedrichsen 5fe73197d3 zd1211rw: Implement get_tsf()
This patch implements get_tsf() of ieee80211_ops in the zd1211rw driver.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Jouni Malinen b3bd89ce95 ath9k: Add module parameter to disable hardware crypto
nohwcrypt=1 module parameter can now be used to disable hardware
crypto in ath9k. While the hardware acceleration handles most cases,
it may be useful to be able to force mac80211 software implementation
to be used for some tests, e.g., with virtual interface combinations
that may not yet be supported in the key cache configuration. In
addition, this allows management frame protection to be tested with
older hardware revisions.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Reinette Chatre 623d563e52 iwlwifi: fix error flow in iwl*_pci_probe
Both the agn and 3945 drivers has some problems with dealing with
errors in their probe functions. Ensure that a goto will undo only
things that was done before the goto was called.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:06 -05:00
Xose Vazquez Perez ef4bb70d87 rt2x00 : more devices to rt73usb.c
add more usb_dev to rt73usb.c . IDs 'stolen' from the
windows inf file(10/21/2008, 1.03.02.0000) plus some
from the Ralink linux driver(2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2)

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:05 -05:00
Xose Vazquez Perez 9eb77ab076 rt2x00 : more devices to rt2500usb.c
add more usb_dev to rt2500usb.c . IDs 'stolen' from the
windows inf file(02/12/2009, 2.01.01.0015).

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:05 -05:00
David S. Miller 508827ff0a Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/tokenring/tmspci.c
	drivers/net/ucc_geth_mii.c
2009-03-05 02:06:47 -08:00
Patrick McHardy 72e2240f18 bonding: Fix device passed into ->ndo_neigh_setup().
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-05 01:57:44 -08:00
David S. Miller 77827a7cf3 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-03-04 23:59:54 -08:00
Meelis Roos 87786945fe tmspci: fix request_irq race
Currently, tmspci tokenring driver crashes on device initialization
because it requests its irq before initializing corresponding data
structures. Fix this by moving request_irq call to a safer place.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 19:24:27 -08:00
Ben Hutchings 2c3c3d02f2 sfc: Improve NIC internal error recovery
Make the error count a per-NIC variable.
Reset this the count after an hour if it has not reached the critical value.
Set the critical value back to 5.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:25 -08:00
Ben Hutchings 4720bc6cfe sfc: Fix search for flush completion events
When flushing queues we disable normal interrupt and event handling and
poll event queue 0 looking for flush completions.  Unfortunately the
flush event polling loop fails to move past any other type of event.
This problem has not been observed in production hardware but appears to
be a possibility.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:24 -08:00
Ben Hutchings 32d760073e sfc: Don't wake TX queues while they're being flushed
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:23 -08:00
Ben Hutchings 8c870379d2 sfc: Clear I2C adapter structure in falcon_remove_nic()
i2c_del_adapter() leaves dangling pointers in the structure.  If we
retry the NIC probe and pass the structure to i2c_add_adapter() again
it will lead to an oops unless we clear it first.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:22 -08:00
Ben Hutchings 115122afc5 sfc: Clean up properly on reset failure paths
If MAC switching fails, stop the port properly.

If PHY reinitialisation fails, clear the port_initialized flag.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:22 -08:00
Ben Hutchings a7ef59332b sfc: Reject packets from the kernel TX queue during a loopback self-test
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:21 -08:00
Ben Hutchings ca83db369c sfc: Fix efx_ethtool_nway_result() to use clause 45 MDIO registers
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 17:40:20 -08:00
Matt Carlson 9f8ac0b7b0 tg3: Fix 5906 link problems
Commit 6833c043f9 introduced the phy
auto-powerdown capability.  While the APD feature only works for 5761
and 5784 asic revisions, the (harmless portion of the) code was applied
to all 5705 and newer devices.  However, the 5906 phy departs from the
usual design.  This commit was interfering with the 5906's ability to
negotiate link against some switches.  This patch corrects the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 15:08:19 -08:00
Helge Bahmann 5ad8b7d126 drm: fix double lock typo
[airlied: you shall not retype patches from other trees half asleep]

Signed-of-by: Dave Airlie <airlied@redhat.com>
2009-03-04 21:49:14 +10:00
Roel Kluin 4a8fd2cfda sungem: another error printed one too early
Another error was printed one too early.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:53 -08:00
Roel Kluin 9487311157 aoe: error printed 1 too early
with while (i-- > 0); i reaches -1 after the loop, so the test below is printed
one too early: 0 still means success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:52 -08:00
Roel Kluin b9bdcd9bd7 net pcmcia: worklimit reaches -1
with while (--worklimit >= 0); worklimit reaches -1 after the loop. In
3c589_cs.c this caused a warning not to be printed.

In 3c574_cs.c contrastingly, el3_rx() treats worklimit differently:

static int el3_rx(struct net_device *dev, int worklimit)
{
	while (--worklimit >= 0) { ... }
	return worklimit;
}

el3_rx() is only called by function el3_interrupt(): twice:

static irqreturn_t el3_interrupt(int irq, void *dev_id)
{
        int work_budget = max_interrupt_work;
	while(...) {
		if (...)
			work_budget = el3_rx(dev, work_budget);
		if (...)
			work_budget = el3_rx(dev, work_budget);
		if (--work_budget < 0) {
		        ...
		        break;
		}
	}
}
The error path can occur 2 too early.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:52 -08:00
Roel Kluin 858b9ced6e net: more timeouts that reach -1
with while (timeout-- > 0); timeout reaches -1 after the loop, so the tests
below are off by one. also don't do an '< 0' test on an unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04 00:11:42 -08:00
Ron Mercer fc1f9ea51d qlge: Add support for lost firmware events.
When the firmware is issuing events to the driver the events
must be removed from the queue.  If the queue overflows, the
firmware will build and special event that captures those that
are lost.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:49 -08:00
Ron Mercer bb6676705e qlge: Save status from firmware crash (system err).
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:49 -08:00
Ron Mercer 7c92191cb4 qlge: Improve handling for firmware init failure.
This event will arrive at boot time or after an
MPI processor reset if the firmware failed to initialize.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:48 -08:00
Ron Mercer f56b54f542 qlge: Clean up event handler for firmware init.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:48 -08:00
Ron Mercer 2ee1e272d1 qlge: Add worker-handler for firmware events.
This worker and it's supporting routines are used for
IDC 'inter-device-communication' events that require
an ACK mailbox command be sent to allow completion
of the request. These requests are originated by
another function wanting to change some common
port paramters. Typical example would be:

1) Change max TX/RX frame size allowed.
2) Change pause parameters.
3) Change loopback mode.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:47 -08:00
Ron Mercer 5700abe947 qlge: Clean up link up processing.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:46 -08:00
Ron Mercer 11d9fe68ac qlge: Clean up link down processing.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:46 -08:00
Ron Mercer eae6b58fb2 qlge: Add firmware support for insert/remove SFP.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:50:45 -08:00
Peter Korsgaard a1a69c8db7 dm9601: new vendor/product IDs
Add vendor/product IDs for new no name dm9601 compatible usb ethernet
adaptors.

Reported-by: Eric Lauriault <eric@linux.ca>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:48:16 -08:00
Eric Biederman 38d408152a veth: Allow setting the L3 MTU
The limitation to only 1500 byte mtu's limits the utility of the veth
device for testing routing.  So implement implement a configurable
MTU.

For consistency I drop packets on the receive side when they are
larger than the MTU.  I count those drops.  And I allow
a little padding for vlan headers.

I also test the mtu when a new device is created with netlink
because that path currently bypasses the current mtu setting
code.

Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 23:36:04 -08:00
Linus Torvalds 9c1a774705 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ixp4xx - Fix qmgr_request_queue build failure
  crypto: api - Fix module load deadlock with fallback algorithms
2009-03-03 17:05:08 -08:00
Krzysztof Hałasa 1777f1a978 crypto: ixp4xx - Fix qmgr_request_queue build failure
There is another user of IXP4xx queue manager, fix it.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2009-03-04 08:01:22 +08:00
Linus Torvalds f41bf2ab99 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] fix lots of ARM __devexit sillyness
  [ARM] 5417/1: Set the correct cacheid for ARMv6 CPUs with ARMv7 style MMU
  [ARM] 5416/1: Use unused address in v6_early_abort
  [ARM] 5411/1: S3C64XX: Fix EINT unmask
  [ARM] at91: fix for Atmel AT91 powersaving
  [ARM] RiscPC: Fix etherh oops
2009-03-03 14:12:41 -08:00
Russell King bdf602bd73 [ARM] fix lots of ARM __devexit sillyness
`iop_adma_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`mv_xor_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`mv64xxx_i2c_unmap_regs' referenced in section `.devinit.text' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`mv64xxx_i2c_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`orion_nand_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o
`pxafb_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-03 21:04:04 +00:00
Dhananjay Phadke 567c6c4e2b netxen: firmware download improvements
o set port mode after resetting device.
o prefer cut-through firmware (doesn't require on-card memory).
o load flashed firmware if newer.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 00:05:27 -08:00
Dhananjay Phadke 1f434f6384 netxen: support larger dma addressing
Support larger dma mask if firmware indicates capability
to handle larger addresses.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-03 00:05:26 -08:00
Ron Mercer bcc2cb3b97 qlge: Add support for getting/setting port config.
This patch adds functionality to get and set port parameters.
Currently it is used to set maximum TX/RX frame sizes. This process is
also capable of setting:
1) Pause type: Standard or Priority based.
2) Loop back mode.
3) Enable Jumbo frame mode (included here...)

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:45:24 -08:00
Ron Mercer cdca8d02ea qlge: Add support for device ID 8000.
This device has more firmware support for link management, setting
TX and RX maximum frame sizes.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:45:24 -08:00
Ron Mercer ca0413b66a qlge: Add support for firmware mailbox commands.
This interface will be used for setting things like maximum
frame size, setting WOL, and ACKing changes requested by the FCOE
function.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:45:23 -08:00
Eilon Greenstein c1accad323 bnx2x: Version update
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:49 -08:00
Eilon Greenstein 0a64ea5748 bnx2x: Register dump
Adding "ethtool -d" support. Due to the complexity of the FW and HW, there are a
lot of different regions in the chip - to keep the code as clean as possible,
the ranges were put in an H file. Some areas cannot be read if the driver is
running - so by default, the driver will not access those areas - but any
programmer facing a problem will be able to easily manipulate the driver to
extract full dump. The full dump can also be used with kernel dump modules in
case of kernel panic.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:48 -08:00
Eilon Greenstein c3eefaf676 bnx2x: Debug prints
Add the FP index to relevant debug prints and simply beautify some others

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:48 -08:00
Eilon Greenstein c016201c5c bnx2x: Whitespace
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:46 -08:00
Eilon Greenstein 8660d8c3ab bnx2x: Loopback support at external PHY
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:45 -08:00
Eilon Greenstein 9223dea6c7 bnx2x: Display BCM8481 FW version
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:44 -08:00
Eilon Greenstein 3b313b618b bnx2x: BCM8705 has no microcode
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:44 -08:00
Eilon Greenstein d7bc788bec bnx2x: Enable BCM8726 module transmitter
When 8726 module detection option is disabled, module should be transmitting
regardless of invalid read from EEPROM

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:43 -08:00
Eilon Greenstein cc1cb004df bnx2x: Supporting new BCM8726 FW
Microcode download requires write of another register and read from
"Limiting/LRM mode" register before setting

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:43 -08:00
Eilon Greenstein 762d5f6c95 bnx2x: Calling tx disable unconditionally
On unload, the FW assumes that no packets will be sent after the driver sends
the FW stop command. To ensure that, the driver must always call
netif_tx_disable

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:42 -08:00
Eilon Greenstein 490c3c9bf9 bnx2x: Using DMA engine
Using DMA engine (DMAE) to initialize large consecutive memories in the chip

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:41 -08:00
Eilon Greenstein 2059aba7e4 bnx2x: Missing module parameter description
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:40 -08:00
Eilon Greenstein 8534f32c2f bnx2x: napi_poll budget check
Check the napi_poll budget only when updating it. Also add a comment to explain
the rmb

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:39 -08:00
Eilon Greenstein 7961f79123 bnx2x: Unlimited Tx interrupt work
The Tx interrupt is very short and there is no need to limit it to a budget

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:39 -08:00
Eilon Greenstein 161197853d bnx2x: Add rmb to read status block indices on load
Add rmb to read status block indices on load

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:38 -08:00
Eilon Greenstein 6044735d8d bnx2x: Reduce the likelihood of smb_mb
As the comment explains, this smb_mb is needed only if the queue is stopped
(which is unlikely) so the barrier can be moved to that location

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:38 -08:00
Eilon Greenstein 0d1a8d2d7d bnx2x: Misleading name
As noted by Ben Hutchings <bhutchings@solarflare.com>, these are the
capabilities offsets and not the ID itself

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:37 -08:00
Eilon Greenstein 98589bb109 bnx2x: Remove redundant smb_mb on unload
As noted by Ben Hutchings <bhutchings@solarflare.com>, these smb_mb are not
needed

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:32:36 -08:00
Russell King 07555c9880 OMAP: enable smc911x support for LDP platform
The following patch enables SMC911x support to work on the OMAP LDP
board.  Although the SMC911x driver will eventually be obsoleted, the
smsc911x patches are rather invasive for the -rc kernels.

Rather than risk destablising smsc911x, this simpler patch is preferred
to allow the network interface to work.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:29:37 -08:00
David Dillow a8c9a53c22 typhoon: repair firmware loading
The conversion to avoid using pci_alloc_consistent() broke the firmware
load process, as well as added an order-4 kmalloc and doubled the memory
usage of the firmware image. Go back to loading a page at a time.

Also, since the user can now give us utter garbage for firmware, do a
cursory validation so we don't try to load just anything.

Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 22:15:09 -08:00
Linus Torvalds 43e407071d Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Fix use-before-null-check in i915_irq_emit().
  drm: Avoid client deadlocks when the master disappears.
  drm: Wake up all lock waiters when the master disappears.
  drm: Don't return ERESTARTSYS to user-space.
2009-03-02 16:11:36 -08:00
Jesse Brandeburg d20b606c99 e1000: fix unmap bug
This is in reference to the issue shown in kerneloops (search e1000 unmap)

The e1000 transmit code was calling pci_unmap_page on dma handles that it
might have called pci_map_single on.

Same bug as e1000e

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 16:03:21 -08:00
Jesse Brandeburg 8ddc951c73 e1000e: fix unmap bug
This is in reference to https://bugzilla.redhat.com/show_bug.cgi?id=484494
Also addresses issue show in kerneloops

The e1000e transmit code was calling pci_unmap_page on dma handles that it
might have called pci_map_single on.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 16:02:53 -08:00
Alexander Duyck 19147bb5f1 igb: remove skb_orphan calls
Remove skb_orphan call from igb driver as it can cause multiple issues due
to the fact that it is calling the desctructor and removing the skb from
the socket prior to transmission.

The call was added to improve performance but did so by allowing the skb to
be removed from the socket which gave the socket more window space to
transmit.  The performance gain is not worth the extra problems that this
kind of workaround can introduce as this could lead to a potential DoS if a
UDP stream decided to monopolize the transmit path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 16:01:53 -08:00
Eric Anholt 299eb93c5f drm/i915: Fix use-before-null-check in i915_irq_emit().
This could be triggered by a client asking to emit an irq when the device
wasn't initialized.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-03-03 09:53:05 +10:00
Thomas Hellstrom fda714c29c drm: Avoid client deadlocks when the master disappears.
This is done by
1) Wake up lock waiters when we close the master file descriptor.
   Not when the master structure is removed, since the latter
   requires the waiters themselves to release the refcount on the
   master structure -> Deadlock.
2) Send a SIGTERM to all clients waiting for the lock.
   Normally these clients will get a SIGPIPE when the X server dies,
   but clients may also spin trying to grab the DRM lock, without
   getting any sort of notification.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-03-03 09:50:20 +10:00
Thomas Hellstrom 171901d15d drm: Wake up all lock waiters when the master disappears.
Currently only one waiter is woken up, leaving other waiters
hanging waiting for the DRM lock.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-03-03 09:49:54 +10:00
Thomas Hellstrom 4d77c88e91 drm: Don't return ERESTARTSYS to user-space.
That return code is for in-kernel use only.
Use EINTR instead.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-03-03 09:49:46 +10:00
Linus Torvalds d86a1c3de5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  sdhci: Add NO_BUSY_IRQ quirk for Marvell CAFE host chip
  sdhci: Add quirk for controllers with no end-of-busy IRQ
2009-03-02 15:48:00 -08:00
Linus Torvalds 359aa09be9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
  zaurus: add usb id for motomagx phones
  usbnet: make usbnet_get_link() fall back to ethtool_op_get_link()
  veth: Fix carrier detect
  cdc_ether: add usb id for Ericsson F3507g
  r8169: read MAC address from EEPROM on init (2nd attempt)
  tcp: fix retrans_out leaks
  net headers: export dcbnl.h
  net headers: cleanup dcbnl.h
  netpoll: Add drop checks to all entry points
  gianfar: Do right check on num_txbdfree
  pkt_sched: sch_drr: Fix oops in drr_change_class.
  b44: Disable device on shutdown
  b44: Unconditionally enable interrupt routing on reset
  net: fix hp-plus build error
  libertas: fix misuse of netdev_priv() and dev->ml_priv
  ipv6: don't use tw net when accounting for recycled tw
  asix: new device ids
  tcp_scalable: Update malformed & dead url
  netfilter: xt_recent: fix proc-file addition/removal of IPv4 addresses
  netxen: handle pci bar 0 mapping failure
  ...
2009-03-02 15:46:09 -08:00
Linus Torvalds 6b3bf20491 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: elantech - touchpad driver miss-recognising logitech mice
  Input: synaptics - ensure we reset the device on resume
  Input: usbtouchscreen - fix eGalax HID ignoring
  Input: ambakmi - fix timeout handling in amba_kmi_write()
  Input: pxa930_trkball - fix write timeout handling
  Input: struct device - replace bus_id with dev_name(), dev_set_name()
  Input: bf54x-keys - fix debounce time validation
  Input: spitzkbd - mark probe function as __devinit
  Input: omap-keypad - mark probe function as __devinit
  Input: corgi_ts - mark probe function as __devinit
  Input: corgikbd - mark probe function as __devinit
  Input: uvc - the button on the camera is KEY_CAMERA
  Input: psmouse - make MOUSE_PS2_LIFEBOOK depend on X86
  Input: atkbd - make forced_release_keys[] static
  Input: usbtouchscreen - allow reporting calibrated data
2009-03-02 15:43:03 -08:00
Linus Torvalds 7b88ed671a Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] mpt: fix disable lsi sas to use msi as default
  [SCSI] fix ABORTED_COMMAND looping forever problem
  [SCSI] sd: revive sd_index_lock
  [SCSI] cxgb3i: update the driver version to 1.0.1
  [SCSI] cxgb3i: Fix spelling errors in documentation
  [SCSI] cxgb3i: added missing include in cxgb3i_ddp.h
  [SCSI] cxgb3i: Outgoing pdus need to observe skb's MAX_SKB_FRAGS
  [SCSI] cxgb3i: added per-task data to track transmit progress
  [SCSI] cxgb3i: transmit work-request fixes
  [SCSI] hptiop: Add new PCI device ID
2009-03-02 15:41:59 -08:00
Andres Salomon a0874897b1 sdhci: Add NO_BUSY_IRQ quirk for Marvell CAFE host chip
As described here: http://lkml.org/lkml/2009/2/20/265

The CAFE chip is broken due to commit e809517f6f.
Anton added a quirk here: http://lkml.org/lkml/2009/2/20/279 that fixes
CAFE's problem.  This adds the quirk for CAFE.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-03-02 21:48:20 +01:00
Ben Dooks f945405cde sdhci: Add quirk for controllers with no end-of-busy IRQ
The Samsung SDHCI (and FSL eSDHC) controller block seems to fail
to generate an INT_DATA_END after the transfer has completed and
the bus busy state finished.

Changes in e809517f6f to use the
new busy method are the cause of the behaviour change.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-03-02 21:46:35 +01:00
Ben Hutchings 94f52cd152 sfc: Add support for SFN4112F SFP+ reference design
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:07 -08:00
Ben Hutchings 8129d2173e sfc: Clean up LED control
Reinitialise LEDs after overriding them for identification.

Rename set_fault_led method to set_id_led since we always use it for
NIC identification and not faults.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:05 -08:00
Ben Hutchings b4a44a6987 sfc: Delete unused efx_blinker::led_num field
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:05 -08:00
Ben Hutchings d2d2c37314 sfc: Add support for QT2025C PHY
This is a new PHY supporting SFP+ modules, used in the SFN4112F
reference design.  It is similar to the QT2022C2 and shares much of
its support code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:04 -08:00
Ben Hutchings 3f39a5e9bf sfc: Fix reporting of PHY id
Shuffle bits of the OUI into the conventional written order.

Replace PHY id component macros with functions.

Zero-pad PHY id components in log messages.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:04 -08:00
Ben Hutchings f794fd4400 sfc: Remove "XFP" from log messages that are not specific to XFP
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:03 -08:00
Ben Hutchings 190dbcfd68 sfc: SFT9001/SFN4111T: Check PHY boot status during board initialisation
During SFN4111T initialisation, check whether the PHY boot status
indicates a bad firmware checksum.  If so, prepare to reflash rather
than continuing with normal initialisation.

Remove redundant PHY boot status check from tenxpress_phy_init().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:03 -08:00
Ben Hutchings 7b065f91fa sfc: Fix test for MDIO read failure
Commit 27dd2caca4 changed
mdio_clause45_check_mmds() to read both DEVS0 and DEVS1 registers and
to combine their values into an unsigned 32-bit mask.  This made the
following test for a negative (failure) value useless.  Fix it to
check whether either read failed.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:02 -08:00
Ben Hutchings 22ef02c23a sfc: SFT9001: Include non-breaking cable diagnostics in online self-tests
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:15:02 -08:00
Inaky Perez-Gonzalez c747583d19 wimax/i2400m: implement RX reorder support
Allow the device to give the driver RX data with reorder information.

When that is done, the device will indicate the driver if a packet has
to be held in a (sorted) queue. It will also tell the driver when held
packets have to be released to the OS.

This is done to improve the WiMAX-protocol level retransmission
support when missing frames are detected.

The code docs provide details about the implementation.

In general, this just hooks into the RX path in rx.c; if a packet with
the reorder bit in the RX header is detected, the reorder information
in the header is extracted and one of the four main reorder operations
are executed. In one case (queue) no packet will be delivered to the
networking stack, just queued, whereas in the others (reset, update_ws
and queue_update_ws), queued packet might be delivered depending on
the window start for the specific queue.

The modifications to files other than rx.c are:

- control.c: during device initialization, enable reordering support
  if the rx_reorder_disabled module parameter is not enabled

- driver.c: expose a rx_reorder_disable module parameter and call
  i2400m_rx_setup/release() to initialize/shutdown RX reorder
  support.

- i2400m.h: introduce members in 'struct i2400m' needed for
  implementing reorder support.

- linux/i2400m.h: introduce TLVs, commands and constant definitions
  related to RX reorder

Last but not least, the rx reorder code includes an small circular log
where the last N reorder operations are recorded to be displayed in
case of inconsistency. Otherwise diagnosing issues would be almost
impossible.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:28 -08:00
Harvey Harrison 61b8d2688a wimax: replace uses of __constant_{endian}
Base versions handle constant folding now.

Edited by Inaky to fix conflicts due to changes in netdev.c

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:27 -08:00
Inaky Perez-Gonzalez fd5c565c0c wimax/i2400m: support extended data RX protocol (no need to reallocate skbs)
Newer i2400m firmwares (>= v1.4) extend the data RX protocol so that
each packet has a 16 byte header. This header is mainly used to
implement host reordeing (which is addressed in later commits).

However, this header also allows us to overwrite it (once data has
been extracted) with an Ethernet header and deliver to the networking
stack without having to reallocate the skb (as it happened in fw <=
v1.3) to make room for it.

- control.c: indicate the device [dev_initialize()] that the driver
  wants to use the extended data RX protocol. Also involves adding the
  definition of the needed data types in include/linux/wimax/i2400m.h.

- rx.c: handle the new payload type for the extended RX data
  protocol. Prepares the skb for delivery to
  netdev.c:i2400m_net_erx().

- netdev.c: Introduce i2400m_net_erx() that adds the fake ethernet
  address to a prepared skb and delivers it to the networking
  stack.

- cleanup: in most instances in rx.c, the variable 'single' was
  renamed to 'single_last' for it better conveys its meaning.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:26 -08:00
Kay Sievers 347707baa7 wimax: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: inaky.perez-gonzalez@intel.com
Cc: linux-wimax@intel.com
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:26 -08:00
Inaky Perez-Gonzalez 8987691a4a wimax/i2400m: allow control of the base-station idle mode timeout
For power saving reasons, WiMAX links can be put in idle mode while
connected after a certain time of the link not being used for tx or
rx. In this mode, the device pages the base-station regularly and when
data is ready to be transmitted, the link is revived.

This patch allows the user to control the time the device has to be
idle before it decides to go to idle mode from a sysfs
interace.

It also updates the initialization code to acknowledge the module
variable 'idle_mode_disabled' when the firmware is a newer version
(upcoming 1.4 vs 2.6.29's v1.3).

The method for setting the idle mode timeout in the older firmwares is
much more limited and can be only done at initialization time. Thus,
the sysfs file will return -ENOSYS on older ones.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:25 -08:00
Inaky Perez-Gonzalez 6a0f7ab830 wimax/i2400m: firmware_check() encodes the firmware version in i2400m->fw_version
Upcoming modifications will need to test for the running firmware
version before activating a feature or not. This is helpful to
implement backward compatibility with older firmware versions.

Modify i2400m_firmware_check() to encode in i2400m->fw_version the
major and minor version numbers of the firmware interface.

As well, move the call to be done as the very first operation once we
have communication with the device during probe() [in
__i2400m_dev_start()]. This is needed so any operation that is
executed afterwards can determine which fw version it is talking to.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:24 -08:00
Inaky Perez-Gonzalez efa05d0f0a wimax/i2400m: drop support for deprecated major fw interface, add for new minor
Firmware interface version 8.x.x has long been deprecated and is no
longer supported (nor available, as it is a preproduction firmware),
so it can be safely dropped.

Add support for firmware interface v9.2.x (current is 9.1.x). Firmware
version 9.2.x is backwards compatible with 9.1.x; new features are
enabled if switches are pressed to turn them on. Forthcoming commits
to the driver will start pressing those switches when the firmware
interface supports it.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:23 -08:00
Inaky Perez-Gonzalez 1039abbc5b wimax/i2400m: add the ability to fallback to other firmware files if the default is not there
In order to support backwards compatibility with older firmwares when
a driver is updated by a new kernel release, the i2400m bus drivers
can declare a list of firmware files they can work with (in general
these will be each a different version). The firmware loader will try
them in sequence until one loads.

Thus, if a user doesn't have the latest and greatest firmware that a
newly installed kernel would require, the driver would fall back to
the firmware from a previous release.

To support this, the i2400m->bus_fw_name is changed to be a NULL
terminated array firmware file names (and renamed to bus_fw_names) and
we add a new entry (i2400m->fw_name) that points to the name of the
firmware being currently used. All code that needs to print the
firmware file name uses i2400m->fw_name instead of the old
i2400m->bus_fw_name.

The code in i2400m_dev_bootstrap() that loads the firmware is changed
with an iterator over the firmware file name list that tries to load
each form user space, using the first one that succeeds in
request_firmware() (and thus stopping the iteration).

The USB and SDIO bus drivers are updated to take advantage of this and
reflect which firmwares they support.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 03:10:23 -08:00