Re: system awareness of endpoints

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

 



On Sun, Mar 13, 2016 at 09:31:39PM -0700, bruce m beach wrote:
> Hello Greg
> 
> >> I believe I can change the Device descriptors in firmware, upload the new
> >> firmware and reboot the stick but wouldn't the usb subsystem have the old
> >> device descriptor from the previous hotplug/system boot?
> 
> > Nope, the kernel reads the descriptor from the device when it is connected,
> > you can check this yourself by doing 'lsusb -v' when it is plugged in.
> 
>   I can't make this out. Consider the following:
> 
> 1. Plug in the device but do -> not <- load the driver. (ie no firmware but
>    code is running in rom)) Do a lsub -v. You get the first device descriptors.

The kernel already read the descriptors before you ran 'lsusb', it has
to as part of the USB init sequence.

> 2> Attach the driver and firmware is uploaded, adds more endpoints,

Wait, what?  How can you dynamically change your USB endpoints without
re-enumerating your device?  (hint, you can't...)

> and
>    completely rearanges the device descriptor. Do a lsusb -v. Has the host usb
>    subsystem automatically done a new scan or do you still get the original
>    lsusb -v.

lsusb is looking at the descriptor that the device originally gave the
operating system and parsing that.  You can't dynamically change your
descriptors without resetting your device and having the OS restart it.
Please read the USB spec if you want all the gory details.

> > No need to do anything in the kernel, all should be fine as long as your
> > firmware is correct.
> 
>   All this might also be moot, since it is possible that I can rearrange the
>   ep's but might not be able change the device descriptor, since routines in rom
>   might need to access a specific address where the device descriptor resides.

I have no idea what this means, sorry.

greg k-h
--
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