Re: [RFC] virtio_console: Add DRIVER and INTERFACE to uevent.

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

 



Hi Greg,

On Tue, Jan 22, 2013 at 5:16 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Jan 22, 2013 at 09:55:20AM +1030, Rusty Russell wrote:
>> sjur.brandeland@xxxxxxxxxxxxxx writes:
>>
>> > From: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx>
>> >
>> > Add information so rproc-serial can be easily recogniced
>> > from user space. Add the following information to uevent:
>> > DRIVER=virtio_console|virtio_rproc_serial
>> > INTERFACE=grand-parent/parent/name
>> >
>> > Signed-off-by: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx>
>> > ---
>> > Hi,
>> >
>> > I need some way to identify the major/minor number for
>> > the rproc-serial device, given the udev event.
>> > Review comments are welcomed.
>> >
>> > Thanks,
>> > Sjur
>>
>> Hmm, I send all uevent questions to Greg KH (CC'd).
>
> The "INTERFACE" uevent variable is only for USB devices, so for anything
> else to be sending userspace that variable, would confuse things
> greatly.
>
> Sjur, what exactly are you trying to do here?  What do you want
> userspace to know, and what should it do with that information?

I'm trying to help user-space make sense of the port-name generated
by virtio_console. I'm using remoteproc and virtio_console for talking
to a remote device (modem). At startup the port-device will be named
vport<X>p0. If we get a reboot of the remote device, the device name
will change to vport<Y>p0. It is difficult for applications to guess
the X or Y values in order to get hold of the right file after a
reboot.

If we at some point get more than one remote processor using
virtio_console the port name may not even be deterministic.
(X is currently just a monotonic counter).

The current device path is:
/sys/devices/platform/ste-modem/remoteproc0/virtio0/virtio-ports/vport0p0

$cat uevent
MAJOR=254
MINOR=0
DEVNAME=vport0p0

So what I'm trying to do is to add information to udev events in order
to be able create good device names and be able identify the remoteproc
device. I should probably also mention that we're currently running this on
Android.

The initial stab at this was to add information to the udev event.

Another approach could perhaps be to change the way port-names are
generated by virtio_console...


Thanks,
Sjur
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux