Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Mar 2000 05:29:55 -0800 (PST)
From:      tuomov@cc.tut.fi
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/17487: ide/atapi/cdrom bugs
Message-ID:  <200003191329.FAA63017@freefall.freebsd.org>

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

>Number:         17487
>Category:       kern
>Synopsis:       ide/atapi/cdrom bugs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 19 05:30:01 PST 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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