1. 18 2月, 2011 24 次提交
  2. 05 2月, 2011 15 次提交
    • A
      USB: cdc-acm: Adding second ACM channel support for Nokia N8 · 721d92fc
      Arvid Ephraim Picciani 提交于
      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: NArvid Ephraim Picciani <arvid.picciani@nokia.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      721d92fc
    • J
      USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct · a283c03a
      Jesper Juhl 提交于
      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: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a283c03a
    • P
      USB: Fix trout build failure with ci13xxx_msm gadget · 8cf28f1f
      Pavankumar Kondeti 提交于
      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: NPavankumar Kondeti <pkondeti@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8cf28f1f
    • M
      USB: gadget: f_fs: even zero-length packets require a buffer · ce1fd358
      Marek Szyprowski 提交于
      Some UDC drivers fails to queue a request if req->buf == NULL even for
      ZLP requests. This patch adds a poisoned pointer instead of NULL to
      make the code compliant with the gadget specification and catches
      possible bug in the UDC driver if it tries to dereference buffer pointer
      on ZLP request.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ce1fd358
    • R
      USB: HCD: Add driver hooks for (un)?map_urb_for_dma · 2694a48d
      Robert Morell 提交于
      Provide optional hooks for the host controller driver to override the
      default DMA mapping and unmapping routines.  In general, these shouldn't
      be necessary unless the host controller has special DMA requirements,
      such as alignment contraints.  If these are not specified, the
      general usb_hcd_(un)?map_urb_for_dma functions will be used instead.
      Also, pass the status to unmap_urb_for_dma so it can know whether the
      DMA buffer has been overwritten.
      
      Finally, add a flag to be used by these implementations if they
      allocated a temporary buffer so it can be freed properly when unmapping.
      Signed-off-by: NRobert Morell <rmorell@nvidia.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2694a48d
    • R
      USB: HCD: Add usb_hcd prefix to exported functions · c8cf203a
      Robert Morell 提交于
      The convention is to prefix symbols exported from the USB HCD core with
      "usb_hcd".  This change makes unmap_urb_setup_for_dma() and
      unmap_urb_for_dma() consistent with that.
      Signed-off-by: NRobert Morell <rmorell@nvidia.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c8cf203a
    • P
      USB: usbmon: fix-up docs and text API for sparse ISO · d25bc4db
      Pete Zaitcev 提交于
      This is based on a patch that Alan Stern wrote. It did the same simple
      thing in both text and binary cases. In the same time, Marton and I
      fixed the binary side properly, but this leaves the text to be fixed.
      It is not very important due to low maxium data size of text, but
      let's add it just for extra correctness.
      
      The pseudocode is too much to keep fixed up, and we have real code
      to be used as examples now, so let's drop it too.
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d25bc4db
    • D
      USB: EHCI: Rearrange create_companion_file() to avoid GCC-4.6 warnings. · ac8d6741
      David Daney 提交于
      In create_companion_file() there is a bogus assignemt to i created for
      the express purpose of avoiding an ignored return value warning.
      
      With pre-release GCC-4.6, this causes a 'set but not used' warning.
      
      Kick the problem further down the road by just returning i.  All the
      callers of create_companion_file() ignore its return value, so all is
      good:
      
      o No warnings are issued.
      
      o We still subvert the desires of the authors of device_create_file()
        by ignorning error conditions.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ac8d6741
    • D
      USB: EHCI: Rearrange EHCI_URB_TRACE code to avoid GCC-4.6 warnings. · eb34a908
      David Daney 提交于
      With pre-release GCC-4.6, we get a 'set but not used' warning when
      EHCI_URB_TRACE is not set because we set the qtd variable without
      using it.
      
      Rearrange the statements so that we only set qtd if it will be used.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eb34a908
    • D
      USB: EHCI: Cleanup and rewrite ehci_vdgb(). · 9a1cadb9
      David Daney 提交于
      The vdbg macro is not used anywhere so it can be removed.
      
      With pre-release GCC-4.6, there are several complaints of variables
      that are 'set but not used' caused by the ehci_vdbg() macro expanding
      to something that does not contain any of its arguments.  We can quiet
      this warning by rewriting ehci_vdbg() as a variadic static inline that
      does nothing.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9a1cadb9
    • D
      USB: EHCI: Remove dead code from ehci-sched.c · fc427a5a
      David Daney 提交于
      The pre-release GCC-4.6 now correctly flags this code as dead.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fc427a5a
    • A
      USB host: Move AMD PLL quirk to pci-quirks.c · b7d5b439
      Andiry Xu 提交于
      This patch moves the AMD PLL quirk code in OHCI/EHCI driver to pci-quirks.c,
      and exports the functions to be used by xHCI driver later.
      
      AMD PLL quirk disable the optional PM feature inside specific
      SB700/SB800/Hudson-2/3 platforms under the following conditions:
      
      1. If an isochronous device is connected to OHCI/EHCI/xHCI port and is active;
      2. Optional PM feature that powers down the internal Bus PLL when the link is
         in low power state is enabled.
      
      Without AMD PLL quirk, USB isochronous stream may stutter or have breaks
      occasionally, which greatly impair the performance of audio/video streams.
      
      Currently AMD PLL quirk is implemented in OHCI and EHCI driver, and will be
      added to xHCI driver too. They are doing similar things actually, so move
      the quirk code to pci-quirks.c, which has several advantages:
      
      1. Remove duplicate defines and functions in OHCI/EHCI (and xHCI) driver and
         make them cleaner;
      2. AMD chipset information will be probed only once and then stored.
         Currently they're probed during every OHCI/EHCI initialization, move
         the detect code to pci-quirks.c saves the repeat detect cost;
      3. Build up synchronization among OHCI/EHCI/xHCI driver. In current
         code, every host controller enable/disable PLL only according to
         its own status, and may enable PLL while there is still isoc transfer on
         other HCs. Move the quirk to pci-quirks.c prevents this issue.
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Alex He <alex.he@amd.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b7d5b439
    • F
      usb: gadget/fsl_mxc_udc: Detect the CPU type in run-time · a51ea8cc
      Fabio Estevam 提交于
      Make sure we are running on a MX35 processor.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a51ea8cc
    • J
      USB: Gadget: Initialize wMaxPacketSize if not already set · 553fbcde
      Jassi Brar 提交于
      Currently, for ISO and INT, a protocol driver must chose the value for
      wMaxPacketSize arbitrarily. The value may be too low, resulting in lesser
      than efficient operation or high enough to not work with all UDC drivers.
      
      Take un-initialized wMaxPacketSize as a hint to provide maximum
      possible packetsize for the selected endpoint. The protocol may
      then choose a value not bigger than that.
      Signed-off-by: NJassi Brar <jassi.brar@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      553fbcde
    • V
      USB: serial: mct_u232: added _ioctl, _msr_to_icount and _get_icount functions · 7af75af2
      Vadim Tsozik 提交于
      Added mct_u232_ioctl (implements TIOCMIWAIT command),
      mct_u232_get_icount (implements TIOCGICOUNT command) and
      mct_u232_msr_to_icount functions. MCT U232 P9 is one of a few usb to
      serail adapters which converts USB +/-5v voltage levels to COM +/-15
      voltages. So it can also power COM interfaced devices. This makes it
      very usable for legacy COM interfaced data-acquisition hardware. I
      tested new implementation with AWARE Electronics RM-60 radiation meter,
      which sends pulse via RNG COM line whenever new particle is registered.
      Signed-off-by: NVadim Tsozik <tsozik@yahoo.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7af75af2
  3. 04 2月, 2011 1 次提交
    • Y
      USB: EHCI: fix scheduling while atomic during suspend · 148fc55f
      Yin Kangkai 提交于
      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: NYin Kangkai <kangkai.yin@intel.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <dbrownell@users.sourceforge.net>
      CC: stable@kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      148fc55f