Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2002 07:50:10 -0800
From:      "Kevin Oberman" <oberman@es.net>
To:        Tony Maher <tonym@biolateral.com.au>
Cc:        stable@freebsd.org
Subject:   Re: panic on resume (ata related?) 
Message-ID:  <20020325155010.639625D06@ptavv.es.net>
In-Reply-To: Your message of "Mon, 25 Mar 2002 20:16:30 %2B1100." <200203250916.g2P9GUr15835@c16703.thorn1.nsw.optusnet.com.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Mon_Mar_25_07:48:54_2002-1
Content-Type: text/plain; charset=US-ASCII

> Date: Mon, 25 Mar 2002 20:16:30 +1100 (EST)
> From: Tony Maher <tonym@biolateral.com.au>
> Sender: owner-freebsd-stable@FreeBSD.ORG
> 
> Hello,
> 
> cvsupped about 24 hours ago and made world.  Suspended laptop (Dell Inspiron
> 3500) on leaving working and when I resumed at home got the following panic.
> Tried the suspend again, this time dropped into debugger but did not get
> a second core file due to lack of disk space. It also appeared to be
> ata related.

Yes, this seems to be a common problem with the new ata code Soren
merged last week. I am seeing it on my ThinkPad, as well.

There are a couple of reports that the patch Ian Dowse posted back on
Friday will fix the problem. I have not yet tried it, but will soon.

If you don't have the message any more, you can find it at:
http://groups.google.com/groups?q=Ian+Dowse+resume+group:mailing.freebsd.stable&hl=en&selm=a7gkv8%

I will attach his patch. I had to strip off the HTML cruft from Google,
but I think it's clean.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634


--Multipart_Mon_Mar_25_07:48:54_2002-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="ata-resume-dowse.patch"
Content-Transfer-Encoding: 7bit


Index: ata-all.c
===================================================================
RCS file: /home/iedowse/CVS/src/sys/dev/ata/ata-all.c,v
retrieving revision 1.50.2.30
diff -u -r1.50.2.30 ata-all.c
--- ata-all.c	18 Mar 2002 08:37:33 -0000	1.50.2.30
+++ ata-all.c	23 Mar 2002 00:53:32 -0000
@@ -162,7 +162,7 @@
 ata_attach(device_t dev)
 {
     struct ata_channel *ch;
-    int error, rid;
+    int error, rid, s;
 
     if (!dev || !(ch = device_get_softc(dev)))
 	return ENXIO;
@@ -186,6 +186,7 @@
      * otherwise attach what the probe has found in ch->devices.
      */
     if (!ata_delayed_attach) {
+	s = splbio();
 	if (ch-&gt;devices & ATA_ATA_SLAVE)
 	    if (ata_getparam(&ch->device[SLAVE], ATA_C_ATA_IDENTIFY))
 		ch->devices &= ~ATA_ATA_SLAVE;
@@ -210,6 +211,7 @@
 	if (ch->devices & ATA_ATAPI_SLAVE)
 	    atapi_attach(&ch->device[SLAVE]);
 #endif
+	splx(s);
     }
     return 0;
 }
@@ -425,7 +427,7 @@
 
     /* apparently some devices needs this repeated */
     do {
-	if (ata_command(atadev, command, 0, 0, 0, ATA_WAIT_INTR)) {
+	if (ata_command(atadev, command, 0, 0, 0, ATA_IMMEDIATE)) {
 	    ata_prtdev(atadev, "%s identify failed\n",
 		       command == ATA_C_ATAPI_IDENTIFY ? "ATAPI" : "ATA");
 	    return -1;
@@ -469,13 +471,14 @@
 ata_boot_attach(void)
 {
     struct ata_channel *ch;
-    int ctlr;
+    int ctlr, s;
 
     if (ata_delayed_attach) {
 	config_intrhook_disestablish(ata_delayed_attach);
 	free(ata_delayed_attach, M_TEMP);
 	ata_delayed_attach = NULL;
     }
+    s = splbio();
 
     /*
      * run through all ata devices and look for real ATA & ATAPI devices
@@ -522,6 +525,7 @@
 	    atapi_attach(&ch->device[SLAVE]);
     }
 #endif
+    splx(s);
 }
 
 static void


--Multipart_Mon_Mar_25_07:48:54_2002-1--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020325155010.639625D06>