Here is the dump from dmesg with the verbose option enabled in the driver:
DM320 : DM320 USB Peripheral Controller (test version 1.0)
DM320 : version: 2005 September 01, Vishal Borker ( [EMAIL PROTECTED] )
Interrupt: RESET Interrupt
g_file_storage DM320 Gadget-lun0: open backing file: /flash_media
g_file_storage DM320 Gadget: File-backed Storage Gadget, version: 21 March 
2004
g_file_storage DM320 Gadget: Number of LUNs=1
g_file_storage DM320 Gadget-lun0: ro=0, file: /flash_media
g_file_storage DM320 Gadget: transport=Bulk-only (x50)
g_file_storage DM320 Gadget: protocol=Transparent SCSI (x06)
g_file_storage DM320 Gadget: VendorID=x0525, ProductID=xa4a5, Release=x0309
g_file_storage DM320 Gadget: removable=1, stall=0, buflen=16384
g_file_storage DM320 Gadget: I/O thread pid: 21
Interrupt: RESET Interrupt
DM320 : full speed
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 00 01 00 00 40 00
g_file_storage DM320 Gadget: get device descriptor
g_file_storage DM320 Gadget: ep0-in, length 18:
     0:  12 01 00 02 00 00 00 40  25 05 a5 a4 09 03 01 02
    10:  03 01
Interrupt: RESET Interrupt
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 00 01 00 00 12 00
g_file_storage DM320 Gadget: get device descriptor
g_file_storage DM320 Gadget: ep0-in, length 18:
     0:  12 01 00 02 00 00 00 40  25 05 a5 a4 09 03 01 02
    10:  03 01
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 00 02 00 00 09 00
g_file_storage DM320 Gadget: get configuration descriptor
g_file_storage DM320 Gadget: ep0-in, length 9:
     0:  09 02 20 00 01 01 00 c0  01
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 00 03 00 00 ff 00
g_file_storage DM320 Gadget: get string descriptor
g_file_storage DM320 Gadget: ep0-in, length 4:
     0:  04 03 09 04
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 03 03 09 04 ff 00
g_file_storage DM320 Gadget: get string descriptor
g_file_storage DM320 Gadget: ep0-in, length 26:
     0:  1a 03 33 00 32 00 33 00  31 00 32 00 30 00 34 00
    10:  44 00 36 00 31 00 37 00  32 00
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 00 02 00 00 ff 00
g_file_storage DM320 Gadget: get configuration descriptor
g_file_storage DM320 Gadget: ep0-in, length 32:
     0:  09 02 20 00 01 01 00 c0  01 09 04 00 00 02 08 06
    10:  50 00 07 05 81 02 40 00  00 07 05 02 02 40 00 00
g_file_storage DM320 Gadget: ep0-setup, length 8:
     0:  80 06 00 06 00 00 0a 00
~ # g_file_storage DM320 Gadget: full speed config #1
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 70 2e ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 70 2e ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 70 2e ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 70 2e ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 70 2e ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0



When i open a file, edit it and save:

g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 b8 08 ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 b8 08 ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 70 2e ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 70 2e ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 70 2e ba ff  00 00 00 00 00 00 06 00
    10:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: TEST UNIT READY;  Dc=6, Dn=0; 
Hc=6,
Hn=0
g_file_storage DM320 Gadget: bulk-in, length 13:
     0:  55 53 42 53 70 2e ba ff  00 00 00 00 00
g_file_storage DM320 Gadget: bulk-out, length 31:
     0:  55 53 42 43 70 6e ba ff  00 10 00 00 00 00 0a 2a
    10:  08 00 00 00 0d 00 00 08  00 00 00 00 00 00 00
g_file_storage DM320 Gadget: SCSI command: WRITE(10);  Dc=10, Do=4096; 
Hc=10, H
o=4096
Interrupt: RESET Interrupt  ---> we get reset here and then kaput

Any comments?







----- Original Message ----- 
From: "Alan Stern" <[EMAIL PROTECTED]>
To: "vishal" <[EMAIL PROTECTED]>
Cc: "linux usb devel" <[email protected]>
Sent: Thursday, November 17, 2005 9:11 PM
Subject: Re: [linux-usb-devel] Gadget Controller driver


| On Thu, 17 Nov 2005, vishal wrote:
|
| >   thanks a lot Greg. I applied the said patches. And thankfully i am 
able to
| > detect my device as a Mass strage media device when i use the following
| > module load command:
| > #insmod g_file_storage.ko file=/my_file  stall=n transport=BBB 
protocol=SCSI
| > removable=y
| >   But the detection is succesfull on a windows host. I am able to read 
the
| > files succesfully and flawlessly!!
| >
| >  However when i try to edit a file and save it, the host controller 
resets
| > the device(my board)
| >    I traced the code and here is what i found happens:
| >    When the Host issues a WRITE(10) command to the device, my DM320 
function
| > driver hands it over to the Mass Media driver gadget layer wherein  the 
code
| > jumps to the do_write() function in the file_storage.c, and there it 
keeps
| > waiting inside the
| > sleep_thread(),wait_event_interruptible(fsg->thread_wqh...)
| >  I havent really understood the Mass Media Driver layer yet, am trying
| > to...any help on what may cause this problem?
|
| The driver is waiting for the host to send data.  It can't write anything
| until the host tells it what to write.
|
| >   And why would the device not get detected on my Linux host running 
2.6.13
| > ?. I get read descriptor errors on my linux host when i plug in the
| > device.Could there be some timing issues? Maybe the device isnt settling
| > down in the stipulated time?
|
| There are lots of possible errors.  If you would post a verbose debugging
| log from the host and from the gadget, maybe I could tell what's going
| wrong.  Make sure the host has CONFIG_USB_DEBUG turned on and the gadget
| driver has #define DEBUG and #define VERBOSE.
|
| Alan Stern 



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to