From nobody@FreeBSD.org  Sun Mar 19 05:29:55 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id 37D2937B575
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 Mar 2000 05:29:55 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id FAA63017;
	Sun, 19 Mar 2000 05:29:55 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200003191329.FAA63017@freefall.freebsd.org>
Date: Sun, 19 Mar 2000 05:29:55 -0800 (PST)
From: tuomov@cc.tut.fi
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: ide/atapi/cdrom bugs
X-Send-Pr-Version: www-1.0

>Number:         17487
>Category:       kern
>Synopsis:       ide/atapi/cdrom bugs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 19 05:30:01 PST 2000
>Closed-Date:    Tue Nov 14 00:58:01 PST 2000
>Last-Modified:  Tue Nov 14 00:59:05 PST 2000
>Originator:     Tuomo Valkonen
>Release:        4.0-RELEASE
>Organization:
>Environment:
FreeBSD localhost 4.0-RELEASE FreeBSD 4.0-RELEASE #11: Sun Mar 19 10:51:06 EET 2000     root@localhost:/usr/src/sys/compile/b100c  i386
>Description:
1. Detection of ATAPI device by some magic signature
(ata-all.c, row 818->) does not seem to work on my cdrom
("noname" 12x). I managed to fix this by a simple identify patch.

2. After this it still complains "NO DRIVER". I managed to track the
problem to acd_mode_sense() failure in acdattach() but I didn't
start trying to fix that too.
>How-To-Repeat:
Another broken noname cdrom drive?
>Fix:
1. Always try atapi identify if ata identify fails. Below is a quick
and dirty patch to ata-all.c

109a110,120
> #define TRY_IDENT(scp, SM) \
>       if (scp->devices & (ATA_ATA_##SM|ATA_ATAPI_##SM)){ \
>           if (ata_getparam(scp, ATA_##SM, ATA_C_ATA_IDENTIFY)) { \
>               scp->devices &= ~ATA_ATA_##SM; \
>               if (ata_getparam(scp, ATA_##SM, ATA_C_ATAPI_IDENTIFY)) \
>                   scp->devices &= ~ATA_ATAPI_##SM; \
>               else \
>                   scp->devices |= ATA_ATAPI_##SM; \
>           } \
>       }
> 
884a896,899
> #if 1
>       TRY_IDENT(scp, SLAVE);
>       TRY_IDENT(scp, MASTER);
> #else
896a912,913
> #endif
> 
1028a1046,1050
> 
> #if 1
>       TRY_IDENT(scp, SLAVE);
>       TRY_IDENT(scp, MASTER);
> #else
1040a1063
> #endif



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos  
Responsible-Changed-By: dan 
Responsible-Changed-When: Sun Mar 19 20:23:48 PST 2000 
Responsible-Changed-Why:  
Soren's territory. 8) 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Tue Nov 14 00:58:01 PST 2000 
State-Changed-Why:  

I'm not really sure what this is, it looks strange, please upgrade 
to 4.2 and contact me if you are still having problems. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=17487 
>Unformatted:
