From: Greg KH <greg@kroah.com>
To: Matthew Wilcox <matthew@wil.cx>,
James.Smart@Emulex.Com, Andrew Morton <akpm@osdl.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] add transport class symlink to device object
Date: Thu, 18 Aug 2005 00:04:42 -0700 [thread overview]
Message-ID: <20050818070442.GA8258@kroah.com> (raw)
In-Reply-To: <20050818075027.D2365@flint.arm.linux.org.uk>
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
next prev parent reply other threads:[~2005-08-18 7:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 15:34 [PATCH] add transport class symlink to device object James.Smart
2005-08-13 21:39 ` Greg KH
2005-08-13 23:36 ` James Bottomley
2005-08-14 0:42 ` James Bottomley
2005-08-14 1:37 ` James Bottomley
2005-08-14 15:02 ` Matthew Wilcox
2005-08-14 22:25 ` Russell King
2005-08-15 0:43 ` Matthew Wilcox
2005-08-15 8:32 ` Russell King
2005-08-18 5:21 ` Greg KH
2005-08-18 6:30 ` Russell King
2005-08-18 6:41 ` Greg KH
2005-08-18 6:50 ` Russell King
2005-08-18 7:04 ` Greg KH [this message]
2005-08-18 11:43 ` Matthew Wilcox
2005-08-15 22:41 ` James Bottomley
2005-08-18 5:23 ` Greg KH
2005-08-18 6:37 ` Greg KH
2005-08-18 19:50 ` Dmitry Torokhov
2005-08-31 21:43 ` Greg KH
2005-09-01 5:57 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2005-08-14 12:42 James.Smart
2005-08-14 14:17 ` James Bottomley
2005-08-16 0:52 James.Smart
2005-08-16 1:08 ` James Bottomley
2005-08-16 13:41 ` Luben Tuikov
2005-08-16 13:37 ` Luben Tuikov
2005-08-16 20:53 ` Russell King
2005-08-16 15:50 James.Smart
2005-08-18 11:31 James.Smart
2005-08-18 11:32 James.Smart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050818070442.GA8258@kroah.com \
--to=greg@kroah.com \
--cc=James.Smart@Emulex.Com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).