Re: 4.6 CDROM cannot mount /dist on Dell Inspiron 8000

Benjamin Close <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
Kirill Bezzubets wrote:

>On Sun, Jul 14, 2002 at 12:28:19PM -0600, M. Warner Losh wrote:
>
>  
>
>>In message: <[email protected]>
>>            Christoph Kukulies <[email protected]> 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 <TOSHIBA DVD-ROM SD-C2402> 
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.
[email protected]                   South Australia, 5095
F00D C83D 5F7E 5561 DF91  B74D E602 CAA3 4842 B5B4
cdromPatch.diff (text/plain, 1.6 KB)
--- 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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.