Re: coping with poor usb implementations

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

 



On Sat, 17 Dec 2011, Tim Coote wrote:

> >>>> trying to interrogate the device before it's completed it's
> >>>> initialisation.
> >>> 
> >>> That's possible, but if it's true then it's the device's fault.  The 
> >>> device has a fixed amount of time in which to carry out its 
> >>> initialization, as described in the USB spec.  If it's not ready by the 
> >>> end of that time then it isn't compliant with the spec.
> >> Indeed, it is 'the device's' fault. But, I believe, it's a common non-compliance.
> > 
> > What makes you think so?
> This blog post http://bit.ly/ssHC1Z

That blog post has no apparent connection with your problem.  It says 
nothing about multiple disconnect messages appearing in the system log.

> I don't know what's going wrong in detail. It looks to me more like a
> timing issue (communications from the USB host - ie linux box -
> overwhelming the device, which eventually runs out of memory
> somewhere (eg runs out of stack, consumes too much memory for all
> functions to work in some way.

If you want, you can view the USB communications directly, using either 
usbmon or wireshark.

> >> Is the implication here that it's not possible to put USB 'in front'
> >> of legacy RS232 in a way that's compliant with USB?
> > 
> > Not at all; it is indeed possible to do so.  There are plenty of
> > USB/RS232 converters available on the market.  Linux has several dozen 
> > USB-serial drivers, many of which can control multiple types of 
> > devices.
> Presumably these devices have a usb connector on one end and an rs232
> connector on the other. I had in mind the situation where a hardware
> manufacturer wires up their own 'solution'.

The same chips are used in both situations.  The hardware manufacturers
who wire up their own "solution" buy chips from the same vendors who
sell the USB/RS232 converters.

> > [snip]
> > Another possibility is to unbind uhci-hcd from the controller into 
> > which the device is plugged.  You can do that without building uhci-hcd 
> > as a module.
> Can you elaborate on that a bit?  I cannot seem to get uchi_hcd to
> unbind from anything. I'd assumed that rmmod would work (it doesn't,
> yet, but the kernel config has the uchi_hcd driver compiled in,
> rather than as a module. I'm in the process of trying a module based
> driver). Is there some other mechanism?

Yes, there is:

	echo X >/sys/bus/pci/drivers/uhci_hcd/unbind

Replace X with the correct name of the UHCI device for the bus your 
device is plugged into -- this will be one of the file names in the 
/sys/bus/pci/drivers/uhci_hcd directory, such as 0000:00:1d.1.

To rebind the controller, use the same command but replace "unbind" 
with "bind".

Alan Stern

--
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