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

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

 



On Thu, Aug 18, 2005 at 07:50:27AM +0100, Russell King wrote:
> On Wed, Aug 17, 2005 at 11:41:29PM -0700, Greg KH wrote:
> > On Thu, Aug 18, 2005 at 07:30:50AM +0100, Russell King wrote:
> > > On Wed, Aug 17, 2005 at 10:21:56PM -0700, Greg KH wrote:
> > > > On Mon, Aug 15, 2005 at 09:32:44AM +0100, Russell King wrote:
> > > > > On Mon, Aug 15, 2005 at 01:43:03AM +0100, Matthew Wilcox wrote:
> > > > > > On Sun, Aug 14, 2005 at 11:25:25PM +0100, Russell King wrote:
> > > > > > > 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.
> > > > > 
> > > > > What's the reason for enforcing one struct device per struct class_dev ?
> > > > > I thought one of the points of class_dev was that you could have multiple
> > > > > of them per struct device.
> > > > 
> > > > No such enforcement is needed at all, and not encouraged.
> > > 
> > > The complaint is that serial is registering several different class_devs
> > > for the same class and device.
> > 
> > That's because they are unique class devices, right?  I don't see a
> > problem here at all.
> 
> They are class devices called ttyS0, ttyS1, ttyS2 so you can say
> they're uniquely named.
> 
> The problem is that Matthew wants to add a symlink from the device
> device to the class device to complement the class device to device
> symlink, since we end up with multiple symlinks in the devices subdir
> all called the same.
> 
> This causes serial a problem because we have multiple class devices
> per device.

Ah, yeah, but the patch I just posted fixes it:

$ tree /sys/devices/platform/serial8250/
/sys/devices/platform/serial8250/
|-- bus -> ../../../bus/platform
|-- driver -> ../../../bus/platform/drivers/serial8250
|-- power
|   `-- state
|-- tty:ttyS0 -> ../../../class/tty/ttyS0
|-- tty:ttyS1 -> ../../../class/tty/ttyS1
|-- tty:ttyS2 -> ../../../class/tty/ttyS2
`-- tty:ttyS3 -> ../../../class/tty/ttyS3


Matthew, this work for you?

thanks,

greg k-h
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux