1. 30 Jan, 2012 2 commits
  2. 25 Jan, 2012 1 commit
  3. 24 Jan, 2012 15 commits
    • Sebastian Andrzej Siewior's avatar
      usb: dwc3: unmap the proper number of sg entries · c09d6b51
      Sebastian Andrzej Siewior authored
      num_sgs contains the number of sgs assigned by the gadget.
      num_mapped_sgs contains the number of mapped sgs which may differ from
      the gadget's values. For dma_unmap_sg() we have to provide the value
      which was returned by dma_map_sg().
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      c09d6b51
    • Grazvydas Ignotas's avatar
      usb: musb: fix shutdown while usb gadget is in use · 24307cae
      Grazvydas Ignotas authored
      If we shutdown without stopping the gadget first or removing the cable,
      gadget manages to configure itself again:
      
      root@pandora /root# poweroff
      The system is going down NOW!
      Requesting system poweroff
      [   47.714385] musb-hm halted.
      [   48.120697]  gadget: suspend
      [   48.123748]  gadget: reset config
      [   48.127227]  gadget: ecm deactivated
      [   48.130981] usb0: gether_disconnect
      [   48.281799]  gadget: high-speed config #1: CDC Ethernet (ECM)
      [   48.287872]  gadget: init ecm
      [   48.290985]  gadget: notify connect false
      [   48.295288]  gadget: notify speed 425984000
      
      This is not only unwanted, it's also happening on half-unitialized
      state, after musb_shutdown() has returned, which sometimes causes
      hardware to fail to work after reboot. Let's better properly stop
      gadget on shutdown too.
      
      This patch moves musb_gadget_cleanup out of musb_free(), which has 2
      callsites: probe error path and musb_remove. On probe error path it was
      superflous since musb_gadget_cleanup is called explicitly there, and
      musb_remove() calls musb_shutdown(), so cleanup will get called as before.
      Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      24307cae
    • Fabio Estevam's avatar
      usb: gadget: f_mass_storage: Use "bool" instead of "int" in fsg_module_parameters · 4b5203f1
      Fabio Estevam authored
      Fix the following build warnings:
      
       CC [M]  drivers/usb/gadget/acm_ms.o
      drivers/usb/gadget/acm_ms.c: In function ‘__check_ro’:
      drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
      drivers/usb/gadget/acm_ms.c: In function ‘__check_removable’:
      drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
      drivers/usb/gadget/acm_ms.c: In function ‘__check_cdrom’:
      drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
      drivers/usb/gadget/acm_ms.c: In function ‘__check_nofua’:
      drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
      drivers/usb/gadget/acm_ms.c: In function ‘__check_stall’:
      drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
        CC [M]  drivers/usb/gadget/mass_storage.o
      drivers/usb/gadget/mass_storage.c: In function ‘__check_ro’:
      drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
      drivers/usb/gadget/mass_storage.c: In function ‘__check_removable’:
      drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
      drivers/usb/gadget/mass_storage.c: In function ‘__check_cdrom’:
      drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
      drivers/usb/gadget/mass_storage.c: In function ‘__check_nofua’:
      drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
      drivers/usb/gadget/mass_storage.c: In function ‘__check_stall’:
      drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
      
      Declare the fsg_module_parameters fields as "bool" so that they can match the types
      passed in FSG_MODULE_PARAM_ARRAY macro.
      
      Since commit 493c90ef (module_param: check that bool parameters really are bool.),
      moduleparam.h was changed in a way that the "bool" parameter type now really
      requires "bool" type and no longer allows "unsigned int".
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      4b5203f1
    • Sebastian Andrzej Siewior's avatar
      usb: gadget: check for streams only for SS udcs · c74c9300
      Sebastian Andrzej Siewior authored
      Currently the UASP gadget fails to bind on an UDC which does not provide
      stream support. This is true for all udc in tree except for dummy and
      dwc3 since they don't support SuperSpeed.
      There is no need to test for the availability of stream support on those
      UDCs because we will never even try to use them. I think it is sane to
      assume that StreamSupport is always available on SuperSpeed since it is
      one of the key features.
      The host side will only allocate on SS so this part is also fine.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      c74c9300
    • Peter Chen's avatar
      usb: gadget: fsl_udc: fix the usage of udc->max_ep · 118d63f7
      Peter Chen authored
      The max_ep is the number of endpoint * 2.
      
      But in dtd_complete_irq, it does again * 2, it will deference wrong memory
      after scanning max_ep - 1.
      
      The another similar problem is at USB_REQ_SET_FEATURE (the pipe number
      should be 0 and max_ep - 1).
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarMatthieu castet <matthieu.castet@parrot.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      118d63f7
    • Fabio Estevam's avatar
      drivers: usb: otg: Fix dependencies for some OTG drivers · a37670b1
      Fabio Estevam authored
      Fix the following build warning:
      
      warning: (USB_LANGWELL_OTG && FSL_USB2_OTG && USB_MV_OTG) selects USB_OTG which has unmet direct dependencies (USB_SUPPORT && USB && EXPERIMENTAL && USB_SUSPEND)
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      a37670b1
    • Jesper Juhl's avatar
      usb: renesas: silence uninitialized variable report in usbhsg_recip_run_handle() · 7983bc74
      Jesper Juhl authored
      In drivers/usb/renesas_usbhs/mod_gadget.c::usbhsg_recip_run_handle()
      the Coverity Prevent checker currently flags a warning about possibly
      uninitialized use of 'ret' i usbhsg_recip_run_handle(). It does this
      since it assumes we take one of the non-default branches in the switch
      and then subsequently take the false branch in the 'if (func)' case
      below. This exact scenario will never happen, but Coverity can't see
      that for some reason. This patch initializes 'ret' to '0' when it is
      declared which should shut up this report and won't really hurt - so
      why not? At least then it's clear that 'ret' is always initialized..
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      7983bc74
    • Paul Zimmerman's avatar
      usb: gadget: SS Isoc endpoints use comp_desc->bMaxBurst too · 9e878a6b
      Paul Zimmerman authored
      SuperSpeed Isoc endpoints also use the bMaxBurst value from the
      companion descriptor. See section 9.6.7 in the USB 3.0 spec.
      Signed-off-by: default avatarPaul Zimmerman <paulz@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      9e878a6b
    • Andiry Xu's avatar
      usb: gadget: storage: endian fix · a8501639
      Andiry Xu authored
      Fix some endian issues for storage gadgets.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      a8501639
    • Felipe Balbi's avatar
      usb: dwc3: ep0: fix compile warning · 1a0955fe
      Felipe Balbi authored
      commit 34c60a7 (usb: dwc3: ep0: tidy up Pending
      Request handling) introduced a compile warning
      by leaving an unused variable.
      
      This patch fixes that warning:
      
      drivers/usb/dwc3/ep0.c: In function ‘__dwc3_gadget_ep0_queue’:
      drivers/usb/dwc3/ep0.c:129:8: warning: unused variable ‘type’
      [-Wunused-variable]
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      1a0955fe
    • Sekhar Nori's avatar
      usb: musb: davinci: fix build breakage · 006896fc
      Sekhar Nori authored
      Commit 0020afb3 (ARM: mach-davinci:
      remove mach/memory.h) removed mach/memory.h for DaVinci which broke
      DaVinci MUSB build.
      
      mach/memory.h is not actually needed in davinci.c, so remove it.
      While at it, also remove some more machine specific inclulde
      files which are not needed for build.
      
      Tested on DM644x EVM using USB card reader.
      
      Cc: stable@vger.kernel.org # v3.2
      Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      006896fc
    • Alexander Shishkin's avatar
      usb: gadget: langwell: don't call gadget's disconnect() · 37fd3710
      Alexander Shishkin authored
      UDC core will call disconnect() and unbind() for us upon the gadget
      removal, so we should not do it ourselves. Otherwise, a composite
      gadget will explode, for example. Others might too.
      
      This was introduced during conversion to new style gadget in 2c7f0989
      (usb: gadget: langwell: convert to new style).
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: stable@vger.kernel.org # v3.2
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      37fd3710
    • Alexander Shishkin's avatar
      usb: gadget: langwell: drop langwell_otg support · 28bd6222
      Alexander Shishkin authored
      Since there is no working (or even compilable) OTG_TRANSCEIVER support
      for this driver, remove the dead code which depends on it at compile
      time.
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: stable@vger.kernel.org # v2.6.31+
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      28bd6222
    • Alexander Shishkin's avatar
      usb: otg: kill langwell_otg driver · c1084a56
      Alexander Shishkin authored
      The way this driver was added by f0ae849d (usb: Add Intel Langwell USB
      OTG Transceiver Driver) never even compiled together with langwell_udc,
      and that's the only way for it to be useful.
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: stable@vger.kernel.org # v2.6.31+
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      c1084a56
    • Felipe Balbi's avatar
      usb: dwc3: ep0: tidy up Pending Request handling · 68d8a781
      Felipe Balbi authored
      The way our code was written, we should never have
      a DWC3_EP_PENDING_REQUEST flag set out of a Data Phase
      and the code in __dwc3_gadget_ep0_queue() did not
      reflect that situation properly.
      
      Tidy up that case to avoid any possible mistakes
      when starting requests for IRQs which are long
      gone.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      68d8a781
  4. 19 Jan, 2012 16 commits
  5. 18 Jan, 2012 6 commits
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 4ba3069f
      Linus Torvalds authored
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits)
        target: Set additional sense length field in sense data
        target: Remove legacy device status check from transport_execute_tasks
        target: Remove __transport_execute_tasks() for each processing context
        target: Remove extra se_device->execute_task_lock access in fast path
        target: Drop se_device TCQ queue_depth usage from I/O path
        target: Fix possible NULL pointer with __transport_execute_tasks
        target: Remove TFO->check_release_cmd() fabric API caller
        tcm_fc: Convert ft_send_work to use target_submit_cmd
        target: Add target_submit_cmd() for process context fabric submission
        target: Make target_put_sess_cmd use target_release_cmd_kref
        target: Set response format in INQUIRY response
        target: tcm_mod_builder: small fixups
        Documentation/target: Fix tcm_mod_builder.py build breakage
        target: remove overagressive ____cacheline_aligned annoations
        tcm_loop: bump max_sectors
        target/configs: remove trailing newline from udev_path and alias
        iscsi-target: fix chap identifier simple_strtoul usage
        target: remove useless casts
        target: simplify target_check_cdb_and_preempt
        target: Move core_scsi3_check_cdb_abort_and_preempt
        ...
      4ba3069f
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · 507a03c1
      Linus Torvalds authored
      This includes initial support for the recently published ACPI 5.0 spec.
      In particular, support for the "hardware-reduced" bit that eliminates
      the dependency on legacy hardware.
      
      APEI has patches resulting from testing on real hardware.
      
      Plus other random fixes.
      
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits)
        acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
        intel_idle: Split up and provide per CPU initialization func
        ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
        ACPI processor: Remove unneeded cpuidle_unregister_driver call
        intel idle: Make idle driver more robust
        intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle
        ACPI: kernel-parameters.txt : Add intel_idle.max_cstate
        intel_idle: remove redundant local_irq_disable() call
        ACPI processor: Fix error path, also remove sysdev link
        ACPI: processor: fix acpi_get_cpuid for UP processor
        intel_idle: fix API misuse
        ACPI APEI: Convert atomicio routines
        ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
        ACPI: Fix possible alignment issues with GAS 'address' references
        ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
        ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
        ACPI: Store SRAT table revision
        ACPI, APEI, Resolve false conflict between ACPI NVS and APEI
        ACPI, Record ACPI NVS regions
        ACPI, APEI, EINJ, Refine the fix of resource conflict
        ...
      507a03c1
    • Stefan Berger's avatar
      tpm: fix (ACPI S3) suspend regression · be405411
      Stefan Berger authored
      This patch fixes an (ACPI S3) suspend regression introduced in commit
      68d6e671 ("tpm: Introduce function to poll for result of self test")
      and occurring with an Infineon TPM and tpm_tis and tpm_infineon drivers
      active.
      
      The suspend problem occurred if the TPM was disabled and/or deactivated
      and therefore the TPM_PCRRead checking the result of the (asynchronous)
      self test returned an error code which then caused the tpm_tis driver to
      become inactive and this then seemed to have negatively influenced the
      suspend support by the tpm_infineon driver...  Besides that the tpm_tis
      drive may stay active even if the TPM is disabled and/or deactivated.
      Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
      Tested-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarRajiv Andrade <srajiv@linux.vnet.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      be405411
    • Linus Torvalds's avatar
      nvme: fix merge error due to change of 'make_request_fn' fn type · 93c3d65b
      Linus Torvalds authored
      The type of 'make_request_fn' changed in 5a7bbad2 ("block: remove
      support for bio remapping from ->make_request"), but the merge of the
      nvme driver didn't take that into account, and as a result the driver
      would compile with a warning:
      
        drivers/block/nvme.c: In function 'nvme_alloc_ns':
        drivers/block/nvme.c:1336:2: warning: passing argument 2 of 'blk_queue_make_request' from incompatible pointer type [enabled by default]
        include/linux/blkdev.h:830:13: note: expected 'void (*)(struct request_queue *, struct bio *)' but argument is of type 'int (*)(struct request_queue *, struct bio *)'
      
      It's benign, but the warning is annoying.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org>
      Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      93c3d65b
    • Stephen Rothwell's avatar
      xen: using EXPORT_SYMBOL requires including export.h · 9ef9b20b
      Stephen Rothwell authored
      Fix these warnings:
      
        drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default]
        drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
        drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default]
      
      And this build error:
      
        ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined!
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9ef9b20b
    • Linus Torvalds's avatar
      Merge branch 'for-linus/i2c-33' of git://git.fluff.org/bjdooks/linux · aa303f2c
      Linus Torvalds authored
      * 'for-linus/i2c-33' of git://git.fluff.org/bjdooks/linux:
        i2c-eg20t: Change-company-name-OKI-SEMICONDUCTOR to LAPIS Semiconductor
        i2c-eg20t: Support new device LAPIS Semiconductor ML7831 IOH
        i2c-eg20t: modified the setting of transfer rate.
        i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus number
        i2c: OMAP: Add DT support for i2c controller
        I2C: OMAP: NACK without STP
        I2C: OMAP: correct SYSC register offset for OMAP4
      aa303f2c