Re: [PATCH v4] USB: core: skip unconfiguration if device doesn't support it

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

 



Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:

> Please pardon me for butting in, but I don't see how this tests the 
> condition that Jose is worried about.
..
> And presumably the device is working again.  However, none of this shows 
> what happens when the device is unconfigured.  To test that, you would 
> have to do:
>
> 	echo 0 >/sys/bus/usb/devices/1-8/bConfigurationValue
> 	echo 1 >/sys/bus/usb/devices/1-8/bConfigurationValue
>
> and then see if the device continues to work.

Ah, sorry. Scanned briefly, saw "bind", and assumed too much.  Making an
ass out of... you know.

Actually I didn't understand the part about unconfiguration since I
can't see how that would happen during normal usage?  Anyway,
unconfiguring also works for me:

canardo:/tmp# hciconfig hci0
hci0:   Type: Primary  Bus: USB
        BD Address: 00:1A:7D:DA:71:15  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING 
        RX bytes:660 acl:0 sco:0 events:43 errors:0
        TX bytes:2178 acl:0 sco:0 commands:43 errors:0

canardo:/tmp# echo 0 >/sys/bus/usb/devices/1-8/bConfigurationValue
canardo:/tmp# hciconfig hci0
Can't get device info: No such device
canardo:/tmp# echo 1 >/sys/bus/usb/devices/1-8/bConfigurationValue


Not entirely sure how to validate that "everything" works at this point?
I can use the rfcomm session the adapter usually handles and also run
lescan after this.  So I guess both BLE and BDR works.

And the counters count something:

canardo:/tmp# hciconfig hci0
hci0:   Type: Primary  Bus: USB
        BD Address: 00:1A:7D:DA:71:15  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING 
        RX bytes:3883 acl:40 sco:0 events:81 errors:0
        TX bytes:2518 acl:19 sco:0 commands:50 errors:0


I can see an error like this logged every time I unconfigure the device:

Bluetooth: hci0: urb 00000000e66a2492 failed to resubmit (2)

There is nothing else logged in kernel log


Bjørn




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

  Powered by Linux