From seva@sevasoft.alex-ua.com Fri Sep 10 03:56:25 1999
Return-Path: <seva@sevasoft.alex-ua.com>
Received: from sevasoft.alex-ua.com (sevasoft.alex-ua.com [195.123.18.144])
	by hub.freebsd.org (Postfix) with ESMTP id C7AB814BC7
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Sep 1999 03:56:17 -0700 (PDT)
	(envelope-from seva@sevasoft.alex-ua.com)
Received: (from seva@localhost)
	by sevasoft.alex-ua.com (8.9.3/8.9.3) id NAA71898;
	Fri, 10 Sep 1999 13:56:10 +0300 (EEST)
	(envelope-from seva)
Message-Id: <199909101056.NAA71898@sevasoft.alex-ua.com>
Date: Fri, 10 Sep 1999 13:56:10 +0300 (EEST)
From: Vsevolod Lobko <seva@sevasoft.alex-ua.com>
Reply-To: seva@sevasoft.alex-ua.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: hard lockup's on tsleep in atapi_queue_cmd called at splbio from afd_start from afd_strategy
X-Send-Pr-Version: 3.2

>Number:         13678
>Category:       kern
>Synopsis:       hard lockup's on tsleep in atapi_queue_cmd called at splbio from afd_start from afd_strategy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 10 04:00:01 PDT 1999
>Closed-Date:    Mon Feb 28 11:29:38 PST 2000
>Last-Modified:  Mon Feb 28 11:31:06 PST 2000
>Originator:     Vsevolod Lobko
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
None
>Environment:

FreeBSD sevasoft.alex-ua.com 4.0-CURRENT FreeBSD 4.0-CURRENT #38: Fri Sep  3 09:38:46 EEST 1999     root@sevasoft.alex-ua.com:/usr/src/sys/compile/SEVASOFT  i386

>Description:

I'm trying to get working Fujitsu ATAPI MO drive, using atapi-fd driver
from new-ata
Drive in general working fine, but sometime machine hard locks on drive
access
Using NMI, i get kernel debugger prompt, and ps show mount process
sleeping on "atprq", stack trace of process show sequence of calls 
afdstrategy->afd_start->atapi_queue_cmd->tsleep

Unfortunately serial console does not work in this case, so I can't attach 
precise stack trace 

>How-To-Repeat:

Machine hard locks after several 

mount_msdos /dev/afd0 /ftp/data
umount /ftp/data

especially with concurent serial port activity (may be any interrupt
activity)

>Fix:

may be by inserting splx() before queue_atapi_cmd ()?
atapi_queue_cmd do own splbio()/splx() locking


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Sep 10 04:34:54 PDT 1999 
Responsible-Changed-Why:  
Over to the new atapi driver's author. 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Feb 28 11:29:38 PST 2000 
State-Changed-Why:  
There is no MO support in 4.0. 
This is being worked on, but the problem described here is fixed in 4.0. 
>Unformatted:
