Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2004 14:01:13 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        sos@freebsd.org
Subject:   Re: atapi cdrom hangs with -current.
Message-ID:  <4151E819.2070201@elischer.org>
In-Reply-To: <20040922104305.GO11948@elvis.mu.org>
References:  <20040922104305.GO11948@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
there is a fix on teh way according to sos..
in the meantime try:

	Stephan

Index: sys/dev/ata/ata-lowlevel.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/ata-lowlevel.c,v
retrieving revision 1.47
diff -u -r1.47 ata-lowlevel.c
--- sys/dev/ata/ata-lowlevel.c	3 Sep 2004 12:10:44 -0000	1.47
+++ sys/dev/ata/ata-lowlevel.c	21 Sep 2004 17:36:27 -0000
@@ -88,11 +88,15 @@
 	 (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)))
 	request->flags &= ~ATA_R_DMA;
 
+    ch->running = request;
+
     switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA)) {
 
     /* ATA PIO data transfer and control commands */
     default:
 	{
+
+
 	/* record command direction here as our request might be gone later */
 	int write = (request->flags & ATA_R_WRITE);
 
@@ -136,7 +140,7 @@
 	}
 	
 	/* record the request as running and return for interrupt */
-	ch->running = request;
+	// ch->running = request;
 	return ATA_OP_CONTINUES;
 
     /* ATA DMA data transfer commands */
@@ -167,7 +171,7 @@
 	}
 
 	/* record the request as running and return for interrupt */
-	ch->running = request;
+	//ch->running = request;
 	return ATA_OP_CONTINUES;
 
     /* ATAPI PIO commands */
@@ -192,7 +196,7 @@
 
 	/* command interrupt device ? just return and wait for interrupt */
 	if ((request->device->param->config & ATA_DRQ_MASK) == ATA_DRQ_INTR) {
-	    ch->running = request;
+	    // ch->running = request;
 	    return ATA_OP_CONTINUES;
 	}
 
@@ -226,7 +230,7 @@
 			   ATA_PROTO_ATAPI_12 ? 6 : 8);
 
 	/* record the request as running and return for interrupt */
-	ch->running = request;
+	//ch->running = request;
 	return ATA_OP_CONTINUES;
 
     case ATA_R_ATAPI|ATA_R_DMA:
@@ -292,9 +296,11 @@
 	}
 
 	/* record the request as running and return for interrupt */
-	ch->running = request;
+	// ch->running = request;
 	return ATA_OP_CONTINUES;
     }
+
+    ch->running = NULL;
 
     /* request finish here */
     if (ch->dma && ch->dma->flags & ATA_DMA_LOADED)




Alfred Perlstein wrote:

>hi, with -current as of last night (24 hrs ago) I hang if my laptop's
>cdrom IDE drive is connected, otherwise I'm fine.  I see:
>
>ATAPI_RESET time = 30us
>
>in the log, and then it hangs hard.  (this is without media
>present), it also seems to happen with media present.
>
>Any ideas?
>
>  
>



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