Re: [PATCH] add transport class symlink to device object

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

 



On Sun, Aug 14, 2005 at 11:25:25PM +0100, Russell King wrote:
> On Sun, Aug 14, 2005 at 04:02:31PM +0100, Matthew Wilcox wrote:
> > Last time I tried to do something like this, it fell over with
> > multi-function serial ports.  Look at this example:
> > 
> > # ls -l /sys/class/tty/ttyS*/device | cut -c40-
> > /sys/class/tty/ttyS0/device -> ../../../devices/parisc/0/0:0/pci0000:00/0000:00:04.0
> > /sys/class/tty/ttyS1/device -> ../../../devices/parisc/0/0:0/pci0000:00/0000:00:04.0
> > /sys/class/tty/ttyS2/device -> ../../../devices/parisc/0/0:0/pci0000:00/0000:00:04.0
> > 
> > Adding the reverse links gets you three links in the 0000:00:04.0
> > directory all called 'tty' (or 'class:tty', whatever), each pointing to
> > a different place.  This doesn't happen for scsi devices as the class is
> > attached to the scsi_dev, not the pci_dev.  I think the tty subsystem
> > needs to be modified to add tty_devs as subdevices of the pci_dev.
> 
> Eww.  Do you really want one struct device per tty with all the
> memory each one eats?
> 
> If that's really what you want you need to talk to Alan and not me.
> Alan looks after tty level stuff, I look after serial level stuff.
> The above is a tty level issue not a serial level issue.

mmm.  I don't know whether it's really a tty level issue or a serial
issue.  The only tty classes with corresponding devices are the serial
ones, at least on my system.  If this is the case, then the right fix
would seem to be something like creating a new struct device for each
serial port, then making that the uart_port->dev instead of the pci_dev
or whatever.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux