Re: [PATCH] serial: 8250_hub6: Fix double definition for hub6_match_port()
Uwe Kleine-König <[email protected]> Wed, 29 Jul 2026 15:30:57 +0200
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <amn8Hb2dbv_Sah_Y@monoceros> |
Hello Hugo, On Mon, Jul 27, 2026 at 11:26:43AM -0400, Hugo Villeneuve wrote: > On Mon, 27 Jul 2026 11:22:10 -0400 > Hugo Villeneuve <[email protected]> wrote: > > > Hi Uwe, > > > > On Fri, 24 Jul 2026 09:58:13 +0200 > > Uwe Kleine-König <[email protected]> wrote: > > > > > On Thu, Jul 23, 2026 at 11:13:59PM -0400, Hugo Villeneuve wrote: > > > > > For me the open question remains if the driver works in the > > > > > configuration CONFIG_SERIAL_8250=y (and thus CONFIG_SERIAL_CORE=y) + > > > > > CONFIG_SERIAL_8250_HUB6=m. In this case at least commit > > > > > 3d406299d8829747fe2e8692f4c29fe3dc1d101f + > > > > > https://lore.kernel.org/linux-serial/[email protected]/ > > > > > introduces a logical change in uart_match_port() that isn't explained in > > > > > the commit log. > > > > > > > > Not sure what you mean by that logical change? > > > > > > With said configuration and before > > > 3d406299d8829747fe2e8692f4c29fe3dc1d101f uart_match_port() returned > > > > > > port1->iobase == port2->iobase && port1->hub6 == port2->hub6 > > > > > > and with 3d406299d8829747fe2e8692f4c29fe3dc1d101f (and your fix on top) > > > it returns false (because when drivers/tty/serial/serial_core.c is > > > compiled IS_REACHABLE(CONFIG_SERIAL_8250_HUB6) evaluates to false). > > > > this change was certainly not intended, sorry about that. Looks like > > there are still subtle Kconfig-isms (and 8250-isms) that I still need to > > master... > > > > So to be sure i understand this correctly: > > I will submit a patch to replace IS_REACHABLE with IS_ENABLED, which > > means that the configuration CONFIG_SERIAL_8250=y and > > CONFIG_SERIAL_8250_HUB6=m is not supported, as you stated that > > it currently cannot happen? No, that can happen. e.g. ARCH=parisc allmodconfig has something similar (and this is how I stumbled over the breakage of 3d406299d8829747fe2e8692f4c29fe3dc1d101f). [similar = SERIAL_CORE=y + SERIAL_8250_HUB6=m] > Or we leave it as is, since this combination is not really valid? Not sure what you're saying here. You want to keep the IS_REACHABLE and so be able to compile CONFIG_SERIAL_8250=y + CONFIG_SERIAL_8250_HUB6=m but have that broken at runtime? What does make CONFIG_SERIAL_8250=y + CONFIG_SERIAL_8250_HUB6=m "not really valid"? Or do you mean something else? I think the real fix would be to just copy uart_match_port() into the two drivers that actually use it (and remove the then dead code paths). Then it would be drivers/tty/serial/8250/8250_core.c using hub6_match_port() only and that can be handled by a proper dependency. Best regards Uwe
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmpqAI8ACgkQj4D7WH0S /k4nCgf/R688pmPPgA42egeiaYdfJAOziwAQrC3AuEU0j60XHHdHUtiyCOXtLaXg IPBEjdgTieouEMMG44+aayNTU5Uz3rv8bhkJhmolwzUrGGYK+FDeDVVlu5RaXKih 7Kyg+cjUlgwcrRSCwG+hTsAZdiU2kAcgRvn008xwLD9rmRjlu2tXT7o591I2p7Je cbi40oCekeqQ9DE0DlBiXmUMgvefZviPCM3CQqvmZHIgDvD+ve0HRh7keTtpjT0R VYkGtgs2hYK4cndpZhfOawBAbwU/zri6rY5dL3UCj+7cEDUCt3/Nvx1FJrGZ6FTm eLTFqc6MoiZXm/C1LSVBMVukdYoC2A== =CPWt -----END PGP SIGNATURE-----