Re: CP210x Driver - Issue Enumerating Multiple Interfaces

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

 



After debugging further, I figured out what was causing the problem.

In the driver for the cp210x, there is a line of code in the `.attach`
function that calls `usb_reset_device(serial->dev);`.  See the source
code here: https://github.com/torvalds/linux/blob/master/drivers/usb/serial/cp210x.c#L859

This call to `usb_reset_device` causes the device to be reset just
before the second interface is detected.  For whatever reason, the
reset prevents the second interface from being created in `/dev/`.

By simply removing this line, both interfaces are properly detected
the first time.  Unfortunately, there is a comment above this line
that reads "/* cp210x buffers behave strangely unless device is reset
*/"  Therefore, this reset might actually be necessary in order to
clear the buffers of the CP210x.  In this case, when is the
appropriate time to perform a device reset so that both interfaces are
properly detected?

Thanks,

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