Commit graph

19034 commits

Author SHA1 Message Date
Joe Perches c1f51212eb drivers/net/chelsio: Use pr_<level>, netif_msg_<type>
Convert CH_<level> and CH_DBG uses to pr_<level> and netif equivalents
Remove CH_<level> and CH_DBG macro definitions

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-26 01:38:34 -08:00
Yegor Yefremov 9abd543864 KS8695: Don't call netif_carrier_off() from ndo_stop()
netif_carrier_on() and netif_carrier_off() should be called from
link status interrupt handler

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-26 01:19:39 -08:00
David S. Miller 19bc291c99 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-core.h
	drivers/net/wireless/rt2x00/rt2800pci.c
2010-02-25 23:26:21 -08:00
David S. Miller 0448873480 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-02-25 23:22:42 -08:00
Linus Torvalds 6ebdc661b6 Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits)
  of: remove undefined request_OF_resource & release_OF_resource
  of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
  of: move definition of of_chosen into common code.
  of: remove unused extern reference to devtree_lock
  of: put default string compare and #a/s-cell values into common header
  of/flattree: Don't assume HAVE_LMB
  of: protect linux/of.h with CONFIG_OF
  proc_devtree: fix THIS_MODULE without module.h
  of: Remove old and misplaced function declarations
  of/flattree: Make the kernel accept ePAPR style phandle information
  of/flattree: endian-convert members of boot_param_header
  of: assume big-endian properties, adding conversions where necessary
  of: use __be32 for cell value accessors
  of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing
  of/flattree: use callback to setup initrd from /chosen
  proc_devtree: include linux/of.h
  of: make set_node_proc_entry private to proc_devtree.c
  of: include linux/proc_fs.h
  of/flattree: merge early_init_dt_scan_memory() common code
  of: add 'of_' prefix to machine_is_compatible()
  ...
2010-02-25 15:38:37 -08:00
Steve Wise e998f245c4 RDMA/cxgb3: Doorbell overflow avoidance and recovery
T3 hardware doorbell FIFO overflows can cause application stalls due
to lost doorbell ring events.  This has been seen when running large
NP IMB alltoall MPI jobs.  The T3 hardware supports an xon/xoff-type
flow control mechanism to help avoid overflowing the HW doorbell FIFO.

This patch uses these interrupts to disable RDMA QP doorbell rings
when we near an overflow condition, and then turn them back on (and
ring all the active QP doorbells) when when the doorbell FIFO empties
out.  In addition if an doorbell ring is dropped by the hardware, the
code will now recover.

Design:

cxgb3:
- enable these DB interrupts
- in the interrupt handler, schedule work tasks to call the ULPs event
  handlers with the new events.
- ring all the qset txqs when an overflow is detected.

iw_cxgb3:
- disable db ringing on all active qps when we get the DB_FULL event
- enable db ringing on all active qps and ring all active dbs when we get
  the DB_EMPTY event
- On DB_DROP event:
       - disable db rings in the event handler
       - delay-schedule a work task which rings and enables the dbs on
         all active qps.
- in post_send and post_recv logic, don't ring the db if it's disabled.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2010-02-24 10:40:28 -08:00
Abhijeet Kolekar 89612124d6 iwlwifi: increase command buffer size
Increase the buffer size for commands with "huge"
bit set. This has been recently observed for 6050 cards where
for even with huge bit set few commands were not properly allocated
memory with the command overwriting the buffer allocated for it..
Also add a check to see if command size exceeds the
maximum allowable size.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-23 14:59:12 -08:00
Reinette Chatre ab9bdc34d6 Revert "iwlwifi: Monitor and recover the aggregation TX flow failure"
This reverts commit 1db5950f1d.

The goal of "iwlwifi: Monitor and recover the aggregation TX flow failure"
is to first detect when data transmission stalls and then to recover from
this situation with a reset of the radio or the firmware, depending on how
bad the transmission failures are.

Unfortunately we have found that this change causes excessive resets with
its current detection algorithm. It also performs its recovery action when
none is really needed, like when we are not associated.

Revert this change until the issues have been addressed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-23 14:02:52 -08:00
David S. Miller 675c60706c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-02-23 01:27:05 -08:00
Atsushi Nemoto 662a96bd6f tc35815: Remove a wrong netif_wake_queue() call which triggers BUG_ON
The netif_wake_queue() is called correctly (i.e. only on !txfull
condition) from txdone routine.  So Unconditional call to the
netif_wake_queue() here is wrong.  This might cause calling of
start_xmit routine on txfull state and trigger BUG_ON.

This bug does not happen when NAPI disabled.  After txdone there
must be at least one free tx slot.  But with NAPI, this is not
true anymore and the BUG_ON can hits on heavy load.

In this driver NAPI was enabled on 2.6.33-rc1 so this is
regression from 2.6.32 kernel.

Reported-by: Ralf Roesch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-23 01:25:01 -08:00
Torgny Johansson cac43a1b7b cdc_ether: new PID for Ericsson C3607w to the whitelist (resubmit)
This patch adds a new vid/pid to the cdc_ether whitelist.

Device added:
- Ericsson Mobile Broadband variant C3607w

Signed-off-by: Torgny Johansson <torgny.johansson@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-23 01:25:01 -08:00
Anton Blanchard b5abb028e2 e1000: Fix DMA mapping error handling on RX
Check for error return from pci_map_single/pci_map_page and clean up.

With this and the previous patch the driver was able to handle a significant
percentage of errors (I set the fault injection rate to 10% and could still
download large files at a reasonable speed).

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-23 01:24:59 -08:00
Jiri Pirko 10886af54a e1000: correct wrong coding style for "else"
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-23 01:19:22 -08:00
Sriram 35e2da46d2 can:ti_hecc: Add pm hook-up
Added the suspend and resume implementation in the HECC (CAN)
driver.

Signed-off-by: K R Baalaaji <krbaalaaji@ti.com>
Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Anant Gole <anantgole@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:53 -08:00
Jiri Pirko 48e2f183cb net: convert multiple drivers to use netdev_for_each_mc_addr, part4
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:52 -08:00
Jiri Pirko 7a81e9f3ca e1000: convert to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:51 -08:00
Jiri Pirko 0ddf477b8a net: convert multiple drivers to use netdev_for_each_mc_addr, part3
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:51 -08:00
Jiri Pirko 3b9a7728d8 net/arm: convert to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:50 -08:00
Joe Perches 0bc88e4af0 drivers/net/typhoon.c: Use (pr|netdev)_<level> macro helpers
David Dillow took my suggestions and improved on them.
Here is this latest version.

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Remove #define ERR_PFX
Remove now unused member name from struct typhoon
Use pr_<level>
Use netdev_<level>
Coalesce long formats
Remove version information

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:49 -08:00
Hauke Mehrtens 53639207c0 b44: use netdev_alloc_skb instead of dev_alloc_skb
The conversion in bf0dcbd929 missed the
new allocation in b44_rx.
This patch was used in OpenWRT for a long time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:48 -08:00
Hauke Mehrtens 8850dce170 b44: Set PHY address to NO_PHY if reset fails.
Do a PHY reset to test if there is an active phy and set the PHY address
to B44_PHY_ADDR_NO_PHY in case of an not active phy. This is needed for
the Linksys WRTSL54GS and Asus WL-500W.
This patch was used in OpenWRT for a long time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:48 -08:00
Milton Miller 3c945e5b37 ixgbe: prevent speculative processing of descriptors before ready
The PowerPC architecture does not require loads to independent bytes to be
ordered without adding an explicit barrier.

In ixgbe_clean_rx_irq we load the status bit then load the packet data.
With packet split disabled if these loads go out of order we get a
stale packet, but we will notice the bad sequence numbers and drop it.

The problem occurs with packet split enabled where the TCP/IP header and data
are in different descriptors. If the reads go out of order we may have data
that doesn't match the TCP/IP header. Since we use hardware checksumming this
bad data is never verified and it makes it all the way to the application.

This bug was found during stress testing and adding this barrier has been shown
to fix it.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-22 15:45:32 -08:00
Johannes Berg 4a6967b88a mwl8k: convert to new station add/remove callbacks
This converts mwl8k to use the new station
add/remove callbacks instead of using the
old sta_notify callback.

The new callbacks can sleep, so a lot of
code can be removed now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-22 11:21:43 -05:00
Stanislaw Gruszka a120e912eb iwlwifi: sanity check before counting number of tfds can be free
Check the frame control for ieee80211_is_data_qos() is true before
counting the number of tfds can be free, the tfds_in_queue only
increment when ieee80211_is_data_qos() is true before transmit; so it
should only decrement if the type match.

Remove ieee80211_is_data_qos check for frame_ctrl in tx_resp to avoid
invalid information pass from uCode.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-22 11:15:50 -05:00
Wey-Yi Guy a239a8b47c iwlwifi: error checking for number of tfds in queue
When receive reply_tx and ready to decrement the count for number of
tfds in queue, do error checking to prevent error condition and
tfds_in_queue become negative number.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-22 11:15:50 -05:00
Alexander Beregalov 06c92ee638 eepro: fix netdev_mc_count conversion
Fix commit 4cd24eaf0 (net: use netdev_mc_count and netdev_mc_empty when
appropriate)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-20 18:48:25 -08:00
Ajit Khaparde 9772a43170 be2net: Bump the driver version number
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:11:54 -08:00
Ajit Khaparde 91992e446c be2net: Maintain tx and rx counters in driver
For certain skews of the BE adapter, H/W Tx and Rx
counters could be common for more than one interface.
Add Tx and Rx counters in the adapter structure
(to maintain stats on a per interfae basis).

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:11:53 -08:00
Ajit Khaparde 294aedcf87 be2net: update copyright dates
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:11:53 -08:00
Robert Hancock 3531768883 r8169: enable 64-bit DMA by default for PCI Express devices (v2)
Currently use of 64-bit DMA is disabled in r8169 unless the user passes the
use_dac module option. This is reasonable for conventional PCI devices where
broken chipsets may not handle dual-address-cycle transfers properly for
32-bit slots and so this may not be safe. However, PCI Express should not have
this problem and not using 64-bit DMA results in DMA transfers needlessly using
the IOMMU or SWIOTLB. Set the use_dac module parameter to a new default value of
-1 which results in 64-bit DMA being enabled by default for PCI Express devices
only.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 17:10:15 -08:00
Ben Hutchings 242cc0547f sfc: SFE4002/SFN4112F: Widen temperature and voltage tolerances
The temperature and voltage limits currently set on these boards are
too conservative and will cause the driver to stop the net device
erroneously in some systems.

