From owner-freebsd-mobile Sun Jul 14 18:18:19 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 108F637B400; Sun, 14 Jul 2002 18:18:15 -0700 (PDT) Received: from reason.levels.unisa.edu.au (reason.levels.unisa.edu.au [130.220.33.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84A7B43E42; Sun, 14 Jul 2002 18:18:13 -0700 (PDT) (envelope-from cisbjc@cs.unisa.edu.au) Received: from cs.unisa.edu.au (cis202068.levels.unisa.edu.au [130.220.37.202]) by reason.levels.unisa.edu.au (8.9.3/8.9.3) with ESMTP id KAA07340; Mon, 15 Jul 2002 10:47:54 +0930 (CST) Message-ID: <3D3221A8.4010403@cs.unisa.edu.au> Date: Mon, 15 Jul 2002 10:43:12 +0930 From: Benjamin Close User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0rc1) Gecko/20020424 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kirill Bezzubets Cc: freebsd-mobile@FreeBSD.ORG, sos@FreeBSD.ORG, "Greg 'groggy' Lehey" Subject: Re: 4.6 CDROM cannot mount /dist on Dell Inspiron 8000 References: <20020714142633.A4349@gilberto.physik.rwth-aachen.de> <20020714190148.A92810@solaris.ru> <20020714190851.A5235@gilberto.physik.rwth-aachen.de> <20020714.122819.29173777.imp@bsdimp.com> <20020714231512.A92930@solaris.ru> X-Enigmail-Version: 0.49.5.0 Content-Type: multipart/mixed; boundary="------------010603060100090607020708" Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------010603060100090607020708 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Kirill Bezzubets wrote: >On Sun, Jul 14, 2002 at 12:28:19PM -0600, M. Warner Losh wrote: > > > >>In message: <20020714190851.A5235@gilberto.physik.rwth-aachen.de> >> Christoph Kukulies writes: >>: > > Error mounting /dev/acd0c on /dist: No such file or directory(2) (100%) >>... >>: > Are you sure there's "/dist" exist in your filesystem? >>: > It is neccessary mount point to perform install/upgrade. >>: >>: Yes, it exists, that's for sure. And it's directory. >> >>Hey Kuku! What does dmesg say? Is there a acd0 listed? Do you have >>a /dev/acd0c in your /dev tree? >> >> >> > >Once again, what dmesg says (preferable booting kernel -v), >and what does "mount_cd9660 -v /dev/acd0c /cdrom" do? I mean manual mount. >If it works, is mounting manually at "/dist" fails or not? > > > I have a very similar problem where acd0 is not detected without a kernel patch either on 4.6 or -current on an early Dell i8000. I tracked the problem down to reading the status registers on the drive. If they are read out of order, after issuing a status command the drive will return corrupt data from the later registers. The ata spec does not define what order the registers should be read in hence either way *should* work. So it appears to be a firmware bug in the drive. However, I think reading the registers in order makes a lot of sense. The patch (against -current), submitted to sos a number of times, but seemingly ignored is attached. Without it I have no cdrom drive with it I get: Jul 8 16:15:34 draco kernel: acd0: DVD-ROM at ata0-slave UDMA33 It truely would be nice if this was integrated into the kernel as I hate having to patch it every time. Cheers, Benjamin -- 3D Research Associate +61 8 8302 3669 School of Computer and Information Science Room D1-07, Levels Campus University of South Australia Mawson Lakes Blvd. Benjamin.Close@cs.unisa.edu.au South Australia, 5095 F00D C83D 5F7E 5561 DF91 B74D E602 CAA3 4842 B5B4 --------------010603060100090607020708 Content-Type: text/plain; name="cdromPatch.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cdromPatch.diff" --- ata-all.c Sun Jun 9 07:03:42 2002 +++ ata-all.c.new Fri May 31 09:17:55 2002 @@ -755,11 +755,13 @@ if (stat0 & ATA_S_BUSY) { ATA_OUTB(ch->r_io, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); + /* Check the registers in the order defined in the standard + some drives corrupt earlier registers if they are not read + before later registers */ + lsb = ATA_INB(ch->r_io, ATA_CYL_LSB); + msb = ATA_INB(ch->r_io, ATA_CYL_MSB); stat0 = ATA_INB(ch->r_io, ATA_STATUS); if (!(stat0 & ATA_S_BUSY)) { - /* check for ATAPI signature while its still there */ - lsb = ATA_INB(ch->r_io, ATA_CYL_LSB); - msb = ATA_INB(ch->r_io, ATA_CYL_MSB); if (bootverbose) ata_printf(ch, ATA_MASTER, "ATAPI %02x %02x\n", lsb, msb); if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) @@ -769,11 +771,13 @@ if (stat1 & ATA_S_BUSY) { ATA_OUTB(ch->r_io, ATA_DRIVE, ATA_D_IBM | ATA_SLAVE); DELAY(10); + /* Check the registers in the order defined in the standard + some drives corrupt earlier registers if they are not read + before later registers */ + lsb = ATA_INB(ch->r_io, ATA_CYL_LSB); + msb = ATA_INB(ch->r_io, ATA_CYL_MSB); stat1 = ATA_INB(ch->r_io, ATA_STATUS); if (!(stat1 & ATA_S_BUSY)) { - /* check for ATAPI signature while its still there */ - lsb = ATA_INB(ch->r_io, ATA_CYL_LSB); - msb = ATA_INB(ch->r_io, ATA_CYL_MSB); if (bootverbose) ata_printf(ch, ATA_SLAVE, "ATAPI %02x %02x\n", lsb, msb); if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) --------------010603060100090607020708-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message