Bug 1529
Summary: | 8250 console and pmac_zilog console can not coexist | ||
---|---|---|---|
Product: | Drivers | Reporter: | Olaf Hering (olh) |
Component: | Serial | Assignee: | David Woodhouse (dwmw2) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | nacc, paulus, protasnb |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.0-test9 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Olaf Hering
2003-11-11 15:04:24 UTC
this looks like a valid workaround. --- linuxppc-2.5_2.6.0-test9-bk/drivers/serial/8250.c 2003-10-23 00:25:21.000000000 +0200 +++ ./drivers/serial/8250.c 2003-11-28 23:50:22.000000000 +0100 @@ -45,6 +45,10 @@ #include <linux/serial_core.h> #include "8250.h" +#ifdef CONFIG_PPC_MULTIPLATFORM +#include <asm/processor.h> +#endif + /* * Configuration: * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option @@ -2008,6 +2044,12 @@ static struct console serial8250_console static int __init serial8250_console_init(void) { +#ifdef CONFIG_PPC_MULTIPLATFORM + if(_machine == _MACH_Pmac) { + printk("%s: nothing to do on PowerMac\n",__FUNCTION__); + return -ENODEV; + } +#endif serial8250_isa_init_ports(); register_console(&serial8250_console); return 0; Is this still a bug in, say, 2.6.12 or 2.6.13-rc3? Thanks, Nish yes, reason is the tty layer, one can not request a specific name and major/minor pair. Russell, Any comments on this patch? Is it acceptable for mainline? Thanks, Nish I have no interest in bastardising the serial driver to cope with drivers which want to re-use a validly assigned major/minor and name. Why? Because if we start allowing this, other folk want to do the same. Then SERIAL_DEV_OFFSET becomes a horrible mess of "if this machine then 2 else if that machine then 3 else if some other machine then 4 else 0." It's also completely wrong to mislead the user into thinking that console=ttyS2 will attach the console to their 8250-based port with this solution. It won't. Also, preventing the console initialising in 8250.c won't stop it being registered. The serial core registers the 8250 console when the correct port is added. And no, why the fsck should we bastardise the serial core layer as well to cope with this? All round, this is _not_ workable or maintainable. Why not just do as everyone else does and get a proper major/minor/name allocated for the pmac driver? Or, if you do want to re-use the 8250 drivers regions, maybe spend some time sorting out the char+tty layer so we can dynamically allocate ttys without having to have prior knowledge of the number of minor numbers we require. Currently, to do that means we have to register one tty_drver per tty device. Which is obviously not scalable. It is rather unfortunate that pmac was allowed to ever introduce this disgusting hack. Olaf, Do you have any response to Russell? Or can I go ahead and reject the bug? Maybe this discussion should be happening on LKML, not Bugzilla? or linux-serial? Thanks, Nish This is a valid bugreport. I will work on it as time permits. Having a dynamic major/minor assignment for such setups, or in general, seems to be the correct way. David suggested a rename of the kernel device name. http://lkml.org/lkml/2007/4/3/316 Any update on this, was it materialized? (I should probably look in the git...but it's getting late) Sorry, maybe quick update Olaf? Thanks. Maybe David can respin his device rename patch. http://lkml.org/lkml/2007/4/4/211 should do it just fine, although I believe Paulus would like it rephrased to not use the word 'abuse'. See commit e4533b243e5e0c3a26287a902a1ed0f8f5b1cec0 in Linus' tree. |