Based on a review of the chip datasheets and advice from the designer
of these boards:

- Raise the maximum board temperatures to the specified maximum ambient
  temperatures for their PHYs plus the expected temperature bias of the
  board
- Raise the maximum controller temperature to 90 degrees
- Lower the minimum temperatures to 0 degrees
- Widen the voltage tolerances to at least +/- 10%

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 15:50:35 -08:00
Ben Hutchings e0bf54c93a sfc: Fix sign of efx_mcdi_poll_reboot() error in efx_mcdi_poll()
efx_mcdi_poll() uses positive error numbers, matching the MCDI
protocol.  It must negate the result of efx_mcdi_poll_reboot() which
returns the usual negative error numbers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 15:50:35 -08:00
FUJITA Tomonori e4fc85600b mlx4: replace the dma_sync_single_range_for_cpu/device API
There are only two users of the dma_sync_single_range_for_cpu/device
API in mainline (mlx4 and ssb). The
dma_sync_single_range_for_cpu/device API has never been documented and
the dma_sync_single_for_cpu/device API also support a partial sync.

This converts mlx4 to use the dma_sync_single_for_cpu/device API
(preparations for the removal of the dma_sync_single_range_for_cpu/device API).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 13:19:51 -08:00
kirjanov@gmail.com 6e03718c85 greth: some driver cleanups
On Fri, Feb 19, 2010 at 13:51 +0100, Jiri Pirko wrote:
>
> <snip>
> >>@@ -1031,7 +1029,7 @@ static void greth_set_multicast_list(struct net_device *dev)
> >> 			return;
> >> 		}
> >>
> >>-		if (dev->mc_count == 0) {
> >>+		if (!netdev_mc_count(dev)) {
> also please use netdev_mc_empty() here.
Some driver cleanups:
* convert to use phy_find_first/phy_direct_connect
* convert to use netdev_mc_* helpers
* fixed missing validate_addr hook
* removed netdev_priv castings

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 13:15:51 -08:00
Jiri Pirko 91fea58584 net/pcmcia: convert to use netdev_for_each_mc_addr
removed fill_multicast_tbl function in smc91c92_cs and do the work inline

rewritten set_addresses function in xirc2ps_cs. This was kinda headache.
Simulated the original and new functions and they bahave the same.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-19 13:15:50 -08:00
Johannes Berg 4ca778605c ath9k: convert to new station add/remove callbacks
This converts ath9k to use the new station
add/remove callbacks instead of using the
old sta_notify callback.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:52 -05:00
Johannes Berg 1d669cbf52 mac80211_hwsim: convert to new station add/remove callbacks
This converts mac80211_hwsim to use the new
station add/remove callbacks instead of using
the old sta_notify callback.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:52 -05:00
Johannes Berg 17f6f054fe p54: convert to new station add/remove callbacks
This converts p54 to use the new station
add/remove callbacks instead of using the
old sta_notify callback.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:51 -05:00
Johannes Berg 3e60f8607e ar9170: convert to new station add/remove callbacks
This converts ar9170 to use the new station
add/remove callbacks instead of using the
old sta_notify callback.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:51 -05:00
Felix Fietkau d8728ee919 ath9k: fix beacon timer restart after a card reset
In AP mode, ath_beacon_config_ap only restarts the timer if a TSF
restart is requested. Apparently this was added, because this function
unconditionally sets the flag for TSF reset.

The problem with this is, that ath9k_hw_reset() clobbers the timer
registers (specified in the initvals), thus effectively disabling the
SWBA interrupt whenever a card reset without TSF reset is issued
(happens in a few places in the code).

This patch fixes ath_beacon_config_ap to only issue the TSF reset flag
when necessary, but reinitialize the timer unconditionally. Tests show,
that this is enough to keep the SWBA interrupt going after a call to
ath_reset()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:50 -05:00
Wey-Yi Guy 528c3126a9 iwlwifi: add debugfs to monitor force reset parameters
Adding debugfs file to monitor the counters and other
information related to "force_reset" request.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:50 -05:00
Wey-Yi Guy 8a472da431 iwlwifi: separated time check for different type of force reset
Use different timing duration check for different type of force reset,
force reset request can come from different source and based on
different reason; one type of reset request should not block other type of
reset request.

Adding structure to keep track of different force reset request.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:50 -05:00
Abhijeet Kolekar d5755939e8 iwlwifi: indicate calib version for 6050 series
Indicate calibration version to 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>
2010-02-19 15:52:49 -05:00
Reinette Chatre d2dfe6df75 iwlwifi: enable serialization of synchronous commands
Until now it was only possible to have one synchronous command running at
any time. If a synchronous command is in progress when a second request
arrives then the second command will fail. Create a new mutex specific for
this purpose to only allow one synchronous command at a time, but enable
other commands to wait instead of fail if a synchronous command is in
progress.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:49 -05:00
Reinette Chatre 4a6547c748 iwl3945: remove STATUS macros from header
iwl3945 includes iwl-core.h in which these STATUS flags are already
defined. This also removes a potential confusing definition with iwlcore
using STATUS_MODE_PENDING with value 18 and iwl3945 defining (but not
using) STATUS_CONF_PENDING for value 18.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:49 -05:00
Felix Fietkau 5c0ba62fd4 ath9k: fix rate control fallback rate selection
When selecting the tx fallback rate, rc.c used a separate variable
'nrix' for storing the next rate index, however it did not use that as
reference for further rate index lowering. Because of that, it ended up
reusing the same rate for multiple multi-rate retry stages, thus
decreasing delivery probability under changing link conditions.

This patch removes the separate (unnecessary) variable and fixes
fallback the way it was intended to work.
This should result in increased throughput and better link stability.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:48 -05:00
Teemu Paasikivi c332a4b8ee wl1271: Added alloc and free hw functions
Moved allocation and freeing of context structure of the driver to
separate functions from probe and remove functions.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:48 -05:00
Teemu Paasikivi 9b28072220 wl1271: Added IO reset and init functions
Added reset and init functions to IO layer of the driver.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:47 -05:00
Teemu Paasikivi 7b048c52d7 wl1271: Renamed IO functions
In preparation for integration of SDIO implementation renamed some IO
functions from wl1271_spi_* form to wl1271_*.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:47 -05:00
Teemu Paasikivi 521a5b2137 wl1271: Moved common IO functions from wl271_spi.c to wl1271_io.c
In prepraration for integration of SDIO implementation moved some IO
functions common for SPI and SDIO to separate file.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:47 -05:00
Kalle Valo c8c9087352 wl1271: add testmode support
Testmode will be used to send PLT (Production Line Testing) commands
from user space.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:47 -05:00
Juuso Oikarinen 1937e74263 wl1271: Fix beacon filter table configuration
The beacon filter table configuration ACX structure had certain elements
reversed, resulting in firmware instability in regard of the feature. Fix
the structure.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:46 -05:00
Juuso Oikarinen 8bf29b0eb3 wl1271: Fix ad-hoc SSID update
If re-configuring the SSID while ad-hoc was already enabled, the beacon
template would be properly updated, but the SSID passed in the CMD_JOIN would
not - hence filtering etc would not work properly.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:46 -05:00
Juuso Oikarinen ee444cf050 wl1271: Fix WEP key handling
WEP key index handling was broken: the default key when using key 0 was never
specified to the FW, and if using other default than 0, it would be set on the
TX path for every single TX'd frame.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:46 -05:00
Juuso Oikarinen fddc7dd7de wl1271: Fix key-remove error
The new firmware does not allow removal of unicast keys - they will be
automatically removed on the next CMD_JOIN.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:45 -05:00
Juuso Oikarinen 6c71b0ea76 wl1271: Optimized RX path packet retrieval
Instead of acking RX packets read from the FW once all (of several possible)
buffered packets are retrieved, ack packets one by one as they are read. This
enables the FW to start receiving more packets from the network while the
host read operation is still ongoing.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:45 -05:00
Kalle Valo c82c1dde30 wl1271: wakeup chip in op_conf_tx()
elp_wakeup() was missing in op_conf_tx() which caused wakeup problems in
power save. I forgot to add this part when porting the patch from wl1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:45 -05:00
Juuso Oikarinen e2e77b5ffb wl1271: Fix random MAC address setting
If reverting to a random MAC address, the driver would not update it to the
NVS file, and hence the firmware frame filtering would not work properly.

So update the randomized MAC address to the NVS image.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:44 -05:00
Luciano Coelho 6f8434a754 wl1271: skip 3 unused bytes from the NVS
Our NVS uploading mechanism had a bug that was causing it to pass three extra
zeros at the start of the NVS.  This may be a problem in the NVS generation
application, but for now we fix it in the driver.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:44 -05:00
Luciano Coelho 12419cce88 wl1271: add most of the normal initialization commands to PLT mode
We need to configure PLT mode almost in the same way as normal mode.  Most of
the configuration functions need to be called also when entering PLT, with
the exception of a few RX and TX configuration (which cause mac80211 warnings
if enable while runnning PLT tests).

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:44 -05:00
Juuso Oikarinen 7b21b6f821 wl1271: Retrieve device mac address from the nvs file
Instead of always randomizing the MAC address, retrieve and configure the
MAC address from the device specific nvs file. For now, randomize an address
only if the address in the NVS is zero.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:43 -05:00
Juuso Oikarinen 152ee6e09e wl1271: Use NVS INI file configuration
Replace the hardcoded general and radio parameter configuration in the driver
with configuration taken from the NVS file directly. Also remove the driver
dependency to the structures with the parameter data.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:43 -05:00
Kalle Valo c6999d831a wl1271: implement WMM
Now that necessary commands for WMM are implemented, implement queue handling
for WMM. But WMM is not enabled yet, only one queue is used.

Based on a similar patch from wl1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:43 -05:00
Kalle Valo f2054df517 wl1271: modify wl1271_acx_tid_cfg() to use function parameters
For WMM we need to configure each tid separately so modify
wl1271_acx_tid_cfg() to take the configuration from function parameters
instead.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:43 -05:00
Kalle Valo 243eeb51ea wl1271: modify wl1271_acx_ac_cfg() to use function parameters
For WMM we need to configure each queue separately so modify
wl1271_acx_ac_cfg() to take the configuration from function parameters
instead.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:42 -05:00
Juuso Oikarinen 30240fc76a wl1271: Add SSID configuration for JOIN in ad-hoc
This patch adds code to extract the SSID from the beacon template used for
ad-hoc. The mac80211 currently does not provide the SSID, so this is a
workaround for that, for now.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:42 -05:00
Juuso Oikarinen ddb01a5b36 wl1271: Fix channel changing code
The channel changing code would a) change the BSSID to a dummy on upon
channel change, breaking connectivity, and b) not update the channel number
at all for ad-hoc, breaking adhoc.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:42 -05:00
Juuso Oikarinen d8c42c0c28 wl1271: Fix PSM entry
Currently the PSM entry function assumes successful operation, and enables
ELP, BET and beacon filtering right away. This is bad, because the PSM
entry may fail due to environmental issues, which will cause the ELP, BET and
beacon filtering to be illegally enabled (because FW remains in active state.)

