Re: Mass storage gadget: Unhandled error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 4, 2009 at 1:55 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 3 Feb 2009, Silesh C V wrote:
>
>> Hi all ,
>>
>> I am trying to use an OMAP3430 (MUSB controller )based board as a
>>  USB mass storage device.I am using  kernel 2.6.28 on the gadget side.
>> Enumeration happens fine , the mass storage driver gets loaded and
>> udev creates  the  /dev entry for the disk.But the disk(which is an MMC
>> card plugged into the  board)
>
> I guess you mean that the backing storage is an MMC card.

Yes

>
>> does not get mounted and after some time
>> the gadget gets reset.A manual mount hangs.I have tested this  with hosts
>> running Linux 2.6.23, 2.6.26 , 2.6.29-rc3 and Windows.Please  see some
>> debug messages from host/gadget below.I have attached an usbmon o/p also.
>
> The logs indicate that your MMC card isn't working right.  Attempts to
> read sector 3967984 don't succeed, even though the kernel thinks the
> card has 3967992 sectors.

But the same MMC card works fine when  I use kernel 2.6.26 in the gadget.
The disk (card) gets mounted on the host(Linux and Windows) and
becomes usable.I have attached the messages and usbmon o/p for the
same set up (board+MMC card+cable+host) with 2.6.26 kernel running in
the gadget.


>  You can test this yourself from the
> command line on the gadget; just do:
>
>        dd if=/dev/mmc... of=/dev/null count=1 skip=3967984

I did this and got :

dd if=/dev/mmcblk0p1 of=/dev/null count=1 skip=3967984
1+0 records in
1+0 records out

>
> Alan Stern
>
>
Thanks,
Silesh.
------------------------------------------------------------------------------------------------------------------------
/var/log/messages:

Feb  4 11:00:27 work kernel: [ 4056.609228] usb 1-5: new high speed
USB device using ehci_hcd and address 5
Feb  4 11:00:27 work kernel: [ 4056.821242] usb 1-5: New USB device
found, idVendor=0525, idProduct=a4a5
Feb  4 11:00:27 work kernel: [ 4056.821245] usb 1-5: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Feb  4 11:00:27 work kernel: [ 4056.821248] usb 1-5: Product:
File-backed Storage Gadget
Feb  4 11:00:27 work kernel: [ 4056.821250] usb 1-5: Manufacturer:
Linux 2.6.26-omap with musb_hdrc
Feb  4 11:00:27 work kernel: [ 4056.821251] usb 1-5: SerialNumber: 372041756775
Feb  4 11:00:27 work kernel: [ 4056.828488] usb 1-5: configuration #1
chosen from 1 choice
Feb  4 11:00:27 work kernel: [ 4056.878092] scsi7 : SCSI emulation for
USB Mass Storage devices
Feb  4 11:00:32 work kernel: [ 4061.930086] scsi 7:0:0:0:
Direct-Access     Linux    File-Stor Gadget 0316 PQ: 0 ANSI: 2
Feb  4 11:00:33 work kernel: [ 4062.018593] sd 7:0:0:0: [sdb] 3967992
512-byte hardware sectors: (2.03 GB/1.89 GiB)
Feb  4 11:00:33 work kernel: [ 4062.041930] sd 7:0:0:0: [sdb] Write
Protect is off
Feb  4 11:00:33 work kernel: [ 4062.041934] sd 7:0:0:0: [sdb] Assuming
drive cache: write through
Feb  4 11:00:33 work kernel: [ 4062.080716] sd 7:0:0:0: [sdb] 3967992
512-byte hardware sectors: (2.03 GB/1.89 GiB)
Feb  4 11:00:33 work kernel: [ 4062.113823] sd 7:0:0:0: [sdb] Write
Protect is off
Feb  4 11:00:33 work kernel: [ 4062.113831] sd 7:0:0:0: [sdb] Assuming
drive cache: write through
Feb  4 11:00:33 work kernel: [ 4062.113836]  sdb:<7>usb-storage:
queuecommand called
Feb  4 11:00:33 work kernel: [ 4062.131209]
Feb  4 11:00:33 work kernel: [ 4062.138264] sd 7:0:0:0: [sdb] Attached SCSI disk
Feb  4 11:00:33 work kernel: [ 4062.141073] sd 7:0:0:0: Attached scsi
generic sg2 type 0
Feb  4 11:00:34 work hald: mounted /dev/sdb on behalf of uid 500
-------------------------------------------------------------------------------------------------------------------------------
/proc/bus/usb/devices:
T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0525 ProdID=a4a5 Rev= 3.16
S:  Manufacturer=Linux 2.6.26-omap-with musb_hdrc
S:  Product=File-backed Storage Gadget
S:  SerialNumber=372041756775
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
------------------------------------------------------------------------------------------------------------------------------------

Attachment: mon_2.6.26_gadget.out
Description: Binary data


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux