Skip to content

Commit

Permalink
libata: Fix early use of port printk. (Was Re: ata4294967295: failed …
Browse files Browse the repository at this point in the history
…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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Dec 1, 2007
1 parent 04d86d6 commit 0f9fe9b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6967,12 +6967,11 @@ int ata_host_start(struct ata_host *host)
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);
}

Expand Down

0 comments on commit 0f9fe9b

Please sign in to comment.