Re: [PATCH] usb/uas: only bind if the hcd supports SG

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

 



On 01/11/2012 09:50 PM, Alan Stern wrote:
  Assume that usb-storage does not
refuse to bind.

But my original question explicitly asked about what happens if
usb-storage _does_ refuse to bind.  So did both of the follow-up
questions.

I can't test it easily right now. What I see with my UAS gadget is that usb-storage tries to bind, refuses and then UAS is probing it.

I don't understand.  Why can't you use CDC and storage at the same
time?

I though you can only use _one_ Interface at a time. Hmmm.

On any composite USB device you should be able to use multiple
interfaces at the same time.

Hmmm.

  So I loaded
the g_multi driver. After that I loaded manually the storage driver and
was able to access /dev/sda.

Why did you need to load it manually?  Doesn't the hotplug mechanism
load it automatically?

It does. It loaded all the driver and repeated to bind cdc-net and a
few others over and over again. So tried to load them by hand to see
when it starts to explode.

  Next thing I did was loading the network
driver and I got usb0 and usb1. I set the ip address. After that I tried
to access dev/sda again and it hung:

[  157.672942] usbcore: registered new interface driver cdc_ether
root@squsb:~# hexdump -C /dev/sda | head

That sounds like a bug.

[  216.804125] cdc_ether 1-1:2.0: forced unbind
[  216.804735] dummy_hcd dummy_hcd: shutdown urb deba5db0 ep3in-intr
[  216.808351] cdc_ether 1-1:2.0: usb1: unregister 'cdc_ether'
usb-dummy_hcd-1, CDC Ethernet Device
[  216.904273] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[  216.960175] usb 1-1: reset high-speed USB device number 2 using dummy_hcd
[  217.020186] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[  217.124086]  gadget: high-speed config #2: Multifunction with CDC ECM

Presumably these resets were caused by usb-storage timing out and
trying to recover.

This went for a while and then it ended with:
[  254.459129] sd 0:0:0:0: Device offlined - not ready after error recovery
[  254.461439] sd 0:0:0:0: rejecting I/O to offline device
[  254.462150] sd 0:0:0:0: rejecting I/O to offline device
[  254.462996]  sda: unable to read partition table

That makes me think that I can not use two of those at the same time.
But I can use one of them at a time.

No, you definitely should be able to use two interfaces at the same
time.  Something needs to be fixed.  Did you try checking with usbmon?

Well. I learned now it is designed to use two interfaces at the same. I
did no know that. So let me try to investigate this later :)


Alan Stern


Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux