Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

David Woodhouse
2007-04-03T23:58:05Z

On Tue, 2007-04-03 at 14:29 -0700, Brad Boyer wrote:
> On Tue, Apr 03, 2007 at 07:28:36PM -0400, David Woodhouse wrote:
> > I agree to a certain extent -- but then again, why should a user know or
> > care about the name /dev/ttyS0 _either_? A GUI PPP dialer should be
> > listing the available serial ports in the system whatever their names
> > are.
>
> The moment you do serial console, the user needs to know. I would hate
> having to have console=ttyPZ0 in my kernel command line. Does that even
> work? I didn't see a change to the console setup in your patch.

Oops. Well-spotted; I forgot to change that. I'll send a replacement
patch.

> The TTY_MAJOR should have never belonged to 8250.c in the first place.
> I know it's just my opinion, but I think this major device should be
> owned by the serial core, and it shouldn't matter what chip drives each
> individual port. Each hardware driver should just register with the
> core how many ports it has and should be allocated from the same range.

Yeah, because that works out really well for Ethernet devices and SCSI
disks, with different numbers every day of the week according to what
order we happen to load drivers in. :)

> This situation is purely a side-effect of the fact that all the
> original Linux supported hardware used the 8250 driver and everyone
> who didn't use 8250 was marginalized enough that they got ignored.

Not really. Non-8250 serial ports, such as the multiport PCI cards from
Cyclades, Stallion, etc. have had their own device numbers for _years_.
With hindsight, it was a mistake for pmac_zilog ever to have been called
'ttyS0' and to have used the ttyS0 device numbers in the first place.

--
dwmw2