Commit Graph

56957 Commits

Author SHA1 Message Date
Sujith
55f5e4a980 ath9k: Remove ath_tx_stopdma and call ath9k_hw_stoptxdma directly
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:40 -05:00
Sujith
e832435790 ath9k: Reorganize code in xmit.c
This patch starts cleaning up all the crufty code in transmission path,
grouping functions into logical blocks.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:39 -05:00
Sujith
dd00639568 ath9k: Update short guard interval in rate control
The rate control algorithm needs to know if a STA allows
short guard interval, fixing this allows RC to use the correct
table.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:39 -05:00
Sujith
6642fe6f5d ath9k: rateCodeToIndex is not used, remove it
Calculation of rate indices from ratecode is done in recv.c
in a straightforward manner for both HT and legacy rates.
This variable is not needed anymore.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:38 -05:00
Gabor Juhos
0c1aa49596 ath9k: enable support for AR9100
Because we have support for the AR9100 devices now, we can enable them.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:35 -05:00
Gabor Juhos
9950688263 ath9k: fix null pointer dereference in ani monitor code
In 'ath9k_ani_reset' the 'ahp->ah_curani' will be initialized only
if 'DO_ANI(ah)' true. In 'ath9k_hw_ani_monitor' we are using
'ahp->ah_curani' unconditionally, and it will cause a NULL pointer
dereference on AR9100.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:34 -05:00
Gabor Juhos
1975ef2039 ath9k: fix ar5416Addac_9100 values
Writing the register at offset 0x98c4 causes a deadlock on the AR913x
SoCs. Although i don't have detailed knowledge about these registers,
but if i change the register offset according to the 'ar5416Addac' table,
it works. Additionally there is no reference to the 0x98c4 elsewhere.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:34 -05:00
Gabor Juhos
d03a66c17a ath9k: remove (u16) casts from rtc register access
The RTC register offsets don't fit into 'u16' on the AR913x, so we have
to remove the existing casts.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:33 -05:00
Gabor Juhos
9dbeb91a8b ath9k: get EEPROM contents from platform data on AHB bus
On the AR913x SOCs we have to provide EEPROM contents via platform_data,
because accessing the flash via MMIO is not safe. Additionally different
boards may store the radio calibration data at different locations.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:33 -05:00
Gabor Juhos
09329d371e ath9k: introduce platform driver for AHB bus support
This patch adds the platform_driver itself, and modifies the main driver
to register it.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:32 -05:00
Gabor Juhos
6baff7f9a6 ath9k: move PCI code into separate file
Now that we have converted all bus specific routines to replaceable, we
can move the PCI specific codes into a separate file.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:31 -05:00
Gabor Juhos
39c3c2f2de ath9k: introduce bus specific cleanup routine
We have left only some PCI specific cleanup code. We have to convert
them as well.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:30 -05:00
Gabor Juhos
88d1570764 ath9k: introduce bus specific cache size routine
The PCI specific bus_read_cachesize routine won't work on the AHB bus,
we have to replace it with a suitable one later.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:30 -05:00
Gabor Juhos
7da3c55ce8 ath9k: convert to use bus-agnostic DMA routines
Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:29 -05:00
Gabor Juhos
f5870acb3a ath9k: convert to struct device
Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB
bus as well.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:29 -05:00
Helmut Schaa
2663516d8f iwl3945: report killswitch changes even if the interface is down
Currently iwl3945 is not able to report hw-killswitch events while the
interface is down. This has implications on user space tools (like
NetworkManager) relying on rfkill notifications to bring the interface
up once the wireless gets enabled through a hw killswitch.

Thus, enable the device already in iwl3945_pci_probe instead of iwl3945_up
and poll the CSR_GP_CNTRL register to update the killswitch state every
two seconds. The polling is only needed on 3945 hardware as this adapter
does not use interrupts to signal rfkill changes to the driver (in case no
firmware is loaded). The firmware loading is still done in iwl3945_up.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:28 -05:00
Harvey Harrison
c95741deef prism54: remove private implementation of le32_add_cpu
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:28 -05:00
Larry Finger
a1d8821095 b43: Eliminate compilation warning in b43_op_set_key
A recent pull from wireless testing generates the following warning:

   CC [M]  drivers/net/wireless/b43/main.o
 drivers/net/wireless/b43/main.c: In function ‘b43_op_set_key’:
 drivers/net/wireless/b43/main.c:3636: warning: pointer type mismatch
 in conditional expression

This fix was suggested by Johannes Berg <johannes@sipsolutions.net>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:28 -05:00
Jouni Malinen
07e74348c7 ath9k: Use a defined value for pci_set_power_state()
Silence sparse by using a defined value PCI_D3hot instead of a magic
constant in a pci_set_power_state() call.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:27 -05:00
Helmut Schaa
81094888bf ath5k: discard 11g caps if reported by an ar5211 eeprom
At least one ar5211 card (GIGABYTE GN-WLMA101, 168c:0012 subsystem
1458:e800) reports itself as 11g capable which seems to be a bug in the
eeprom. initvals.c assumes that ar5211 is only 11b capable and thus refuses
to initialize this card. Hence this patch changes the probing for 11g
capabilities to discard 11g capabilities for ar5211 cards which allows this
specific card to work fine in 11b and 11a modes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:26 -05:00
Christian Lamparter
cd8d3d3212 p54spi: p54spi driver
This patch adds the p54spi driver.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:25 -05:00
Christian Lamparter
4628ae7558 p54spi: stlc45xx eeprom blob
Usually every prism54 design hardware has a tiny eeprom chip in which all
device specific data for calibration and link-tuning is stored.
The stlc45xx chips are the only exception.
They are made for embedded devices, where space is scarce.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:25 -05:00
Christian Lamparter
6917f506a0 p54: longbow frontend support
This patch adds support for longbow RF chip.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:24 -05:00
Christian Lamparter
83cf1b6edb p54: prepare the eeprom parser routines for longbow
This patch adds support to upload pre-calculated calibration data to the firmware.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:22 -05:00
Bob Copeland
b6ea03562f ath5k: fix bf->skb==NULL panic in ath5k_tasklet_rx
Under memory pressure, we may not be able to allocate a new skb for
new packets.  If the allocation fails, ath5k_tasklet_rx will exit but
will leave a buffer in the list with a NULL skb, eventually triggering
a BUG_ON.

Extract the skb allocation from ath5k_rxbuf_setup() and change the
tasklet to allocate the next skb before accepting a packet.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:22 -05:00
Vasanthakumar Thiagarajan
138ab2e44e ath9k: Fix basic connectivity issue
This patch temporarily fixes a regression introduced by BT coexistence support.
There is an instability in connection when BT coexistence is enabled on some h/w.
This interim fix introduces a module parameter for BT coexistence configuration.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:21 -05:00
Andrew Price
217875a37d rt2400,rt2500: init led_qual for LED_MODE_DEFAULT
Add a check for LED_MODE_DEFAULT so that we use the link LED for rt2400
and rt2500 devices.

Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:21 -05:00
Colin McCabe
d2b21f1917 libertas: if_spi, driver for libertas GSPI devices
Add initial support for libertas devices using a GSPI interface.  This has
been tested with the 8686.

GSPI is intended to be used on embedded systems. Board-specific parameters are
required (see libertas_spi.h).

Thanks to everyone who took a look at the earlier versions of the patch.

Signed-off-by: Colin McCabe <colin@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:19 -05:00
Christian Lamparter
3cd08b383b p54: upgrade memrecord to p54_tx_info
mac80211 reserves 24 bytes in skb->cb for the driver.
So far, we only used them to keep track of used and free device memory.
But p54spi will need a slice of it, as well as the stuck frame detection.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:19 -05:00
Christian Lamparter
63f2dc9f2f p54: refactor p54_alloc_skb
Old firmwares had no problems processing frames which filled eighth of the memory window.
However we have to be a bit more careful with fat frames when we talk to new firmwares.
Apart from that, I confess the old logic was a bit weird and not very sophisticated.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:18 -05:00
Jiri Slaby
e724b8fef6 IWL: fix WARN typo
new kew -> a new key

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:17 -05:00
Colin McCabe
b48365994b libertas: Update libertas core with GSPI constants
Add GSPI constants to libertas core.

Fix misleading comment in lbs_setup_firmware.

Signed-off-by: Colin McCabe <colin@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:16 -05:00
Samuel Ortiz
c7a7c8ecd4 iwl3945: Fix iwl3945_init_drv()
iwl3945_init_drv() initialises the wrong lock, and sets the wrong power saving
default level.
With this power saving mode, we are losing a lot of frames in Ad-Hoc mode.

This is a bug fix for bug #1873.
( http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1873 )

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:16 -05:00
Reinette Chatre
01f8162a85 iwlwifi: update copyright year to 2009
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:15 -05:00
Samuel Ortiz
9c74d9fbd5 iwl3945: Change crypto parameter name
Now that we're using iwl_mod_params, we want our module parameters names to be
in sync with the structure.
So, to set iwl_mod_params.sw_crypto, we'd better use a "swcrypto" parameter
name instead of the "hwcrypto" current one.
Moreover, by setting the decrypted flag properly, this patch also fixes the HW
crypto path for 3945 (the current code is not setting it when running HW
crypto).

This is a bug fix for bug #1872
( http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1872 )

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:14 -05:00
Winkler, Tomas
1e33dc6447 iwl3945: use hw_params.rx_buf_size
This patch makes 3945 use of hw_params.rx_buf_size instead of
IWL_RX_BUF_SIZE. It also renames IWL_RX_BUF_SIZE to IWL_RX_BUF_SIZE_3K
and moves rx buffer defines into iwl-fh.h.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:14 -05:00
Winkler, Tomas
d45aadd04b iwl3945: remove double defined 3945 tfd structures
This patch removes doubly defined struct iwl3945_tfd_frame_data
and struct iwl3945_tfd_frame.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:13 -05:00
Winkler, Tomas
625a381ab8 iwl3945: kill iwl3945_x2_queue_used
This patch replaces iwl3945_x2_queue_used with iwl_queue_used.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:13 -05:00
Winkler, Tomas
37d68317ad iwl3945: kill iwl3945_rx_queue_space
This patch replaces iwl3945_rx_queue_space with iwl_rx_queue_space.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:12 -05:00
Winkler, Tomas
141c43a3e4 iwl3945: kill iwl3945_rx_queue_restock
This patch kills iwl3945_rx_queue_restock function on prise of new
hw_params.rx_wrt_ptr_reg which holds per NIC RX write pointer register.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:11 -05:00
Winkler, Tomas
f5965955e0 iwl3945: kill hw_params.tx_ant_num
This patch removes tx_ant_num for hw_params structure. It is not used.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:11 -05:00
Jouni Malinen
fa77533e2e mac80211_hwsim: Report driver as MFP capable
mac80211_hwsim has no problems with MFP, so report it as MFP capable.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:10 -05:00
Jouni Malinen
0ced0e176a ath9k: Setup MFP options for CCMP
Configure hardware CCMP for management frame protection and use
software crypto when needed.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:10 -05:00
Jouni Malinen
ca470b2902 ath9k: Fix set_key error codes
Return -EOPNOTSUPP if the algorithm is not supported and -ENOSPC if
there is no room in the key cache. This avoids KERN_ERR printk in
mac80211 for "errors" that are actually expected to happen in normal
operating conditions.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:09 -05:00
Jouni Malinen
3cfcf6ac6d mac80211: 802.11w - Use BIP (AES-128-CMAC)
Add mechanism for managing BIP keys (IGTK) and integrate BIP into the
TX/RX paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:00:03 -05:00
Johannes Berg
4be8c3873e mac80211: extend/document powersave API
This modifies hardware flags for powersave to support three different
flags:
 * IEEE80211_HW_SUPPORTS_PS - indicates general PS support
 * IEEE80211_HW_PS_NULLFUNC_STACK - indicates nullfunc sending in software
 * IEEE80211_HW_SUPPORTS_DYNAMIC_PS - indicates dynamic PS on the device

It also adds documentation for all this which explains how to set the
various flags.

Additionally, it fixes a few things:
 * a spot where && was used to test flags
 * enable CONF_PS only when associated again

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:58 -05:00
Christian Lamparter
acbaf32e94 p54: return NETDEV_TX_OK in p54_tx and fix sparse warnings
This patch addresses all recent comments from Johannes Berg:

