This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB device support in DM8168

We are trying to configure USB ports in DM8168 host and device modes.

With reference to  "http://processors.wiki.ti.com/index.php/Usbgeneralpage", we did Linux kernel configuration and 
inserted the driver by giving command "insmod g_file_storage.ko file=/dev/mmcblk0p3 stall=0" and connected to linux pc it is getting mounted.But it is not mounting in all linux pcs. In some linux pc, some ports it is showing error.


$ insmod g_file_storage.ko file=/dev/mmcblk0p3 stall=0   
g_file_storage gadget: No serial-number string provided!
g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, nofua=0, file: /dev/mmcblk0p3

**************************dmesg log on host PC when its get mounted***************************
[ 4949.330670] usb 2-3: new high speed USB device using ehci_hcd and address 8
[ 4949.484843] usb 2-3: configuration #1 chosen from 1 choice
[ 4949.489779] scsi11 : SCSI emulation for USB Mass Storage devices
[ 4949.490667] usb-storage: device found at 8
[ 4949.490673] usb-storage: waiting for device to settle before scanning
[ 4954.490649] usb-storage: device scan complete
[ 4954.491828] scsi 11:0:0:0: Direct-Access     Linux    File-Stor Gadget 0316 PQ: 0 ANSI: 2
[ 4954.494547] sd 11:0:0:0: Attached scsi generic sg2 type 0
[ 4954.496746] sd 11:0:0:0: [sdb] 3405780 512-byte logical blocks: (1.74 GB/1.62 GiB)
[ 4954.497114] sd 11:0:0:0: [sdb] Write Protect is off
[ 4954.497122] sd 11:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[ 4954.497128] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[ 4954.498603] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[ 4954.498615]  sdb:
[ 4954.512994] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[ 4954.513006] sd 11:0:0:0: [sdb] Attached SCSI disk

**************************dmesg log on host PC when its not get mounted***************************
[ 5017.210531] usb 2-4: new high speed USB device using ehci_hcd and address 9
[ 5017.362659] usb 2-4: configuration #1 chosen from 1 choice
[ 5017.368389] scsi12 : SCSI emulation for USB Mass Storage devices
[ 5017.368733] usb-storage: device found at 9
[ 5017.368738] usb-storage: waiting for device to settle before scanning
[ 5022.363108] usb-storage: device scan complete
[ 5022.363936] scsi 12:0:0:0: Direct-Access     Linux    File-Stor Gadget 0316 PQ: 0 ANSI: 2
[ 5022.365771] sd 12:0:0:0: Attached scsi generic sg2 type 0
[ 5022.373849] sd 12:0:0:0: [sdb] 3405780 512-byte logical blocks: (1.74 GB/1.62 GiB)
[ 5022.374341] sd 12:0:0:0: [sdb] Write Protect is off
[ 5022.374349] sd 12:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[ 5022.374355] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[ 5022.375592] sd 12:0:0:0: [sdb] Assuming drive cache: write through
[ 5022.375602]  sdb:
[ 5022.500314] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5022.802690] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5023.091769] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5054.132665] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5054.288727] sd 12:0:0:0: [sdb] Unhandled error code
[ 5054.288736] sd 12:0:0:0: [sdb] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
[ 5054.288746] sd 12:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
[ 5054.288769] end_request: I/O error, dev sdb, sector 0
[ 5054.288780] Buffer I/O error on device sdb, logical block 0
[ 5054.288790] Buffer I/O error on device sdb, logical block 1
[ 5054.420186] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5054.711914] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5055.020186] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5055.312695] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5055.464990] sd 12:0:0:0: [sdb] Unhandled error code
[ 5055.464999] sd 12:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 5055.465010] sd 12:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
[ 5055.465034] end_request: I/O error, dev sdb, sector 0
[ 5055.465046] Buffer I/O error on device sdb, logical block 0
[ 5055.465055] Buffer I/O error on device sdb, logical block 1
[ 5055.600294] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5055.902714] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5056.191852] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5056.347992] sd 12:0:0:0: [sdb] Unhandled error code
[ 5056.348002] sd 12:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 5056.348013] sd 12:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
[ 5056.348036] end_request: I/O error, dev sdb, sector 0
[ 5056.348047] Buffer I/O error on device sdb, logical block 0
[ 5056.348057] Buffer I/O error on device sdb, logical block 1
[ 5056.482758] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5056.770435] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5057.061396] usb 2-4: reset high speed USB device using ehci_hcd and address 9
[ 5057.217615] sd 12:0:0:0: [sdb] Unhandled error code
[ 5057.217626] sd 12:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 5057.217636] sd 12:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
[ 5057.217660] end_request: I/O error, dev sdb, sector 0
[ 5057.217671] Buffer I/O error on device sdb, logical block 0
[ 5057.217682] Buffer I/O error on device sdb, logical block 1

When connected to windows pc the gadget name appears in removable devices icon.

Am i missing something or any more further steps is needed ?

Please help us on this issue.