From owner-freebsd-bugs Sun Mar 19 5:30: 4 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5E2B737B5BC for ; Sun, 19 Mar 2000 05:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA63061; Sun, 19 Mar 2000 05:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 37D2937B575 for ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/17487: ide/atapi/cdrom bugs Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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