1st: (reference http://marc.info/?l=linux-wireless&m=123124685019631 )
>First off: all those should return NETDEV_TX_OK/BUSY.
>iwl-agn: returns 0 (== NETDEV_TX_OK, but still should be changed)
>[...]
>p54: same (some paths)

2nd:
> due to your PS patch ("p54: power save management"), please run sparse:
> make C=2 CF=-D__CHECK_ENDIAN__ M=...
> +drivers/net/wireless/p54/p54common.c:1753:8: warning: incorrect type in assignment (different base types)
> +drivers/net/wireless/p54/p54common.c:1769:29: warning: incorrect type in assignment (different base types)
The cpu_to_le16 ended up in the wrong line... Sorry!

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:57 -05:00
Ivo van Doorn
64d7468143 rt2x00: Only register rfkill input when key is present
rt2x00 should only register the RFKILL input device when the hardware indicated
the key was present.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:57 -05:00
Johannes Berg
4797938c5d mac80211: clean up channel type config
The channel_type really doesn't need to be the only member in
a new structure, so remove the struct. Additionally, remove
the _CONF_CHANGE_HT flag and use _CONF_CHANGE_CHANNEL when the
channel type changes, since that's enough of a change to require
reprogramming the hardware anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:55 -05:00
David Kilroy
47166791b7 orinoco: Remove unused variable rx_data
Probably something leftover from experimentation with tasklets. Now the
structure declaration orinoco_rx_data can be relocated to orinoco.c

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:54 -05:00
Nick Kossifidis
8465676241 ath5k: Minor QCU updates
* Sync qcu.c with legacy-hal
* Add some more comments
* Set QCU mask to save power (QCU mask controls which QCUs are attached
  to each DCU, we do a 1:1 mapping)

TODO: Use max QCU from EEPROM, further sync with legacy-hal and sam's
hal and a few more minor fixes.

I think after this we are ready to implement WME on the driver
part. Anyone interested ?

Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:53 -05:00
Ivo van Doorn
cca3e99861 rt2x00: Replace RFKILL with INPUT
As discussed on linux-wireless rt2x00 does not offer a true RFKILL key,
for that reason RFKILL support should be entirely removed.

The key which is attached to the hardware should be treated as normal
input device instead. Implement input_poll_dev support to poll the device
frequently. When the key status has changed report it as a SW event.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:47 -05:00
Vasanthakumar Thiagarajan
c97c92d927 ath9k: Enable Bluetooth Coexistence support
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:46 -05:00
Bob Copeland
7d96920488 ath5k: fix off-by-one in gpio checks
Sanity checks against AR5K_NUM_GPIO were all broken.  This doesn't
currently cause any problems since we only use the first four gpios.

Changes-licensed-under: ISC

Reported-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:45 -05:00
Bob Copeland
63649b6cf0 ath5k: support LEDs on Acer Aspire One netbook
Add vendor ID for Foxconn and use it to set the ath5k LED gpio and
polarity for Acer branded laptops.

base.c:
Changes-licensed-under: 3-Clause-BSD

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:45 -05:00
Christian Lamparter
2b8d4e2eea p54: power save management
This patch implements dynamic power save feature for p54.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:44 -05:00
Christian Lamparter
51eed9923d p54: implement FIF_OTHER_BSS filter setting
According to STMicroelectronics' LMAC documentation, the P54_FILTER_TYPE_TRANSPARENT flag
"configures the receive frame filter to pass all frames without regard to type and address matching."

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:44 -05:00
Christian Lamparter
78eb7484fa p54: enable rx/tx antenna diversity by eeprom bits
Respect all documented bits in the eeprom about the device diversity features.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:43 -05:00
Gabor Juhos
295834fe36 ath9k: use signed format to print HAL status
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:43 -05:00
Johannes Berg
dc822b5db4 mac80211: clean up set_key callback
The set_key callback now seems rather odd, passing a MAC address
instead of a station struct, and a local address instead of a
vif struct. Change that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Bob Copeland <me@bobcopeland.com> [ath5k]
Acked-by: Ivo van Doorn <ivdoorn@gmail.com> [rt2x00]
Acked-by: Christian Lamparter <chunkeey@web.de> [p54]
Tested-by: Kalle Valo <kalle.valo@nokia.com> [iwl3945]
Tested-by: Samuel Ortiz <samuel@sortiz.org> [iwl3945]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:42 -05:00
Michael Buesch
c557289cb8 b43: Change schedule for old-fw support removal
The scheduled date for the removal of old fw support was in July 2008.
However, we're not going to remove the support unless it causes a major
headache. So change the schedule from "July 2008" to "when it causes headaches".

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:41 -05:00
Christian Lamparter
98a8d1a8f2 p54: regulatory domain hints
This patch adds a sub-routine that parses the default country eeprom entry
and forwards the obtained Alpha2 identifier to the regulatory sub-system.

Note: I dropped the p54 specific regdomain<->alpha2 conversion code for now.
But it will be added as soon as there's the common library function is ready.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:40 -05:00
Christian Lamparter
e365f16046 p54: prevent upload of wrong firmwares
This patch will prevent anyone to upload a firmware which was not designed for his device.

There's still a catch:
There is no easy way to detect if a firmware is for PCI or for USB (1st Gen),
because they all share the same LM86 identifier.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:39 -05:00
Christian Lamparter
6982869d99 p54usb: utilize usb_reset_device for 3887
Sometimes on unload or reboot the 3887 USB devices become stuck.
<usual log entry>
kernel: usbcore: registered new interface driver p54usb
kernel: usb 2-10: (p54usb) reset failed! (-110)
kernel: p54usb: probe of 2-10:1.0 failed with error -110
[...]

and a physical unplug and replug was necessary.
However we should be able to do this in software as well,
without any user interaction.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:39 -05:00
Michael Buesch
6b1c7c6760 b43/ssb: Add SPROM8 extraction and LP-PHY detection
This adds detection code for the LP-PHY and SPROM
extraction code for version 8, which is needed by the LP-PHY and
newer N-PHY.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:38 -05:00
Johannes Berg
bb519bee07 b43: detect N PHY revision/radio
Does nothing unless you enable the hidden N PHY config.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:38 -05:00
Senthil Balasubramanian
cb33c4126b ath9k: INI update for Atheros AR9280 and AR9285 chipset.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:37 -05:00
Johannes Berg
92d6128e17 ssb/b43: add new N PHY device
This is used on my macbook. N PHY, obviously nothing works
yet, but we can detect the chip with this patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:37 -05:00
Luis R. Rodriguez
a085ff718c ath9k: fix sparse warnings
Fix sparse warnings:

drivers/net/wireless/ath9k/hw.c:1850:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:1713:6: originally declared here
drivers/net/wireless/ath9k/hw.c:2051:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:1961:6: originally declared here

drivers/net/wireless/ath9k/eeprom.c:195:6: warning: symbol 'ath9k_fill_eeprom' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:463:5: warning: symbol 'ath9k_check_eeprom' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1219:6: warning: symbol 'ath9k_hw_set_def_power_per_rate_table' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1510:6: warning: symbol 'ath9k_hw_set_4k_power_per_rate_table' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2007:5: warning: symbol 'ath9k_set_txpower' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2106:6: warning: symbol 'ath9k_set_addac' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2543:6: warning: symbol 'ath9k_eeprom_set_board_values' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2606:5: warning: symbol 'ath9k_get_eeprom_antenna_cfg' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2622:4: warning: symbol 'ath9k_hw_get_4k_num_ant_config' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2628:4: warning: symbol 'ath9k_hw_get_def_num_ant_config' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2647:4: warning: symbol 'ath9k_get_num_ant_config' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2790:5: warning: symbol 'ath9k_get_eeprom' was not declared. Should it be static?

drivers/net/wireless/ath9k/calib.c:962:30: warning: symbol 'iq_cal_multi_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:969:30: warning: symbol 'iq_cal_single_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:976:30: warning: symbol 'adc_gain_cal_multi_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:983:30: warning: symbol 'adc_gain_cal_single_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:990:30: warning: symbol 'adc_dc_cal_multi_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:997:30: warning: symbol 'adc_dc_cal_single_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:1004:30: warning: symbol 'adc_init_dc_cal' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:35 -05:00
Luis R. Rodriguez
c0d7c7af0a ath9k: remove superfluous check on changing channel
When we try to change the channel in ath9k its because
either the configuration indicates we *have* changed
channels or HT configuration has changed. In both cases
we want to do a reset. Either way mac80211 will inform us
when we want to actually change the channel so trust those
calls.

Although in the patch it may seem as I am doing more code
changes I am not, all I am doing is removing the initial
branch conditional and shifting the code to the left.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:35 -05:00
Luis R. Rodriguez
0de57d991b ath9k: remove ath9k_hw_check_chan()
The only check we care about in ath9k_hw_check_chan() is
the internal regulatory check so use that.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:34 -05:00
Luis R. Rodriguez
4febf7b8f4 ath9k: remove ath9k_hw_chan2wmode()
The only left users are for timing for ACK timeout, slotime and
CTS timeout. We currently use an array CLOCK_RATE to keep
these values per mode and since as only will use A and G
we can depend on the band to get the appropriate values.

We note that we should be using a different clock rate value
for CCK, we can do this in separate patch, currently this is
being disregarded and should only affect when we want to
change the default ACK/CTS timeout or slot time and stuck
with using using 802.11b.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:34 -05:00
Luis R. Rodriguez
e56db71846 ath9k: remove mode specific default noise floor values
The NOISE_FLOOR array we have is mode specific, and the only
possible indexed values are A, B and G. The mode routine only
can return G or A, so this is band specific. Then since the
values for A and G (5ghz or 2ghz) are the same (-96) we simply
remove the array and use a static value.

If we later determine we want to use special values for
HT configurations we can use the new mac80211 conf_is_ht*()
helpers.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:33 -05:00
Luis R. Rodriguez
38b33707a1 ath9k: Make ANI CCK and OFDM error triggers band specific
The CCK and OFDM ANI error triggers are not mode specific but rather
band specific so just make use of the already available band from
ieee80211_conf.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:33 -05:00
Luis R. Rodriguez
de27e64e5e iwlwifi: make use of conf_is_ht*() helpers
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:32 -05:00
Luis R. Rodriguez
ecf70441a3 ath9k: make use of conf_is_ht*() in the rest of the driver
Use shiny new conf_is_ht*() helpers, we can later remove ht.enabled if
desired.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:31 -05:00
Luis R. Rodriguez
c9e27d94f5 ath9k: use ieee80211_conf on ath9k_hw_iscal_supported()
ath9k_hw_iscal_supported() just needs to be aware of your band
and if HT20 is being used so lets abandon our internal channel,
HT appended values and internal mode values and use ieee80211_conf
which already carries this information. This works as calibration
is being done for the currently configured channel.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:31 -05:00
Luis R. Rodriguez
76061abbbb ath9k: make request to get the noisefloor threshold band specific
Lets make the request to get the current noise floor threshold
from the EEPROM band specific as it is band specific, not mode
specific.

This also adds a backpointer on the private channel structure
back to the ieee80211_channel structure as this is now needed during
ath9k_hw_getnf().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:30 -05:00
Luis R. Rodriguez
ae8d2858c5 ath9k: consolidate arguments on hw reset
HW reset calls pass the same variables or structs
which we can obtain easily from ah. Although this also applies
during channel changes as we will keep around the ath9k_channel
passed as an argument for now.

We now also now propagate the hw reset errors down.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:29 -05:00
Luis R. Rodriguez
ce111badf5 ath9k: Rename ath_setcurmode() to ath_cache_conf_rate()
ath_setcurmode() is a bit misleading, all we are doing is
caching the rate for the corresponding configuration we
are using.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:29 -05:00
Luis R. Rodriguez
96742256ab ath9k: remove cache of rate preference when using 11g protection
No need to cache when we want to use 2Mbit/s for all protection
frames for 802.11g as we can determine that dynamically on
ath_buf_set_rate() itself.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:28 -05:00
Luis R. Rodriguez
030bb495c0 ath9k: use hw->conf on ath_setcurmode()
We don't need to use our own mode for setting the
the routine tries to do, in fact lets remove ath_chan2mode() now as
we can simply use the currently set band and the HT configuration
provided by mac80211 through the ieee80211_conf. This works on
changing channels as well as the internal ath9k_channel we use is
based on the ieee80211_channel in the config.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:28 -05:00
Winkler, Tomas
51af3d3fbb iwl3945: use rx queue management infrastructure from iwlcore
This patch uses rx queue alloc free and reset function from iwlcore.
This should fix the regression reported by Kalle Valo.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:27 -05:00
Winkler, Tomas
e52119c50d iwl3945: use iwl3945_tx_cmd instead of iwl_tx_cmd
The patch replaces iwl_tx_cmd with iwl3945_tx_cmd to complete
transitions introduced by "iwlwifi: use iwl_cmd instead
of iwl3945_cmd"

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:26 -05:00
Samuel Ortiz
c496294efe iwl3945: switch to the iwl-core send_card_state routine
Switch iwl3945 to use iwl-core:send_card_state routine.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:25 -05:00
Samuel Ortiz
188cf6c73a iwl3945: sync tx queue data structure with iwlagn
We are now using the iwl_tx_queue for iwl3945. To reach that goal, we
included the 3945 specific tfd frame structure to iwl_tx_queue. This
has no effect on the current iwlagn code.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:24 -05:00
Kolekar, Abhijeet
42427b4e43 iwl3945: adding utils ops
The patch implements iwl_hcmd_utils_ops for 3945.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:24 -05:00
Winkler, Tomas
dbb6654c41 iwl3945: rearrange 3945 tfd
This patch moves 3945 TFD structures to iwl-3945-fh.h. It renames them
similarly to AGN naming. This patch also eliminates iwl3945_tx_info and
fixes endianity issue in iwl3945_tx_skb and iwl3945_enqueue_hcmd caused
by ugly casting.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:23 -05:00
Winkler, Tomas
8cd812bcda iwl3945: use iwl_rb_status
This patch makes use of iwl_rb_status also in 3945. The structure
for 3945 is not the same but since only closed_rb_num filed is used
in both cases there is no reason to duplicate it.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:23 -05:00
Kolekar, Abhijeet
cbba18c6e3 iwl3945: use iwl_get_hw_mode
Use iwl_get_hw_mode for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:22 -05:00
Kolekar, Abhijeet
d552bfb652 iwl3945: release resources before shutting down
Release resource before shutting down and notify upper stack.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:22 -05:00
Kolekar, Abhijeet
90a30a021e iwl3945: simplify iwl3945_pci_probe
The patch simplifies iwl3945_pci_probe. It also uses apm_ops for apm init.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:21 -05:00
Kolekar, Abhijeet
854682ed28 iwl3945: add set_pwr_src
The patch adds 3945 iwl_lib_ops->set_pwr_src to the driver

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:20 -05:00
Kolekar, Abhijeet
01ec616d8c iwl3945: add apm ops
The patch adds 3945 iwl_lib_ops->apm_ops to the driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:20 -05:00
Kolekar, Abhijeet
0164b9b45d iwl3945: add load ucode op
The patch adds 3945 iwl_lib_ops->load_ucode to the driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:19 -05:00
Kolekar, Abhijeet
775a6e27bf iwl3945: cleanup and remove duplicate code
The patch removes the following duplicate structures:

	iwl3945_is_alive
	iwl3945_is_ready
	iwl3945_is_init
	iwl3945_is_rfkill_sw
	iwl3945_is_rfkill
	iwl3945_reset_qos

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:19 -05:00
Kolekar, Abhijeet
df878d8f01 iwl3945: use iwl_mod_params for 3945
Use iwl_mod_params for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:18 -05:00
Winkler, Tomas
c2d79b488a iwlwifi: use iwl_cmd instead of iwl3945_cmd
This patch makes use of iwl_cmd instead of iwl3945_cmd and related
structures which were just the same.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:18 -05:00
Winkler, Tomas
15b1687cb4 iwlwifi: replace IWL_ERROR with IWL_ERR
IWL_ERR doesn't use hidden priv pointer.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:17 -05:00
Winkler, Tomas
39aadf8c29 iwlwifi: replace IWL_WARNING with IWL_WARN
IWL_WARN doesn't use hidden priv pointer.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:16 -05:00
Tomas Winkler
978785a389 iwlwifi: clean up printing
Use IWL_ macros where possible to unify debug output usage.
Define new unconditional printouts IWL_ERR, IWL_WARN, IWL_INFO,
and IWL_CRIT which don't use hidden priv pointer.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:15 -05:00
Zhu Yi
146846aed5 iwlwifi: add more comments to IWL_DL_xx
This adds more comments to IWL_DL_xx macros.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:14 -05:00
Abhijeet Kolekar
5d49f498a2 iwl3945: use iwl-io.h and delete iwl-3945-io.h
The patch deletes iwl-3945-io.h and uses iwl-io.h functions.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:14 -05:00
Abhijeet Kolekar
4a8a43222d iwl3945: replaces iwl3945_priv with iwl_priv
The patch replaces iwl3945_priv to iwl_priv. It adds 3945 specific
data members to iwl_priv.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:13 -05:00
Abhijeet Kolekar
f2c7e52100 iwl3945: rename iwl3945_priv variables
The patch renames iwl3945 specific variables in iwl3945_priv
structure. iwl3945_priv structure differs with iwl_priv structure
with these variables. Goal of this patch is to make transition from
iwl3945_priv to iwl_priv smoothly.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:11 -05:00
Abhijeet Kolekar
3832ec9dc9 iwl3945: use iwl_hw_params in iwl3945_priv
The patch makes changed necessary to use iwl_hw_params to
replace iwl3945_driver_hw_info.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:10 -05:00
Abhijeet Kolekar
cc2f362c36 iwl3945: use iwl_rx_queue in iwl3945
The patch replaces iwl3945_rx_queue with iwl_rx_queue.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:09 -05:00
Abhijeet Kolekar
6100b58806 iwl3945: use iwl_rx_mem_buffer
The patch replaces iwl3945_rx_mem_buffer with iwl_rx_mem_buffer.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:08 -05:00
Wu Fengguang
d2bf55839a iwlwifi: beautify code
This patch beautifies macros in iwl-debug.h.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:07 -05:00
Kolekar, Abhijeet
b5323d3663 iwl3945: replace iwl3945_broadcast_addr with iwl_bcast_addr
The patch replaces iwl3945_broadcast_addr with iwl_bcast_addr for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:07 -05:00
Kolekar, Abhijeet
a78fe754e0 iwl3945: remove duplicate structures from iwl-3945.h
The patch renames and deletes duplicate structure from iwl-3945.h.
The following structures are renamed with iwlwifi counterparts:

	1) iwl3945_ac_qos
	2) iwl3945_ucode
	3) iwl3945_qos_capabity

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:06 -05:00
Kolekar, Abhijeet
85d4149533 iwl3945: move structures from iwl-3945.h to iwl-dev.h
The patch moves few structres from iwl-3945.h to iwl-dev.h.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:05 -05:00
Kolekar, Abhijeet
c0f20d9141 iwl3945: replace iwl_3945_cfg with iwl_cfg
The patch replaces iwl_3945_cfg with iwl_cfg for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:04 -05:00
Kolekar, Abhijeet
5747d47fb4 iwl3945: include iwl-core.h
Use iwl-core.h instead of iwl-3945-core.h.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:03 -05:00
Kolekar, Abhijeet
eaa686c37d iwl3945: Change IWLWIFI_VERSION constant name
Change IWLWIFI_VERSION to IWL3945_VERSION.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:02 -05:00
Winkler, Tomas
6d6498947d iwlwifi: emliminate iwl3945_mac_get_stats mac80211 handler
This patch removes empty iwl3945_mac_get_stats mac80211 handler.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:02 -05:00
Samuel Ortiz
d20b3c65f2 iwl3945: iwl3945_queue and iwl3945_channel_info replacement
This patch replaces the queue and channel info 3945 structures with the iwl
ones.

