mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Meelis Roos <mroos@linux.ee>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	jeff@garzik.org, akpm@osdl.org
Subject: [PATCH] libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))
Date: Fri, 30 Nov 2007 15:23:16 +0000	[thread overview]
Message-ID: <20071130152316.32e2effa@the-village.bc.nu> (raw)
In-Reply-To: <Pine.SOC.4.64.0711301433130.13468@math.ut.ee>

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




  reply	other threads:[~2007-11-30 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-28 17:59 ata4294967295: failed to start port (errno=-19) Meelis Roos
2007-11-28 20:07 ` Alan Cox
2007-11-29 20:06   ` Alessandro Suardi
2007-11-30  7:15     ` Craig Schlenter
2007-11-30 12:34   ` Meelis Roos
2007-11-30 15:23     ` Alan Cox [this message]
2007-12-01 18:25       ` [PATCH] libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19)) Meelis Roos
2007-12-01 22:45       ` Jeff Garzik
2007-11-30 21:58     ` ata4294967295: failed to start port (errno=-19) Alessandro Suardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071130152316.32e2effa@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®