1. 27 1月, 2012 2 次提交
  2. 26 1月, 2012 1 次提交
  3. 25 1月, 2012 34 次提交
  4. 24 1月, 2012 3 次提交
    • S
      usb: dwc3: unmap the proper number of sg entries · c09d6b51
      Sebastian Andrzej Siewior 提交于
      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: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c09d6b51
    • G
      usb: musb: fix shutdown while usb gadget is in use · 24307cae
      Grazvydas Ignotas 提交于
      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: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      24307cae
    • F
      usb: gadget: f_mass_storage: Use "bool" instead of "int" in fsg_module_parameters · 4b5203f1
      Fabio Estevam 提交于
      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: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4b5203f1