The initial goal was to replace the channel info structure. Once we do that,
and then include iwl-dev.h instead of iwl-3945.h, we still get build errors
due to several routines and macro redefinitions. This is why this patch also
includes:
- TFD39_MAX_PAYLOAD definition for 3945.
- CMD_SIZE, CMD_HUGE, CMD_SKB duplication removal.
- iwl3945_queue replacement in order to also get rid of the duplicated
get_cmd_index routine.

Getting rid of any of those needs the iwl-dev.h inclusion which then creates
build errors due to definitions duplication. This is why we include all those
in the same patch.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:59:01 -05:00
Samuel Ortiz
1125eff3ae iwl3945: Remove power related definitions from 3945 code
Most of the power (not TX power, but power management) structures and
definitions are duplicated accross iwl-power.h and iwl-3945.h. We should try
to only use the iwl header.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:59 -05:00
Samuel Ortiz
b5b83239e7 iwl3945: Getting rid of iwl-3945-led.h
The duplicated LED definitions prevent one from including iwl-dev.h from the
3945 specific C files.
Moreover, we are sharing many definitions between iwl-3945-led.h and
iwl-led.h, so let's just use the iwl one. Note that this file will get more
cleanups once we share a common iwl_priv structure.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:59 -05:00
Samuel Ortiz
d9829a67f9 iwl3945: Use iwl-agn-rs.h rates definitions.
A lot of rate relates definition are shared between iwl-3945-rs.h and
iwl-agn-rs.h. Let's just use the agn version, and add the 3945 specific
constants there.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:58 -05:00
Samuel Ortiz
250bdd216c iwl3945: Have consistant and not redefined HW constants
SRAM addresses are different for 3945, 4065, and 5000, let's give them
different names.
Also, the RSSI_OFFSET is different for 3945 and 4965, thus they should be
named differently.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:57 -05:00
Samuel Ortiz
0f741d9992 iwl3945: Getting rid of iwl3945_eeprom_channel
The corresponding iwl structure is identical.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:57 -05:00
Samuel Ortiz
a3139c5956 iwl3945: Remove DRV_NAME dependenies
As DRV_NAME is defined in 2 different header files, including both is not
possible.
This patch defines this constant from iwl3945-base.c and iwl-agn.c. It also
redefines the IWL_ERROR and IWL_WARNING macros to use dev_printk, as the
IWL_DEBUG_* macros do.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:56 -05:00
Samuel Ortiz
40b8ec0bfa iwl3945: Getting rid of iwl-3945-debug.h
At the cost of adding a debug_level field to iwl3945_priv, we are now able to
get rid of iwl-3945-debug.h, and use iwl-debug.h instead.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:55 -05:00
Tomas Winkler
3d24a9f790 iwlwifi: 3945 remove iwl-3945-commands.h
This patch remove iwl-3945-commands.h
eliminating duplicated and moving all definitions to iwl-commands.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-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>
2009-01-29 15:58:54 -05:00
Tomas Winkler
28afaf9139 iwlwifi: 3945 drop usage of union tsf
This patch replaces union tsf with u64
This also allows to use iwl_error_res
and iwl_rxon_time_cmd instead of 3945 structures

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-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>
2009-01-29 15:58:54 -05:00
Tomas Winkler
4c897253cc iwlwifi: 3945 remove duplicated code from iwl-3945-commands.h
This patch remove trivial (renames) commands and defines
from iwl-3945-commands.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-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>
2009-01-29 15:58:53 -05:00
Tomas Winkler
600c0e11ea iwlwifi: use iwl-commands.h also in 3945
This patch uses iwl-commands.h also for iwl3945
more clean ups are required but this get to stage where it
compiles cleanly.
Most massive changes are in spectrum and power managment.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-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>
2009-01-29 15:58:53 -05:00
Winkler, Tomas
b936d9be05 iwlwifi: 3945 remove current_rate from station entry.
This patch removes current_rate from station_entry it was write only
variable

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:52 -05:00
Tomas Winkler
69d00d2722 iwlwifi: 3945 unfold iwl-3945-commands.h
This patch unfolds includes of iwl-3945-commands.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-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>
2009-01-29 15:58:51 -05:00
Tomas Winkler
bddadf86fb iwlwifi: 3945 extract flow handler definitions into iwl-3945-fh.h
This patch moves 3945 definitions into iwl-3945-fh.h
It renames FH_ to FH39 to help inclusion of 3945 into iwlcore
framework

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-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>
2009-01-29 15:58:50 -05:00
David Kilroy
9ee677c227 wireless: Add channel/frequency conversions to ieee80211.h
Added mappings for FHSS, DSSS and OFDM channels - with macros to point
HR DSSS and ERP to the DSSS mappings. Currently just static inline
functions.

Use the new functions in the older fullmac drivers. This eliminates a
number of const static buffers and removes a couple of range checks that
are now redundant.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Richard Farina <sidhayn@gmail.com>
Acked-by: Jeroen Vreeken <pe1rxq@amsat.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:46 -05:00
Nick Kossifidis
eaee7cc2c1 ath5k: More EEPROM code updates
* Don't scale power values on RF5111 EEPROMs because they get out of
  bounds (power is u8, so multiplying power by 50 is too much and there
  is no reason to do so -we don't do it on other chips anyway-). HAL
  does it as a technique to handle 0.5 dbm steps but i believe it's not
  the right thing to do and certainly not the right place to do it. We
  'll work this out on interpolation code for all chips (0.5 or 0.25
  steps etc) in a generic way.

Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:46 -05:00
Winkler, Tomas
b306b82c58 iwlwifi: kill retry_rate sysfs for iwlagn
This patch kills retry_rate in sysfs for iwlagn. It's not used.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:45 -05:00
Winkler, Tomas
2ddfa129bb iwlwifi: move sysfs status entry to debugfs
This patch moves priv->status sysfs entry to debugfs. It is for
debugging only anyway.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:44 -05:00
Christian Lamparter
29701e5abf p54: enable proper frame injection
This patch enables frame injection in monitor mode for all p54 devices.
As a result, any user can finally use the aircrack-ng suite out of the box.

e.g:
aireplay-ng --test wlan0
Trying broadcast probe requests...
Injection is working!
Found 1 AP

Trying directed probe requests...
XX:XX:XX:XX:XX:XX - channel: i - 'SSID'
Ping (min/avg/max): 1.536ms/3.193ms/4.377ms Power: 193.00
30/30: 100%

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:44 -05:00
Christian Lamparter
a15bd00543 p54: label queues with their corresponding names
This patch introduce new shiny named labels for our 8 (4 - on old firmware) queues.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:43 -05:00
Nick Kossifidis
0ea9c00c9d ath5k: Update EEPROM code
*Read misc2...6 values from eeprom since we want to use them (fixes
 wrong power calibration info offset on RF2413+ chips)