Fix this by enabling ELP, BET and beacon filtering only after successful entry,
and by ensuring the firmware is in active mode after the failure.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:42 -05:00
Jean-François Moine 5b9a919a97 p54usb: Add the USB ID for Belkin (Accton) FD7050E ver 1010ec
Yet another USB ID.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:41 -05:00
Darren Jenkins 088ea189c4 drivers/net/wireless/p54/txrx.c Fix off by one error
fix off by one error in the queue size check of p54_tx_qos_accounting_alloc()

Coverity CID: 13314

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:52:40 -05:00
Pavel Roskin fbc87d67af Introduce PCMCIA_DEVICE_PROD_ID3
...and use it in hostap_cs and orinoco_cs.

Another PCMCIA device with Intersil Prism chipset has been reported:

Socket 0:
  product info: "Gigabyte", "GN-WLM01_P25L_ADAPTER", "ISL37300P", "Eval-RevA"
  manfid: 0x02e0, 0x1011
  function: 6 (network)

As it's the case with some other Prism based devices, the third ID
string contains a design name that should be sufficient to identify the
card as having Intersil Prism chipset and thus compatible with both
orinoco_cs and hostap_cs.

Introduce PCMCIA_DEVICE_PROD_ID3 that matches the third ID string only.

Use it in orinoco_cs and hostap_cs to match cards with the third ID
string indicating Prism chipset.  Remove corresponding entries that use
PCMCIA_DEVICE_PROD_ID123.

Reported-by: Ozzy <ozzymud@gmail.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:51:23 -05:00
Dan Halperin 5e2f75b899 iwlwifi: set HT flags after channel in rxon
The HT extension channel settings require priv->staging_rxon.channel to be
accurate. However, iwl_set_rxon_ht was being called before iwl_set_rxon_channel
and thus HT40 could be broken unless another call to iwl_mac_config came in.

This problem was recently introduced by "iwlwifi: Fix to set correct ht
configuration"

The particular setting in which I noticed this was monitor mode:

	iwconfig wlan0 mode monitor
	ifconfig wlan0 up
	./iw wlan0 set channel 64 HT40-
	#./iw wlan0 set channel 64 HT40-
	tcpdump -i wlan0 -y IEEE802_11_RADIO

would only catch HT40 packets if I issued the IW command twice.

From visual inspection, iwl_set_rxon_channel does not depend on
iwl_set_rxon_ht, so simply swapping them should be safe and fixes this problem.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-19 15:35:29 -05:00
David S. Miller cf261b2392 net: Make GRETH driver depend on SPARC.
Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 23:32:26 -08:00
Joe Perches ad06ab2a1c drivers/net/sis190.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level> and netif_msg_<test>
Remove local #define net_<test> macros
Remove periods from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 15:43:11 -08:00
Joe Perches 05dbe00538 drivers/net/tg3.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Remove periods from most formats
Coalesce long formats
Use printk_once

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 15:43:11 -08:00
Sathya Perla b03388d638 be2net: free tx buffers when completions never arrive
be2net: free tx buffers when completions never arrive

In cases like when a pci device is disconnected on an error,
pending tx completions will never arrive. Unmap and free such
buffers in the tx cleanup path.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 15:43:10 -08:00
Jiri Pirko 16cad98186 tokenring: convert to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:51 -08:00
Jiri Pirko a92635dc77 net/usb: convert to use netdev_for_each_mc_addr
also removed needless checks in smsc95xx

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:50 -08:00
Jiri Pirko 4302b67e04 tulip: convert to use netdev_for_each_mc_addr
also bug in de2104x.c was corrected:
for (i = 0; i < 32; i++) loop should be outside mc_list iteration.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:50 -08:00
Jiri Pirko 5508590c19 net: convert multiple drivers to use netdev_for_each_mc_addr, part2
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:49 -08:00
Jiri Pirko 2a0d18f97c smsc911x: convert to use netdev_for_each_mc_addr
also removed unnecessary checks

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:48 -08:00
Jiri Pirko 59ce25d9eb 3c5xx: use netdev_mc_* helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:48 -08:00
Jiri Pirko bf473a268a depca: remove forgotten needless inicialization
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:47 -08:00
Arnd Bergmann b9fb9ee07e macvtap: add GSO/csum offload support
Added flags field to macvtap_queue to enable/disable processing of
virtio_net_hdr via IFF_VNET_HDR. This flag is checked to prepend virtio_net_hdr
in the receive path and process/skip virtio_net_hdr in the send path.

Original patch by Sridhar, further changes by Arnd.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:08:38 -08:00
Arnd Bergmann 501c774cb1 net/macvtap: add vhost support
This adds support for passing a macvtap file descriptor into
vhost-net, much like we already do for tun/tap.

Most of the new code is taken from the respective patch
in the tun driver and may get consolidated in the future.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:08:38 -08:00
Arnd Bergmann 02df55d28c macvtap: rework object lifetime rules
This reworks the change done by the previous patch
in a more complete way.

The original macvtap code has a number of problems
resulting from the use of RCU for protecting the
access to struct macvtap_queue from open files.

This includes
- need for GFP_ATOMIC allocations for skbs
- potential deadlocks when copy_*_user sleeps
- inability to work with vhost-net

Changing the lifetime of macvtap_queue to always
depend on the open file solves all these. The
RCU reference simply moves one step down to
the reference on the macvlan_dev, which we
only need for nonblocking operations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:08:37 -08:00
Joe Perches dfa1a04109 drivers/net/tehuti.c: Reapply use DEFINE_PCI_DEVICE_TABLE()
Commit 865a21a5e3 overwrote
commit a3aa18842a

Fix it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 18:48:11 -08:00
Joe Perches acbbf1f1fd drivers/net/yellowfin.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 18:41:42 -08:00
Joe Perches ada1db5c6f drivers/net/sky2.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:29 -08:00
Joe Perches 67777f9bf2 drivers/net/skge.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Checkpatch cleaning

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:29 -08:00
Joe Perches f15063cdd6 drivers/net/skge.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:28 -08:00
Joe Perches 9cd31f078e drivers/net/pci-skeleton.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Checkpatch cleaning
Convert formats like 0x%08x to %#08x
Remove periods from formats
Coalesce long formats
Use print_hex_dump

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:21 -08:00
Joe Perches ddf79b20ee drivers/net/cnic.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Remove periods from formats
Coalesce long formats
Use __func__

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:21 -08:00
Joe Perches 436d27d1db drivers/net/cassini.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:20 -08:00
Joe Perches 7995c64e5b drivers/net/bnx2x: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert struct bnx2x member msglevel to msg_enable for netif_msg_<foo> macros
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:20 -08:00
Joe Perches 3a9c6a4915 drivers/net/bnx2.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Coalesce some printks

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:19 -08:00
Joe Perches 2fc96fff44 drivers/net/b44.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:19 -08:00
Joe Perches 497159aff6 drivers/net/8139too.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats
Use print_hex_dump

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:18 -08:00
Joe Perches b4f18b3fac drivers/net/8139cp.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:45:18 -08:00
Matt Carlson be7ce5307d tg3: Update version to 3.108
This patch updates the tg3 version to 3.108.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:40 -08:00
Matt Carlson 6a443a0f72 tg3: Push phylib definitions to phylib
This patch pushes phylib definitions out to phylib headers.  For phy
IDs, this removes some code duplication.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:40 -08:00
Matt Carlson 79eb690436 tg3: Rename tg3 phy ID preprocessor definitions
The phylib presents the phy ID in a different format than the one tg3
has traditionally used.  To highlight the distinction, this patch
prepends the tg3 native phy ID format with TG3.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:39 -08:00
Matt Carlson 24daf2b0a4 tg3: Reformat SSID to phy ID table
This patch reformats the SSID to phy ID table, replacing constants with
preprocessor definitions.  This patch is also prep work for the
following patch, which will push line lengths beyond 80 chars.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:39 -08:00
Matt Carlson 9ea4818dd3 tg3: Discover phy address once
The phy address will not change after it has been identified.  Move the
discovery code to a location that only gets executed once.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:38 -08:00
Matt Carlson 0d86df8088 tg3: Reduce indent level of tg3_rx_prodring_alloc
This patch adds an inverted "jumbo ring enable" test and jumps to the exit
if it succeeds.  The change reduces the indent level of the remaining
code making it more readable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:38 -08:00
Matt Carlson 144170635b tg3: Rename TG3_FLG3_RGMII_STD_IBND_DISABLE
The STD part of this preprocessor definition is a bit of a misnomer.
This flag is a coarse control of the RGMII inband status facilities.
This patch renames the definition to be more accurate.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:37 -08:00
Matt Carlson b474eca74c tg3: Add more partno entries for fallback path
This patch adds 57765 asic partno entries for the path executed if VPD
is not present in NVRAM.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:37 -08:00
Matt Carlson 2712168f85 tg3: Allow phylib flowctrl changes anytime
This patch loosens the restriction that the phylib interface must be up
and running to change the flow control parameters.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:36 -08:00
Matt Carlson a4153d401a tg3: Add support for 2 new selfboot formats
This patch adds new offsets to the bootcode version extraction code to
support NVRAM format versions 4 and 5.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:35 -08:00
Matt Carlson d110114281 tg3: Make 57791 and 57795 10/100 only
This patch adds the 57791 and 57795 to the list of devices that only
support 10 and 100 Mbps speeds.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:35 -08:00
Matt Carlson 61e800cf94 tg3: Enforce DMA mapping / skb assignment ordering
Michael Chan noted that there is nothing in the code that would prevent
the compiler from delaying the access of the "mapping" member of the
newly arrived packet until much later.  If this happened after the
skb = NULL assignment, it is possible for the driver to pass a bad
dma_addr value to pci_unmap_single().  To enforce this ordering, we need
a write memory barrier.  The pairing read memory barrier already exists
in tg3_rx_prodring_xfer() under the comments starting with
"Ensure that updates to the...".

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 17:27:34 -08:00
Michael S. Tsirkin 9940516259 tun: socket filter support
This patch adds Linux Socket Filter support to
tun driver.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 16:35:17 -08:00
Jiri Pirko 305b016093 chelsio: convert to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:48 -08:00
Jiri Pirko 0988d26978 cxgb3: convert to use netdev_for_each_addr
Removed whole t3_rx_mode structure and appropriate helpers cause they are no
longer needed.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:48 -08:00
kirjanov@gmail.com e4a474f82d smsc911x: replace manual phy lookup.
Use phy_find_first() function instead of manual lookup.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:47 -08:00
kirjanov@gmail.com 1d4bd947c5 mv643xx_eth: fix missing validate_addr hook
Fix missing validate_addr hook.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:46 -08:00
Kristoffer Glembo d4c41139df net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
Adds device driver for Aeroflex Gaisler 10/100 and 10/100/1G Ethernet
MAC IP cores.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:40 -08:00
Simon Kagstrom b6ca430599 via-velocity: Enable scatter/gather IO by default
Reduces CPU utilization significantly with sendfile for example.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:39 -08:00
Jeff Mahoney 25cca53527 ipg: Remove device claimed by dl2k from pci id table
This patch removes D-Link DGE-550T PCI ID (1186:4000) from the ipg
driver. The ipg driver is for IP2000-based cards and the DGE-550T is
a DL2000-based card. The driver loads and works for a few moments, but
once a real workload is applied it stops operating. The ipg driver
claimed this ID since it was introduced in 2.6.24 and it's forced many
users to blacklist it.

