From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Smolik Date: Sat, 05 Aug 2006 12:43:15 +0000 Subject: Re: [PATCH] Fix E250 console with RSC Message-Id: <44D49263.1080307@mydatex.cz> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: sparclinux@vger.kernel.org Marc Zyngier napsal(a): > Folks, > > This patch fixes the RSC console oops Daniel discovered. The > problem is that, when the console is redirected to the RSC, it uses > the second sunsab chip, which is perfectly detected. Unfortunately, > the console framework calls the sunsab_console_setup each time a port > is registered. This has some adverse effect, as the third port has not > been discovered yet... > > This patch, tested on my own E250 through an RSC console, hides the > problem by defering the console setup until the port has been properly > initialized. > > Dave, please consider applying. > > M. > > This patch fixes yet another sunsab problem, when console is set to > anything but the first port. The console framework calls > sunsab_console_setup for each port, and we end up setting up a console > on a not yet discovered port, which leads to an Oops. Instead, defer > console setup until the requested port is properly initialized. Tested > on an E250 through an RSC console. > > Reported by Daniel Smolik > > Signed-off-by: Marc Zyngier > > diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c > index dc673e1..077c201 100644 > --- a/drivers/serial/sunsab.c > +++ b/drivers/serial/sunsab.c > @@ -886,6 +886,15 @@ static int sunsab_console_setup(struct c > unsigned long flags; > unsigned int baud, quot; > > + /* > + * The console framework calls us for each and every port > + * registered. Defer the console setup until the requested > + * port has been properly discovered. A bit of a hack, > + * though... > + */ > + if (up->port.type != PORT_SUNSAB) > + return -1; > + > printk("Console: ttyS%d (SAB82532)\n", > (sunsab_reg.minor - 64) + con->index); > > Thanks Marc for patch. It works great for me. No crash and my E250 now boots. But in dmesg i found this: se@14,200000: ttyS3 at MMIO 0x1fff1200040 (irq = 8) is a SAB82532 V3.2 I mean that my E250 have only 2 ports + RSC console. Am I right ? Dan