*Initialize num_piers to 0 for RF2413 chips (note that we read 2GHz
 frequency piers while reading mode sections, we have to ignore them
 -usualy they are 0xff anyway but during my tests i got a 1 on b mode
 with no data- and use the newer eemap.

*Add some more comments (please forgive my poor English ;-( ) and
 some minor code cleanup

*Tested on 2425 and 2112 and has the same data with ath_info (i
 wrote some debug code on debug.c to print everything like ath_info
 but i haven't tested it yet on 5111 and it's full of > 80 col lines,
 if anyone wants to play with it let me know).

Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:42 -05:00
Ivo van Doorn
754be3098b rt2x00: Release rt2x00 2.3.0
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:42 -05:00
Ivo van Doorn
b30dd5c043 rt2x00: Introduce RXDONE_SIGNAL_MASK mask
Improve error message reporting when a frame was received
with unknown rate. Instead of using the boolean check if
the frame is supposed to be a PLCP value or not, we should
add a new mask (RXDONE_SIGNAL_MASK) which returns the type
identification for a signal value (i.e. PLCP). At the moment
we only have 2 different types, but more will arrive when
support for 11n is added.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:41 -05:00
Ivo van Doorn
2bdb35c7ff rt2x00: Allow drivers to pass the noise value during rxdone
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:41 -05:00
Ivo van Doorn
076f9582a6 rt2x00: Remove ENTRY_TXD_OFDM_RATE
The flag ENTRY_TXD_OFDM_RATE isn't flexible enough
to indicate which rate modulation should be used for
a frame. This will become a problem when 11n support
is added.

Remove the flag and replace it with an enum value which
can better indicate the exact rate modulation.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:40 -05:00
Ivo van Doorn
7b40982e23 rt2x00: Move code into seperate functions
Some functions have grown rapidly in size over the last time,
some of those functions (like the rt2x00queue_create_tx_descriptor)
will further increase in size soon, so it is best to start cutting
it into logical pieces.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:39 -05:00
Ivo van Doorn
91581b6272 rt2x00: Split EEPROM_NIC_TX_RX_FIXED
The 2 bits in EEPROM_NIC_TX_RX_FIXED each influence
a different antenna. We might as well split the
definition and directly read the correct bit.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:38 -05:00
Ivo van Doorn
ce292a6402 rt2x00: Implement WDS support
WDS support should be very easy to handle, mac80211 handles
everything for us, so all that is needed is to set the
support flags and handle it in the add_interface() callback.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:38 -05:00
Ivo van Doorn
3f787bd6d5 rt2x00: Rename CONFIG_CRYPTO_COPY_IV
CONFIG_CRYPTO_COPY_IV is a bad name since it is part
of the driver requirements instead of a configuration option.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:37 -05:00
Ivo van Doorn
7396faf4f3 rt2x00: Add RFKILL support to rt2500usb and rt73usb
Some very rare Ralink USB hardware exists which features
the RFKILL switch on the USB stick.
This patch adds the EEPROM check function to see if RFKILL
is supported and the polling function to rt2500usb and
rt73usb in order to support RFKILL for that hardware.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:37 -05:00
Andrey Yurovsky
a07dbea210 rt2x00: Add mesh support
This adds initial support for Mesh Point mode.  For this we tell mac80211 that
we support NL80211_IFTYPE_MESH_POINT.  We also need to send beacons.  mac80211
will configure our RX filter accordingly.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:35 -05:00
Ivo van Doorn
5352ff6510 rt2x00: Restrict interface between rt2x00link and drivers
Restrict drivers to only access link_qual structure during
link tuning. The contents of these fields are for the drivers
and all fields are allowed to be changed to values the driver
considers correct.

This means that some fields need to be moved outside of this
structure to restrict access only to rt2x00link itself.
This allows some code to be moved outside of the rt2x00.h header
and into rt2x00link.c.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:35 -05:00
Ivo van Doorn
eb20b4e8a6 rt2x00: Reduce calls to bbp_read()
The link_tuner() function will always call bbp_read()
at the start of the function. Because this is an
indirect register access has some costs attached
to it (especially for USB hardware).

We already store the value read from the register
into the vgc_level value inside the link structure.
Instead of reading from the register we can read that
field directly and base the tuner on that value.

This reduces the time the registers are locked with
the csr_mutex and speeds up the link_tuner processing.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:34 -05:00
Ivo van Doorn
84e3196ff8 rt2x00: Move link tuning into seperate file
Move link and antenna tuning into a seperate file named rt2x00link.c,
this makes the interface to the link tuner a lot cleaner.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:34 -05:00
Ivo van Doorn
7d7f19ccb7 rt2x00: Implement Powersaving
Listen to IEEE80211_CONF_PS to determine if the device
should drop into powersaving mode. This feature depends
on the dynamic power save functionality in mac80211.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:34 -05:00
Michael Buesch
3ebbbb56a1 b43: Use 64bit atomic register access for TSF
On modern b43 devices with core rev >=3, the hardware guarantees us an
atomic 64bit read/write of the TSF, if we access the lower 32bits first.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:33 -05:00
Michael Buesch
e808e586b7 b43: Fixup set_key handling
This fixes the key handling for mac80211's new key->flags.
It also adds TX locking to the set_key handler and adds a comment why this is required.
This doesn't fix any known bugs.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:58:33 -05:00
Zhu, Yi
1f304e4e3b iwlwifi: fix kernel oops when ucode DMA memory allocation failure
The patch fixes memcpy to NULL address when the ucode DMA allocation failure.

This is a fix to bug
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1861

Signed-off-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>
2009-01-29 15:46:43 -05:00
Larry Finger
eb83bbf574 rtl8187: Fix error in setting OFDM power settings for RTL8187L
After reports of poor performance, a review of the latest vendor driver
(rtl8187_linux_26.1025.0328.2007) for RTL8187L devices was undertaken.

A difference was found in the code used to index the OFDM power tables. When
the Linux driver was changed, my unit works at a much greater range than
before. I think this fixes Bugzilla #12380 and has been tested by at least
two other users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Martín Ernesto Barreyro <barreyromartin@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 15:46:42 -05:00
Stefan Richter
1448d7c6a2 ieee1394: sbp2: add workarounds for 2nd and 3rd generation iPods
as per https://bugs.launchpad.net/bugs/294391.  These got one sample of
each iPod generation going.  However there still occurred I/O stalls
with the 3rd generation iPod which remain undiagnosed at the time of
this writing.

Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-29 20:19:49 +01:00
Stefan Richter
c8c4707cf7 firewire: sbp2: add workarounds for 2nd and 3rd generation iPods
According to https://bugs.launchpad.net/bugs/294391
  - 3rd generation iPods need the "fix capacity" workaround after all
    (apparently they crash after the last sector was accessed),
  - 2nd generation iPods need the "128 kB maximum request size"
    workaround.

Alas both iPod generations feature the same model ID in the config ROM,
hence we can only define a shared quirks list entry for them.  Luckily
the fix capacity workaround did not show a negative effect in Jarod's
tests with 2nd gen. iPod.

A side note:  Apple computers in target mode (or at least an x86 Mac
mini) don't have firmware_version and model_id, hence none of the iPod
quirks list entries is active for them.

Tested-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-29 20:19:48 +01:00
Jeremy Fitzhardinge
618b2c8db2 xen: make sysfs files behave as their names suggest
1: make "target_kb" only accept and produce a memory size in kilobytes.
2: add a second "target" file which produces output in bytes, and will accept
   memparse input (scaled bytes)

This fixes the rather irritating problem that writing the same value
read back into target_kb would end up shrinking the domain by a factor
of 1024, with generally bad results.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
Cc: "dan.magenheimer@oracle.com" <dan.magenheimer@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-29 13:20:36 +01:00
Hans Verkuil
2c1a3c979c V4L/DVB (10229): ivtv: fix memory leak
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 09:19:29 -02:00
Jean-Francois Moine
2fd9c2eac3 V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming.
Resetting the streaming flag on disconnection prevented the URBs to be freed
when streaming was active.
Also, USBs cannot be killed after disconnection (oops in [usbcore] unlink1).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 09:06:41 -02:00
Robert Krakora
9c06210b89 V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled
Trace:  (Provided by Douglas)

BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:558
in_atomic():0, irqs_disabled():1
Pid: 4918, comm: sox Not tainted 2.6.27.5 #1
 [<c04246d8>] __might_sleep+0xc6/0xcb
 [<c058c8b0>] usb_kill_urb+0x1a/0xd8
 [<c0488e68>] ? __kmalloc+0x9b/0xfc
 [<c0488e85>] ? __kmalloc+0xb8/0xfc
 [<c058cd5a>] ? usb_alloc_urb+0xf/0x31
 [<f8dd638c>] em28xx_isoc_audio_deinit+0x2f/0x6c [em28xx_alsa]
 [<f8dd6573>] em28xx_cmd+0x1aa/0x1c5 [em28xx_alsa]
 [<f8dd65e1>] snd_em28xx_capture_trigger+0x53/0x68 [em28xx_alsa]
 [<f8aa8674>] snd_pcm_do_start+0x1c/0x23 [snd_pcm]
 [<f8aa85d7>] snd_pcm_action_single+0x25/0x4b [snd_pcm]
 [<f8aa9833>] snd_pcm_action+0x6a/0x76 [snd_pcm]
 [<f8aa98f5>] snd_pcm_start+0x14/0x16 [snd_pcm]
 [<f8aae10e>] snd_pcm_lib_read1+0x66/0x273 [snd_pcm]
 [<f8aac5a3>] ? snd_pcm_kernel_ioctl+0x46/0x5f [snd_pcm]
 [<f8aae4a7>] snd_pcm_lib_read+0xbf/0xcd [snd_pcm]
 [<f8aad774>] ? snd_pcm_lib_read_transfer+0x0/0xaf [snd_pcm]
 [<f89feeb6>] snd_pcm_oss_read3+0x99/0xdc [snd_pcm_oss]
 [<f89fef9c>] snd_pcm_oss_read2+0xa3/0xbf [snd_pcm_oss]
 [<c064169d>] ? _cond_resched+0x8/0x32
 [<f89ff0be>] snd_pcm_oss_read+0x106/0x150 [snd_pcm_oss]
 [<f89fefb8>] ? snd_pcm_oss_read+0x0/0x150 [snd_pcm_oss]
 [<c048c6e2>] vfs_read+0x81/0xdc
 [<c048c7d6>] sys_read+0x3b/0x60
 [<c04039bf>] sysenter_do_call+0x12/0x34
 =======================

The culprit in the trace is snd_pcm_action() which invokes a spin lock
which disables pre-emption which disables an IRQ which causes the
__might_sleep() function to fail the irqs_disabled() test.  Since
pre-emption is enabled then it is safe to de-allocate the memory if
you first unlink each URB.  In this instance you are safe since
pre-emption is disabled.  If pre-emption and irqs are not disabled then
call usb_kill_urb(), else call usb_unlink_urb().

Thanks to Douglas for tracking down this bug originally!!!

[dougsland@redhat.com: Fixed codyingstyle]
Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 09:01:06 -02:00
Alexey Klimov
7f03a5856c V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo
Move radio->muted and radio->stereo in section where radio mutex is
locked to avoid possible race condition problems or access to memory.
Thanks to David Ellingsworth <david@identd.dyndns.org> for pointing to
this weak place in driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 09:00:40 -02:00
Hans Verkuil
6d9f13c47a V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback.
These days TUNER_SET_CONFIG is broadcast to the other i2c devices
and that triggers a fw load on the cx25840. Ignore this command
since cx25840 isn't a tuner and you really do not want to load
the firmware that early.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 09:00:34 -02:00
Antti Palosaari
d1a470fbd9 V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
First control messages to the stick timeouts very often due to probable
hw bug. Repeat first message few times if it fails as workaround.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:56:43 -02:00
Antti Palosaari
f0830ebec9 V4L/DVB (10287): af9015: fix second FE
Bug causes 2nd FE MPEG TS buffer size to be zero and therefore no picture
when 2nd FE was enabled. Configure correct buffer size also for 2nd FE.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:56:39 -02:00
Hans Verkuil
ba3ed4c57f V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock
The default case of the switch didn't unlock the mutex.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:47:01 -02:00
Tony Broad
6dbe7af37d V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff
I'm using a "Hauppauge WinTV-NOVA-T DVB card" of PCI id "13c2:1005" with
kernel 2.6.27.9.

I've recently experienced the following fairly consistent kernel oops on
startup in grundig_29504_401_tuner_set_params from budget.c. As you
might expect, following this failure, the card doesn't work.

I'm not a kernel developer, nevertheless I seem to have managed to track
this down to a non-existent initialisation of
budget->dvb_frontend->tuner_priv.

The attached patch fixes the problem for me (and I've managed to tune
the card successfully as a result), but I don't know of anyone else
using the driver so I can't test it on other people.

Please let me know if this works for you or if I've done something
terribly wrong ;-(

BUG: unable to handle kernel paging request at ffffffff
IP: [<f8981e11>] :budget:grundig_29504_401_tuner_set_params+0x3b/0xf8
*pde = 007e0067 *pte = 00000000
Oops: 0000 [#1] SMP
Modules linked in: bridge stp bnep rfcomm l2cap asb100 hwmon_vid hwmon
fuse ipt_REJECT nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT
xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter
ip6_tables x_tables ipv6 loop dm_multipath scsi_dh ppdev snd_cmipci
gameport snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
snd_pcm_oss snd_mixer_oss l64781 snd_pcm snd_page_alloc snd_opl3_lib
snd_timer parport_pc snd_hwdep parport btusb snd_mpu401_uart budget
budget_core snd_rawmidi bluetooth saa7146 snd_seq_device ttpci_eeprom
snd soundcore sr_mod i2c_sis96x cdrom dvb_core sis900 i2c_core floppy
pcspkr mii sata_sil sg dm_snapshot dm_zero dm_mirror dm_log dm_mod
pata_sis ata_generic pata_acpi libata sd_mod scsi_mod crc_t10dif ext3
jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]

Pid: 2319, comm: kdvb-fe-0 Not tainted (2.6.27.9-73.fc9.i686 #1)
EIP: 0060:[<f8981e11>] EFLAGS: 00010286 CPU: 0
EIP is at grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
EAX: f6417f00 EBX: f6f53808 ECX: 00000000 EDX: ffffffff
ESI: f6f94404 EDI: f6417f00 EBP: f6417f10 ESP: f6417ef0
  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process kdvb-fe-0 (pid: 2319, ti=f6417000 task=f642b2c0 task.ti=f6417000)
Stack: f6e39800 00000000 00000004 f6417f00 c064523c f6f53808 f6f53800 f6f94404
        f6417f54 f8b2e45a f6417f24 00000286 f6417f4c f6417f38 00000000 00000286
        f6417f3c c064520f f642b2c0 f6417f6c c064456f 00000001 f6f94400 00000001
Call Trace:
  [<c064523c>] ? _spin_lock_irqsave+0x29/0x30
  [<f8b2e45a>] ? apply_frontend_param+0x27/0x357 [l64781]
  [<c064520f>] ? _spin_lock_irq+0x1c/0x20
  [<c064456f>] ? __down_common+0x91/0xbf
  [<f894f25d>] ? dvb_frontend_swzigzag_autotune+0x17d/0x1a4 [dvb_core]
  [<f894f780>] ? dvb_frontend_swzigzag+0x1ac/0x209 [dvb_core]
  [<f894fcc8>] ? dvb_frontend_thread+0x2eb/0x3b3 [dvb_core]
  [<c043c166>] ? autoremove_wake_function+0x0/0x33
  [<f894f9dd>] ? dvb_frontend_thread+0x0/0x3b3 [dvb_core]
  [<c043bec3>] ? kthread+0x3b/0x61
  [<c043be88>] ? kthread+0x0/0x61
  [<c040494b>] ? kernel_thread_helper+0x7/0x10
  =======================
Code: ec 14 8b 80 00 02 00 00 8b 93 08 02 00 00 8d 7d e4 8b 40 20 89 45
e0 31 c0 85 d2 f3 ab 8d 45 f0 66 c7 45 e8 04 00 89 45 ec 74 09 <0f> b6
02 66 89 45 e4 eb 06 66 c7 45 e4 61 00 8b 0e be 0a 8b 02
EIP: [<f8981e11>] grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
SS:ESP 0068:f6417ef0

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:46:42 -02:00
Devin Heitmueller
8760e5b6d1 V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown
Revert a change made in change 9743 which resulted in a kernel panic in some
cases on shutdown of the audio stream.

First discovered when working on the Pinnacle 880e support, and later
reproduced by a user on the mailing list with the HVR-900 as well.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:39:40 -02:00
Robert Krakora
6e7b9ea093 V4L/DVB (10257): em28xx: Fix for KWorld 330U Board
Fix for KWorld 330U Board

Many thanks to Devin and Mauro!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:39:18 -02:00
Robert Krakora
7e4b15e420 V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97
Fix for KWorld 330U AC97

Many thanks to Devin and Mauro again!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:39:09 -02:00
Robert Krakora
53d12e5a56 V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition
em28xx: Fix audio URB transfer buffer memory leak and race
condition/corruption of capture pointer

Leak fix kindly contributed by Pádraig Brady.

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:38:43 -02:00
Hans Verkuil
ba390f0055 V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use
With the conversion to v4l2_subdev one bit of code was accidentally dropped:
on receiving the first command the driver has to load the fw. A new init()
command was introduced to do that explicitly for bridge drivers that are
converted to use v4l2_subdev, but old drivers that are not yet converted
no longer worked.

This patch fixes this regression for these old drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:38:23 -02:00
Hans Verkuil
cf8e193a48 V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:38:04 -02:00
Hans Verkuil
32929fb4c7 V4L/DVB (10243): em28xx: fix compile warning
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Mike Isely
aeaecaf8eb V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic
The VIDIOC_QUERYCTRL command needs to actually do a queryctrl, not a
querymenu.  Similarly, the VIDIOC_QUERYMENU command needs to actually
do a querymenu not a queryctrl.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Nicolas Fournier
db4b2d193c V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081)
The following patch adds support for a new version of the
Terratec Cinergy DT USB XS Diversity Dual DVB-T TV tuner stick.
The USB ID of the new stick is 0ccd:0081.
The hardware of the stick has changed, when compared to the first version of
this stick, but it still uses quite standard components, so that only minor
changes are needed to the sources.

The patch has been successfully tested with hotplugging the device and then
2 x tzap and 2 x mplayer, to watch two different TV programs simultaneously.

The stick works with both, the old and new firmwares:
- dvb-usb-dib0700-1.10.fw and
- dvb-usb-dib0700-1.20.fw

Signed-off-by: Nicolas Fournier <nicolasfournier@yahoo.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Andy Walls
6e0e12f15a V4L/DVB (10229): cx88-dvb: Fix order of frontend allocations
On Fri, 2009-01-09 at 15:40 +0300, Goga777 wrote:
> hI
>
> With today v4l-dvb I couldn't run my hvr4000 card on 2.6.27 kernel

> [   14.555162] cx88/2: cx2388x dvb driver version 0.0.6 loaded
> [   14.555231] cx88/2: registering cx8802 driver, type: dvb access: shared
> [   14.555303] cx88[0]/2: subsystem: 0070:6900, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]
> [   14.555374] cx88[0]/2: cx2388x based DVB/ATSC card
> [   14.555446] BUG: unable to handle kernel NULL pointer dereference at 00000000
> [   14.555560] IP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4
> [   14.555652] *pde = 00000000
> [   14.555735] Oops: 0002 [#1] SMP
> [   14.555851] Modules linked in: cx88_dvb(+) cx88_vp3054_i2c videobuf_dvb wm8775 dvb_core tuner_simple tuner_types snd_seq_dummy tda9887 snd_seq_oss(+) snd_intel8x0(+) tda8290 snd_seq_midi snd_seq_midi_event snd_ac97_codec cx88_alsa(+) snd_seq ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_rawmidi snd_timer tuner snd_seq_device psmouse snd serio_raw ivtv(+) cx8800 cx8802 cx88xx soundcore cx2341x ir_common ns558 i2c_i801 v4l2_common videodev i2c_algo_bit gameport v4l1_compat snd_page_alloc tveeprom pcspkr floppy videobuf_dma_sg videobuf_core btcx_risc i2c_core parport_pc parport button intel_agp agpgart shpchp pci_hotplug rng_core iTCO_wdt sd_mod evdev usbhid hid ff_memless ext3 jbd mbcache ide_cd_mod cdrom ide_disk ata_piix libata dock 8139too usb_storage scsi_mod piix 8139cp mii ide_core uhci_hcd ehci_hcd usbcore thermal processor fan thermal_sys
> [   14.557013]
> [   14.557013] Pid: 2310, comm: modprobe Not tainted (2.6.27.1-custom-default1 #1)
> [   14.557013] EIP: 0060:[<c02e6bff>] EFLAGS: 00010246 CPU: 1
> [   14.557013] EIP is at __mutex_lock_common+0x3c/0xe4
> [   14.557013] EAX: de653e98 EBX: de739118 ECX: de739120 EDX: 00000000
> [   14.557013] ESI: dd4209e0 EDI: de73911c EBP: de653eb0 ESP: de653e88
> [   14.557013]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> [   14.557013] Process modprobe (pid: 2310, ti=de652000 task=dd4209e0 task.ti=de652000)
> [   14.557013] Stack: 3535352e 5d343733 00000002 de739120 de739120 00000000 c044a6c0 de739110
> [   14.557013]        de739118 00000001 de653ebc c02e6d38 c02e6b88 de653ec4 c02e6b88 de653ed8
> [   14.557013]        e1ac7115 de6a9000 00000001 00000000 de653f0c e1aeca62 de739004 de739000
> [   14.557013] Call Trace:
> [   14.557013]  [<c02e6d38>] ? __mutex_lock_slowpath+0x17/0x1a
> [   14.557013]  [<c02e6b88>] ? mutex_lock+0x12/0x14
> [   14.557013]  [<c02e6b88>] ? mutex_lock+0x12/0x14
> [   14.557013]  [<e1ac7115>] ? videobuf_dvb_get_frontend+0x19/0x40 [videobuf_dvb]
> [   14.557013]  [<e1aeca62>] ? cx8802_dvb_probe+0xc9/0x1945 [cx88_dvb]
> [   14.557013]  [<e09ee41e>] ? cx8802_register_driver+0xbd/0x1ac [cx8802]
> [   14.557013]  [<e09ee467>] ? cx8802_register_driver+0x106/0x1ac [cx8802]
> [   14.557013]  [<e1aee37f>] ? dvb_init+0x22/0x27 [cx88_dvb]
> [   14.557013]  [<c0101132>] ? _stext+0x42/0x11a
> [   14.557013]  [<e1aee35d>] ? dvb_init+0x0/0x27 [cx88_dvb]
> [   14.557013]  [<c013d2ca>] ? __blocking_notifier_call_chain+0xe/0x51
> [   14.557013]  [<c014970b>] ? sys_init_module+0x8c/0x17d
> [   14.557013]  [<c0103b42>] ? syscall_call+0x7/0xb
> [   14.557013]  [<c013007b>] ? round_jiffies_relative+0x14/0x16
> [   14.557013]  =======================
> [   14.557013] Code: 78 04 89 f8 89 55 e0 64 8b 35 00 30 3f c0 e8 2e 0c 00 00 8d 43 08 89 45 e4 8b 53 0c 8d 45 e8 8b 4d e4 89 43 0c 89 4d e8 89 55 ec <89> 02 89 75 f0 83 c8 ff 87 03 48 74 55 8a 45 e0 8b 4d e0 83 e0
> [   14.557013] EIP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4 SS:ESP 0068:de653e88
> [   14.565211] ---[ end trace 94d8b014e067ac7b ]---

Tested and confirmed to work by several users at linux-media@vger.kernel.org

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Mauro Carvalho Chehab
8866f9cf8d V4L/DVB (10228): em28xx: fix audio output PCM IN selection
Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However,
currently, the PCM IN selection is not set by the driver. This patch allows
specifying the PCM IN expected output, via board description table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Trent Piepho
fc96ab7302 V4L/DVB (10226): zoran: Get rid of extra module ref count
The zoran driver does a module_get/put of THIS_MODULE on device open/close.
This isn't necessary as the kernel does this automatically.

Clean up the failure path of zoran_open() somewhat.

Make the dprintk()s on open/close a higher debug level and make the user
count printed take the current open/close into account.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Trent Piepho
5e098b6689 V4L/DVB (10225): zoran: Remove zr36057_adr field
The driver should only use the kernel mapped io address, zr36057_mem, and
not the PCI bus address, zr36057_adr.  Since the latter is only printed out
once, there is no need to save it in the driver data structure.

There was some old code that looked like it was for the Alpha architecture
which would use the PCI bus address.  It probably no longer applies to
modern kernels.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Trent Piepho
17faeb2091 V4L/DVB (10224): zoran: Use pci device table to get card type
Instead of using custom code, just let the device layer look it up for us
from the pci device table.  This requires extending the pci device table to
list each known card, plus a catch-all entry for the cards that don't have
sub-system vendor/device data.

Improve some of the info and error messages too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Trent Piepho
601139e083 V4L/DVB (10223): zoran: Remove global device array
The driver was keeping a global array with an entry for each zoran device
probed.  It was a leftover from when the driver didn't dynamically allocate
the driver data for each device.

There was only one use left, in the video device's ->open() method, looking
up the struct zoran for the opened device from the minor number.  This can
be done better with video_get_drvdata().

Since zoran_num is now only used in the pci driver's ->probe() method, it
doesn't need to be an atomic_t and be static.  There is a race if multiple
zoran cards could be probed at the same time, but currently the probe
method for a given driver is single threaded.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Trent Piepho
45bdcefea2 V4L/DVB (10222): zoran: Better syntax for initializing array module params
When initializing a module parameter that is a per-card array, use
"{ [0 ... (BUZ_MAX-1)] = -1 }" instead of "{ -1, -1, -1, -1 }".  This way
all of the entries will be correctly set to -1 if someone changes BUZ_MAX
to a value other than 4.

Adjust some of the parameter help text too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Andy Walls
7ef5e02553 V4L/DVB (10219): saa7134: Prevent Oops due to stale IRQ status when enabling interrupts
When enabling a shared IRQ line, then saa7134_irq handler could be invoked
before the driver had completely set up internal structures, due to a shared
interrupt line firing.  Clear the saa7134 interrupt status reg, before
requesting the irq line, so that stale IRQ status isn't processed before the
internal structures are set up.

Marcin Slusarz recently brought this Oops to the attention of the v4l-dvb
lists and provided an initial analysis by investigating reports found here:

http://kerneloops.org/guilty.php?guilty=mute_input_7133&version=2.6.27-release&start=1802240&end=1835007&class=oops

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Andy Walls
cd8f894eac V4L/DVB (10218): cx23885: Fix Oops for mixed install of analog and digital only cards
Analog support for HVR-1250 has not been completed, but does exist for
the HVR-1800.

Since both cards use the same driver, it tries to create the analog
dev for both devices, which is not possible.

This causes a NULL error to show up in video_open and mpeg_open.

-Mark

Iterations through the cx23885_devlist must check for NULL
pointers as some supported devices only have DVB support at the moment.
Mark Jenks encoutered an Oops in a system with both an HVR-1250 and HVR-1800
installed.

-Andy

Reported-by: Mark Jenks <mjenks1968@gmail.com>
Tested-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Martin Dauskardt
0f3559ef17 V4L/DVB (10216): saa7127: fix broken S-Video with saa7129
Register 0x2d has to be set differently in the saa7129 compared to the
saa7127. This was not done correctly, so S-Video was broken in certain
circumstances.

This fixes a regression introduced in 2.6.28.

Signed-off-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Hans Verkuil
9c17e2ea1e V4L/DVB (10214): Fix 'stb0899_get_srate' defined but not used warning
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Trent Piepho
66aa66ea31 V4L/DVB (10212): Convert to be a pci driver
This is a really old and crufty driver that wasn't using the long
established pci driver framework.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
[mchehab@redhat.com: Cleaned up a few CodingStyle issues]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Mauro Carvalho Chehab
3e478c06e8 V4L/DVB (10209): tveeprom: Properly initialize tuner type (BZ#11367)
If Hauppauge eeprom is corrupted, the driver returns tuner = 0, instead
of TUNER_ABSENT.

This makes the drivers to initialize tuner, instead of handling the
manual parameter.

Since the tuner core rejects that a tuner to have their type changed,
this breaks the manual tuner override.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Mauro Carvalho Chehab
dbdf03b48b V4L/DVB (10208): zoran: Re-adds udev entry removed by changeset 60b4bde4
Changeset 60b4bde48b removed an unused
struct on zoran driver, when compiled with "Y".

However, as pointed by Jean Delvare <khali@linux-fr.org>, this is
neeeded when the driver is compiled as a module, since udev relies on it
to auto-load the module.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Matthias Dahl
d7e43844e4 V4L/DVB (9054): implement proper locking in the dvb ca en50221 driver
Concurrent access to a single DVB CA 50221 interface slot is generally
discouraged. The underlying drivers (budget-av, budget-ci) do not implement
proper locking and thus two transactions could (and do) interfere with on
another.

This fixes the following problems seen by others and myself:

 - sudden i/o errors when writing to the ci device which usually would
   result in an undefined state of the hw and require a software restart

 - errors about the CAM trying to send a buffer larger than the agreed size
   usually also resulting in an undefined state of the hw

Due the to design of the DVB CA 50221 driver, implementing the locks in the
underlying drivers would not be enough and still leave some race conditions,
even though they were harder to trigger.

Signed-off-by: Matthias Dahl <devel@mortal-soul.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Sebastian Andrzej Siewior
0c37dd7a90 V4L/DVB (10202): [PATCH] v4l/tvp514x: Don't write after line end
to avoid:
| tvp514x 0-005c: No platform data
| !!<3>tvp514x 0-005d: No platform data

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Mauro Carvalho Chehab
77f56279f7 V4L/DVB (10201): Fixes cx88 compilation bug
Randy Dunlap <randy.dunlap@oracle.com> wrote:

> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c: In function 'cx88_call_i2c_clients':
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:122: error: 'struct cx88_core' has no member named 'gate_ctrl'
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:123: error: 'struct cx88_core' has no member named 'gate_ctrl'
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:127: error: 'struct cx88_core' has no member named 'gate_ctrl'
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:128: error: 'struct cx88_core' has no member named 'gate_ctrl'

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Laurent Pinchart
51cac8ada5 V4L/DVB (10199): uvcvideo: Fix GET_DEF failure detection.
Commit 44f0079ec7 erroneously considers all
GET_DEF requests as unsuccessful. Fix this by checking the request return
value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Laurent Pinchart
fba4578ee9 V4L/DVB (10198): uvcvideo: Print the UVC version number in binary-coded decimal.
The UVC specification release number is a binary-coded decimal number, print
it as such.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:36 -02:00
Laurent Pinchart
2c2d264bb9 V4L/DVB (10197): uvcvideo: Whitespace and comments cleanup, copyright updates.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:36 -02:00
Yusuf Altin
bb1b082ed6 V4L/DVB (10195): [PATCH] add Terratec Cinergy T Express to dibcom driver
This patch introduces support for dvb-t for the following dibcom based card:
Terratec Cinergy T Express (USB-ID: 0ccd:0062)

Signed-off-by: Yusuf Altin <yusuf.altin@t-online.de>
Signed-off-by: Albert Comerma <albert.comerma@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:36 -02:00
Huang Weiyi
16e68d7cb8 V4L/DVB (10193): removed unused #include <version.h>'s
Removed unused #include <version.h>'s in files below,
  drivers/media/video/cs5345.c
  drivers/media/video/pwc/pwc-if.c
  drivers/media/video/saa717x.c
  drivers/media/video/upd64031a.c
  drivers/media/video/upd64083.c
  drivers/media/video/uvc/uvc_ctrl.c
  drivers/media/video/uvc/uvc_driver.c
  drivers/media/video/uvc/uvc_queue.c
  drivers/media/video/uvc/uvc_video.c
  drivers/media/video/uvc/uvc_status.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:36 -02:00
Mauro Carvalho Chehab
24c3c41584 V4L/DVB (10192): em28xx: fix input selection
em28xx were trying to access the third input entry, even for boards that
don't support it.

This patch reviews the input mux selection fixing this bug and a few
other troubles, like not validating the input on one userspace ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:36 -02:00
Jiri Kosina
bae7eb33b2 HID: document difference between hid_blacklist and hid_ignore_list
Many people get it wrong and add device IDs into hid_blacklist instead
of hid_ignore_list. Let's put a little comment in place.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-29 11:23:12 +01:00
Jarod Wilson
656f1fb90a HID: add antec-branded soundgraph imon devices to blacklist
hid_ignore_list additions for the Antec-branded SoundGraph iMon VFD and LCD
devices (0x15c2:0x0044 and 0x0045).

These devices are driven by lirc.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-29 11:23:12 +01:00
Oliver Neukum
be5d0c837c HID: fix reversed logic in disconnect testing of hiddev
The logic for testing for disconnection is reversed in an ioctl leading
to false reports of disconnection.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-29 11:23:12 +01:00
Jiri Kosina
0fb21de079 HID: adjust report descriptor fixup for MS 1028 receiver
Report descriptor fixup for MS 1028 receiver changes also values for
Keyboard and Consumer, which incorrectly trims the range, causing correct
events being thrown away before passing to userspace.

We need to keep the GenDesk usage fixup though, as it reports totally bogus
values about axis.

Reported-by: Lucas Gadani <lgadani@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-29 11:23:11 +01:00
Randy Dunlap
7cbcf22548 driver-core: fix kernel-doc parameter name
Fix function parameter name in kernel-doc:

Warning(linux-next-20090120//drivers/base/core.c:1289): No description found for parameter 'dev'
Warning(linux-next-20090120//drivers/base/core.c:1289): Excess function parameter 'root' description in 'root_device_unregister'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:55:48 -08:00
Roel Kluin
dcbbcefb6a Staging: poch: fix verification of memory area
fix verification of memory area

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:06 -08:00
Roel Kluin
05d6d677ab Staging: usbip: usbip_start_threads(): handle kernel_thread failure
kernel_thread may fail, notice this.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Geert Uytterhoeven
e48d94dac7 staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h>
On m68k:
drivers/staging/agnx/agnx.h: In function 'agnx_read32':
drivers/staging/agnx/agnx.h:10: error: implicit declaration of function 'ioread32'
drivers/staging/agnx/agnx.h: In function 'agnx_write32':
drivers/staging/agnx/agnx.h:15: error: implicit declaration of function 'iowrite32'
drivers/staging/agnx/sta.c: In function 'get_sta_power':
drivers/staging/agnx/sta.c:94: error: implicit declaration of function 'memcpy_fromio'
drivers/staging/agnx/sta.c: In function 'set_sta_power':
drivers/staging/agnx/sta.c:103: error: implicit declaration of function 'memcpy_toio'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Oleg Nesterov
1176e83aff Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal
Compile tested.

task_struct->signal is not protected by RCU, the code is bogus.
Change the code to take ->siglock to pin ->signal.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Arve Hjønnevåg
191805ac41 Staging: android: Add lowmemorykiller documentation.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Greg Kroah-Hartman
07960058f0 Staging: android: fix build error on 64bit boxes
ktime_t isn't ment to directly access on all arches, so use the proper
conversion functions instead to figure out what time is remaining.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Arve Hjønnevåg
2d0db6bf50 Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Arve Hjønnevåg
c171ac36b7 Staging: android: binder: fix arm build errors
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Greg Kroah-Hartman
7c5151fbf1 Staging: meilhaus: fix Kbuild
The Meilhaus drivers do not like being built into the kernel right now,
so force them to be a module.

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Greg Kroah-Hartman
c69a1f0943 Staging: comedi: fix Kbuild
comedi doesn't like being built into the kernel right now, so force it
to be a module.

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Stefan Richter
5e2125677f firewire: sbp2: fix DMA mapping leak on the failure path
Reported-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
who also provided a first version of the fix.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:08 +01:00
Stefan Richter
f746072abc firewire: sbp2: define some magic numbers as macros
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:07 +01:00
Stefan Richter
a08e100aec firewire: sbp2: fix payload limit at S1600 and S3200
1394-2008 clause 16.3.4.1 (1394b-2002 clause 16.3.1.1) defines tighter
limits than 1394-2008 clause 6.2.2.3 (1394a-2000 clause 6.2.2.3).

Our previously too large limit doesn't matter though if the controller
reports its max_receive correctly.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:07 +01:00
Stefan Richter
c1fbdd7851 ieee1394: sbp2: don't assume zero model_id or firmware_revision if there is none
This makes sbp2 behave more like firewire-sbp2 which reports 0xff000000
as immediate value if there are no unit directory entries for model_id
or firmware_revision.

It does not reduce matches with the currently existing quirks table; the
only zero entry there is for a device which actually does have a zero
model_id.  It only changes how model_id and firmware_revision are logged
if they are missing.

Other functionally unrelated changes:  The model_id member of quirks
list entries is renamed to model;  the value (but not the effect) of
SBP2_ROM_VALUE_WILDCARD is changed.  Now this part of the source is
identical with firewire-sbp2 for easier maintenance.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:06 +01:00
Stefan Richter
d3e3e970e3 ieee1394: sbp2: fix payload limit at S1600 and S3200
1394-2008 clause 16.3.4.1 (1394b-2002 clause 16.3.1.1) defines tighter
limits than 1394-2008 clause 6.2.2.3 (1394a-2000 clause 6.2.2.3).

Our previously too large limit doesn't matter though if the controller
reports its max_receive correctly.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:06 +01:00
Stefan Richter
4106ceff15 ieee1394: sbp2: update a help string
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:06 +01:00
Stefan Richter
82d4b90deb ieee1394: support for speeds greater than S800
The hard-wired configuration of the top speed (until now S800) was
unnecessary, remove it.

If the local link layer controller supports S1600 or S3200, we now
assume this speed for all present 1394b PHYs (except if they are
behind 1394a repeaters) until nodemgr figured out the actual speed
while fetching the config ROM.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-01-28 20:31:05 +01:00
Linus Torvalds
c4568d6c7e Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
  powerpc/pseries: Correct VIO bus accounting problem in CMO env.
  powerpc: More printing warning fixes for the l64 to ll64 conversion
  powerpc: Remove arch/ppc cruft from Kconfig
  powerpc: Printing fix for l64 to ll64 conversion: phyp_dump.c
  powerpc/embedded6xx: Update defconfigs
  powerpc/8xx: Update defconfigs
  powerpc/86xx: Update defconfigs
  powerpc/83xx: Update defconfigs
  powerpc/85xx: Update defconfigs
  powerpc/mpc8313erdb: fix kernel panic because mdio device is not probed
  powerpc/4xx: Update multi-board PowerPC 4xx defconfigs
  powerpc/44x: Update PowerPC 44x defconfigs
  powerpc/40x: Update PowerPC 40x defconfigs
  powerpc/85xx: Fix typo in mpc8572ds dts
  powerpc/44x: Warp patches for the new NDFC driver
  powerpc/4xx: DTS: Add Add'l SDRAM0 Compatible and Interrupt Info
2009-01-28 09:01:42 -08:00
Linus Torvalds
78a768b6ca Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: fix 5329 ColdFire periphal addressing
  uclinux: add process name to allocation error message
  m68knommu: correct the mii calculations for 532x ColdFire FEC
  m68knommu: add ColdFire M532x to the FEC configuration options
  m68knommu: fix syscall restarting
  m68knommu: remove the obsolete and long unused comempci chip support
  m68knommu: remove the no longer used PCI support option
  m68knommu: remove obsolete and unused eLIA board
  m68knommu: set NO_DMA
  m68knommu: fix cache flushing for the 527x ColdFire processors
  m68knommu: fix ColdFire 5272 serial baud rates in mcf.c
  m68knommu: use one exist from execption
2009-01-28 08:41:57 -08:00
Eric Anholt
30b2363408 drm: Rip out the racy, unused vblank signal code.
Schedule a vblank signal, kill the process, and we'll go walking over freed
memory.  Given that no open-source userland exists using this, nor have I
ever heard of a consumer, just let this code die.

Signed-off-by: Eric Anholt <eric@anholt.net>
Requested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-28 07:50:14 -08:00
Russell King
a71558d0ec [ARM] etherh: continue fixing build failure
Further to 483a2b3a31, also fix:

drivers/net/arm/etherh.c:649: error: 'eth_set_mac_addr' undeclared here (not in a function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-28 10:19:52 +00:00
Stephen Rothwell
4712fff9be powerpc: More printing warning fixes for the l64 to ll64 conversion
These are all powerpc specific drivers.

res.start in fsl_elbc_nand.c needs to be cast since it may be either 32
or 64 bit.  Thanks to Scott Wood for noticing.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Arnd Bergmann <arnd@arndb.de> call_edac bits in particular
Acked-by: Olof Johansson <olof@lixom.net> pasemi_nand peices
Acked-by: Scott Wood <scottwood@freescale.com> fsl_elbc fixes
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:52 +11:00
Jesse Brandeburg
15b2bee22a e1000: fix bug with shared interrupt during reset
A nasty bug was found where an MTU change (or anything else that caused a
reset) could race with the interrupt code.  The interrupt code was entered
by a shared interrupt during the MTU change.

This change prevents the interrupt code from running while the driver is in
the middle of its reset path.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-27 16:41:58 -08:00
David S. Miller
0c8dfc830a net: Add skb_record_rx_queue() calls to multiqueue capable drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-27 16:22:32 -08:00
Linus Torvalds
e4a7ca2903 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (36 commits)
  USB: Driver for Freescale QUICC Engine USB Host Controller
  USB: option: add QUANTA HSDPA Data Card device ids
  USB: storage: Add another unusual_dev for off-by-one bug
  USB: unusual_dev: usb-storage needs to ignore a device
  USB: GADGET: fix !x & y
  USB: new id for ti_usb_3410_5052 driver
  USB: cdc-acm: Add another conexant modem to the quirks
  USB: 'option' driver - onda device MT503HS has wrong id
  USB: Remove ZTE modem from unusual_devices
  USB: storage: support of Dane-Elec MediaTouch USB device
  USB: usbmon: Implement compat_ioctl
  USB: add kernel-doc for wusb_dev in struct usb_device
  USB: ftdi_sio driver support of bar code scanner from Diebold
  USB: ftdi_sio: added Alti-2 VID and Neptune 3 PID
  USB: cp2101 device
  USB: usblp.c: add USBLP_QUIRK_BIDIR to Brother HL-1440
  USB: remove vernier labpro from ldusb
  USB: CDC-ACM quirk for MTK GPS
  USB: cdc-acm: support some gps data loggers
  USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index
  ...
2009-01-27 16:08:04 -08:00
Anton Vorontsov
236dd4d18f USB: Driver for Freescale QUICC Engine USB Host Controller
This patch adds support for the FHCI USB controller, as found
in the Freescale MPC836x and MPC832x processors. It can support
Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC
generation and checking), though scheduling and retransmission is on
software's shoulders.

This controller does not integrate the root hub, so this driver also
fakes one-port hub. External hub is required to support more than
one device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:38 -08:00
Alex.Cheng@quantatw.com
fc91be2ad0 USB: option: add QUANTA HSDPA Data Card device ids
This patch adds the support  for the QUANTA Q101 series HSDPA Data Card.
With the vendor and product IDs are set properly,
the data card can be detected and works fine.

Signed-off-by: Alex Cheng <alex.cheng@quantatw.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:37 -08:00
Phil Dibowitz
aa23c8d616 USB: storage: Add another unusual_dev for off-by-one bug
Argosy has released another device with the off-by-one sector. This is a
harddrive with an internal cardreader which is affected.

Based on a patch written by Martijn Hijdra <martijn.hijdra@gmail.com>

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Cc: Martijn Hijdra <martijn.hijdra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:37 -08:00
Phil Dibowitz
a83775b146 USB: unusual_dev: usb-storage needs to ignore a device
This patch adds an unusual_devs entry for a Sony Ericsson modem. Like many
other modems, we have to ignore the storage device in order to access the
modem.


At this time usb_modeswitch does not work with this device.


Reported-by: The Solutor <thesolutor@gmail.com>.
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:37 -08:00
Roel Kluin
0df2479232 USB: GADGET: fix !x & y
! has a higher precedence than &

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:37 -08:00
Oliver Neukum
1a1fab5137 USB: new id for ti_usb_3410_5052 driver
This adds a new device id

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:37 -08:00
Alan Cox
c89c60e9d6 USB: cdc-acm: Add another conexant modem to the quirks
Another Conexant, another device with the same quirk

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:37 -08:00
Marcel Sebek
3b498a66a6 USB: 'option' driver - onda device MT503HS has wrong id
While trying to make GSM modem Onda MT503HS working, I found a mismatch
between device id in the driver code (0x0200) and id in the lsusb
output (0x2000).

This patch fixed it for me, but I don't know if the original device id was
also correct and the new ID should be added instead of replacing the
old one.


Signed-off-by: Marcel Sebek <sebek64@post.cz>
Acked-by: Domenico Riccio <domenico.riccio@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Phil Dibowitz
d547f13472 USB: Remove ZTE modem from unusual_devices
The ZTE modem entry causes usb-storage to ignore the device, but for some
versions of the device, usb-storage mode is required to get to modem ode. For
both kinds the tool: http://www.draisberghof.de/usb_modeswitch/ should work.

Note that the various versions of the device have the same ProductId,
VendorId, and bcdDevice number, so we cannot have the entry for some and not
others.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Jean-Baptiste Onofre
649150926b USB: storage: support of Dane-Elec MediaTouch USB device
This adds another unusual_devs.h entry for a device that can't handle more
than 64k reads/writes in a single command.

Signed-off-by: Jean-Baptiste Onofre <jb@nanthrax.net>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Pete Zaitcev
7abce6bedc USB: usbmon: Implement compat_ioctl
Running a 32-bit usbmon(8) on 2.6.28-rc9 produces the following:
ioctl32(usbmon:28563): Unknown cmd fd(3) cmd(400c9206){t:ffffff92;sz:12} arg(ffd3f458) on /dev/usbmon0

It happens because the compatibility mode was implemented for 2.6.18
and not updated for the fsops.compat_ioctl API.

This patch relocates the pieces from under #ifdef CONFIG_COMPAT into
compat_ioctl with no other changes except one new whitespace.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Mhayk Whandson
ca80801bfb USB: ftdi_sio driver support of bar code scanner from Diebold
Added the product id of bcs(bar code scanner) from Diebold Procomp Brazil.

Signed-off-by: Mhayk Whandson <eu@mhayk.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Robie Basak
45eeff848b USB: ftdi_sio: added Alti-2 VID and Neptune 3 PID
This patch adds the vendor and product ID for the Alti-2 Neptune 3
(http://www.alti-2.com) which uses the FTDI chip.

Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Tomasz K
877e262c4e USB: cp2101 device
My girl use modem GSM (EDGE) Commanader 2 on iPlus Polsih provider,

PLEASE add this vendor=0x10C4 and product=0x822B to USB serial driver cp2101.c

From: Tomasz K <eros81@o2.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Brandon Philips
06a743bfc4 USB: usblp.c: add USBLP_QUIRK_BIDIR to Brother HL-1440
My Brother HL-1440 would print one document before CUPS would stop
printing with the error "Printer not connected; will retry in 30
seconds...". I traced this down to the CUPS usb backend getting an EIO
out of usblp on the IOCNR_GET_DEVICE_ID IOCTL. Adding the
USBLP_QUIRK_BIDIR fixes the problem but is it the right solution?

output from strace /usr/lib/cups/backend/usb after printing a document
(Note: SNDCTL_DSP_SYNC == IOCNR_GET_DEVICE_ID):

before patch

open("/dev/usb/lp0", O_RDWR|O_EXCL)     = 3
ioctl(3, SNDCTL_DSP_SYNC, 0x7fff2478cef0) = -1 EIO (Input/output error)

after patch

open("/dev/usb/lp0", O_RDWR|O_EXCL)     = 3
ioctl(3, SNDCTL_DSP_SYNC, 0x7fffb8d474c0) = 0

Possibly related bug: https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/35638

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
sware
296361ec3a USB: remove vernier labpro from ldusb
Labpro device is in both ldusb and vstusb device tables.
Should only be a vstusb device.

Signed-off-by: stephen ware <stephen.ware@eqware.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Andrew Lunn
0f9c7b4a1c USB: CDC-ACM quirk for MTK GPS
This patch adds a device quirk for a MediaTek Inc GPS chipset. The
device implements USB CDC ACM, but is missing the union descriptor, so
the ACM class driver fails to probe the device.

I've tested this patch with an iBlue A+ GPS which uses this chipset
and using kernel 2.6.28-rc9.

Signed-off-by: Andrew Lunn, <andrew@lunn.ch>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
James A. Treacy
837d842496 USB: cdc-acm: support some gps data loggers
Below is a patch which allows a number of GPS loggers to work
under linux. It is known to support the i-Blue 747 (all models),
i-Blue 757, Qstarz BT-Q1000, i.Trek Z1, Konet BGL-32, and the Holux
M-241.

From: James A. Treacy <treacy@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:36 -08:00
Bryan Wu
08889517b3 USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index
In some usb gadget driver, for example usb audio class device, the high
byte of w_index is the entity id and low byte is the interface number.
If we use the 2 bytes of w_index as the array number, we will get a
wrong pointer or NULL pointer.

This patch fixes this issue.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:35 -08:00
Bryan Wu
dd4dff8b03 USB: composite: Fix bug: should test set_alt function pointer before use it
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:35 -08:00
David Brownell
cd67435ef9 USB: musb: Kconfig fix
The Blackfin MUSB Kconfig text didn't properly parenthesise its
dependencies.  This was visible in non-Blackfin configs by the
way the user interfaces lost track of dependencies, when doing
a bunch of test builds.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:35 -08:00
Swaminathan S
191b776616 USB: musb cppi dma fix
Initializes the actual_len field to 0 before every DMA transaction.

Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:35 -08:00
Hugo Villeneuve
704a14854a USB: musb cppi bugfixes
These compilation errors are related to incorrect
debugging macro and variable names and generated the
following errors:

  drivers/usb/musb/cppi_dma.c:437:5: warning: "MUSB_DEBUG" is not defined
  drivers/usb/musb/cppi_dma.c: In function 'cppi_next_rx_segment':
  drivers/usb/musb/cppi_dma.c:884: error: 'debug' undeclared (first use in this function)

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:35 -08:00
Julia Lawall
96bcd090fa USB: musb uses endpoint functions
This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:34 -08:00
Kalle Valo
af7e0c5f12 USB: musb: tusb6010 buildfix
drivers/usb/musb/tusb6010_omap.c:18:26: error: asm/arch/dma.h:
  No such file or directory
drivers/usb/musb/tusb6010_omap.c:19:26: error: asm/arch/mux.h:
  No such file or directory

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:33 -08:00
Ajay Kumar Gupta
97a3989681 USB: musb free_irq bugfix
Fixes insert module failure as free_irq() was not
done in previous rmmod.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:33 -08:00
David Brownell
37daa925cf USB: musb_hdrc: another davinci buildfix (otg related)
The DaVinci code had an implementation of the OTG transceiver glue
too; make it use the new-standard one.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
David Brownell
10b4eadef1 USB: musb davinci buildfix
Trying once more to get this merged.  The original was submitted
for 2.6.27-rc2 or so, and never got correctly merged.  Neither
were any of the numerous subsequent resends.  Sigh.

  CC      drivers/usb/musb/davinci.o
drivers/usb/musb/davinci.c:35:32: error: mach/arch/hardware.h: No such file or directory
drivers/usb/musb/davinci.c:36:30: error: mach/arch/memory.h: No such file or directory
drivers/usb/musb/davinci.c:37:28: error: mach/arch/gpio.h: No such file or directory
drivers/usb/musb/davinci.c:373: error: redefinition of 'musb_platform_set_mode'
drivers/usb/musb/davinci.c:368: error: previous definition of 'musb_platform_set_mode' was here

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
David Brownell
2bf5fa13fc USB: omap1 ohci buildfix (otg related)
> > drivers/built-in.o: In function `ohci_omap_init':
 > > hid-quirks.c:(.text+0x6c608): undefined reference to `otg_get_transceiver'
 > > drivers/built-in.o: In function `omap_udc_probe':
 > > hid-quirks.c:(.init.text+0x34c0): undefined reference to `otg_get_transceiver'
 > > hid-quirks.c:(.init.text+0x3d40): undefined reference to `otg_put_transceiver'

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Alan Stern
501950d846 USB: fix char-device disconnect handling
This patch (as1198) fixes a conceptual bug: Somewhere along the line
we managed to confuse USB class devices with USB char devices.  As a
result, the code to send a disconnect signal to userspace would not be
built if both CONFIG_USB_DEVICE_CLASS and CONFIG_USB_DEVICEFS were
disabled.

The usb_fs_classdev_common_remove() routine has been renamed to
usbdev_remove() and it is now called whenever any USB device is
removed, not just when a class device is unregistered.  The notifier
registration and unregistration calls are no longer conditionally
compiled.  And since the common removal code will always be called as
part of the char device interface, there's no need to call it again as
part of the usbfs interface; thus the invocation of
usb_fs_classdev_common_remove() has been taken out of
usbfs_remove_device().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
Tested-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: stable <stable@kernel.org>
2009-01-27 16:15:32 -08:00
Rafael J. Wysocki
a15d95a003 USB: Fix suspend-resume of PCI USB controllers
Commit a0d4922da2
(USB: fix up suspend and resume for PCI host controllers) attempted
to fix the suspend-resume of PCI USB controllers, but unfortunately
it did that incorrectly and interrupts are left enabled by the USB
controllers' ->suspend_late() callback as a result.  This leads to
serious problems during suspend which are very difficult to debug.

Fix the issue by removing the ->suspend_late() callback of PCI
USB controllers and moving the code from there to the ->suspend()
callback executed with interrupts enabled.  Additionally, make
the ->resume() callback of PCI USB controllers execute
pci_enable_wake(dev, PCI_D0, false) to disable wake-up from the
full power state (PCI_D0).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Tested-by: "Jeff Chua" <jeff.chua.linux@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: "Zdenek Kabelac" <zdenek.kabelac@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Alan Stern
bcca06efea USB: don't enable wakeup by default for PCI host controllers
This patch (as1199) changes the initial wakeup settings for PCI USB
host controllers.  The controllers are marked as capable of waking the
system, but wakeup is not enabled by default.

It turns out that enabling wakeup for USB host controllers has a lot
of bad consequences.  As the simplest example, if a USB mouse or
keyboard is unplugged immediately after the computer is put to sleep,
the unplug will cause the system to wake back up again!  We are better
off marking them as wakeup-capable and leaving wakeup disabled.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
CC: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Oliver Neukum
b90de8aea3 USB: storage: add unusual devs entry
This adds an unusual devs entry for 2116:0320

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Alan Stern
ddeac4e75f USB: fix toggle mismatch in disable_endpoint paths
This patch (as1200) finishes some fixes that were left incomplete by
an earlier patch.

Although nobody has addressed this issue in the past, it turns out
that we need to distinguish between two different modes of disabling
and enabling endpoints.  In one mode only the data structures in
usbcore are affected, and in the other mode the host controller and
device hardware states are affected as well.

The earlier patch added an extra argument to the routines in the
enable_endpoint pathways to reflect this difference.  This patch adds
corresponding arguments to the disable_endpoint pathways.  Without
this change, the endpoint toggle state can get out of sync between
the host and the device.  The exact mechanism depends on the details
of the host controller (whether or not it stores its own copy of the
toggle values).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Dan Streetman <ddstreet@ieee.org>
Tested-by: Dan Streetman <ddstreet@ieee.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Wolfgang Glas
95bec45d20 USB: cp2101: add fasttrax GPS evaluation kit vendor/product ID
This adds the vendor/product ID of the fasttrax GPS evaluation kit from:
	http://www.fastraxgps.com/products/evaluationtools/evaluationkit/

to the cp2101 module since this device is actually equipped with a
CP210x USB to serial bridge.

The vendor/product ID is: 0x10c4/0x826b.

Signed-off-by: Wolfgang Glas <wolfgang.glas@ev-i.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:31 -08:00
Linus Torvalds
b00ecabf1d Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure
  [SCSI] qla2xxx: Update version number to 8.03.00-k2.
  [SCSI] qla2xxx: Add checks for a valid fcport in dev-loss-tmo/terminate_rport_io callbacks.
  [SCSI] qla2xxx: Correct regression in DMA-mask setting prior to allocations.
  [SCSI] qla2xxx: Correct descriptions in flash manipulation routines.
  [SCSI] qla2xxx: Correct regression in EH abort handling.
  [SCSI] qla2xxx: Correct endianness issue during flash manipulation.
  [SCSI] qla2xxx: Correct MSI-X vector allocation for single queue mode.
  [SCSI] qla2xxx: Modify firmware-load order precedence for ISP81XX parts.
  [SCSI] qla2xxx: Always serialize mailbox command execution.
  [SCSI] qla2xxx: Ensure RISC-interrupt-enabled consistency for IS_NOPOLLING_TYPE() ISPs.
  [SCSI] qla2xxx: Simplify sector-mask calculation in preparation for larger flash parts.
  [SCSI] qla2xxx: Fix memory leak in error path
  [SCSI] qla4xxx: do not reuse session when connecting to different target port
  [SCSI] libiscsi: fix iscsi pool leak
2009-01-27 16:07:24 -08:00
Matthew Garrett
71a082efc9 PCI hotplug: Change link order of pciehp & acpiphp
Some hardware exposes PCIE slots in such a way that they can be claimed
by either the acpiphp or pciehp driver. pciehp is the preferred driver
if the firmware allows the OS to claim control via the _OSC method so
should be loaded first - if it fails to bind (either due to a missing
_OSC method or the firmware refusing to hand off control) then we can
fall back to acpiphp or a vendor-specific driver.

This patch simply changes the link order to ensure that pciehp will be
initialised before acpiphp if both are statically built into the kernel.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 15:35:51 -08:00
Darrick J. Wong
bf4162bcf8 PCI hotplug: fakephp: Allocate PCI resources before adding the device
For PCI devices, pci_bus_assign_resources() must be called to set up the
pci_device->resource array before pci_bus_add_devices() can be called, else
attempts to load drivers results in BAR collision errors where there are none.
This is not done in fakephp, so devices can be "unplugged" but scanning the
parent bus won't bring the devices back due to resource unallocation.  Move the
pci_bus_add_device-calling logic into pci_rescan_bus and preface it with a call
to pci_bus_assign_resources so that we only have to (re)allocate resources once
per bus where a new device is found.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 10:53:24 -08:00
Matthew Wilcox
bffac3c593 PCI MSI: Fix undefined shift by 32
Add an msi_mask() function which returns the correct bitmask for the
number of MSI interrupts you have.  This fixes an undefined bug in
msi_capability_init().

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 09:53:25 -08:00
Rafael J. Wysocki
476e7faefc PCI PM: Do not wait for buses in B2 or B3 during resume
pci_restore_standard_config() adds extra delay for PCI buses in
low power states (B2 or B3), but this is only correct for buses in
B2, because the buses in B3 are reset when they are put back into
B0.  Thus we should wait for such buses to settle after the reset,
but it's not a good idea to wait that long (1.1 s) with interrupts
off.

On the other hand, we have never waited for buses in B2 and B3
during resume and it seems reasonable to go back to this well
tested behaviour.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 09:47:10 -08:00
Rafael J. Wysocki
48f67f54a5 PCI PM: Power up devices before restoring their state
Devices that have MSI-X enabled before suspend to RAM or hibernation
and that are in a low power state during resume will not be handled
correctly by pci_restore_standard_config().  Namely, it first calls
pci_restore_state() which calls pci_restore_msi_state(), which in turn
executes __pci_restore_msix_state() that accesses the device's memory
space to restore the contents of the MSI-X table.  However, if the
device is in a low power state at this point, it's memory space is
not accessible.

The easiest way to fix this potential problem is to make
pci_restore_standard_config() call pci_restore_state() after
it has put the device into the full power state, D0.  Fortunately,
all of this is done with interrupts off, so the change of ordering
should not cause any trouble.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 09:47:02 -08:00
Rafael J. Wysocki
545ffd58ad PCI PM: Fix hibernation breakage on EeePC 701
Hibernation breaks on EeePC 701 as a result of attempting to put one
of its (driverless) devices into a low power state.  Avoid that by
not attepmting to power manage driverless devices during hibernation.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 09:46:27 -08:00
Rafael J. Wysocki
418e4da33f PCI PM: Fix suspend error paths and testing facility breakage
If one of device drivers refuses to suspend by returning error code
from its ->suspend() callback, the devices that have already been
suspended are resumed by executing their drivers' ->resume()
callbacks.  Some of these callbacks expect the device's
configuration space to be restored if the device has been put into
D3 before they are called.  Unfortunately, this mechanism has been
broken by recent changes moving the restoration of config spaces
of some devices (most importantly, USB controllers and HDA Intel)
into the resume callbacks executed with interrupts off.  Obviously,
these callbacks are not invoked in the suspend error path and, as a
result, the system cannot be successfully brought back into the
working state in case of a suspend error.  The same thing happens
in the hibernation error path right before putting the system into
S4.

Similarly, the suspend testing facility associated with the
/sys/power/pm_test file is broken, because it uses the very same
mechanism that is used in the suspend and hibernation error paths.

Fix the breakage by making the PCI core restore the configuration
spaces of PCI devices that haven't been restored already before
pci_pm_resume() is called for those devices by the PM core.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-27 09:45:46 -08:00
Linus Torvalds
490a8d70cd Merge branch 'hibern_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'hibern_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  SATA PIIX: Blacklist system that spins off disks during ACPI power off
  SATA Sil: Blacklist system that spins off disks during ACPI power off
  SATA AHCI: Blacklist system that spins off disks during ACPI power off
  SATA: Blacklisting of systems that spin off disks during ACPI power off
  DMI: Introduce dmi_first_match to make the interface more flexible
  Hibernation: Introduce system_entering_hibernation
2009-01-27 07:50:41 -08:00
Linus Torvalds
8c022fdd5f Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata-rb532-cf: remove set_irq_type from finish_io
  [libata] pata_via: support VX855, future chips whose IDE controller use 0x0571
  sata_mv: no longer experimental (v2)
  sata_mv: msi masking fix (v2)
  sata_mv: Properly initialize main irq mask
  sata_mv: remove bogus nsect restriction
  sata_mv: don't read hc_irq_cause
  sata_mv: fix 8-port timeouts on 508x/6081 chips
  sata_nv: fix MCP5x reset
  sata_nv: rename nv_nf2_hardreset()
  libata: set NODEV_HINT for 0x7f status
  libata-sff: fix incorrect EH message
2009-01-27 07:47:22 -08:00
Michael Bramer
78d70d4813 Add support for '8-port RS-232 MIC-3620 from advantech'
This Patch add the device information for the
MIC-3620 8-port RS-232 cPCI card from Advantech Co. Ltd.

Signed-off-by: Michael Bramer <grisu@deb-support.de>
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-27 07:37:15 -08:00
Uwe Kleine-König
e9fed56739 Move jsm_remove_one to .devexit.text
The function jsm_remove_one is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-27 07:37:15 -08:00
Ihar Hrachyshka
11455be2a3 MIPS: enable serial UART support on PNX833X devices.
Enabled serial UART driver for PNX833X devices.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-27 07:37:15 -08:00
Eric Paris
808ffa3d30 tty_open can return to userspace holding tty_mutex
__tty_open could return (to userspace) holding the tty_mutex thanks to a
regression introduced by 4a2b5fddd5 ("Move
tty lookup/reopen to caller").

This was found by bisecting an fsfuzzer problem.  Admittedly I have no
idea how it managed to tickle this 100% reliably, but it is clearly a
regression and when hit leaves the box in a completely unusable state.
This patch lets the fsfuzzer test complete every time.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-27 07:37:15 -08:00
Sidney Amani
766fb95ba0 UBI: allow direct user-space I/O
Introduce a new ioctl UBI_IOCSETPROP to set properties
on a volume. Also add the first property:
UBI_PROP_DIRECT_WRITE, this property is used to set the
ability to use direct writes in userspace

Signed-off-by: Sidney Amani <seed@uffs.org>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-01-27 16:54:41 +02:00
Rafael J. Wysocki
5f451fe1ab SATA PIIX: Blacklist system that spins off disks during ACPI power off
Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.

Blacklist HP 2510p that uses the ata_piix driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:15:53 -05:00
Rafael J. Wysocki
e57db7bde7 SATA Sil: Blacklist system that spins off disks during ACPI power off
Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.

Blacklist HP nx6325 that uses the sata_sil driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:15:52 -05:00
Rafael J. Wysocki
1fd684346d SATA AHCI: Blacklist system that spins off disks during ACPI power off
Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.

Blacklist HP nx6310 that uses the AHCI driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:15:51 -05:00
Rafael J. Wysocki
2a6e58d273 SATA: Blacklisting of systems that spin off disks during ACPI power off
Introduce new libata flags ATA_FLAG_NO_POWEROFF_SPINDOWN and
ATA_FLAG_NO_HIBERNATE_SPINDOWN that, if set, will prevent disks from
being spun off during system power off and hibernation, respectively
(to handle the hibernation case we need the new system state
SYSTEM_HIBERNATE_ENTER that can be checked against by libata, in
analogy with SYSTEM_POWER_OFF).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:15:49 -05:00
Rafael J. Wysocki
d7b1956fed DMI: Introduce dmi_first_match to make the interface more flexible
Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.  However, only the on-board controlles should
be blacklisted and their PCI slot numbers can be used for this
purpose.  Unfortunately the existing interface for checking DMI
information of the system is not very convenient for this purpose,
because to use it, we would have to define special callback functions
or create a separate struct dmi_system_id table for each blacklisted
system.

To overcome this difficulty introduce a new function
dmi_first_match() returning a pointer to the first entry in an array
of struct dmi_system_id elements that matches the system DMI
information.  Then, we can use this pointer to access the entry's
.driver_data field containing the additional information, such as
the PCI slot number, allowing us to do the desired blacklisting.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:15:47 -05:00
Phil Sutter
b98f504639 pata-rb532-cf: remove set_irq_type from finish_io
The driver has been tested without the call to set_irq_type at this
point and occurs to work fine, so it should be safe to remove it.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:13:03 -05:00
Matt Waddel
b9d57f94bb m68knommu: correct the mii calculations for 532x ColdFire FEC
Signed-off-by: Matt Waddel <Matt.Waddel@freescale.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-01-27 16:42:03 +10:00
Matt Waddel
d4732d3c59 m68knommu: add ColdFire M532x to the FEC configuration options
Signed-off-by: Matt Waddel <Matt.Waddel@freescale.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-01-27 16:42:03 +10:00
John Adamson
26a4bc66a6 m68knommu: fix ColdFire 5272 serial baud rates in mcf.c
I noticed (the hard way) that the mcf.c driver doesn't support the fractional precision register on the MCF5272.  This makes the console dicey at 115200 baud and a system clock of 66.0 MHz.  On the other hand, if your hardware is running at 66.666 MHz, it probably isn't a problem.

Patch submitted by John Adamson <jadamson@allen-organ.com>

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2009-01-27 16:42:00 +10:00
Divy Le Ray
a73efd0a85 iw_cxgb3: handle chip reset notifications
Freeze activity when notified that the underlying chip
is getting reset on a EEH event or fatal error.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 22:22:19 -08:00
Divy Le Ray
cb0bc20595 cxgb3: Notify fatal errors
Set up a notification mechanism to inform upper layer modules
(iWARP, iSCSI) of a chip reset due to an EEH event or a fatal error.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 22:21:59 -08:00
Manish Katiyar
a7a41acf99 r6040: Remove unused variable pdev from drivers/net/r6040.c
drivers/net/r6040.c:441: warning: unused variable 'pdev'

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:54:21 -08:00
Steve Glendinning
1373c0fdbc smsc911x: leave RX_STOP interrupt permanently enabled
smsc911x_set_multicast_list currently performs the only non-atomic
read-modify-write of INT_EN.  This patch permanently enables the
RXSTOP_INT interrupt, and changes the ISR to only conditionally run the
multicast filter workaround code.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:33:16 -08:00
Magnus Damm
a528079e01 smc91x: struct net_device_ops
Convert the smc91x driver to use struct net_device_ops.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:32:25 -08:00
Kay Sievers
db1d7bf70f net: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:12:58 -08:00
Cyrill Gorcunov
3617aa485c net: pppoe - stop using proc internals
Alexey Dobriyan pointed that using PDE_NET outside the
proc code is plain bogus (thanks Alexey!). Fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:11:02 -08:00
Alexey Dobriyan
cbec6605cf pppol2tp: stop using proc internals
PDE_NET usage in driver code is a sign and, indeed, switching
to seq_open_net/seq_release_net saves code and fixes bogus things, like
user triggerabble BUG_ON(!net) after maybe_get_net, and NULLifying ->private.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:10:08 -08:00
Ira W. Snyder
8527bec548 virtio_net: use correct accessors for scatterlists
Without this fix, virtio_net makes incorrect usage of scatterlists. It sets
the end of the scatterlist chain after the first element, despite the fact
that more entries come after it.

If you try to run dma_map_sg() on one of the scatterlists given to you by
add_buf(), you will get a null pointer oops.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26 21:00:33 -08:00
Don Skidmore
1e336d0fc9 ixgbe: add support KX/KX4 device
And support for the KX/KX4 mezzanine card.  Device id 0x10B6.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
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>
2009-01-26 20:57:51 -08:00
Don Skidmore
5b9c3cdd55 ixgbe: fix slow load times on 82598 nics
Load times for NICs that use i2c to communicate with the phy were taking
~4.5 sec per port.  This fix first checks to see if the link is already
up before calling get_link_capabilities, since if it is we don't need
query the phy for link state.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
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>
2009-01-26 20:57:17 -08:00