Date: Mon, 9 Aug 2004 19:34:29 GMT From: Claudio Destro <o1b6@tiscali.it> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/70227: 5.2-CURRENT does not recognize <CD-ROM CDU55E/1.0u> CDROM drive at ata1 Message-ID: <200408091934.i79JYTL3022792@www.freebsd.org> Resent-Message-ID: <200408091940.i79Jeb0f047146@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70227 >Category: kern >Synopsis: 5.2-CURRENT does not recognize <CD-ROM CDU55E/1.0u> CDROM drive at ata1 >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 09 19:40:37 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Claudio Destro >Release: 5.2-CURRENT >Organization: >Environment: FreeBSD vulcan 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Mon Aug 9 20:24:16 CEST 2004 root@vulcan:/mnt/ST52520A/usr-obj/usr/src/sys/VULCAN i386 >Description: the 5.2-CURRENT code in src/sys/dev/ata/ata-lowlevel.c does not recognize my 2x Sony CD-ROM on ata1. The following dump is from dmesg bootverbose=yes before my patch: .. atapci0: <Intel PIIX4 UDMA33 controller> port 0xb800-0xb80f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 4.1 on pci0 atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0xb800 atapci0: Reserved 0x8 bytes for rid 0x10 type 4 at 0x1f0 atapci0: Reserved 0x1 bytes for rid 0x14 type 4 at 0x3f6 ata0: reset tp1 mask=03 ostat0=50 ostat1=00 ata0-master: stat=0x50 err=0x01 lsb=0x00 msb=0x00 ata0-slave: stat=0x00 err=0x01 lsb=0x00 msb=0x00 ata0: reset tp2 stat0=50 stat1=00 devices=0x1<ATA_MASTER> ata0: at 0x1f0 irq 14 on atapci0 ata0: [MPSAFE] atapci0: Reserved 0x8 bytes for rid 0x18 type 4 at 0x170 atapci0: Reserved 0x1 bytes for rid 0x1c type 4 at 0x376 ata1: reset tp1 mask=03 ostat0=50 ostat1=50 ata1-master: stat=0x50 err=0x00 lsb=0x14 msb=0xeb ata1-slave: stat=0x50 err=0x50 lsb=0x50 msb=0x50 ata1-slave: stat=0x50 err=0x50 lsb=0x50 msb=0x50 ata1-slave: stat=0x50 err=0x50 lsb=0x50 msb=0x50 .. ata1-slave: stat=0x50 err=0x50 lsb=0x50 msb=0x50 ata1-slave: stat=0x50 err=0x50 lsb=0x50 msb=0x50 ata1-slave: stat=0x50 err=0x50 lsb=0x50 msb=0x50 ata1: reset tp2 stat0=50 stat1=d0 devices=0x0 ata1: at 0x170 irq 15 on atapci0 ata1: [MPSAFE] .. As you can see ata0 is correctly and quickly recognized, while ata1 is not. I think there is another problem with "stat=0x50 err=0x50 lsb=0x50 msb=0x50" because I have no more CD-ROMs attached, but I don't know how to fix it. >How-To-Repeat: >Fix: This patch solves the immediate problem, and in fact it works for me (now I can see my CD-ROM), but I am new to FreeBSD and also I don't know whether this is a correct solution or not: here I simply assume that when err == 0 then it simply means no errors. --- ata-lowlevel.c.orig Sun Aug 8 22:36:18 2004 +++ ata-lowlevel.c Mon Aug 9 20:00:03 2004 @@ -601,7 +601,7 @@ "stat=0x%02x err=0x%02x lsb=0x%02x msb=0x%02x\n", stat0, err, lsb, msb); if (!(stat0 & ATA_S_BUSY)) { - if ((err & 0x7f) == ATA_E_ILI) { + if ((err & 0x7f) == 0 || (err & 0x7f) == ATA_E_ILI) { if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_MASTER; } @@ -626,7 +626,7 @@ " stat=0x%02x err=0x%02x lsb=0x%02x msb=0x%02x\n", stat1, err, lsb, msb); if (!(stat1 & ATA_S_BUSY)) { - if ((err & 0x7f) == ATA_E_ILI) { + if ((err & 0x7f) == 0 || (err & 0x7f) == ATA_E_ILI) { if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_SLAVE; } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408091934.i79JYTL3022792>