From owner-freebsd-current@FreeBSD.ORG Wed Sep 22 21:01:15 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 563F216A4CE; Wed, 22 Sep 2004 21:01:15 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 997FC43D31; Wed, 22 Sep 2004 21:01:14 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 4CE307A423; Wed, 22 Sep 2004 14:01:14 -0700 (PDT) Message-ID: <4151E819.2070201@elischer.org> Date: Wed, 22 Sep 2004 14:01:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Alfred Perlstein References: <20040922104305.GO11948@elvis.mu.org> In-Reply-To: <20040922104305.GO11948@elvis.mu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org cc: sos@freebsd.org Subject: Re: atapi cdrom hangs with -current. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 21:01:15 -0000 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? > > >