1. 22 Nov, 2010 3 commits
    • Ajay Kumar Gupta's avatar
      usb: musb: gadget: fix compilation warning · bb324b08
      Ajay Kumar Gupta authored
      Fixes below compilation warning when musb driver is compiled for
      PIO mode:
      
      drivers/usb/musb/musb_gadget.c: In function 'musb_g_rx':
      drivers/usb/musb/musb_gadget.c:840:
      		warning: label 'exit' defined but not used
      Signed-off-by: default avatarAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      bb324b08
    • Ming Lei's avatar
      usb: musb: clear RXCSR_AUTOCLEAR before PIO read · e75df371
      Ming Lei authored
      If RXCSR_AUTOCLEAR flag is not cleard before PIO reading, one packet
      may be recieved by musb fifo, but no chance to notify
      software, so cause packet loss, follows the detailed process:
      
      	- PIO read one packet
      	- musb fifo auto clear the MUSB_RXCSR_RXPKTRDY
      	- musb continue to recieve the next packet, and MUSB_RXCSR_RXPKTRDY
      	is set
      	- software clear the MUSB_RXCSR_RXPKTRDY, so there is no chance for
      	musb to notify software that the 2nd recieved packet.
      
      The patch does fix the g_ether issue below:
      
      	- use fifo_mode 3 to enable double buffer
      	- 'ping -s 1024 IP_OF_BEAGLE_XM'
      	- one usb packet of 512 byte is lost, so ping failed,
      	which can be observed by wireshark
      
      note:
      	Beagle xm takes musb rtl1.8 and may fallback to pio mode
      	for unaligned buffer.
      Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      e75df371
    • Hema Kalliguddi's avatar
      usb: musb: unmap dma buffer when switching to PIO · 92d2711f
      Hema Kalliguddi authored
      Buffer is mapped to dma when dma channel is
      allocated. If, for some reason, dma channel
      programming fails, musb code will fallback
      to PIO mode to transfer that request. In
      that case, we need to unmap the buffer
      back to CPU.
      
      MUSB RTL1.8 and above cannot handle buffers
      which are not 32bit aligned. That happens to
      every request sent by g_ether gadget
      driver. Since the buffer sent was unaligned,
      we need to fallback to PIO.
      
      Because of that, g_ether was failing due
      to missing buffer unmapping.
      
      With this patch and [1] g_ether works fine
      with all MUSB revisions.
      
      Verified with OMAP3630 board, which has
      MUSB RTL1.8 using g_ether and g_zero.
      
      [1] http://www.spinics.net/lists/linux-usb/msg38400.htmlSigned-off-by: default avatarHema HK <hemahk@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      92d2711f
  2. 21 Nov, 2010 1 commit
  3. 20 Nov, 2010 3 commits
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · b86db474
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard
        fs: Do not dispatch FITRIM through separate super_operation
        ext4: ext4_fill_super shouldn't return 0 on corruption
        jbd2: fix /proc/fs/jbd2/<dev> when using an external journal
        ext4: missing unlock in ext4_clear_request_list()
        ext4: fix setting random pages PageUptodate
      b86db474
    • Lukas Czerner's avatar
      ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard · e681c047
      Lukas Czerner authored
      Filesystem independent ioctl was rejected as not common enough to be in
      core vfs ioctl. Since we still need to access to this functionality this
      commit adds ext4 specific ioctl EXT4_IOC_TRIM to dispatch
      ext4_trim_fs().
      
      It takes fstrim_range structure as an argument. fstrim_range is definec in
      the include/linux/fs.h and its definition is as follows.
      
      struct fstrim_range {
      	__u64 start;
      	__u64 len;
      	__u64 minlen;
      }
      
      start	- first Byte to trim
      len	- number of Bytes to trim from start
      minlen	- minimum extent length to trim, free extents shorter than this
        number of Bytes will be ignored. This will be rounded up to fs
        block size.
      
      After the FITRIM is done, the number of actually discarded Bytes is stored
      in fstrim_range.len to give the user better insight on how much storage
      space has been really released for wear-leveling.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      e681c047
    • Lukas Czerner's avatar
      fs: Do not dispatch FITRIM through separate super_operation · 93bb41f4
      Lukas Czerner authored
      There was concern that FITRIM ioctl is not common enough to be included
      in core vfs ioctl, as Christoph Hellwig pointed out there's no real point
      in dispatching this out to a separate vector instead of just through
      ->ioctl.
      
      So this commit removes ioctl_fstrim() from vfs ioctl and trim_fs
      from super_operation structure.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      93bb41f4
  4. 19 Nov, 2010 15 commits
  5. 18 Nov, 2010 18 commits