1. 04 Feb, 2011 15 commits
    • Arvid Ephraim Picciani's avatar
      USB: cdc-acm: Adding second ACM channel support for Nokia N8 · 721d92fc
      Arvid Ephraim Picciani authored
      This adds the N8 to the list of devices in cdc-acm, in order to get the
      secondary ACM device exposed.
      
      In the spirit of:
      http://kerneltrap.org/mailarchive/linux-usb/2010/9/4/6264554Signed-off-by: default avatarArvid Ephraim Picciani <arvid.picciani@nokia.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      721d92fc
    • Jesper Juhl's avatar
      USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct · a283c03a
      Jesper Juhl authored
      Trying to compile drivers/usb/gadget/f_mass_storage.o currently fails and
      spews a ton of warnings :
      
        CC      drivers/usb/gadget/f_mass_storage.o
      drivers/usb/gadget/f_mass_storage.c:436:22: error: field ‘function’ has incomplete type
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_from_func’:
      drivers/usb/gadget/f_mass_storage.c:466:9: warning: type defaults to ‘int’ in declaration of ‘__mptr’
      drivers/usb/gadget/f_mass_storage.c:466:9: warning: initialization from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:2743:15: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:2743:15: warning: its scope is only this definition or declaration, which is probably not what you want
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_common_init’:
      drivers/usb/gadget/f_mass_storage.c:2745:34: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:2775:23: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:2779:3: error: implicit declaration of function ‘usb_string_id’
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:2984:60: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3003:57: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_bind’:
      drivers/usb/gadget/f_mass_storage.c:3006:31: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3013:2: error: implicit declaration of function ‘usb_interface_id’
      drivers/usb/gadget/f_mass_storage.c:3033:3: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3034:6: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3043:4: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3044:7: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3045:26: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:3067:14: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3067:14: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_bind_config’:
      drivers/usb/gadget/f_mass_storage.c:3093:2: error: implicit declaration of function ‘usb_add_function’
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:3103:9: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3103:9: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_add’:
      drivers/usb/gadget/f_mass_storage.c:3105:2: warning: passing argument 1 of ‘fsg_bind_config’ from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c:3065:12: note: expected ‘struct usb_composite_dev *’ but argument is of type ‘struct usb_composite_dev *’
      drivers/usb/gadget/f_mass_storage.c:3105:2: warning: passing argument 2 of ‘fsg_bind_config’ from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c:3065:12: note: expected ‘struct usb_configuration *’ but argument is of type ‘struct usb_configuration *’
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:3190:23: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3195:23: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3193:1: error: conflicting types for ‘fsg_common_from_params’
      drivers/usb/gadget/f_mass_storage.c:3188:1: note: previous declaration of ‘fsg_common_from_params’ was here
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_common_from_params’:
      drivers/usb/gadget/f_mass_storage.c:3199:2: warning: passing argument 2 of ‘fsg_common_init’ from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c:2741:27: note: expected ‘struct usb_composite_dev *’ but argument is of type ‘struct usb_composite_dev *’
      make[1]: *** [drivers/usb/gadget/f_mass_storage.o] Error 1
      make: *** [drivers/usb/gadget/f_mass_storage.o] Error 2
      
      This is due to the missing include of linux/usb/composite.h - this patch
      adds the missing include.
      
      In addition there's also a problem in fsg_common_init() where we memset
      'common', but we use the size of a pointer to 'struct fsg_common' as the
      size argument to memset(), not the actual size of the struct. This patch
      fixes the sizeof so we zero the entire struct as intended.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a283c03a
    • Pavankumar Kondeti's avatar
      USB: Fix trout build failure with ci13xxx_msm gadget · 8cf28f1f
      Pavankumar Kondeti authored
      This patch fixes the below compilation errors.
      
        CC      drivers/usb/gadget/ci13xxx_msm.o
        CC      net/mac80211/led.o
        drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
        drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function)
        drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once
        drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.)
        drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
      make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
      make[3]: *** [drivers/usb/gadget] Error 2
      
      MSM USB driver is not supported on boards like trout (MSM7201) which
      has an external PHY.
      Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8cf28f1f
    • Yin Kangkai's avatar
      USB: EHCI: fix scheduling while atomic during suspend · 148fc55f
      Yin Kangkai authored
      There is a msleep with spin lock held during ehci pci suspend, which will
      cause kernel BUG: scheduling while atomic. Fix that.
      
      [  184.139620] BUG: scheduling while atomic: kworker/u:11/416/0x00000002
      [  184.139632] 4 locks held by kworker/u:11/416:
      [  184.139640]  #0:  (events_unbound){+.+.+.}, at: [<c104ddd4>] process_one_work+0x1b3/0x4cb
      [  184.139669]  #1:  ((&entry->work)){+.+.+.}, at: [<c104ddd4>] process_one_work+0x1b3/0x4cb
      [  184.139686]  #2:  (&__lockdep_no_validate__){+.+.+.}, at: [<c127cde3>] __device_suspend+0x2c/0x154
      [  184.139706]  #3:  (&(&ehci->lock)->rlock){-.-...}, at: [<c132f3d8>] ehci_pci_suspend+0x35/0x7b
      [  184.139725] Modules linked in: serio_raw pegasus joydev mrst_gfx(C) battery
      [  184.139748] irq event stamp: 52
      [  184.139753] hardirqs last  enabled at (51): [<c14fdaac>] mutex_lock_nested+0x258/0x293
      [  184.139766] hardirqs last disabled at (52): [<c14fe7b4>] _raw_spin_lock_irqsave+0xf/0x3e
      [  184.139777] softirqs last  enabled at (0): [<c10371c1>] copy_process+0x3d2/0x109d
      [  184.139789] softirqs last disabled at (0): [<  (null)>]   (null)
      [  184.139802] Pid: 416, comm: kworker/u:11 Tainted: G         C  2.6.37-6.3-adaptation-oaktrail #37
      [  184.139809] Call Trace:
      [  184.139820]  [<c102eeff>] __schedule_bug+0x5e/0x65
      [  184.139829]  [<c14fbca5>] schedule+0xac/0xc4c
      [  184.139840]  [<c11d4845>] ? string+0x37/0x8b
      [  184.139853]  [<c1044f21>] ? lock_timer_base+0x1f/0x3e
      [  184.139863]  [<c14fe7da>] ? _raw_spin_lock_irqsave+0x35/0x3e
      [  184.139876]  [<c1061590>] ? trace_hardirqs_off+0xb/0xd
      [  184.139885]  [<c14fccdc>] schedule_timeout+0x283/0x2d9
      [  184.139896]  [<c104516f>] ? process_timeout+0x0/0xa
      [  184.139906]  [<c14fcd47>] schedule_timeout_uninterruptible+0x15/0x17
      [  184.139916]  [<c104566a>] msleep+0x10/0x16
      [  184.139926]  [<c132f316>] ehci_adjust_port_wakeup_flags+0x69/0xf6
      [  184.139937]  [<c132f3eb>] ehci_pci_suspend+0x48/0x7b
      [  184.139946]  [<c1326587>] suspend_common+0x52/0xbb
      [  184.139956]  [<c1326625>] hcd_pci_suspend+0x26/0x28
      [  184.139967]  [<c11e7182>] pci_pm_suspend+0x5f/0xd0
      [  184.139976]  [<c127ca3a>] pm_op+0x5d/0xf0
      [  184.139986]  [<c127ceac>] __device_suspend+0xf5/0x154
      [  184.139996]  [<c127d2c8>] async_suspend+0x16/0x3a
      [  184.140006]  [<c1058f54>] async_run_entry_fn+0x89/0x111
      [  184.140016]  [<c104deb6>] process_one_work+0x295/0x4cb
      [  184.140026]  [<c1058ecb>] ? async_run_entry_fn+0x0/0x111
      [  184.140036]  [<c104e3d0>] worker_thread+0x17f/0x298
      [  184.140045]  [<c104e251>] ? worker_thread+0x0/0x298
      [  184.140055]  [<c105277f>] kthread+0x64/0x69
      [  184.140064]  [<c105271b>] ? kthread+0x0/0x69
      [  184.140075]  [<c1002efa>] kernel_thread_helper+0x6/0x1a
      Signed-off-by: default avatarYin Kangkai <kangkai.yin@intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <dbrownell@users.sourceforge.net>
      CC: stable@kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      148fc55f
    • Greg Kroah-Hartman's avatar
      Merge branch 'for-greg' of git://gitorious.org/usb/usb into usb-next · 4e8ed7e4
      Greg Kroah-Hartman authored
      * 'for-greg' of git://gitorious.org/usb/usb:
        usb: ehci-omap: Show fatal probing time errors to end user
        usb: musb: introduce api for dma code to check compatibility with usb request
        usb: musb: maintain three states for buffer mappings instead of two
        usb: musb: disable double buffering when it's broken
        usb: musb: hsdma: change back to use musb_read/writew
        usb: musb: core: fix IRQ check
        usb: musb: fix kernel panic during s2ram(v2)
      4e8ed7e4
    • Alan Stern's avatar
      USB: usb-storage: unusual_devs entry for Coby MP3 player · 3ea3c9b5
      Alan Stern authored
      This patch (as1444) adds an unusual_devs entry for an MP3 player from
      Coby electronics.  The device has two nasty bugs.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Tested-by: default avatarJasper Mackenzie <scarletpimpernal@hotmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3ea3c9b5
    • Michael Williamson's avatar
      USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph · 28fe2eb0
      Michael Williamson authored
      Add the USB Vendor ID and Product ID for a Acton Research Corp.
      spectrograph device with a FTDI chip for serial I/O.
      Signed-off-by: default avatarMichael H Williamson <michael.h.williamson@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      28fe2eb0
    • Alan Stern's avatar
      USB: fix race between root-hub resume and wakeup requests · bf3d7d40
      Alan Stern authored
      The USB core keeps track of pending resume requests for root hubs, in
      order to resolve races between wakeup requests and suspends.  However
      the code that does this is subject to another race (between wakeup
      requests and resumes) because the WAKEUP_PENDING flag is cleared
      before the resume occurs, leaving a window in which another wakeup
      request might arrive.
      
      This patch (as1447) fixes the problem by clearing the WAKEUP_PENDING
      flag after the resume instead of before it.
      
      This fixes Bugzilla #24952.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Tested-by: default avatarPaul Bender <pebender@san.rr.com>
      Tested-by: default avatarwarpme <warpme@o2.pl>
      Cc: stable <stable@kernel.org> [.36+]
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bf3d7d40
    • Alan Stern's avatar
      USB: prevent buggy hubs from crashing the USB stack · d199c96d
      Alan Stern authored
      If anyone comes across a high-speed hub that (by mistake or by design)
      claims to have no Transaction Translators, plugging a full- or
      low-speed device into it will cause the USB stack to crash.  This
      patch (as1446) prevents the problem by ignoring such devices, since
      the kernel has no way to communicate with them.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Tested-by: default avatarPerry Neben <neben@vmware.com>
      CC: <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d199c96d
    • Yusuke Goda's avatar
      usb: r8a66597-udc: Fixed bufnum of Bulk · 6d86d52a
      Yusuke Goda authored
      Signed-off-by: default avatarYusuke Goda <yusuke.goda.sx@renesas.com>
      Acked-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6d86d52a
    • Jean-Christophe PLAGNIOL-VILLARD's avatar
      USB: ftdi_sio: add ST Micro Connect Lite uart support · 6ec2f46c
      Jean-Christophe PLAGNIOL-VILLARD authored
      on ST Micro Connect Lite we have 4 port
      Part A and B for the JTAG
      Port C Uart
      Port D for PIO
      Signed-off-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6ec2f46c
    • Nick Holloway's avatar
      USB: Storage: Add unusual_devs entry for VTech Kidizoom · c25f6b15
      Nick Holloway authored
      This device suffers from the off-by-one error when reporting the capacity,
      so add entry with US_FL_FIX_CAPACITY.
      Signed-off-by: default avatarNick Holloway <Nick.Holloway@pyrites.org.uk>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c25f6b15
    • Jesper Juhl's avatar
      USB SL811HS HCD: Fix memory leak in sl811h_urb_enqueue() · 2bd15f1f
      Jesper Juhl authored
      In drivers/usb/host/sl811-hcd.c::sl811h_urb_enqueue(), memory is allocated
      with kzalloc() and assigned to 'ep'. If we leave via the 'fail' label due
      to 'if (ep->maxpacket > H_MAXPACKET)', then 'ep' will go out of scope
      without having been assigned to anything, so we'll leak the memory we
      allocated.
      This patch fixes the leak by simply calling kfree(ep); before jumping to
      the 'fail' label.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2bd15f1f
    • Ionut Nicu's avatar
      USB: ti_usb: fix module removal · b14de385
      Ionut Nicu authored
      If usb_deregister() is called after usb_serial_deregister() when
      the device is plugged in, the following Oops occurs:
      
      [   95.337377] BUG: unable to handle kernel NULL pointer dereference at 00000010
      [   95.338236] IP: [<c0776b2d>] klist_put+0x12/0x62
      [   95.338356] *pdpt = 000000003001a001 *pde = 0000000000000000
      [   95.338356] Oops: 0000 [#1] SMP
      [   95.340499] last sysfs file: /sys/devices/pci0000:00/0000:00:1d.2/usb8/idVendor
      [   95.340499] Modules linked in: ti_usb_3410_5052(-) usbserial cpufreq_ondemand acpi_cpufreq mperf iptable_nat nf_nat iptable_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ipv6 uinput arc4 ecb iwlagn iwlcore mac80211 cfg80211 microcode pcspkr acer_wmi joydev wmi sky2 [last unloaded: scsi_wait_scan]
      [   95.341908]
      [   95.341908] Pid: 1532, comm: modprobe Not tainted 2.6.37-rc7+ #6 Eiger                          /Aspire 5930
      [   95.341908] EIP: 0060:[<c0776b2d>] EFLAGS: 00010246 CPU: 0
      [   95.341908] EIP is at klist_put+0x12/0x62
      [   95.341908] EAX: 00000000 EBX: eedc0c84 ECX: c09c21b4 EDX: 00000001
      [   95.341908] ESI: 00000000 EDI: efaa0c1c EBP: f214fe2c ESP: f214fe1c
      [   95.341908]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      [   95.341908] Process modprobe (pid: 1532, ti=f214e000 task=efaaf080 task.ti=f214e000)
      [   95.341908] Stack:
      [   95.341908]  f214fe24 eedc0c84 efaaf080 efaa0c1c f214fe34 c0776ba8 f214fe5c c0776c76
      [   95.341908]  c09c21b4 c09c21b4 eedc0c84 efaaf080 00000000 c0634398 eafe2d1c f7b515f0
      [   95.341908]  f214fe6c c0631b5c eafe2d50 eafe2d1c f214fe7c c0631ba2 eafe2d1c eafe2c00
      [   95.341908] Call Trace:
      [   95.341908]  [<c0776ba8>] ? klist_del+0xd/0xf
      [   95.341908]  [<c0776c76>] ? klist_remove+0x48/0x74
      [   95.341908]  [<c0634398>] ? devres_release_all+0x49/0x51
      [   95.341908]  [<c0631b5c>] ? __device_release_driver+0x7b/0xa4
      [   95.341908]  [<c0631ba2>] ? device_release_driver+0x1d/0x28
      [   95.341908]  [<c06317c4>] ? bus_remove_device+0x92/0xa1
      [   95.341908]  [<c062f3d8>] ? device_del+0xf9/0x13e
      [   95.341908]  [<f7b06146>] ? usb_serial_disconnect+0xd9/0x116 [usbserial]
      [   95.341908]  [<c0681e3f>] ? usb_disable_interface+0x32/0x40
      [   95.341908]  [<c0683972>] ? usb_unbind_interface+0x48/0xfd
      [   95.341908]  [<c0631b43>] ? __device_release_driver+0x62/0xa4
      [   95.341908]  [<c06320b9>] ? driver_detach+0x62/0x81
      [   95.341908]  [<c0631a41>] ? bus_remove_driver+0x8f/0xae
      [   95.341908]  [<c063214c>] ? driver_unregister+0x50/0x57
      [   95.341908]  [<c0682f95>] ? usb_deregister+0x77/0x84
      [   95.341908]  [<f7b505b6>] ? ti_exit+0x26/0x28 [ti_usb_3410_5052]
      [   95.341908]  [<c046a307>] ? sys_delete_module+0x181/0x1de
      [   95.341908]  [<c04e2727>] ? path_put+0x1a/0x1d
      [   95.341908]  [<c047f4c5>] ? audit_syscall_entry+0x116/0x138
      [   95.341908]  [<c04094df>] ? sysenter_do_call+0x12/0x28
      [   95.341908] Code: 00 83 7d f0 00 74 09 85 f6 74 05 89 f0 ff 55 f0 8b 43 04 5a 5b 5e 5f 5d c3 55 89 e5 57 56 53 89 c3 83 ec 04 8b 30 83 e6 fe 89 f0 <8b> 7e 10 88 55 f0 e8 47 26 01 00 8a 55 f0 84 d2 74 17 f6 03 01
      [   95.341908] EIP: [<c0776b2d>] klist_put+0x12/0x62 SS:ESP 0068:f214fe1c
      [   95.341908] CR2: 0000000000000010
      [   95.342357] ---[ end trace 8124d00ad871ad18 ]---
      Signed-off-by: default avatarIonut Nicu <ionut.nicu@mindbit.ro>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b14de385
    • Bjørn Mork's avatar
      USB: io_edgeport: fix the reported firmware major and minor · 271c1150
      Bjørn Mork authored
      The major and minor number saved in the product_info structure
      were copied from the address instead of the data, causing an
      inconsistency in the reported versions during firmware loading:
      
       usb 4-1: firmware: requesting edgeport/down.fw
       /usr/src/linux/drivers/usb/serial/io_edgeport.c: downloading firmware version (930) 1.16.4
       [..]
       /usr/src/linux/drivers/usb/serial/io_edgeport.c: edge_startup - time 3 4328191260
       /usr/src/linux/drivers/usb/serial/io_edgeport.c:   FirmwareMajorVersion  0.0.4
      
      This can cause some confusion whether firmware loaded successfully
      or not.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      271c1150
  2. 01 Feb, 2011 8 commits
  3. 31 Jan, 2011 17 commits