LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   usb bulk transfer error: reset by peer (https://www.linuxquestions.org/questions/linux-newbie-8/usb-bulk-transfer-error-reset-by-peer-4175542658/)

awadhesh_emb 05-15-2015 04:50 AM

usb bulk transfer error: reset by peer
 
Hi,
I am working on usb device driver. Frequently I am getting problem in usb_bulk_msg during sending data from host to device, its returning -104 i.e. reset by peer.

I am using embedded linux_3.14 on Renesas RZA1H board.

Please let me know what is the issue.

Thanks

eino 05-15-2015 12:22 PM

Quote:

Originally Posted by awadhesh_emb (Post 5362707)
Hi,
I am working on usb device driver. Frequently I am getting problem in usb_bulk_msg during sending data from host to device, its returning -104 i.e. reset by peer.

I am using embedded linux_3.14 on Renesas RZA1H board.

Please let me know what is the issue.

Thanks

The usb driver your working on may be in conflict with the usb driver loaded by the kernel.
This will happen unless your building a kernel patch, for the new driver.

awadhesh_emb 05-19-2015 01:44 AM

Hi,
Thanks for your reply. I compile the usb driver on same kernel which I have loaded to the target. What may be other conflicts.
Please tell me in details because I am new for usb driver.

eino 05-19-2015 05:37 AM

You can see the supported devices (by modalias) and their associated modules with

Code:

less /lib/modules/`uname -r`/modules.alias
If you grep for the usb-storage device driver, you'll see it has some specific devices it supports by vendor and device ID, and will also attempt to support any device with the right (storage) class, no matter the vendor/device.

You can influence this using userspace mechanisms on your OS (/etc/modprobe.d/ on Debian and friends. You can blacklist modules, or you can specify modules to be loaded by modalias, just like the modules.alias file (and using the same syntax).
Code:

depmod -a
will then regenerate the module loader's patterns.

If the driver has no support for your device, it should ignore it.

This is the theory in the general case.

In practice, and in the case of USB, I see your device appears to have two interfaces, of which storage is one. The kernel will attach to the storage interface of the overall device. If the other interface has the right class, the usbnet driver could attach to it. Yes, you can have multiple drivers attached to the same physical device, because a USB device exports multiple interfaces e.g. my Logitech G15 keyboard exports two because it has a keyboard device and an LCD screen, each of which is handled by a separate drivers.

The fact that the second interface of your USB device isn't detected is indicative of lack of support in the kernel. Whatever the case, you can list the device interfaces/endpoints in excruciating detail using
Code:

lsusb -v | less
, then scroll down to your particular device.

You can limit the output by device:vendor ID or USB path if you're so inclined.


All times are GMT -5. The time now is 10:49 AM.