[PATCH 1/2] tty: serial: remove hub6 multiport support

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Oct 19 01:12:56 PDT 2026


On Fri, Oct 16, 2026 at 12:48:39PM -0400, Hugo Villeneuve wrote:
> On Fri, 16 Oct 2026 14:59:47 +0200
> Arnd Bergmann <arnd at kernel.org> wrote:

...

> >  	switch (up->port.iotype) {
> > -	case UPIO_HUB6:
> > -		outb(up->port.hub6 - 1 + offset, up->port.iobase);
> > -		return inb(up->port.iobase + 1);
> > -
> >  	case UPIO_MEM:
> >  		return readb(up->port.membase + offset);
> 
> Maybe change to a simple if/else?
> 
> 	if (up->port.iotype == UPIO_MEM)
> 		return readb(up->port.membase + offset);
> 	else
> 		return inb(up->port.iobase + offset);

While it may work, I would still leave a possibility of the default case, but
Ideally this should be a simple callback level change, so it will be checked
only once at the probe time or so.

...

> >  	offset <<= up->port.regshift;
> >  
> >  	switch (up->port.iotype) {
> > -	case UPIO_HUB6:
> > -		outb(up->port.hub6 - 1 + offset, up->port.iobase);
> > -		outb(value, up->port.iobase + 1);
> > -		break;
> > -
> >  	case UPIO_MEM:
> >  		writeb(value, up->port.membase + offset);
> >  		break;
> 
> Similar here:
> 
> 	if (up->port.iotype == UPIO_MEM)
> 		writeb(value, up->port.membase + offset);
> 	else
> 		outb(value, up->port.iobase + offset);

Same here, see how we assign the respective callbacks in the 8250, for instance.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list