1. 24 1月, 2012 1 次提交
  2. 14 10月, 2011 1 次提交
  3. 10 9月, 2011 1 次提交
    • K
      usb gadget: clean up FSF boilerplate text · 28c9fc68
      Klaus Schwarzkopf 提交于
      remove the following two paragraphs as they are not needed:
      
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      License for more details.
      
      You should have received a copy of the GNU General Public License along with
      this program; if not, write to the Free Software Foundation, Inc.,59
      Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      28c9fc68
  4. 09 9月, 2011 2 次提交
    • P
      usb: gadget: storage: make FSG_NUM_BUFFERS variable size · 6532c7fd
      Per Forlin 提交于
      FSG_NUM_BUFFERS is set to 2 as default.
      Usually 2 buffers are enough to establish a good buffering pipeline.
      The number may be increased in order to compensate a for bursty VFS
      behaviour.
      
      Here follows a description of system that may require more than
      2 buffers.
       * CPU ondemand governor active
       * latency cost for wake up and/or frequency change
       * DMA for IO
      
      Use case description.
       * Data transfer from MMC via VFS to USB.
       * DMA shuffles data from MMC and to USB.
       * The CPU wakes up every now and then to pass data in and out from VFS,
         which cause the bursty VFS behaviour.
      
      Test set up
       * Running dd on the host reading from the mass storage device
       * cmdline: dd if=/dev/sdb of=/dev/null bs=4k count=$((256*100))
       * Caches are dropped on the host and on the device before each run
      
      Measurements on a Snowball board with ondemand_governor active.
      
      FSG_NUM_BUFFERS 2
      104857600 bytes (105 MB) copied, 5.62173 s, 18.7 MB/s
      104857600 bytes (105 MB) copied, 5.61811 s, 18.7 MB/s
      104857600 bytes (105 MB) copied, 5.57817 s, 18.8 MB/s
      
      FSG_NUM_BUFFERS 4
      104857600 bytes (105 MB) copied, 5.26839 s, 19.9 MB/s
      104857600 bytes (105 MB) copied, 5.2691 s, 19.9 MB/s
      104857600 bytes (105 MB) copied, 5.2711 s, 19.9 MB/s
      
      There may not be one optimal number for all boards. This is why
      the number is added to Kconfig. If selecting USB_GADGET_DEBUG_FILES
      this value may be set by a module parameter as well.
      Signed-off-by: NPer Forlin <per.forlin@linaro.org>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      6532c7fd
    • P
      usb: gadget: storage: adapt logic block size to bound block devices · 3f565a36
      Peiyu Li 提交于
      Now the mass storage driver has fixed logic block size of 512 bytes.
      
      The mass storage gadget read/write bound devices only through VFS, so the
      bottom level devices actually are just RAW devices to the driver and connected
      PC. As a RAW, hosts can always format, read and write it right in 512 bytes
      logic block and don't care about the actual logic block size of devices bound
      to the gadget.
      
      But if we want to share the bound block device partition between target board
      and PC, in case the logic block size of the bound block device is 4KB, we
      execute the following steps:
      
      1. connect a board with mass storage gadget to PC(the board has set one
      	partition of on-board block device as file name of the mass storage)
      2. PC format the mass storage to VFAT by default logic block size and
      	read/write it
      3. disconnect boards from PC
      4. target board mount the partition as VFAT
      
      Step 4 will fail since kernel on target thinks the logic block size of the
      bound partition as 4KB.
      A typical error is "FAT: logical sector size too small for device (logical
      sector size = 512)"
      
      If we execute opposite steps:
      1. format the partition to VFAT on target board and read/write this partition
      2. connect the board to Windows PC as usb mass storage gadget, windows will
      	think the disk is not formatted
      
      So the conclusion is that only as a gadget, the mass storage driver has no any
      problem.  But being shared VFAT or other filesystem on PC and target board, it
      will fail.
      
      This patch adapts logic block size to bound block devices and fix the issue.
      
      Cc: Michal Nazarewicz <mina86@mina86.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NPeiyu Li <peiyu.li@csr.com>
      Signed-off-by: NXianglong Du <xianglong.du@csr.com>
      Signed-off-by: NHuayi Li <huayi.li@csr.com>
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3f565a36
  5. 02 7月, 2011 1 次提交
  6. 30 4月, 2011 1 次提交
  7. 15 4月, 2011 1 次提交
    • G
      Revert "usb: usb_storage: do not align length of request for CBW to maxp size" · 98346f7d
      Greg Kroah-Hartman 提交于
      This reverts commit 806e8f8f.
      
      To quote Alan Stern:
      	The necessity for this patch has been under discussion.
      
      	It turns out the UDC that Mian has been working on and Felipe's
      	UDC have contradictory requirements.  Mian's UDC driver wants a
      	bulk-OUT transfer length to be shorter than the maxpacket size
      	if a short packet is expected, whereas Felipe's UDC hardware
      	always needs bulk-OUT transfer lengths to be evenly divisible by
      	the maxpacket size.
      
      	Mian has agreed to go back over the driver to resolve this
      	conflict.  This means we probably will not want this patch after
      	all.  (In fact, we may ultimately decide to change the gadget
      	framework to require that bulk-OUT transfer lengths _always_ be
      	divisible by the maxpacket size -- only the g_file_storage and
      	g_mass_storage gadgets would need to be changed.)
      
      Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Cc: Michal Nazarewicz <mina86@mina86.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      98346f7d
  8. 14 4月, 2011 2 次提交
  9. 13 11月, 2010 1 次提交
    • T
      block: check bdev_read_only() from blkdev_get() · 75f1dc0d
      Tejun Heo 提交于
      bdev read-only status can be queried using bdev_read_only() and may
      change while the device is being opened.  Enforce it by checking it
      from blkdev_get() after open succeeds.
      
      This makes bdev_read_only() check in open_bdev_exclusive() and
      fsg_lun_open() unnecessary.  Drop them.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: linux-usb@vger.kernel.org
      75f1dc0d
  10. 23 10月, 2010 3 次提交
  11. 11 8月, 2010 3 次提交
  12. 22 5月, 2010 1 次提交
  13. 12 12月, 2009 8 次提交