USB mass storage support

Rosen Kolev rosen.kolev at amk-drives.bg
Thu Sep 29 11:26:49 EDT 2011


Hi Antony,

On 29.9.2011 г. 16:50 ч., Antony Pavlov wrote:
> On 28 September 2011 11:15, Sascha Hauer<s.hauer at pengutronix.de>  wrote:
>> On Fri, Sep 23, 2011 at 08:57:43AM +0200, Sascha Hauer wrote:
>>> Hi,
>>>
>>> The following adds USB mass storage support to barebox. The patches
>>> are from Rosen Kolev, I am just sending these patches for him because
>>> git send-email does not work for him (yet).
>>>
>>> Sascha
>>>
>>> Rosen Kolev (3):
>>>        Modified timeout in the ehci-hcd USB host driver.
>>>        Extended USB device matching.
>>>        USB mass storage device driver initial implementation
>> I merged this as-is. There are still some minor things like CamelCase
>> function names but overall This looked to good to not merge it ;)
> This patches have no "Signed-off-by :" label.
>
> I have tried them with 2 USB-flash drives on my Tegra board:
>
> toshiba ac100>  / usb
> USB: scanning bus for devices...
> Bus 001 Device 003: ID 0bdb:190a F3307
> Bus 001 Device 004: ID 0bda:58f2 USB Camera
> Bus 001 Device 006: ID 8564:1000 Mass Storage Device
> disk at disk0: Failed to register partition disk0.1 (-22)
> Bus 001 Device 007: ID 067b:2303 USB-Serial Controller
> Bus 001 Device 008: ID 8564:1000 Mass Storage Device
> register_device: already registered disk0
> Bus 001 Device 009: ID 2001:3c05 DUB-E100
> eth at eth0: got MAC address from EEPROM: 1C:7E:E5:0F:E1:14
> Bus 001 Device 005: ID 05e3:0660 USB2.0 Hub
> Bus 001 Device 002: ID 0424:2513
> Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
> 9 USB Device(s) found
>
> Can we register more that one disk?
>
We were supposed to, but you have just found an omission. In function 
usb_stor_add_blkdev(), we need "pdev->id = -1;", e.g. right after "pdev 
= &pblk_dev->dev;".

The first error, "Failed to register partition...", probably has 
something to do with the partition table. Keep in mind that the disk 
driver currently supports up to 2GB partitions.

Regards,
Rosen




More information about the barebox mailing list