* eighty_ninty_three
@ 2005-09-22 7:31 jayakumar ide
2005-09-22 9:36 ` eighty_ninty_three Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: jayakumar ide @ 2005-09-22 7:31 UTC (permalink / raw)
To: linux-ide
quick question:
598 /*
599 * All hosts that use the 80c ribbon must use!
600 * The name is derived from upper byte of word 93 and the 80c ribbon.
601 */
602 u8 eighty_ninty_three (ide_drive_t *drive)
603 {
604 if(HWIF(drive)->udma_four == 0)
605 return 0;
606 if (!(drive->id->hw_config & 0x6000))
607 return 0;
608 #ifndef CONFIG_IDEDMA_IVB
609 if(!(drive->id->hw_config & 0x4000))
610 return 0;
611 #endif /* CONFIG_IDEDMA_IVB */
612 return 1;
613 }
does that mean that 893() will return 0 if the drive is not udma4
capable? what's the rest of the stuff about 0x6000 and 0x4000? i took
a quick look at a diamondmax spec and it says:
http://www.maxtor.com/_files/maxtor/en_us/documentation/manuals/diamondmax_plus_9_manual.pdf
Word 93 Hardware reset result. The contents of bits (12:0) of this
word shall change only
during the execution of a hardware reset
15: Shall be cleared to zero.
14: Shall be set to one.
13: 1 = device detected CBLID- above ViH. 0 = device detected CBLID- below
ViL
12-8: Device 1 hardware reset result. Device 0 shall clear these bits to zero.
Device shall set these bits as follows:
12: Reserved.
11: 0 = Device 1 did not assert PDIAG
So I'm not sure I understand what the 0x6000 and 0x4000 check does. I
was kind of hoping it would be some way to detect whether the cable
was 40 core or 80 core. The reason I'm asking is because I'm trying to
figure out the appropriate usage for eighty_ninty_three, ratemask and
ide_rate_filter. I think I should call eighty93 in ratemask() and then
use that to decide what the maximum mode should be. so if eighty93
returned 0, then I would set max mode to 3 if my device spec claimed
it was UDMA66 0-4 capable. Actually, I'm not sure about the UDMA66 0-4
stuff. I haven't yet understood the relationship between the
XFER_UDMA_n and the UDMA/33/66/100 0-4 modes. If anyone has advice,
I'm all ears.
Thanks,
jayakumar
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: eighty_ninty_three
2005-09-22 7:31 eighty_ninty_three jayakumar ide
@ 2005-09-22 9:36 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-09-22 9:36 UTC (permalink / raw)
To: jayakumar ide; +Cc: linux-ide
On 9/22/05, jayakumar ide <jayakumar.ide@gmail.com> wrote:
> quick question:
>
> 598 /*
> 599 * All hosts that use the 80c ribbon must use!
> 600 * The name is derived from upper byte of word 93 and the 80c ribbon.
> 601 */
> 602 u8 eighty_ninty_three (ide_drive_t *drive)
> 603 {
> 604 if(HWIF(drive)->udma_four == 0)
> 605 return 0;
> 606 if (!(drive->id->hw_config & 0x6000))
> 607 return 0;
> 608 #ifndef CONFIG_IDEDMA_IVB
> 609 if(!(drive->id->hw_config & 0x4000))
> 610 return 0;
> 611 #endif /* CONFIG_IDEDMA_IVB */
> 612 return 1;
> 613 }
>
> does that mean that 893() will return 0 if the drive is not udma4
No, hwif->udma_four is 1 if host detects 80-wires cable
(0 otherwise except when forced by "ide?=ata66" kernel parameter).
> capable? what's the rest of the stuff about 0x6000 and 0x4000? i took
> a quick look at a diamondmax spec and it says:
>
> http://www.maxtor.com/_files/maxtor/en_us/documentation/manuals/diamondmax_plus_9_manual.pdf
>
> Word 93 Hardware reset result. The contents of bits (12:0) of this
> word shall change only
> during the execution of a hardware reset
> 15: Shall be cleared to zero.
> 14: Shall be set to one.
> 13: 1 = device detected CBLID- above ViH. 0 = device detected CBLID- below
> ViL
> 12-8: Device 1 hardware reset result. Device 0 shall clear these bits to zero.
> Device shall set these bits as follows:
> 12: Reserved.
> 11: 0 = Device 1 did not assert PDIAG
>
> So I'm not sure I understand what the 0x6000 and 0x4000 check does. I
Drive side cable detection, some older drives get it wrong.
> was kind of hoping it would be some way to detect whether the cable
> was 40 core or 80 core. The reason I'm asking is because I'm trying to
> figure out the appropriate usage for eighty_ninty_three, ratemask and
> ide_rate_filter. I think I should call eighty93 in ratemask() and then
> use that to decide what the maximum mode should be. so if eighty93
> returned 0, then I would set max mode to 3 if my device spec claimed
> it was UDMA66 0-4 capable. Actually, I'm not sure about the UDMA66 0-4
Values returned by ->ratemask() are of internal use of IDE layer
so for UDMA66 capable host (not device!) ->ratemask() should return
2 if eighty_ninty_three() returns true and 1 otherwise.
Could you explain what exactly are you trying to do?
> stuff. I haven't yet understood the relationship between the
> XFER_UDMA_n and the UDMA/33/66/100 0-4 modes. If anyone has advice,
> I'm all ears.
XFER_UDMA_n is used for SETFEATURES command
(which is described in ATA spec - http://www.t13.org).
Bartlomiej
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-22 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-22 7:31 eighty_ninty_three jayakumar ide
2005-09-22 9:36 ` eighty_ninty_three Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).