dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

78770 Commits

Author SHA1 Message Date
Luciano Coelho 9cf25fed6a wl1271: remove workaround for disconnection
Now we're using a the idle information coming from mac80211 to decide when to
disconnect.  If we have joined (ie. we're listening to a channel), whenever
the interface goes to idle, we will issue a disconnect command.  So the
workaround to send a disconnect command before joining is not needed anymore.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:30 -05:00
Luciano Coelho c7f43e451b wl1271: use join command with dummy BSSID
When we need to change the channel before association, we have to send a join
command with a valid BSSID.  With this patch we use 0baddeadbeef as the
BSSID.  There are ongoing discussions with TI to get this done in a cleaner
way.

When we go back to idle, we issue a CMD_DISCONNECT to make sure the firmware
stops listening to the channel and cleans things up internally.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:30 -05:00
Luciano Coelho cf18be4467 wl1271: added radio parameters configuration values newer firmwares
Add new radio parameters for new structures based on firmware revision
6.1.0.0.288.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:29 -05:00
Luciano Coelho a3e84847b0 wl1271: update radio and general parameters values
There were some changes in the values we have to use for these settings.  This
patches updates them.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:29 -05:00
Luciano Coelho 76c0f8d396 wl1271: updated general parameters structure for newer firmwares
In revision 6.1.0.0.288 the general parameters structure has changed.  This
patch updates the driver code accordingly.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:29 -05:00
Luciano Coelho 937a67e75a wl1271: updated radio parameters structure for newer firmwares
In revision 6.1.0.0.288 the radio parameters structure has changed.  This
patch updates the driver code accordingly.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:28 -05:00
Larry Finger b02914af4d b43: Allow PIO mode to be selected at module load
If userencounter the "Fatal DMA Problem" with a BCM43XX device, and
still wish to use b43 as the driver, their only option is to rebuild
the kernel with CONFIG_B43_FORCE_PIO. This patch removes this option and
allows PIO mode to be selected with a load-time parameter for the module.
Note that the configuration variable CONFIG_B43_PIO is also removed.

Once the DMA problem with the BCM4312 devices is solved, this patch will
likely be reverted.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:28 -05:00
Lennert Buytenhek 7dc6a7a763 mwl8k: remove duplicate local per-vif copy of ieee80211_bss_conf
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:28 -05:00
Lennert Buytenhek 9747478295 mwl8k: remove unused mwl8k_vif::priv
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:27 -05:00
Lennert Buytenhek 89a91f4f4c mwl8k: fix up AP vs. STA firmware image receive descriptor handling
The receive descriptor ops that are currently marked as being for
8687 only are actually used for all STA firmware images, whereas the
receive descriptor ops marked as 8366 are only used on 8366 when an
AP firmware image is in use.

Rename the receive descriptor ops to reflect this, use the STA ops
unconditionally if the firmware image loaded reported the STA ready
code, and rename the mwl8k_device_info::rxd_ops member to ap_rxd_ops
to indicate that it should only be used if we are running on AP
firmware.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:27 -05:00
Lennert Buytenhek be695fc4f0 mwl8k: do rx/tx ring initialisation after loading firmware
Whether the firmware we have loaded is AP or STA firmware decides
which receive descriptor format we have to use.  Therefore, move
rx/tx ring initialisation to be after firmware loading.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:27 -05:00
Lennert Buytenhek 22be40d9c5 mwl8k: get rid of the struct mwl8k_firmware abstraction
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:26 -05:00
Lennert Buytenhek 647ca6b01a mwl8k: add 2.4GHz channels 12, 13 and 14
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:26 -05:00
Lennert Buytenhek 49eb691c8f mwl8k: initialize the mwl8k_info_tbl table using the MWL* enums
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:26 -05:00
Lennert Buytenhek e0493a8dd6 mwl8k: inline qos field manipulation functions
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:25 -05:00
Lennert Buytenhek 74726e7292 mwl8k: get rid of the AMSDU check in the transmit path
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:25 -05:00
Lennert Buytenhek 99200a992e mwl8k: hw is never NULL in mwl8k_set_radio_preamble()
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:24 -05:00
Lennert Buytenhek 55489b6ed6 mwl8k: firmware command code cleanup
Sort firmware commands by command code, get rid of the 802_11 substring
in all command names, and make sure that the command functions match the
firmware command names.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:31:24 -05:00
Zhu Yi 6c853da3f3 iwmc3200wifi: fix array out-of-boundary access
Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().

Cc: stable@kernel.org
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:20:07 -05:00
Roel Kluin e8a4a6df73 wl1251: timeout one too soon in wl1251_boot_run_firmware()
`loop' reaches INIT_LOOP + 1 after the loop. so if ACX_INTR_INIT_COMPLETE
occurs in the last iteration the write occurs but also the error out as if a
timeout occurred. This is probably very unlikely to ever occur.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:20:06 -05:00
Felix Fietkau 5b479a076d ath9k: fix missed error codes in the tx status check
My previous change added in:

 commit 815833e7ec
    ath9k: fix tx status reporting

was not checking all possible tx error conditions. This could possibly
lead to throughput issues due to slow rate control adaption or missed
retransmissions of failed A-MPDU frames.

This patch adds a mask for all possible error conditions and uses it
in the xmit ok check.

Cc: stable@kernel.org
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:20:03 -05:00
Luis R. Rodriguez 8b685ba9de ath9k: wake hardware during AMPDU TX actions
AMDPDU actions poke hardware for TX operation, as such
we want to turn hardware on for these actions. AMDPU RX operations
do not require hardware on as nothing is done in hardware for
those actions. Without this we cannot guarantee hardware has
been programmed correctly for each AMPDU TX action.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:20:02 -05:00
Luis R. Rodriguez 5f70a88f63 ath9k: wake hardware for interface IBSS/AP/Mesh removal
When we remove a IBSS/AP/Mesh interface we stop DMA
but to do this we should ensure hardware is on. Awaken
the device prior to these calls. This should ensure
DMA is stopped upon suspend and plain device removal.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:20:01 -05:00
Sujith 3867cf6a8c ath9k: fix suspend by waking device prior to stop
Ensure the device is awake prior to trying to tell hardware
to stop it. Impact of not doing this is we can likely leave
the device in an undefined state likely causing issues with
suspend and resume. This patch ensures harware is where it
should be prior to suspend.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:20:00 -05:00
Dan Carpenter befabac2d8 wl1271_cmd.c: cleanup char => u8
This is just a clean up and doesn't make a functional difference.  It keeps the
lint checkers happy.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:19:57 -05:00
Tobias Klauser 79496738eb iwlwifi: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:19:56 -05:00
Tobias Klauser 83bd11a06d ath9k: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:19:55 -05:00
Johannes Berg 671adc93b6 wireless: remove remaining qual code
This removes the remaining users of the rx status
'qual' field and the field itself.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:19:45 -05:00
Gertjan van Wingerde 5e31258945 rt2x00: Add USB ID for Linksys WUSB 600N rev 2.
This is a rt2870 based device.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:13:57 -05:00
Bob Copeland 242ab7ad68 ath5k: fix SWI calibration interrupt storm
The calibration period is now invoked by triggering a software
interrupt from within the ISR by ath5k_hw_calibration_poll()
instead of via a timer.

However, the calibration interval isn't initialized before
interrupts are enabled, so we can have a situation where an
interrupt occurs before the interval is assigned, so the
interval is actually negative.  As a result, the ISR will
arm a software interrupt to schedule the tasklet, and then
rearm it when the SWI is processed, and so on, leading to a
softlockup at modprobe time.

Move the initialization order around so the calibration interval
is set before interrupts are active.  Another possible fix
is to schedule the tasklet directly from the poll routine,
but I think there are additional plans for the SWI.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 16:13:47 -05:00
Samuel Ortiz 659c8e5243 libertas: Remove carrier signaling from the scan code
There is no reason to signal a carrier off when doing a 802.11 scan.

Cc: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 15:56:33 -05:00
Andrey Borzenkov 5b0691508a orinoco: fix GFP_KERNEL in orinoco_set_key with interrupts disabled
orinoco_set_key is called from two places both with interrupts disabled
(under orinoco_lock). Use GFP_ATOMIC instead of GFP_KERNEL. Fixes following
warning:

[   77.254109] WARNING: at /home/bor/src/linux-git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x9a/0xa0()
[   77.254109] Hardware name: PORTEGE 4000
[   77.254109] Modules linked in: af_packet irnet ppp_generic slhc ircomm_tty ircomm binfmt_misc dm_mirror dm_region_hash dm_log dm_round_robin dm_multipath dm_mod loop nvram toshiba cryptomgr aead pcompress crypto_blkcipher michael_mic crypto_hash crypto_algapi orinoco_cs orinoco cfg80211 smsc_ircc2 pcmcia irda toshiba_acpi yenta_socket video i2c_ali1535 backlight rsrc_nonstatic ali_agp pcmcia_core psmouse output crc_ccitt i2c_core alim1535_wdt rfkill sg evdev ohci_hcd agpgart usbcore pata_ali libata reiserfs [last unloaded: scsi_wait_scan]
[   77.254109] Pid: 2296, comm: wpa_supplicant Not tainted 2.6.32-1avb #1
[   77.254109] Call Trace:
[   77.254109]  [<c011f0ad>] warn_slowpath_common+0x6d/0xa0
[   77.254109]  [<c014206a>] ? lockdep_trace_alloc+0x9a/0xa0
[   77.254109]  [<c014206a>] ? lockdep_trace_alloc+0x9a/0xa0
[   77.254109]  [<c011f0f5>] warn_slowpath_null+0x15/0x20
[   77.254109]  [<c014206a>] lockdep_trace_alloc+0x9a/0xa0
[   77.254109]  [<c018d296>] __kmalloc+0x36/0x130
[   77.254109]  [<dffcb6a8>] ? orinoco_set_key+0x48/0x1c0 [orinoco]
[   77.254109]  [<dffcb6a8>] orinoco_set_key+0x48/0x1c0 [orinoco]
[   77.254109]  [<dffcb9fc>] orinoco_ioctl_set_encodeext+0x1dc/0x2d0 [orinoco]
[   77.254109]  [<c035b117>] ioctl_standard_call+0x207/0x3b0
[   77.254109]  [<dffcb820>] ? orinoco_ioctl_set_encodeext+0x0/0x2d0 [orinoco]
[   77.254109]  [<c0307f1f>] ? rtnl_lock+0xf/0x20
[   77.254109]  [<c0307f1f>] ? rtnl_lock+0xf/0x20
[   77.254109]  [<c02fb115>] ? __dev_get_by_name+0x85/0xb0
[   77.254109]  [<c035b616>] wext_handle_ioctl+0x176/0x200
[   77.254109]  [<dffcb820>] ? orinoco_ioctl_set_encodeext+0x0/0x2d0 [orinoco]
[   77.254109]  [<c030020f>] dev_ioctl+0x6af/0x730
[   77.254109]  [<c02eec65>] ? move_addr_to_kernel+0x55/0x60
[   77.254109]  [<c02eed59>] ? sys_sendto+0xe9/0x130
[   77.254109]  [<c02ed77e>] sock_ioctl+0x7e/0x250
[   77.254109]  [<c02ed700>] ? sock_ioctl+0x0/0x250
[   77.254109]  [<c019cf4c>] vfs_ioctl+0x1c/0x70
[   77.254109]  [<c019d1fa>] do_vfs_ioctl+0x6a/0x590
[   77.254109]  [<c0178e50>] ? might_fault+0x90/0xa0
[   77.254109]  [<c0178e0a>] ? might_fault+0x4a/0xa0
[   77.254109]  [<c02ef90e>] ? sys_socketcall+0x17e/0x280
[   77.254109]  [<c019d759>] sys_ioctl+0x39/0x60
[   77.254109]  [<c0102e3b>] sysenter_do_call+0x12/0x32
[   77.254109] ---[ end trace 95ef563548d21efd ]---

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-28 15:55:47 -05:00
John W. Linville ea1e4b8420 Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2009-12-28 15:09:11 -05:00
Octavian Purdila bf9ae5386b llc: use dev_hard_header
Using dev_hard_header allows us to use LLC with VLANs and potentially
other Ethernet/TokernRing specific encapsulations. It also removes code
duplication between LLC and Ethernet/TokenRing core code.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-26 20:38:23 -08:00
David S. Miller d346f49d0b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-12-25 16:34:56 -08:00
Scott Feldman d87fd25d5a enic: whitespace cleanup; #define cleanup; more verbose err msg
Some misc changes to cleanup whitespace issues and fix/remove some #define
HW defintions.

1) fix some whitespace issues
2) more verbose err msg when resources aren't available to configure vnic
3) remove unused #define
4) fix RSS #define rss hash types

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 21:03:42 -08:00
Scott Feldman 7c84459911 enic: feature add: add ethtool -c/C support
Only rx_usec and tx_usec options for ethtool -C are settable as those
are the only settings that make sense to HW.  Adds driver reporting of
intr coalescing timer value in usec units rather than HW units.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 21:03:41 -08:00
Scott Feldman bd2496229e enic: Bug fix: align desc ring sizes to 32 descs
Previous driver was aligning ring sizes to 16 descs, but hardware actually
wants desc ring sizes to be aligned to 32 descs.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 21:03:41 -08:00
Scott Feldman 9959a18556 enic: minimize pkt filter updates to firmware
In set_multicast(), only push pkt filter changes down to firmware if
pkt filter actually changes.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 21:03:40 -08:00
Scott Feldman 2d6ddced5c enic: Bug fix: try harder to fill Rx ring on skb allocation failures
During dev->open(), make sure we get at least one skb on the Rx ring.
Otherwise abort the interface load.  Also, if we get skb allocation
failures in NAPI poll while trying to replenish the ring, try again
later so we don't end up starving out the Rx ring completely.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 21:03:40 -08:00
Scott Feldman b3d18d191b enic: Bug fix: use safe queue shutdown in dev->stop
Fix dev->stop shutdown bug where driver was stopping xmit queue and then
disabling intrs.  Fix is to disable intrs first and then stop the xmit
queue, otherwise an interrupt could cause the queue to be rewoken.  Also,
no need to explicitly do queue servicing because queues are cleaned and
reset back to initial state at end of dev->stop.  Servicing queues also
had the side-effect of also rewakening the xmit queue, which is not what
we want.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 21:03:39 -08:00
Tomas Winkler fe45332ed2 iwmc3200top: simplify imwct_tx
1. remove address argument since we use same address IWMC_SDIO_DATA_ADDR in
    all cases
2. add __iwmct_tx - non locking tx function for already locked contexts

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:32 -08:00
Tomas Winkler 0df828f670 iwmc3200top: cleanup log messages
1. add TRACE level
2. use TRACE where needed to reduce the noise
3  don't INFOEX from driver
4. add DUMP level for packets dumps
5. use correct context for the log messages

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:31 -08:00
Tomas Winkler 9fa4d67c6e iwmc3200top: clean up fw_download
1. removed redundant NULL-pointers checks in iwmct_fw_load
as release_firmware and kfree are NULL pointer friendly
2. remove redundant memset of the parser since the structure
is fully initialized in iwmct_fw_parser_init function

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:31 -08:00
Amit Kumar Salecha 7ef8a2127a netxen: fix unified fw size check
o Unified firmware image size can be < 1 MB

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:27 -08:00
Amit Kumar Salecha e87ad55393 netxen: support pci error handlers
o Support pci error detection and recovery.
o Refactor suspend and resume code, to share with io_error_detected,
  and slot_reset callbacks
o NX_NEED_AER device state added, to synchronize with firmware
  recovery.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:27 -08:00
Amit Kumar Salecha 6a808c6c02 netxen: fix tx timeout recovery
o In case of tx timeout, firmare may be healthy, but some pci-func may
  see no response from it. Force firmware reset, if some pci-func
  explicitly requests so.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:26 -08:00
Amit Kumar Salecha bc86fcbac0 netxen: minor suspend resume fixes
o pci device should be disable at the end and it should be enable first.
o Interface should be attached(netif_device_attach()) irrespective
  of its state.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:26 -08:00
David S. Miller b4de921ae6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-23 14:09:17 -08:00
Linus Torvalds 17a3be341e 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: (30 commits)
  USB: Fix a bug on appledisplay.c regarding signedness
  USB: option: support hi speed for modem Haier CE100
  USB: audio gadget: free alsa devices when unloading
  USB: audio gadget: fix wTotalLength calculation
  usb: otg: isp1301_omap: fix compile error
  USB: musb: workaround Blackfin FIFO anomalies
  USB: musb: Fix array index out of bounds issue
  USB: musb: Fix null pointer dereference issue
  USB: musb: correct DMA address for tx
  USB: musb: gadget_ep0: avoid SetupEnd interrupt
  USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled
  USB: musb: do not work if no gadget driver is loaded
  USB: musb: gadget: set otg tranceiver to idle when registering gadget
  USB: musb: Populate the VBUS GPIO with the correct GPIO number
  USB: musb: MAINTAINERS: Fix my tree's address
  USB: musb: fix compiling warning with min() macro
  USB: musb: move musb_remove to __exit
  USB: musb_gadget: fix kernel oops in txstate()
  USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header
  USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header
  ...
2009-12-23 13:35:19 -08:00
Linus Torvalds f793067eb9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  devtmpfs: unlock mutex in case of string allocation error
  Driver core: export platform_device_register_data as a GPL symbol
  driver core: Prevent reference to freed memory on error path
  Driver-core: Fix bogus 0 error return in device_add()
  Driver core: driver_attribute parameters can often be const*
  Driver core: bin_attribute parameters can often be const*
  Driver core: device_attribute parameters can often be const*
  Doc/stable rules: add new cherry-pick logic
  vfs: get_sb_single() - do not pass options twice
  devtmpfs: Convert dirlock to a mutex
2009-12-23 13:35:03 -08:00
pancho horrillo 37e9066b2f USB: Fix a bug on appledisplay.c regarding signedness
brightness status is reported by the Apple Cinema Displays as an
'unsigned char' (u8) value, but the code used 'char' instead.

Note that he driver was developed on the PowerPC architecture,
where the two types are synonymous, which is not always the case.

Fixed that.  Otherwise the driver will interpret brightness
levels > 127 as negative, and fail to load.

Signed-off-by: pancho horrillo <pancho@pancho.name>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:20 -08:00
Donny Kurnia c983202bd0 USB: option: support hi speed for modem Haier CE100
I made this patch for usbserial driver to add the support for EVDO modem
Haier CE100. The bugs report for this is here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/490068

This patch based on these post:
http://blankblondtank.wordpress.com/2009/09/04/mengoptimalkan-koneksi-modem-haier-ce-100-cdma-di-linux/
http://tantos.web.id/blogs/how-to-internet-connection-using-cdma-evdo-modem-and-karmic-koala-ubuntu-9-10

I hope this patch can help other that have the Haier C100 modem, mostly in my country, Indonesia.

Signed-off-by: Donny Kurnia <donnykurnia@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:20 -08:00
Cliff Cai feef1d952e USB: audio gadget: free alsa devices when unloading
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:20 -08:00
Cliff Cai d16f172622 USB: audio gadget: fix wTotalLength calculation
The wTotalLength should contain the sum of the interface and unit
descriptor sizes per the Audio Device Class specification 1.0.

Reported-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:19 -08:00
Felipe Balbi 465f8294ee usb: otg: isp1301_omap: fix compile error
commit 91c8a5a998 broke
compilation of this driver after it introduced
otg_init() as a static inline in <linux/usb/otg.h>

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:19 -08:00
Bryan Wu 1c4bdc01b8 USB: musb: workaround Blackfin FIFO anomalies
Some of these workarounds are already in place, but labeled as affecting
all BF52x parts.  Since we have official anomaly numbers now, use those
defines.  And since writing to the FIFO has a similar hang issue as reading
from the FIFO, implement the workaround there too when necessary.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:19 -08:00
Maulik Mankad 0ea52ff44f USB: musb: Fix array index out of bounds issue
This patch fixes the below array index out of bounds issue.

Buffer overflow, array index of 'aInfo' may be out of
bounds. Array 'aInfo' of size 78 may use index value(s) 6..84

The data stored in 'aInfo' array exceeds the array size of 78.

This patch increases the size of this array to hold the string
correctly without any memory corruption.

This issue was reported by Klockwork tool.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:19 -08:00
Maulik Mankad 0abdc36f06 USB: musb: Fix null pointer dereference issue
This patch fixes the following NULL pointer dereference issue.

Pointer 'request' returned from call to function 'next_request'
at line 748 may be NULL and may be dereferenced at line 792.

============
Code Snippet
============

748:  request = next_request(musb_ep);
785: if (dma && (csr & MUSB_RXCSR_DMAENAB)) {
	csr &= ~(MUSB_RXCSR_AUTOCLEAR
			| MUSB_RXCSR_DMAENAB
			| MUSB_RXCSR_DMAMODE);
	musb_writew(epio, MUSB_RXCSR,
		MUSB_RXCSR_P_WZC_BITS | csr);

792:	 request->actual += musb_ep->dma->actual_len;
		

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:19 -08:00
Cliff Cai 796a83fa03 USB: musb: correct DMA address for tx
Since a DMA transfer may need to be kicked off several times to complete,
the DMA start must include the length that has already been transferred.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:18 -08:00
Sergei Shtylyov 17be5c5f5e USB: musb: gadget_ep0: avoid SetupEnd interrupt
Gadget stalling a zero-length SETUP request results in this error message:

SetupEnd came in a wrong ep0stage idle

In order to avoid it, always set the CSR0.DataEnd bit after detecting a zero-
length request.  Add the missing '\n' to the error message itself as well...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:18 -08:00
Swaminathan S 93aa3dab00 USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled
Race condition exists between the cppi_interrupt handler and
davinci_interrupt handler w.r.t completing a TX IO.  Since DM646x
has seperate DMA and USB endpoint interrupts cppi_interrupt handler
needs to hold the lock while operating on the endpoint.

Update over previous patch to avoid taking the lock if already
taken.  Tested on DM644x, DM355 and DM646x platforms.

Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:17 -08:00
Felipe Balbi cd42fef0a0 USB: musb: do not work if no gadget driver is loaded
On OTG and gadget-only configurations, we need a gadget driver
in order to work properly, so avoid changing operation modes
when there's no gadget driver loaded.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:17 -08:00
Arnaud Mandy d4c433fe6f USB: musb: gadget: set otg tranceiver to idle when registering gadget
When registering gadget driver, the state of the transceiver
must be set from undefined (no gadget) to b_idle.

Module unload sets the transceiver state to undefined state.
After the first load/unload pair, the reset irq will be lost.

Signed-off-by: Arnaud Mandy <ext-arnaud.2.mandy@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:17 -08:00
Swaminathan S a2396a32b8 USB: musb: Populate the VBUS GPIO with the correct GPIO number
This fixes a null-pointer dereference bug.

Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:13 -08:00
Cliff Cai f95c4c0186 USB: musb: fix compiling warning with min() macro
Current musb gadget dma code produces the warning:
drivers/usb/musb/musb_gadget.c: In function 'txstate':
drivers/usb/musb/musb_gadget.c:312: warning: comparison of distinct
                                             pointer types lacks a cast

So switch to min_t(size_t, ...).

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:13 -08:00
Felipe Balbi e3060b175c USB: musb: move musb_remove to __exit
probe() already was on __init, so moving remove() to __exit.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:13 -08:00
Sergei Shtylyov 95962a773c USB: musb_gadget: fix kernel oops in txstate()
Commit 7723de7e19 (USB: musb_gadget: remove
pointless loop) included uncalled for (and incorrect) optimization that
might cause a kernel oops in txstate() -- undo it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:12 -08:00
Andreas Mohr 4e092d110f USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header
This is a (almost) sort-only patch to sort FTDI device
product ID definitions in new ftdi_sio_ids.h header.

Advantage is that new device ID submissions will now have a specific (sorted)
position - less future merge conflicts.

Compile-tested, based on _current_ mainline git.
Minor checkpatch.pl warnings were eliminated whereever it made sense,
very minor text changes.


Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:12 -08:00
Andreas Mohr 31844d5580 USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header
This is a strictly move-only patch to relocate all FTDI device
product ID definitions to their own ftdi_sio_ids.h header
(following the usual *_ids.h kernel tree convention, too),
thus correcting the slightly too messy appearance
(crucial driver defines were stuck somewhere in the decaying middle swamp
of the huge existing header).

Compile-tested, based on latest mainline git.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:12 -08:00
Randy Dunlap 70445ae6c6 USB core: fix recent kernel-doc warnings
Fix new kernel-doc warnings in usb core:

Warning(drivers/usb/core/usb.c:79): No description found for parameter 'config'
Warning(drivers/usb/core/usb.c:79): No description found for parameter 'iface_num'
Warning(drivers/usb/core/usb.c:79): No description found for parameter 'alt_num'
Warning(drivers/usb/core/hcd.c:1622): No description found for parameter 'udev'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:12 -08:00
pancho horrillo 4b372072b5 USB: add device ID for Apple Cinema Display 23in 2007
Hi!

$ lsusb -v
Bus 001 Device 008: ID 05ac:921c Apple, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x05ac Apple, Inc.
  idProduct          0x921c 
  bcdDevice            1.15
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      92
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              16



Signed-off-by: pancho horrillo <pancho@pancho.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:11 -08:00
Jan Beulich 40b52371be USB: fix section mismatch in early ehci dbgp
Commit 917778267f removed __init from
ehci_wait_for_port(), but left it in place on ehci_reset_port(), which
is being called from the former function.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:11 -08:00
Clemens Ladisch ac06c06770 USB: emi62: fix crash when trying to load EMI 6|2 firmware
While converting emi62 to use request_firmware(), the driver was also
changed to use the ihex helper functions.  However, this broke the loading
of the FPGA firmware because the code tries to access the addr field of
the EOF record which works with a plain array that has an empty last
record but not with the ihex helper functions where the end of the data is
signaled with a NULL record pointer, resulting in:

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<f80d248c>] emi62_load_firmware+0x33c/0x740 [emi62]

This can be fixed by changing the loop condition to test the return value
of ihex_next_binrec() directly (like in emi26.c).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Der Mickster <retroeffective@gmail.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:11 -08:00
Blaise Gassend 27f1281d5f USB: serial: Extra device/vendor ID for mos7840 driver
Signed-off-by: Blaise Gassend <blaise.gasend_linux@m4x.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:10 -08:00
Bill Gatliff 179192d38e USB: Fix double-linking of drivers/usb/otg when ULPI is selected
This patch corrects a problem where drivers/usb/otg is linked twice
if CONFIG_USB_ULPI is selected, resulting in a build error (symbol
conflict). The files in that directory are properly linked already
as part of CONFIG_USB, and need not be indicated specifically for
CONFIG_USB_ULPI.

Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:10 -08:00
Julia Lawall ff3b968cee USB: gadget: Use ERR_PTR/IS_ERR
Use ERR_PTR and IS_ERR rather than mixing integers and pointers.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression *E;
@@

* E < 0
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:10 -08:00
Alan Stern da307123c6 USB: fix bugs in usb_(de)authorize_device
This patch (as1315) fixes some bugs in the USB core authorization
code:

	usb_deauthorize_device() should deallocate the device strings
	instead of leaking them, and it should invoke
	usb_destroy_configuration() (which does proper reference
	counting) instead of freeing the config information directly.

	usb_authorize_device() shouldn't change the device strings
	until it knows that the authorization will succeed, and it should
	autosuspend the device at the end (having autoresumed the
	device at the start).

	Because the device strings can be changed, the sysfs routines
	to display the strings must protect the string pointers by
	locking the device.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Acked-by: David Vrabel <david.vrabel@csr.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:10 -08:00
Alan Stern 8d8558d108 USB: rename usb_configure_device
This patch (as1314) renames usb_configure_device() and
usb_configure_device_otg() in the hub driver.  Neither name is
appropriate because these routines enumerate devices, they don't
configure them.  That's handled by usb_choose_configuration() and
usb_set_configuration().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:34:09 -08:00
Randy Dunlap b2cd41496c Staging/vt66*: kconfig, depends on WLAN
The vt665[56] drivers can be built when CONFIG_NET=n &
CONFIG_NETDEVICES=n or just when CONFIG_WLAN=n.
This leads to build failures.
Prevent this by making them depend on WLAN.

[This patch was lost in a dualing trees merge;
still needs to be re-applied.]

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:50 -08:00
Julia Lawall e281cf8966 Staging: batman-adv: introduce missing kfree
Error handling code following a kzalloc should free the allocated data.
Similarly for usb-alloc urb.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:50 -08:00
Andrew Lunn ae67491ea0 Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:49 -08:00
Peter Huewe ae08961a99 Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig
In panel.c there are only the values 0-3 defined. So 4 is invalid:

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:49 -08:00
Peter Huewe a6a6c90804 Staging: panel: Fix compilation error with custom lcd charset
When compiling panel.c with a DEFAULT_LCD_CHARSET it fails to compile
with the following error message:
drivers/staging/panel/panel.c: In function >>lcd_init<<:
drivers/staging/panel/panel.c:1396: error: expected expression before
>>;<< token
drivers/staging/panel/panel.c:1475: error: expected expression before
>>;<< token
make[3]: *** [drivers/staging/panel/panel.o] error 1
make[2]: *** [drivers/staging/panel] error 2
make[1]: *** [drivers/staging] error 2

The config used was:
CONFIG_PANEL=m
CONFIG_PANEL_PARPORT=0
CONFIG_PANEL_PROFILE=0
CONFIG_PANEL_KEYPAD=0
CONFIG_PANEL_LCD=1
CONFIG_PANEL_LCD_HEIGHT=2
CONFIG_PANEL_LCD_WIDTH=20
CONFIG_PANEL_LCD_BWIDTH=40
CONFIG_PANEL_LCD_HWIDTH=64
CONFIG_PANEL_LCD_CHARSET=0
CONFIG_PANEL_LCD_PROTO=0
CONFIG_PANEL_LCD_PIN_E=14
CONFIG_PANEL_LCD_PIN_RS=17
CONFIG_PANEL_LCD_PIN_RW=16
CONFIG_PANEL_LCD_PIN_BL=0

This patch fixes both errors, as it fixes the define
Patch against current linux-next tree at Tue Dec 15 06:07:01 2009 +0100

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:49 -08:00
Nitin Gupta 30fb8a7141 Staging: ramzswap: remove ARM specific d-cache hack
Remove d-cache hack in ramzswap driver that was needed
to workaround a bug in ARM version of update_mmu_cache()
which caused stale data in d-cache to be transferred to
userspace. This bug was fixed by git commit:
	787b2faadc
This also brings down one entry in TODO file.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:49 -08:00
Randy Dunlap 3d8affc001 Staging: rtl8192x: fix printk formats
Fix printk format warnings in rtl8192[eu]:

drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c:979: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:385: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:484: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:614: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:848: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:343: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:442: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:572: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:48 -08:00
Julia Lawall 4068fe8b2a Staging: wlan-ng: fix Correct size given to memset
Memset should be given the size of the structure, not the size of the pointer.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
T *x;
expression E;
@@

memset(x, E, sizeof(
+ *
 x))
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:48 -08:00
Stephane Glondu 488d374962 staging: rtl8192su: add USB VID/PID for HWNUm-300
The Hercules Wireless N USB mini (HWNUm-300) uses the RTL8191S chipset
and seems to work with this driver.

Signed-off-by: Stephane Glondu <steph@glondu.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:47 -08:00
George Kadianakis 55c7d5fc18 staging: fix rtl8192su compilation errors with mac80211
This patch series fixes compilation problems that were caused by
function naming conflicts between the rtl8192su driver and the
mac80211 stack.

Signed-off-by: George Kadianakis <desnacked at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:47 -08:00
George Kadianakis fb5fe2776d staging: fix rtl8192e compilation errors with mac80211
This patch series fixes compilation problems that were caused by
function naming conflicts between the rtl8192e driver and the
mac80211 stack.

Signed-off-by: George Kadianakis <desnacked at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:46 -08:00
George Kadianakis df574b8ecf Staging: fix rtl8187se compilation errors with mac80211
This patch fixes compilation problems that were caused by function
naming conflicts between the rtl8187se driver and the mac80211 stack.

Signed-off-by: George Kadianakis <desnacked at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:46 -08:00
Roel Kluin aad445f8cc Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr()
The error tested for is negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:46 -08:00
Ian Abbott fa5c5f4ce0 Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.
For the JR3/PCI cards, the size of the PCIBAR0 region depends on the
number of channels.  Don't try and ioremap space for 4 channels if the
card has fewer channels.  Also check for ioremap failure.

Thanks to Anders Blomdell for input and Sami Hussein for testing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:46 -08:00
Bernd Porr d103bef451 Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
The flag COMEDI_CB_BLOCK was marked as "depricated in the header file".
However, this flag is important to wake up the data-reader (and writer)
after new data has arrived from(for) the DAQ card.


Signed-off-by: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:45 -08:00
Bernd Porr d4c3a56587 Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty
Jan-Matthias Braun spotted a bug which locks up the driver when the
comedi ring buffer runs empty and provided a patch. The driver would
still send the data to comedi but the reader won't wake up any more.
What's required is setting the flag COMEDI_CB_BLOCK after new data has
arrived which wakes up the reader and therefore the read() command.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:45 -08:00
Greg Kroah-Hartman 29d249ed80 Staging: dst: remove from the tree
DST is dead, no one is using it and upstream
has abandoned it, so remove it from the tree because
it is not going anywhere.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:45 -08:00
Wu Zhangjin d7edf47947 Staging: sm7xx: add a new framebuffer driver
Yeeloong netbook has a sm712 video card, need this driver, but it is not
ready to upstream yet, so, go to drivers/staing at first.

This source code is originally from Silicon Motion Technology Corp, and
maintained at http://dev.lemote.com/code/linux_loongson for YeeLoong
netbook. I have done a lot of cleanups for it and merged it into my git
repository at http://dev.lemote.com/code/rt4ls.

Thanks to Simon for testing it on a little-endian x86 platform.

Thanks to Olivier Croset <olivier.croset@actis-computer.com> for
reporting the problem about __BIG_ENDIAN compiling problem and send a
relative patch.

The suspend/resume and blank support are contributed by Jason from
Silicon Motion Technology.

Tested-by: Simon Braunschmidt <sbraun@emlix.com>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:44 -08:00
Kay Sievers 8042273801 devtmpfs: unlock mutex in case of string allocation error
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:23:44 -08:00
Michael Hennerich 0787fdf70b Driver core: export platform_device_register_data as a GPL symbol
This allows MFD's to register/bind drivers for their sub devices while
still being compiled as a module.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:23:44 -08:00
Phil Carmody 99b28f1b41 driver core: Prevent reference to freed memory on error path
priv is drv->p. So only free drv->p after we've finished using priv.

Found using a static code analysis tool

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:23:44 -08:00