Re: virtual USB device

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

 



> On Mar 22, 2017, at 3:34 AM, Johan Hovold <johan@xxxxxxxxxx> wrote:
> 
> On Wed, Mar 22, 2017 at 11:19:10AM +0100, Greg Kroah-Hartman wrote:
>> On Wed, Mar 22, 2017 at 02:26:52AM -0700, Greg Hazel wrote:
>>> Hi,
>>> 
>>> I’m working with Greybus and I’m wondering if there’s any support or
>>> code for virtual USB devices.
>> 
>> Yes, the USB virtual controller driver is in the kernel, but you need to
>> have it enabled in your firmware as well, as it passes USB commands from
>> the kernel down to the firmware and then USB device directly.
> 
> The driver that's merged is far from complete I'm afraid. There was some
> development happening out of tree, but the effort was discontinued and
> the work in progress never merged back.

Which side is not likely to work well? I can control the virtual device side, but not the host side.

> 
>> Note, there are some limits on the size of a USB transaction at the
>> moment, we never got the chance to fix them up, but small transactions
>> (like a keyboard), should work fine.  Once you start to get up to 4kb in
>> a transaction, you might have firmware issues.
> 
> That would even be 2k, and you'd still need the out-of-tree driver…

1500 bytes is the typical ethernet MTU, so even with overhead is 2k is reasonable?

> 
>>> On one side of Greybus I have a small nuttX environment with a UART
>>> connected device which I can write modules for, and on the other side
>>> of Greybus I’d like to provide a network interface. I can’t modify
>>> that side, so I have to work with the kernel modules it has available.
>>> I thought it might be possible to present a virtual USB CDC-EVM to
>>> Greybus, and my guess (hope) is that cdc_ether would pick it up on the
>>> other side.
>> 
>> Ah, if this isn't really a network device, or modem, I wouldn't mess
>> with cdc-evm.  If it is a modem, then it should "just work" with the
>> uart code today, just tell userspace this is a modem and all should be
>> fine.
> 
> Indeed, that would be the way to go.

This suggestion isn’t clear to me. The UART device is not a standard network device or modem; it needs some of my software to behave like one. I’d like to present it in a way that Greybus can provide to the host machine. cdc-evm was my first guess at that interface; but what do you think would be better?

-Greg


_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux