Commit graph

178394 commits

Author SHA1 Message Date
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
laurent chavey 31d12926e3 net: Add rtnetlink init_rcvwnd to set the TCP initial receive window
Add rtnetlink init_rcvwnd to set the TCP initial receive window size
advertised by passive and active TCP connections.
The current Linux TCP implementation limits the advertised TCP initial
receive window to the one prescribed by slow start. For short lived
TCP connections used for transaction type of traffic (i.e. http
requests), bounding the advertised TCP initial receive window results
in increased latency to complete the transaction.
Support for setting initial congestion window is already supported
using rtnetlink init_cwnd, but the feature is useless without the
ability to set a larger TCP initial receive window.
The rtnetlink init_rcvwnd allows increasing the TCP initial receive
window, allowing TCP connection to advertise larger TCP receive window
than the ones bounded by slow start.

Signed-off-by: Laurent Chavey <chavey@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:30 -08:00
Krishna Kumar 068a2de57d net: release dst entry while cache-hot for GSO case too
Non-GSO code drops dst entry for performance reasons, but
the same is missing for GSO code. Drop dst while cache-hot
for GSO case too.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:30 -08:00
Krishna Kumar def87cf420 tcp: Slightly optimize tcp_sendmsg
Slightly optimize tcp_sendmsg since NETIF_F_SG is used many
times iteratively in the loop. The only other modification is
to change:
			} else if (i == MAX_SKB_FRAGS ||
				   (!i &&
				   !(sk->sk_route_caps & NETIF_F_SG))) {
	to:
			} else if (i == MAX_SKB_FRAGS || !sg) {

The reason why this change is correct: this code (other than
the MAX_SKB_FRAGS case) executes only due to the else part
of: "if (skb_tailroom(skb) > 0) {" - i.e. there was no space
in the skb to put the data inline. Hence SG is false is a
sufficient condition, and there is no way a fragment can be
added to the skb.

Changelog:
	- Added the above explanation for the change

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:29 -08:00
Krishna Kumar afeca340c0 tcp: Remove unrequired operations in tcp_push()
Remove unrequired operations in tcp_push()

Changelog:
	Removed a temporary skb variable from tcp_push()

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:28 -08:00
Krishna Kumar 12d50c46dc tcp: Remove check in __tcp_push_pending_frames
tcp_push checks tcp_send_head and calls __tcp_push_pending_frames,
which again checks tcp_send_head, and this unnecessary check is
done for every other caller of __tcp_push_pending_frames.

Remove tcp_send_head check in __tcp_push_pending_frames and add
the check to tcp_push_pending_frames. Other functions call
__tcp_push_pending_frames only when tcp_send_head would evaluate
to true.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23 14:13:28 -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
Linus Torvalds f988dac7fe Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging/vt66*: kconfig, depends on WLAN
  Staging: batman-adv: introduce missing kfree
  Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET.
  Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig
  Staging: panel: Fix compilation error with custom lcd charset
  Staging: ramzswap: remove ARM specific d-cache hack
  Staging: rtl8192x: fix printk formats
  Staging: wlan-ng: fix Correct size given to memset
  staging: rtl8192su: add USB VID/PID for HWNUm-300
  staging: fix rtl8192su compilation errors with mac80211
  staging: fix rtl8192e compilation errors with mac80211
  Staging: fix rtl8187se compilation errors with mac80211
  Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr()
  Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.
  Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
  Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty
  Staging: dst: remove from the tree
  Staging: sm7xx: add a new framebuffer driver
  Staging: batman: fix debug Kconfig option
2009-12-23 13:34:26 -08:00
Linus Torvalds 849254e9bb Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2: Set i_nlink properly during reflink.
  ocfs2: Add reflinked file's inode to inode hash eariler.
  ocfs2: refcounttree.c cleanup.
  ocfs2: Find proper end cpos for a leaf refcount block.
2009-12-23 13:33:07 -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
Felipe Balbi 8a700f3d0d USB: musb: MAINTAINERS: Fix my tree's address
The tree is now on a new address.

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
Alan Stern baf67741bf USB: power management documentation update
This patch (as1313) updates the documentation concerning USB power
management.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
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