lkml.org 
[lkml]   [2007]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))
On Fri, 30 Nov 2007 14:34:11 +0200 (EET)
Meelis Roos <mroos@linux.ee> wrote:

> > Can you stick a stack trace in at that point ? That would help diagnose
> > it a great deal quicker.
>
> Finally done - found out hard way that BUG() is too bad and
> dump_st5ack() suits me better.

Thanks. This should fix the real cause, and also allow for port start to
fail politely with -ENODEV.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc2-mm1/drivers/ata/libata-core.c linux-2.6.24-rc2-mm1/drivers/ata/libata-core.c
--- linux.vanilla-2.6.24-rc2-mm1/drivers/ata/libata-core.c 2007-11-16 17:55:11.000000000 +0000
+++ linux-2.6.24-rc2-mm1/drivers/ata/libata-core.c 2007-11-30 14:31:56.093473744 +0000
@@ -6999,12 +7014,11 @@
if (ap->ops->port_start) {
rc = ap->ops->port_start(ap);
if (rc) {
- ata_port_printk(ap, KERN_ERR, "failed to "
- "start port (errno=%d)\n", rc);
+ if (rc != -ENODEV)
+ dev_printk(KERN_ERR, host->dev, "failed to start port %d (errno=%d)\n", i, rc);
goto err_out;
}
}
-
ata_eh_freeze_port(ap);
}


--
"Twenty-five million records of children's names and addresses have
disappeared. Given the amount of data that the Government are collecting, no
doubt including whether the children have been bad or good, and that it is
six weeks before Christmas, it is blindingly obvious who has taken them."
-- Desmond Swayne MP



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-30 16:29    [W:0.342 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site