The correct driver for this hardware is the dl2k driver, which has been
claiming this PCI ID since the 2.4 days.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:38 -08:00
Tony Lindgren 80c20d543d Merge branch 'omap-fixes-for-linus' into omap-for-linus 2010-02-17 14:08:58 -08:00
Riccardo Ghetta 08326dbe7b SiS190/191 half-duplex initialization fix
Adds half-duplex specific setup code (taken from SiS own GPL driver).
Without those, half-duplex connections are very unreliable, often
working on small transfers and failing after a while.

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:38:10 -08:00
Vladislav Zolotarov a07da6df73 bnx2x: version number and date
Updated release version and date: 1.52.1-6 and 2010/02/16

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>
2010-02-17 13:35:44 -08:00
Vladislav Zolotarov 3359fced77 bnx2x: Use firmware 5.2.13
Switch to the new firmware version (5.2.13).

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>
2010-02-17 13:35:44 -08:00
Vladislav Zolotarov 0c43f43f48 bnx2x: fix in 57710 self-test
Bug fix: Use the last unicast entry in CAM in bnx2x_test_int(). Relevant for 57710 only.

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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>
2010-02-17 13:35:43 -08:00
Vladislav Zolotarov d43a7e67ae bnx2x: Do not allow enabling LRO if disable_tpa=1
Bug fix: Do not allow enabling LRO if disable_tpa=1.

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>
2010-02-17 13:35:42 -08:00
Vladislav Zolotarov f1e1a199f3 bnx2x: clean up in case of error in bnx2x_init_hw()
Bug fix: clean up MCP state in case of error in bnx2x_init_hw().

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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>
2010-02-17 13:35:42 -08:00
Vladislav Zolotarov 6cbe5065bb bnx2x: Properly release allocated MSI-X/MSI vectors
Bug fix: Properly release allocated MSI-X/MSI vectors if ifup failed
due to lack of memory.

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>
2010-02-17 13:35:41 -08:00
Joe Perches a475f603d2 drivers/net/usb: Use netif_<level> logging facilities
Convert from:
	if (netif_msg_<foo>(priv))
		dev_<level>(dev...
to
	netif_<level>(priv, foo, dev...

Also convert a few:

	if (i < REG_TIMEOUT) {
		etc...
		return ret;
       }
to
	if (i >= REG_TIMEOUT)
		goto fail;
	etc...
	return ret;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:41 -08:00
Joe Perches 60b8675592 usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>
These macros are too similar to the dev_<level> equivalents
but take a usbnet * argument.  Convert them to the recently
introduced netdev_<level> macros and remove the old macros.

The old macros had "\n" appended to the format string.
Add the "\n" to the converted uses.

Some existing uses of the dev<foo> macros in cdc_eem.c
probably mistakenly had trailing "\n".  No "\n" added there.

Fix net1080 this/other log message inversion.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:40 -08:00
Sathya Perla 82456b031e be2net: implement pci shutdown handler
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:40 -08:00
Sathya Perla 89420424fc be2net: fix rx-path to ignore a flush completion
The flush compl (compl with numfrags == 0; no data) is rcvd
from hw to indicate completion of RXQ destory operation. Fix
the RX path to not process it as RX data.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:39 -08:00
Sathya Perla 7a1e9b2059 be2net: don't rearm mcc cq when device is not open
When an MCC cmd is issued (via a netdev/ethtool op)
while the device is not open, the MCC CQ gets processed but the EQ
is not processed (as isr is not registered.) This can cause the EQ
to become full. So, while the device is not open, CQ must not be re-armed
to prevent EQ entries.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:39 -08:00
Sathya Perla a058a63274 be2net: a mini optimization in rx_compl_process() code
Introduce unlikely() for skb alloc failure and vlanf checks...

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:38 -08:00
Ron Mercer aa13bd6ef4 qlge: Fix occasional loopback test failure.
On some servers we see the cleaning of the RX queue finish before all
the loopback packets are sent out.  This delay allows the queues to
settle before checking for successful completion.
Also, delay completion so link has time to come back up.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:38 -08:00
Ron Mercer 801e9096c5 qlge: Fix bonding mac address bug.
Use local copy of current mac address when initializing.  In bonding
testing we saw cases where dev_addr was out of data causing failover
errors.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:37 -08:00
Ron Mercer c0c56955e7 qlge: Fix dropping of large non-TCP/UDP frames.
This was found with pings that were large enough to span multiple rx
buffers.  The split frame logic handles this case nicely.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:37 -08:00
Steven J. Magnani 8ea7a37c5a ll_temac: Fix MAC address configuration from userland
A userland command to set the LLTEMAC MAC address,
i.e. "ifconfig eth0 hw addr xx:yy:zz:pp:dd:qq",
results in a device address of 00:01:xx:yy:zz:pp.
Correct this.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:36 -08:00
Steven J. Magnani c3b7c12cd7 ll_temac: Add support for V2 LLTEMAC core
LLTEMAC V1 cores place only received packet length in the app4 word.
V2 cores place additional information in app4.
Mask out the additional information when retrieving the packet length.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:36 -08:00
Jiri Pirko e1d444771e net: convert multiple drivers to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:12 -08:00
Jiri Pirko d7b855c2dc cassini: convert to use netdev_for_each_mc_addr
Introduced a new function to do the mc list processing, makes code
clearer after transition.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:12 -08:00
Nick Nunley a77ff709dd igb: update tx DMA mapping error handling
This updates the tx DMA mapping error handling code to
resemble e1000e/ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:39 -08:00
Nick Nunley 58fd62f525 igb: change descriptor control thresholds
This change simplifies the code by setting RX_PTHRESH to 8 for
all devices, as it was unlikely that there was any advantage to
set it at 16 for earlier cards. Additionally TX_WTHRESH is
set to 1 for the 82576 NIC to improve performance by enabling
a minimal amount of write combining when writing back descriptors.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:39 -08:00
Nick Nunley fe0592b4be igb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors
This change makes it so that igb_free_q_vectors is reused in
igb_alloc_q_vectors to handle the cleanup instead of unwinding
through the allocations.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:38 -08:00
Nick Nunley d3eeb62ddd igb: remove unused vmolr value
In an earlier version of igb_write_mc_addr_list() the vmolr register
was modified. This register is no longer accessed, although the variable
still exists. This patch removes it from the function.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:38 -08:00
Nick Nunley 91d4ee3382 igb: minor type cleanups
This change cleans up some instances where unsigned int and u32
were being used interchangeably, and cleans up hdr_len which
was being set to 0 twice.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:37 -08:00
Nick Nunley 40e90c26f5 igb: move gso_segs into buffer_info structure
This change moves gso_segs into the buffer_info structure to avoid
a possible cache line miss in clean_tx_irq.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:37 -08:00
Nick Nunley 717ba08935 igb: inline igb_maybe_stop_tx
igb_maybe_stop_tx() is extremely small and appears in several spots in
the tx hotpath. This change inlines the function for a possible
performance boost.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:36 -08:00
Nick Nunley 43915c7c9a igb: only read phy specific stats if in internal phy mode
There are a couple statistics registers that are not meant to
be read when in SGMII/serdes mode. This patch adds a check to
verify mode before reading and updating these statistics.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:36 -08:00
Nick Nunley e6bdb6fefc igb: only support SRRCTL_DROP_EN when using multiple queues
The SRRCTL.DROP_EN bit should only be set when we are supporting
multiple queues. This bit is meant to prevent head of line blocking
and is unnecessary in the single queue case.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:35 -08:00
Nick Nunley abe1c3638c igb: cap interrupts at 20K per queue when in itr mode 3
In order to maintain similar performance between MSI-X and
legacy/MSI interrupts, this patch reduces the number of interrupts
when receiving small packets to 20K when in interrupt throttle
rate mode 3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:35 -08:00
Nick Nunley 2d0b0f6935 igb: remove adaptive IFS from driver
Adaptive IFS support has been included in the igb driver since its
initial release, but it is not a feature on any igb NICs. This patch
removes it from the driver.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:34 -08:00
Alexander Duyck 3025a446b6 igb: Allocate rings seperately instead of as a block
This change makes it so that the rings are allocated seperately.  As a
result we can allocate them on seperate nodes at some point in the future
if we so desire.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:34 -08:00
Nick Nunley b94f2d775a igb: call pci_save_state after pci_restore_state
This patch adds calls to pci_save_state() immediately after
calls to pci_restore_state(). Due to a change in the behavior
of pci_restore_state() it is necessary to call pci_save_state()
to keep the state_saved flag. This patch is based on a similar
patch for ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:33 -08:00
Nick Nunley 88a268c1a1 igb: Power down link when interface is down
This changes the behavior of the driver to power down the link
when the associated interface is down, unless management is enabled.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:33 -08:00
Nick Nunley 53c992fa84 igb: ignore EEPROM APME check when shutting down serdes link
Checking the EEPROM APME state unnecessarily prevents the link from
shutting down. The standard power down routines should be
sufficient to determine whether the serdes link can power down
when going into D3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:32 -08:00
Nick Nunley 3145535ac6 igb: Report link status in ethtool when interface is down
With this change ethtool will correctly report link status when
the interface is down. Currently ethtool reports the link as not
detected when the interface is down.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:32 -08:00
Nick Nunley 22939f0606 igb: add support for wake-on-link
This adds support for wake-on-link/phy activity to the ethtool
interface.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:31 -08:00
Alexander Duyck 26b39276ca igb: remove unecessary q_vector declarations and remove itr_shift
This change removes the use of itr_shift since a mac type call can be
used just as easily to identify the only HW that needs to have the itr
shifted.

In addition it removes two unecessary declarations of a q_vector
pointer from the initialization path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:31 -08:00
Jochen Friedrich f6ca057f1b b44: Ratelimit timeout error message.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 00:03:27 -08:00
Tejun Heo 47d742752d percpu: add __percpu sparse annotations to net drivers
Add __percpu sparse annotations to net drivers.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors.  This patch doesn't affect normal builds.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 23:05:38 -08:00
David S. Miller 2bb4646fce Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-02-16 22:09:29 -08:00
Mike Frysinger e06d41d09f netdev: bfin_mac: drop experimental markings on RMII support
The code has been around for a long time now and is known to work on a
bunch of different parts/boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 20:20:23 -08:00
Joe Perches 9e3f8063a7 drivers/net/pcnet32.c: Checkpatch cleaning
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:45 -08:00
Joe Perches 13ff83b90f drivers/net/pcnet32.c: Use (pr|netdev|netif)_<levels> macro helpers
Make the output logging messages a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:44 -08:00
Joe Perches 249658d5c2 drivers/net/tehuti.c: trivial checkpatch cleanups
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:44 -08:00
Joe Perches cb001a1f7d drivers/net/tehuti.c: Hoist assigns out of ifs
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:43 -08:00
Joe Perches 865a21a5e3 drivers/net/tehuti.c: Use (pr|netdev|netif)_<levels> macro helpers
Make the output logging messages a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:43 -08:00
Joe Perches 6c35abaedc drivers/net/sky2: Convert to use netif_printk macros
Some unlikely(netif_msg_<foo>(sky2)) tests are also
removed by this change.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:42 -08:00
Joe Perches 6909c66dfb drivers/net/ixgb: Use netif_printk macros
Convert private DPRINTK macro uses to netif_<level> equivalents
Remove #define DPRINTK

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:45:42 -08:00
Michael Chan bec92044b7 bnx2: Update firmwares and update version to 2.0.8.
- Increase FTQ depth to 256 to ehnabce performance.
- Fix RV2P context corruption on 5709 when flow control is enabled.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:19:42 -08:00
Patrick Rabau c9885fe5a7 bnx2: Fix bug when saving statistics.
This fixes the problem of dropping the carry when adding 2 32-bit values.
Switch to use array indexing for better readability.

Reported by and fix provided by Patrick Rabau.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:19:04 -08:00
Michael Chan beb499afe3 bnx2: Allow user-specified multiple advertisement speed values.
Remove unnecessary code that works around older versions of ethtool
that can pass down invalid advertisement speed values.  This old
code prevents the user from specifying multiple advertisement values.
The new code uses simple masking to mask out invalid advertisment bits.

Reported-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:19:04 -08:00
Michael Chan 5726026bff bnx2: Adjust flow control water marks.
The current water marks are too high and can cause unnecessary flow
control frames.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:19:03 -08:00
Michael Chan e9f26c49ce bnx2: Need to call cnic_setup_cnic_irq_info() after MTU change.
New status blocks are allocated during MTU change so we need to
update this information for the cnic driver.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:19:02 -08:00
Michael Chan efde73a35c bnx2: Check BNX2_FLAG_USING_MSIX flag when setting up MSIX.
Checking the flag is more correct than checking bp->irq_nvecs. By
accident it is not a problem because we always have more than 1
vectors when using MSIX mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:19:02 -08:00
Luis R. Rodriguez 496c185c94 atl1c: Add support for Atheros AR8152 and AR8152
AR8151 is a Gigabit Ethernet device. AR8152 devices are
Fast Ethernet devices, there are two revisions, a 1.0
and a 2.0 revision.

This has been tested against these devices:

Driver	Model-name	vendor:device	Type
atl1c 	AR8131		1969:1063	Gigabit Ethernet
atl1c	AR8132		1969:1062	Fast Ethernet
atl1c	AR8151(v1.0)	1969:1073	Gigabit Ethernet
atl1c	AR8152(v1.1)	1969:2060	Fast Ethernet

This device has no hardware available yet so it goes untested,
but it should work:

atl1c	AR8152(v2.0)	1969:2062	Fast Ethernet

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 15:16:45 -08:00
Ajit Khaparde 07793d33b4 be2net: set proper value to version field in req hdr
Before sending a command to the ASIC, set version properly.
This is necessary for the ARM firmware to send correct data to the driver.
This also fixes a bug in certain skews of the ASIC where the statistics
are misreported.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-16 14:53:25 -08:00
Jouni Malinen 64b84010f9 ath9k: Use the Beacon TX rate from mac80211
Instead of hardcoding the lowest rate for Beacon frames, use the rate
index specified in the mac80211 TX info in AP mode.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-16 14:16:24 -05:00
Pavel Roskin 0466236085 mwl8k: disable softirqs when accessing sta_notify_list
Use spin_[un]lock_bh in mwl8k_sta_notify().  The sta_notify handler is
required to be atomic, yet it can be called in process context, so make
sure one call won't preempt another.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-16 14:16:24 -05:00
Don Skidmore e86bff0eda ixgbe: fix WOL register setup for 82599
We need to have the WUS register set to all 1's in order for the hardware
to be capable of ever waking up.  Set it here in the ixgbe_probe().

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:52:02 -08:00
Don Skidmore a626e8478b ixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata
The 82598 has an erratum that receipt of pause frames at 1G
could lead to a Tx Hang.  To avoid this this patch disables
Rx FC while at 1G speed for all 82598 parts.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:51:56 -08:00
John Linn 5cdaaa1286 net: emaclite: adding MDIO and phy lib support
These changes add MDIO and phy lib support to the driver as the
IP core now supports the MDIO bus.

The MDIO bus and phy are added as a child to the emaclite in the device
tree as illustrated below.

mdio {
	#address-cells = <1>;
	#size-cells = <0>;
	phy0: phy@7 {
		compatible = "marvell,88e1111";
		reg = <7>;
	} ;
}

Signed-off-by: Sadanand Mutyala <Sadanand.Mutyala@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:51:00 -08:00
Sathya Perla cf588477a3 be2net: implement EEH pci error recovery handlers
The code has been tested on IBM pSeries server.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:49:51 -08:00
Arnd Bergmann 564517e804 net/macvtap: fix reference counting
The RCU usage in the original code was broken because
there are cases where we possibly sleep with rcu_read_lock
held. As a fix, change the macvtap_file_get_queue to
get a reference on the socket and the netdev instead of
taking the full rcu_read_lock.

Also, change macvtap_file_get_queue failure case to
not require a subsequent macvtap_file_put_queue, as
pointed out by Ed Swierk.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ed Swierk <eswierk@aristanetworks.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:49:49 -08:00
Divy Le Ray e9449d85c6 cxgb3: fix link flap
The driver is expected to report that the link is up
when the phy Rx signal is established and the mac
has not detected a link fault.
The code is however broken, the driver does not check the link fault
status when the phy link status changes.
The link fault status being checked within a short period of time,
it leads to link up/link down events.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:49:48 -08:00
Divy Le Ray 38a8fc0fcf cxgb3: FIx VLAN over Jumbo frames
The mac is expected to auto-inflate the Maximum Frame size for VLAN
tagged frames. It however does not work with jumbo frames.
Work around the bug adding 4 to the Maximum Frame for MTUs
greater than 1536.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:49:48 -08:00
Peter Waskiewicz d41a5b7da2 ixgbe: Cleanup incorrect header comments
The recent n-tuple patches added some comments to the headers
of the Flow Director functions that aren't accurate.  This
cleans them up, and is a purely cosmetic patch.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 21:49:48 -08:00
Gertjan van Wingerde de1ebdceb6 rt2x00: rt2800 - Make rt30xx and rt35xx chipsets configurable.
Support for rt30xx- and rt35xx-based devices is currently not functional
in rt2800pci and rt2800usb.
In order to not confuse users we shouldn't claim the PCI and USB device
ID's for these devices. However, to allow for testing it is good to still
have them available, although disabled by default.
Make support for these device configuration options that default to off.

For rt2800usb a 3rd class of devices is added, which are the unknown
devices. For these devices it is known that they are either based on
rt28xx, rt30xx or rt35xx, but it is not known on what chipset exactly.
These devices are disabled by default as well, until it can be established
on what chipset exactly they are based.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:14:12 -05:00
Gertjan van Wingerde 49e721ec6c rt2x00: rework RT chipset and revision determination for PCI an SOC devices.
The recent rt2800 devices are no longer really identified by their PCI
ID's, but rather by the contents of their CSR0 register. Also for the
other chipsets is the contents of this CSR0 register important.
Change the chipset determination logic to be more aligned with the rt2800
model.
Preparation for the support of rt3070 / rt3090 based devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:14:11 -05:00
Gertjan van Wingerde 714fa66363 rt2x00: Reorganize RT chipset setting for PCI/SOC devices.
Don't set the RT chipset for a device from within the generic PCI/SOC code,
but rather from the individual drivers, so that individual drivers have
more control over what RT chipset is set.
Preparation for chip handling updates for rt2800 devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:14:10 -05:00
Gertjan van Wingerde cea90e5596 rt2x00: Introduce SoC interface type.
Introduce the SoC interface type to detect SoC devices, instead of having
them mimic being PCI devices.
This allows for easier detection of SoC devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:14:09 -05:00
Shimada Hirofumi 15a69a8173 p54usb: Add usbid for Corega CG-WLUSB2GT.
Signed-off-by: Shimada Hirofumi <hirofumi@flycat.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:14:01 -05:00
Hauke Mehrtens 634c8d2587 rtl8187: fix typo in ifdef comment
Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:12:53 -05:00
Hauke Mehrtens 063b2dfffc b43legacy: fix typo in ifdef comment
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:12:53 -05:00
Randy Dunlap 2bf9fa6980 wireless: airo_cs build fixes
When WEXT_PRIV is not enabled, airo_cs has build errors.
It needs to include net/iw_handler.h and it should select
WEXT_PRIV, like the airo driver does.

drivers/net/wireless/airo.c:7655: error: unknown field 'num_private' specified in initializer
drivers/net/wireless/airo.c:7655: warning: initialization makes pointer from integer without a cast
drivers/net/wireless/airo.c:7656: error: unknown field 'num_private_args' specified in initializer
drivers/net/wireless/airo.c:7656: warning: excess elements in struct initializer
drivers/net/wireless/airo.c:7656: warning: (near initialization for 'airo_handler_def')
drivers/net/wireless/airo.c:7658: error: unknown field 'private' specified in initializer
drivers/net/wireless/airo.c:7658: warning: initialization makes integer from pointer without a cast
drivers/net/wireless/airo.c:7658: error: initializer element is not computable at load time
drivers/net/wireless/airo.c:7658: error: (near initialization for 'airo_handler_def.num_standard')
drivers/net/wireless/airo.c:7659: error: unknown field 'private_args' specified in initializer
drivers/net/wireless/airo.c:7659: warning: initialization from incompatible pointer type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-15 16:12:52 -05:00
John W. Linville f318d658de Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6 2010-02-15 16:04:43 -05:00
Tony Lindgren a8eb7ca0cb omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3
Replace ARCH_OMAP34XX with ARCH_OMAP3

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:02 -08:00
Tony Lindgren 088ef950dc omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2
Convert ARCH_OMAP24XX to ARCH_OMAP2

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:01 -08:00
David S. Miller 02b1bae5e1 niu: Refinements to kernel logging.
Fix unconditional empty kerne log message every interrupt.

Kill some informational log messages that are superfluous
and anyways occur before the netdev is registered.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-15 00:07:00 -08:00
Joe Perches f10a1f2e7e niu: Use pr_<level>, netdev_<level> and netif_<level> macros
Remove #define PFX
Add pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert printks to pr_<level>
Convert printks without levels to pr_cont
Convert pr_<level> with np->dev to netdev_<level>
Convert dev_<level> to netdev_<level>
Convert niudbg to netif_printk
Convert niuinfo, niuwarn macros to netif_<level>(priv, type, dev...
Coalesce long formats
Convert embedded function names to "%s", __func__
Always use "%s()..." when __func__ is printed

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-14 22:40:39 -08:00
David S. Miller 5ecccb74dc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/mac80211/rate.c
2010-02-14 22:30:54 -08:00
David S. Miller f6f223039c Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2010-02-14 17:45:59 -08:00
David S. Miller 3d0beb921f Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-02-14 11:56:38 -08:00
Matt Carlson b3b3f04fb5 tg3: Update driver version to 3.107
This patch updates the tg3 version to 3.107.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:55 -08:00
Matt Carlson 1061b7c564 tg3: Fix AC131 loopback test errors for 5785
The AC131 does not enable the forced transmit clock settings
immediately.  The workaround is to read the register again to get the
setting to take effect.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:55 -08:00
Matt Carlson c88734054e tg3: Fix napi assignments in loopback test
The 57765 lacks TSS support.  This renders the napi assignments
incorrect in the loopback test function.  This patch fixes the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:54 -08:00
Matt Carlson 603f11738c tg3: Reset phy during bringup when using phylib
The driver puts the phy into low-power mode when it releases the device.
If the device were to be reacquired, the phy needs a reset to bring it
back to full powered operation.  This patch allows phylib-enabled
devices to reset the phy.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:54 -08:00
Matt Carlson 0339e4e3ef tg3: Turn off multiple DMA reads for 5717
The 5717's DMA read engine has a bug when initiating multiple DMA reads
across the PCIe bus.  This patch disables the feature.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:53 -08:00
Matt Carlson 6b10c1653e tg3: Fix 57765 A0 bootcode race condition
On A0 revision of 57765 asic rev devices, the bootcode will perform some
hardware operations, after the magic signature is presented, that will
collide with setup operations performed by the driver.  The best way to
avoid the contention is to have the driver delay an additional 10
milliseconds.  B0 revisions of the chip will make this workaround
unnecessary.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:53 -08:00
Matt Carlson f89f38b8ec tg3: Unwedge stuck MSI-X vectors
The previous patch changed the code so that new rx buffer submissions to
the hardware stall if a new submission would overwrite data needed by an
unserviced rx packet.  On very busy 5717 and 57765 asic rev devices,
there is a corner case where the hardware will fail to assert an MSI-X
interrupt for rx traffic.  If that vector's interrupt never has another
reason to assert, any rx buffers held will never be serviced.  If the
buffers are never serviced and the hardware consumes all the available
rx packets for other rx rings, deadlock will result.

The most reliable and least intrusive way to work around the problem is
to detect the case where new submissions would overwrite existing data
and force all rx interrupt vectors to fire.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:52 -08:00
Matt Carlson e92967bfb1 tg3: Prevent rx producer ring overruns
When operating in RSS mode, it is possible for one rx return ring to
submit enough rx buffers back to the hardware such that it inadvertently
overwrites data needed by another rx return ring.  This patch addresses
the problem by looking for non-NULL skb pointers in the
rx_[std|jmb]_buffers rings that parallel the rx producer rings.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:51 -08:00
Matt Carlson e4af1af900 tg3: Give MSI-X vec 1 rx backlog space
RSS ring 1 is responsible for submitting new rx buffers to the
hardware on behalf of all the other RSS rx return rings.  Up until now
this ring submitted its new rx buffers to the producer ring directly.
The following patch will require that this ring have a place to put
backlogged rx packets.  As a consequence, it can no longer submit new
buffers to the producer ring.

This patch adds code to allocate an extra shadow producer ring for this
RSS ring and adds RSS ring 1 to the list of rings needing buffer
transfers.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 17:05:51 -08:00
Williams, Mitch A 8151d2948e igb: support for VF configuration tools
Add support to the igb driver for VF configuration mechanisms through the
PF interface.

Signed-off-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>
2010-02-12 16:56:09 -08:00
stephen hemminger cfc0861ba3 sky2: version 1.27
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:04 -08:00
Mike McCormack 8a0c9228f1 sky2: Avoid down and up during sky2_reset
Rewrite sky2_reset to work with interrupts disabled and
 avoid freeing and reallocing memory.

The old code used sky2_down and sky2_up to implement sky2_reset,
 which meant interrupts could not be disabled, and the transmit and
 receive ring buffers would be free'd and reallocated.

To avoid the interrupt handler waking the transmit queue while
 we're doing a reset, it's better to have interrupts and NAPI
 polls disabled.

Note: Modified Mike's patch to do IRQ disable in sky2_down before
 calling sky2_hw_down - Stephen

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:04 -08:00
Mike McCormack f2b31cb3ae sky2: Refactor sky2_down into two functions
Create a sky2_hw_down that brings the hardware down.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminber <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:03 -08:00
Mike McCormack ea0f71e59c sky2: Refactor sky2_up into two functions
Move hardware initialization into sky2_hw_up.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:03 -08:00
Mike McCormack 200ac492b3 sky2: Allocate initial skbs in sky2_alloc_buffers
Allocate everything in one place so there's a single point
of failure in sky2_up, and sky2_rx_start can no longer fail.

Don't leave the hardware in a partially initialized state in the
case rx ring allocation fails.

As with the old code, the rx ring still needs to be fully
allocated for sky2_up to succeed.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:02 -08:00
Mike McCormack 39ef110ba8 sky2: Factor out code to calculate packet sizes
Move code to calculate receive threshold and packet size out of
sky2_rx_start() so that is can be called from elsewhere easily.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:02 -08:00
stephen hemminger 44dde56d37 sky2: jumbo packet changes
Change how FIFO is programmed in jumbo mode (to match vendor driver).
Mostly cosmetic, the only register change is that the bits 22,23
are not programemd used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:01 -08:00
stephen hemminger 87b09f1f25 sky2: dont enable PME legacy mode
This bit is not changed by vendor driver, and should be left alone.
The documentation implies this a debug bit.
  0 = WAKE# only asserted when VMAIN not available
  1 = WAKE# is depend on wake events and independent of VMAIN.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:01 -08:00
stephen hemminger 5f8ae5c537 sky2: WoL changes
Change Wake On Lan code to be similar to vendor driver. The definition
of Y2_HW_WOL_ON is confusing; what it means is transition to firmware SPI
setting when doing power change.

Since same code is done for both shutdown and suspend, use common
code path.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:00 -08:00
stephen hemminger 8b05543129 sky2: fix sparse warning
Warning about hidden variable

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 16:21:00 -08:00
Joe Perches d707204c1f drivers/net/skge.c: Use netif_printk macros
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 13:27:47 -08:00
Joe Perches ae9540f75d drivers/net/qlge: Use netif_printk helpers
Convert QPRINTK macros to netif_<level> equivalents.
Expands and standardizes the logging message output.
Removes __func__ from most logging messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 13:27:46 -08:00
Joe Perches f8502ce4f9 drivers/net/jme: Use netif_printk helpers
Convert uses of msg_<type> to netif_<level>(
Remove msg_<type> macros

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 13:27:46 -08:00
Joe Perches bf82c189a9 drivers/net/r8196.c: Use netif_printk macros
Simplify the logic a bit, make the message logs a bit more consistent.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 13:27:45 -08:00
Joe Perches ba211e3ec3 drivers/net/atl1e: Use netdev_printk helpers
Logging messages sometimes had duplicated "ATL1E" output.

For instance:
ATL1E 0000:03:00.0: ATL1E: eth0 NIC Link is Up<100 Mbps Full Duplex>
is now:
ATL1E 0000:03:00.0: eth0: NIC Link is Up <100 Mbps Full Duplex>

Add some consistency to logging messages
Add some missing \n's to logging messages
Miscellaneous typo spelling corrections
Change atl1e_validate_option argument from pdev to adapter

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 13:27:44 -08:00
Steve Hodgson 5e2a911cec sfc: Fix SFE4002 initialisation
From: Steve Hodgson <shodgson@solarflare.com>

Commit 357d46a17e "sfc: QT202x: Remove
unreliable MMD check at initialisation" broke initialisation of the
SFE4002.  efx_mdio_reset_mmd() returns a positive value rather than 0
on success.  The above commit causes this value to be propagated up
by qt202x_reset_phy(), which is treated as a failure by its callers.
Change qt202x_reset_phy() to return 0 if successful.

The PCI layer treats >0 as "fail, but please call remove() anyway",
which means that unloading the driver would cause a crash.  Add a
WARN_ON() on the failure path of efx_pci_probe() to provide early
warning if there are any other cases where we do this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:32:27 -08:00
Ajit Khaparde c0ad98453f be2net: bug fix in be_read_eeprom
The offset to read the eeprom data was missing and
wrong eeprom data was being dumped. This patch fixes this.

>From Suresh R <sureshr@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:28:00 -08:00
Ajit Khaparde 1a8cdc5d49 be2net: remove ASIC generation number from Kconfig
Since the driver is supporting multiple generations of the ASIC
don't mention any ASIC generation number.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:28:00 -08:00
Ajit Khaparde 35ecf03c83 be2net: change the driver description
Since the driver is supporting multiple generations of the ASIC
remove ASIC generation information from the driver description.
This information is displayed by modinfo.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:59 -08:00
Ajit Khaparde 82903e4bfc be2net: fix to limit max vlans supported in certain skews
In certain skews the ASIC can support only 16 vlans per interface.
Once the limit is crossed, the ASIC is programmed in vlan promiscuous mode.
Switch off the vlan promiscuous mode once the number of vlans
falls back to the max vlans supported.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:59 -08:00
Ajit Khaparde 205859a2ff be2net: minor code optimizations
Couple of code optimizations in the Rx path (to avoid a memset).

From: Sathya P <sathyap@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:58 -08:00
Ajit Khaparde 34a89b8c75 be2net: bug fix in be_change_mtu
Current code allows the new mtu to cross the supported value.
This patch fixes the boundary checks.

From: Suresh R <sureshr@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:58 -08:00
Ajit Khaparde 3f0d4560ae be2net: bug fix for flashing the BladeEngine3 ASIC
Now flashing both BE2 and BE3 devices is supported.

From: Naresh G <nareshg@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:57 -08:00
Ajit Khaparde e254f6ecae be2net: remove unused pci device id
We are not going to use this device id.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:57 -08:00
Shirley Ma 830a8a976f virtio_net: remove send queue
Now we have a virtio detach API (in commit
f9bfbebf34), we don't need to track xmit
skbs in the virio_net driver, which improves transmission performance.

Signed-off-by: Shirley Ma <xma@us.ibm.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:27:56 -08:00
Tristram Ha b25822ca5e net: Makefile change for KSZ884X driver
Add Micrel KSZ884X network driver for KSZ8841/KSZ8842 PCI Ethernet chips.

Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:15:22 -08:00
Tristram Ha 1eb1cc7a20 net: Kconfig change for KSZ884X driver
Add Micrel KSZ8841/KSZ8842 PCI Ethernet chip support.

Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:15:22 -08:00
Tristram Ha 8ca86fd83e net: Micrel KSZ8841/2 PCI Ethernet driver
This is a new network driver for Micrel KSZ8841/KSZ8842 PCI Ethernet chips.  The same driver can run both chips at the same time.  It supports IPv4 TCP hardware checksumming and so can use scatter/gather transmission.

The KSZ8842 switch has 2 ports.  Some users like to take direct control of those ports.  So KSZ8842 has a multiple devices mode in which the driver creates another network device so that users can specify which port to send packets.  This mode is enabled by passing the "multi_dev=1" parameter to the driver during loading.

The KSZ884X can receive huge frames with size up to 1916 bytes.  To use this feature change the network device MTU from 1500 to 1898.

The KSZ884X driver has 3 packet receive processing functions for the normal mode, multiple devices mode, and huge frame mode.  Those functions are identical except for more checking for the new features.  In normal programming point of view the huge frame version is the one to use because it covers all the cases, but this is done for performance consideration because the target clients for the KSZ884X chips are embedded systems, which unlike desktop PC may not have powerful CPU.

Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:15:21 -08:00
Uwe Kleine-König 447d8c2603 net: move am79c961's probe function to .devinit.text
A pointer to am79c961_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded.  Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 12:10:47 -08:00
Jiri Pirko 7455a76f17 macb: straighten out macb_mii_probe function
Use "phy_find_first" instead of manual lookup. Also use "phy_connect_direct"
instead of "phy_connect" since we already have phy_device pointer here.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 11:38:58 -08:00
Jiri Pirko 4cd24eaf0c net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.

Jirka

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 11:38:58 -08:00
Shanyu Zhao fafaf31bf9 iwlwifi: fix AMSDU Rx after paged Rx patch
Previous patch "use paged Rx" broke AMSDU Rx functionality. If an AP
sends out A-MSDU packets the station will crash.  Fix it by linearizing
skbuff for AMSDU packet before handing it to mac80211 since mac80211
doesn't support paged skbuff.

This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2155

Reported-by: Norbert Preining <preining@logic.at>
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-12 14:35:05 -05:00
Felix Fietkau 42c4568a4a ath9k: add a workaround for ack timeout issues
Adding support for setting the coverage class in some cases broke
association and data transfer, as it overwrote the initial ACK timeout
value from the initvals with a smaller value.
I don't know why the new value works in 5 GHz (matches the initval
there), but not in 2.4 GHz (initvals use 64us here), so until the
problem is fully understood, the value should be increased again.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-12 14:28:40 -05:00
Trieu 'Andrew' Nguyen 1db5950f1d iwlwifi: Monitor and recover the aggregation TX flow failure
This change monitors the tx statistics to detect the drop in throughput.
When the throughput drops, the ratio of the actual_ack_count and the expected_
ack_count also drops.  At the same time, the aggregated ba_timeout (the number
of ba timeout retries) also rises.  If the actual_ack_count/expected_ack_count
ratio is 0 and the number of ba timeout retries rises to 16, no tx packets
(tcp, udp, or ping - icmp) can be delivered.  The driver recovers from this
situation by reseting the uCode firmware.  If the actual_ack_count/expected_
ack_count ratio drops below 50% (but not 0) and the aggregated ba_timeout
retries just exceed 5 (but not 16), then the driver can reset the radio to
bring the throughput up.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:27:41 -08:00
Wey-Yi Guy a9e10fb9b1 iwlwifi: clear all the stop_queue flag after load firmware
All the queues are awake and ready to use after loading firmware,
for firmware reload case, if any queues was stopped before
reload, mac80211 will wake those queues after restart hardware, so make
sure all the flag used to keep track of the queue status are
reset correctly.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:27:30 -08:00
Stanislaw Gruszka f36d04abe6 iwlwifi: use dma_alloc_coherent
Change pci_alloc_consistent() to dma_alloc_coherent() so we can use
GFP_KERNEL flag.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:27:18 -08:00
Trieu 'Andrew' Nguyen 6c3872e1d5 iwlwifi: Adjusting PLCP error threshold for 1000 NIC
While testing the station with the NIC 1000 family, it is found that
the plcp error can easily exceed 50 value in 100mSecs.  This creates
unneccessary radio reset/tuning.  This patch raises the PLCP error
threshold of the NIC 1000 from 50 to 200 error count.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:27:05 -08:00
Reinette Chatre 4843b5a731 iwlwifi: reset card during probe
To ensure that card is in a sane state during probe we add a reset call.
This change was prompted by users of kdump who was not able to bring up the
wireless driver in the kdump kernel. The problem here was that the primary
kernel, which is not running at the time, left the wireless card up and
running. When the kdump kernel starts it is thus possible to immediately
receive interrupts from firmware after registering interrupt, but without
being ready to deal with interrupts from firmware yet.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:26:55 -08:00
Reinette Chatre bbcbb9ef97 iwlwifi: fix scan race
There is a problem if an "internal short scan" is in progress when a
mac80211 requested scan arrives. If this new scan request arrives within
the "next_scan_jiffies" period then driver will immediately return success
and complete the scan. The problem here is that the scan has not been
fully initialized at this time (is_internal_short_scan is still set to true
because of the currently running scan), which results in the scan
completion never to be sent to mac80211. At this time also, evan though the
internal short scan is still running the state (is_internal_short_scan)
will be set to false, so when the internal scan does complete then mac80211
will receive a scan completion.

Fix this by checking right away if a scan is in progress when a scan
request arrives from mac80211.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:26:40 -08:00
Abhijeet Kolekar 7bfedc59ee iwlwifi: cleanup return values
Cleanup return values and removes unnecessary code.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:26:31 -08:00
Wey-Yi Guy a24dd27c47 iwlwifi: remove unused op-code in PHY Calibration command
Number of calibration op-code are not used by driver, remove those from
iwl-commands.h

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:26:21 -08:00
Wey-Yi Guy 45d427001b iwlwifi: check for aggregation frame and queue
Error checking for aggregation frames should go into aggregation queue,
if aggregation queue not available, use legacy queue instead.
Also make sure the aggregation queue is available to activate,
if driver and mac80211 is out-of-sync, try to disable the queue and
sync-up with mac80211.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:26:10 -08:00
Wey-Yi Guy 04cafd7fa7 iwlwifi: add debug function to reset/reload radio/firmware
Adding function to force reset radio or reload firmware from debugfs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:25:55 -08:00
Wey-Yi Guy a93e7973d0 iwlwifi: multiple force reset mode
Provide the function to perform different type of uCode reset/reload operation.
When uCode detect error and can not fix itself, this iwl_force_reset()
function allow driver to perform the necessary reset/reload functions and help
to bring uCode back to normal operation state.

Currently only 2 type of force reset are available:
 - reset radio
 - reload firmware

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:24:12 -08:00
Wey-Yi Guy dff010ac8e iwlwifi: clear all tx queues when firmware ready
Reset and clear all the tx queues when finished downloading runtime
uCode and ready to go into operation mode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-11 10:22:45 -08:00
Peter Waskiewicz 92eb879ff5 ixgbe: Bump driver version up
Driver has gone under significant changes, the version should
reflect that.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 20:03:14 -08:00
Peter Waskiewicz 9a713e7c7c ixgbe: Add support for the new ethtool n-tuple programming interface
This patch adds n-tuple filter programming to 82599.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 20:03:14 -08:00
stephen hemminger 375c568844 sky2: receive checksum refactoring
Break the largish case for handling receive checksum into a separate
function, and if there is a problem use dev_XXX routines to
show which hardware is the problem.

Turn one corner case into a BUG().  This only happens if the driver
is expecting one behavior but the chip does the old behavior;
only ever saw this when bringing up a new chip type and driver
was buggy.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 17:56:28 -08:00
stephen hemminger acd12dde26 sky2: disable ASF on Yukon Supreme
Clone of vendor code to disable ASF on Extreme and Supreme chips.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 17:56:28 -08:00
stephen hemminger a0db28b898 sky2: resume clocks
Change the resume path to use pci write config for a couple of reasons:
1. pci_write_config_dword() allows for more error
   checking of PCI health after resume.

2. better to toggle this register on all chip types, since that
   is what vendor driver does.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 17:56:27 -08:00
Deepak Saxena f32338319f Add Station and AdHoc mode support to libertas_tf
Add support for using the libertas_tf driver on a managed
or ad-hoc network.

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-10 16:36:50 -05:00
Bob Copeland 2ac2927a95 ath5k: use correct packet type when transmitting
The hardware needs to know what type of frames are being
sent in order to fill in various fields, for example the
timestamp in probe responses (before this patch, it was
always 0).  Set it correctly when initializing the TX
descriptor.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-10 16:15:22 -05:00
Amit Kucheria bd011e8826 fec: Add ARCH_MX5 as a dependency
i.MX51 babbage board has a FEC ethernet controller

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 13:05:43 -08:00
Amit Kucheria fceb291919 fec: Add LAN8700 phy support
The i.MX51 babbage board has a FEC ethernet controller with this phy.

In the long term we should resurrect the phylib patches for fec.

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 13:05:42 -08:00
Rob Herring 633e7533ce fec: fix uninitialized rx buffer usage
The fec driver was enabling receive buffer descriptor without allocating
the buffers. Make sure the buffer descriptors are initialized to not
start receiving packets.

Open also calls fec_restart after the rx buffers are allocated. With the code
in fec_restart, it zeroes out the buffer descriptors that have just been
setup.

Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 13:05:42 -08:00
David S. Miller 044c18c9f5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-02-10 12:35:24 -08:00
Simon Kagstrom 3f2e8d9f13 via-velocity: Fix races on shared interrupts
This patch fixes two potential races in the velocity driver:

* Move the ACK and error handler to the interrupt handler. This fixes a
  potential race with shared interrupts when the other device interrupts
  before the NAPI poll handler has finished. As the velocity driver hasn't
  acked it's own interrupt, it will then steal the interrupt from the
  other device.

* Use spin_lock_irqsave in velocity_poll. In the current code, the
  interrupt handler will deadlock if e.g., the NAPI poll handler is
  executing when an interrupt (for another device) comes in since it
  tries to take the already held lock.

  Also unlock the spinlock only after enabling the interrupt in
  velocity_poll.

The error path is moved to the interrupt handler since this is where the
ISR is checked now.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Anders Grafstrom <anders.grafstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 10:55:02 -08:00
Simon Kagstrom 39c2ff43ea via-velocity: Take spinlock on set coalesce
velocity_set_coalesce touches ISR and some other sensitive registers not
covered by the rtnl lock, so take the velocity spinlock.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 10:55:01 -08:00
Simon Kagstrom d6cade0f7f via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10 10:55:01 -08:00
Jelle Martijn Kok 174b24963e rtl8187: Add new device ID
Add new RTL8187B device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-10 13:14:09 -05:00
David S. Miller b1109bf085 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-02-09 11:44:44 -08:00
Vivek Natarajan 05df49865b ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-09 14:10:05 -05:00
Roel Kluin 33a5d083e7 iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()
The wrong pointer was tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-09 14:03:34 -05:00
Sujith 6c8afef551 ath9k: Fix sequence numbers for PAE frames
Currently, PAE frames are not assigned proper sequence numbers.
Since sending PAE frames as part of aggregates breaks
crupto with several APs, they are sent as normal MPDUs.
Fix the seqeuence number issue by updating the frame with the
internal sequence number.

Tested-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-09 14:03:33 -05:00
Grant Likely 71a157e8ed of: add 'of_' prefix to machine_is_compatible()
machine is compatible is an OF-specific call.  It should have
the of_ prefix to protect the global namespace.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-09 08:33:00 -07:00
Daniel Mack 3ad2f3fbb9 tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-09 11:13:56 +01:00
Julia Lawall bcf4d812e6 drivers/net: Correct NULL test
Test the value that was just allocated rather than the previously tested one.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@

if (x == NULL || ...) {
    ... when forall
    return ...; }
... when != goto l;
    when != x = e
    when != &x
*x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-08 22:44:18 -08:00
Divy Le Ray 2d171886b1 cxgb3: fix GRO checksum check
Verify the HW checksum state for frames handed to GRO processing.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-08 22:37:24 -08:00
Christian Lamparter 641eabb0a3 ath: fix WARN_ON with Polish (Poland) Contry code
This patch fixes a WARN_ON which is triggered
by Poland's country code.

ath: EEPROM regdomain: 0x8268
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x37
ath: Country alpha2 being used: PL
ath: Regpair used: 0x37
  -----------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/regd.c:155 ath_regd_init+0x30b
Pid: 12661, comm: firmware/carl91 2.6.33-rc5-wl #18
Call Trace:
 [<>] ? warn_slowpath_common+0x76/0x8c
 [<>] ? ar9170_reg_notifier+0x0/0x2d [carl9170usb]
 [<>] ? ath_regd_init+0x30b/0x377 [ath]
 [<>] ? ar9170_register+0x3b3/0x3ca [carl9170usb]
[...]
---[ end trace ]---

Note: Poland is just an example. But it is very likely
that more country codes are affected.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:02 -05:00
Kalle Valo 00a08eb62f rt2x00: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:01 -05:00
Kalle Valo 97e93fcd86 p54: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

p54 uses struct ieee80211_tx_queue_stats also internally, so create a new
identical struct p54_tx_queue_stats which the driver can use.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:01 -05:00
Kalle Valo 1296d47445 iwlwifi: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:01 -05:00
Kalle Valo 8b2bbe66ab b43legacy: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:00 -05:00
Kalle Valo 3b27521a5b b43: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:00 -05:00
Kalle Valo 3b2119096d ath5k: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:51:00 -05:00
Kalle Valo d1ace8e57a ar9170: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Because ar9170 uses ieee80211_tx_queue_stats internally, create a new
identical struct ar9170_tx_queue_stats which the driver can use.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:59 -05:00
Kalle Valo 8ccbc3b8b0 mwl8k: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

mwl8k used struct ieee80211_tx_queue_stats internally to track the queue
lenght. Replace struct ieee80211_tx_queue_stats with a simple len field
in struct mwl8k_tx_queue. Limit and count fields seemed to be unused.

Compile-tested only.

Cc: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:59 -05:00
Kalle Valo 4046fe66ce adm821: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.

Compile-tested only.

Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:59 -05:00
Ming Lei 733da37dab ath9k: fix keycache leak in split tkip case
If split tkip key is used, ath_delete_key should delete
rx key and rx mic key. This patch fixes the leak of hw
keycache in the case.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:59 -05:00
Samuel Ortiz 21b2d8bd2f iwlwifi: Send broadcast probe request only when asked to
When running directed active scans we currently end up sending both the SSID
probe requests and an additional broadcast one.
This is due to the fact that we always leave the probe request template SSID IE
length to 0. Instead we should set it to the first SSID to scan, and fill the
direct_scan array with the remaining SSIDs to scan for. This way we only send
what we've been asked to: a broadcast probe request when no directed scan is
requested, and directed probe requests otherwise.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:58 -05:00
Ben Cahill ed56a3f15a iwlwifi: Add chain_noise support for 6050
Existing iwl6050_ops->iwl6050_hcmd_utils structure had no pointers to chain
noise functions (gain_computation and chain_noise_reset).  As it turns out,
by adding chain_noise_scale (see related patch), there is no need for separate
chain noise function, so simply use iwl6000_ops->iwl5000_hcmd_utils, and
remove those for 6050.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:58 -05:00
Ben Cahill d4fe5ac9e0 iwlwifi: Add chain noise scaling factor
6x50 device requires a different scaling factor for Rx gain values sent to
device via PHY_CALIBRATION_CMD (CHAIN_NOISE_GAIN_CMD).  Rather than create
a new iwlXXXX_gain_computation() function, add new chain_noise_scale member
to struct iwl_cfg, and keep using iwl5000_gain_computation().

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:58 -05:00
Holger Schurig 40e6fa829a libertas: don't retry commands
Retrying commands seldomly works, most often the firmware is in a
weird state anyway and needs the device to reset. So it's better
to report the broken state back to user-space.

Also rename command_timer_fn() into lbs_cmd_timeout_handler(),
which better reflect it's usage.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:56 -05:00
Kalle Valo 85359499ee wl1251: fix txop unit
mac80211 uses unit units of 32 usec with txop but wl1251_acx_ac_cfg()
expects it to be usecs. This fortunately didn't cause any severe problems,
only that firmware was using incorrect WMM settings.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:56 -05:00
Rafał Miłecki 40bd5203dd b43: N-PHY: handle allocation fail in samples generation
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:56 -05:00
Rafał Miłecki 5f6393ecf5 b43: N-PHY: load generated samples
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:56 -05:00
Rafał Miłecki 9442e5b58e b43: N-PHY: partly implement SPUR workaround
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-08 16:50:55 -05:00