Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 1996 15:43:23 -0500 (EST)
From:      luoqi@watermarkgroup.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/2108: Bug fix: wcd driver may hang under certain condition
Message-ID:  <199611262043.PAA14041@luoqi.watermarkgroup.com>
Resent-Message-ID: <199611262230.OAA02346@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



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