1. 25 3月, 2009 1 次提交
    • D
      USB: gadget: fix rndis regression · 090b9011
      David Brownell 提交于
      Restore some code that was wrongly dropped from the RNDIS
      driver, and caused interop problems observed with OpenMoko.
      
      The issue is with hardware which needs help conforming to part
      of the USB 2.0 spec (section 8.5.3.2); some can automagically
      send a ZLP in response to an unexpected IN, but not all chips
      will do that.  We don't need to check the packet length ourselves
      the way earlier code did, since the UDC must already check it.
      But we do need to tell the UDC when it must force a short packet
      termination of the data stage.
      
      (Based on a patch from Aric D. Blumer <aric at sdgsystems.com>)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      090b9011
  2. 28 2月, 2009 4 次提交
  3. 19 2月, 2009 1 次提交
  4. 10 2月, 2009 6 次提交
  5. 28 1月, 2009 3 次提交
  6. 08 1月, 2009 16 次提交
  7. 07 1月, 2009 1 次提交
  8. 06 1月, 2009 2 次提交
    • C
      add a vfs_fsync helper · 4c728ef5
      Christoph Hellwig 提交于
      Fsync currently has a fdatawrite/fdatawait pair around the method call,
      and a mutex_lock/unlock of the inode mutex.  All callers of fsync have
      to duplicate this, but we have a few and most of them don't quite get
      it right.  This patch adds a new vfs_fsync that takes care of this.
      It's a little more complicated as usual as ->fsync might get a NULL file
      pointer and just a dentry from nfsd, but otherwise gets afile and we
      want to take the mapping and file operations from it when it is there.
      
      Notes on the fsync callers:
      
       - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
         	lower file
       - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
      	file, and returning 0 when ->fsync was missing
       - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
         taking i_mutex.  Now given that shared memory doesn't have disk
         backing not doing anything in fsync seems fine and I left it out of
         the vfs_fsync conversion for now, but in that case we might just
         not pass it through to the lower file at all but just call the no-op
         simple_sync_file directly.
      
      [and now actually export vfs_fsync]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4c728ef5
    • A
      zero i_uid/i_gid on inode allocation · 56ff5efa
      Al Viro 提交于
      ... and don't bother in callers.  Don't bother with zeroing i_blocks,
      while we are at it - it's already been zeroed.
      
      i_mode is not worth the effort; it has no common default value.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      56ff5efa
  9. 22 12月, 2008 2 次提交
  10. 18 12月, 2008 2 次提交
  11. 01 12月, 2008 2 次提交
    • A
      USB: fsl_usb2_udc: Report disconnect before unbinding · 1f15a506
      Anton Vorontsov 提交于
      Gadgets disable endpoints in their disconnect callbacks, so
      we must call disconnect before unbinding.
      
      The patch fixes following badness:
      
      root@b1:~# insmod fsl_usb2_udc.ko
      Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007)
      root@b1:~# insmod g_ether.ko
      g_ether gadget: using random self ethernet address
      g_ether gadget: using random host ethernet address
      usb0: MAC 26:07:ba:c0:44:33
      usb0: HOST MAC 96:81:0c:05:4d:e3
      g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
      g_ether gadget: g_ether ready
      fsl-usb2-udc: bind to driver g_ether
      g_ether gadget: high speed config #1: CDC Ethernet (ECM)
      root@b1:~# rmmod g_ether.ko
      ------------[ cut here ]------------
      Badness at drivers/usb/gadget/composite.c:871
      [...]
      NIP [e10c3454] composite_unbind+0x24/0x15c [g_ether]
      LR [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc]
      Call Trace:
      [df145e80] [ffffff94] 0xffffff94 (unreliable)
      [df145eb0] [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc]
      [df145ed0] [e10c4c40] usb_composite_unregister+0x3c/0x4c [g_ether]
      [df145ee0] [c006bcc0] sys_delete_module+0x130/0x19c
      [df145f40] [c00142d8] ret_from_syscall+0x0/0x38
      [...]
      unregistered gadget driver 'g_ether'
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1f15a506
    • A
      USB: fsl_qe_udc: Report disconnect before unbinding · 9ac36da3
      Anton Vorontsov 提交于
      Gadgets disable endpoints in their disconnect callbacks, so
      we must call disconnect before unbinding. This also fixes
      muram memory leak, since we free muram in the qe_ep_disable().
      
      But mainly the patch fixes following badness:
      
      root@b1:~# insmod fsl_qe_udc.ko
      fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0
      fsl_qe_udc e01006c0.usb: QE USB controller initialized as device
      root@b1:~# insmod g_ether.ko
      g_ether gadget: using random self ethernet address
      g_ether gadget: using random host ethernet address
      usb0: MAC be:2d:3c:fa:be:f0
      usb0: HOST MAC 62:b8:6a:df:38:66
      g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
      g_ether gadget: g_ether ready
      fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether
      g_ether gadget: high speed config #1: CDC Ethernet (ECM)
      root@b1:~# rmmod g_ether.ko
      ------------[ cut here ]------------
      Badness at drivers/usb/gadget/composite.c:871
      [...]
      NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether]
      LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
      Call Trace:
      [cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable)
      [cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
      [cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether]
      [cfb93ee0] [c006bde0] sys_delete_module+0x130/0x19c
      [cfb93f40] [c00142d8] ret_from_syscall+0x0/0x38
      [...]
      fsl_qe_udc e01006c0.usb: unregistered gadget driver 'g_ether'
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ac36da3