From owner-freebsd-bugs Tue Nov 26 15:26:49 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA02397 for bugs-outgoing; Tue, 26 Nov 1996 14:30:40 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA02346; Tue, 26 Nov 1996 14:30:30 -0800 (PST) Resent-Date: Tue, 26 Nov 1996 14:30:30 -0800 (PST) Resent-Message-Id: <199611262230.OAA02346@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.freebsd.org, luoqi@watermarkgroup.com Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA02028 for ; Tue, 26 Nov 1996 14:29:30 -0800 (PST) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id MAA13354 for ; Tue, 26 Nov 1996 12:47:11 -0800 (PST) Received: from luoqi.watermarkgroup.com (ppp-3.ts-1.ptn.idt.net) by mail.crl.com with SMTP id AA05992 (5.65c/IDA-1.5 for ); Tue, 26 Nov 1996 12:46:43 -0800 Received: (from luoqi@localhost) by luoqi.watermarkgroup.com (8.7.5/8.6.12) id PAA14041; Tue, 26 Nov 1996 15:43:23 -0500 (EST) Message-Id: <199611262043.PAA14041@luoqi.watermarkgroup.com> Date: Tue, 26 Nov 1996 15:43:23 -0500 (EST) From: luoqi@watermarkgroup.com Reply-To: luoqi@watermarkgroup.com To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.2 Subject: i386/2108: Bug fix: wcd driver may hang under certain condition Sender: owner-bugs@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2108 >Category: i386 >Synopsis: wcd driver may hang under certain condition >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 26 14:30:08 PST 1996 >Last-Modified: >Originator: Luoqi Chen >Organization: >Release: FreeBSD 2.1-STABLE i386 >Environment: >Description: In isa/atapi.c, function atapi_request_wait may sleep indefinitely if the request fails immediately (e.g. timeout waiting for command phase while a CD is inserted into the drive). >How-To-Repeat: Start xcdplayer (available from ports/audio) with CD in drive, eject the CD, insert a new one. Xcdplayer process will hang 99% of the time. >Fix: Apply the following patch to isa/atapi.c: *** atapi.c.orig Fri Oct 25 00:28:58 1996 --- atapi.c Fri Oct 25 01:55:03 1996 *************** *** 788,794 **** ac->cmd[13], ac->cmd[14], ac->cmd[15], count); atapi_enqueue (ata, ac); wdstart (ata->ctrlr); ! tsleep ((caddr_t)ac, PRIBIO, "atareq", 0); result = ac->result; atapi_free (ata, ac); --- 788,795 ---- ac->cmd[13], ac->cmd[14], ac->cmd[15], count); atapi_enqueue (ata, ac); wdstart (ata->ctrlr); ! if (ac == ata->queue) ! tsleep ((caddr_t)ac, PRIBIO, "atareq", 0); result = ac->result; atapi_free (ata, ac); >Audit-Trail: >Unformatted: