[Fwd: [Fwd: Re: ATA/CHS problem]]

Roman Kurakin rik at cronyx.ru
Thu Mar 25 14:54:13 PST 2004



S?ren Schmidt wrote:

> Roman Kurakin wrote:
>
>> This is not an LBA request. ATA driver thinks that I have 80G CHS 
>> device, cause it's ATA_FLAG_54_58
>> is zero. (This decision is incorrect, we shouldn't relay on this 
>> flag). I've checked another seagate 80G drive in
>> CHS mode(by driver hacking), and problematic one with LBA mode. I get 
>> the same behavior on both with CHS.
>> And both work fine in LBA mode. It also should be mentioned that I 
>> get this problem on machine with
>> ICH2 controller, and it seems that I don't have such problem on other 
>> machine with ICH5
>
>
> Hmm, we could loosen up this check (Se patch below) but that will 
> probably break support for real old ATA disks (note that those old

Probably I'll do something like that, but since I've already lost some 
time on this problem
I want to get why CHS mode doesn't works. I can't understand how using 
of ICH2 could lead
to such problems ... (I'll try to get access to other ICH2 and non ICH2 
machines to make
extra checks).
As I understand before using CHS we issue command 91h, to set proper CHS 
mode.

I have one really CHS device and it seems to be working.

> systems most likely will have trouble with -current anyways).
> If I coul dhave my ways, we wouldn't even try to support disks that 
> doesn't support LBA....

I think we could use another way to check old ata. Why no to use bit9 
from word 49 and if
device really ATA, why it's 60-61 words are non zero?

>> PS. If you have any ideas, or if you have any materials (standards 
>> for example) about ATA/ATAPI and you
>> can share them with me, please let me know. I am not ata developer, 
>> so this is a bit difficalt for me to
>> dig this problem.
>
>
> Go to t13.org they are the standards body for ATA etc...

I already have a couple of drafts, but probably I need to get some more 
information.

Please take a look to my patch. It makes output more informative. If I 
have it before I started to dig,
I didn't lost so much time. There is a couple of places where we may 
need to apply the alike patches.

rik





-------------- next part --------------
--- ata-queue.c.orig	Tue Mar 23 20:39:22 2004
+++ ata-queue.c	Thu Mar 25 00:45:51 2004
@@ -316,7 +316,9 @@
 		    (request->dmastat & ATA_BMSTAT_ERROR))
 		    printf(" dma=0x%02x", request->dmastat);
 		if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL)))
-		    printf(" LBA=%llu", (unsigned long long)request->u.ata.lba);
+		    printf((request->device->flags & ATA_D_USE_CHS)
+			? " CHS=%llx" : " LBA=%llu",
+			(unsigned long long)request->u.ata.lba);
 		printf("\n");
 	    }
 




More information about the freebsd-hackers mailing list