40-wire/80-wire detection
Linux kernel: version 2.6.22.1
Chipset: VIA VT8363 + VT82C686A
Hard drives: Quantum Fireball LCT10 (UDMA66)
I'm having a problem with the 80-wire/40-wire cable detection in the ata driver. Even when I configure the kernel with IDEDMA_IVB set, I still get the 40-wire speed downgrade on hda.
Why did you guys put that 80-wire/40-wire cable detection in the ata driver anyway? Since when is it your job to police me in making sure I'm using the correct cable on my drives.
This is a pefect example of why I feel Linux isn't worth the trouble. If it weren't free of cost, I wouldn't go near it. But then again, I guess you get what you pay for so I shouldn't complain.
Regards,
- Craig
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/
Quoted 11 lines · Craig Block
Linux kernel: version 2.6.22.1
Chipset: VIA VT8363 + VT82C686A
Hard drives: Quantum Fireball LCT10 (UDMA66)I'm having a problem with the 80-wire/40-wire cable detection in the ata driver. Even when I configure the kernel with
IDEDMA_IVBset, I still get the 40-wire speed downgrade on hda.Why did you guys put that 80-wire/40-wire cable detection in the ata driver anyway? Since when is it your job to police me in making sure I'm using the correct cable on my drives.
If you signal a 40-wire cable too fast, you get trouble with a capital T.
Jeff
Quoted 19 lines · Jeff Garzik
Quoted 4 lines · Craig Block
Linux kernel: version 2.6.22.1
Chipset: VIA VT8363 + VT82C686A
Hard drives: Quantum Fireball LCT10 (UDMA66)Quoted 9 lines
I'm having a problem with the 80-wire/40-wire cable detection in the ata driver. Even when I configure the kernel with
IDEDMA_IVBset, I still get the 40-wire speed downgrade on hda.Why did you guys put that 80-wire/40-wire cable detection in the ata driver anyway? Since when is it your job to police me in making sure I'm using the correct cable on my drives.
If you signal a 40-wire cable too fast, you get trouble with a capital T.
Quoted 11 lines
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
This would be fine if the software could correctly figure it out. Problem is it can't always get it right so the user should be allowed to "override" it at their own risk. Linux is turning into winblows - in that choice is be taken away from the user.
My $.02
Steve Clark
Signature · 3 lines
"They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety." (Ben Franklin) "The course of history shows that as a government grows, liberty decreases." (Thomas Jefferson)
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Craig Block wrote:
I'm having a problem with the 80-wire/40-wire cable detection
Quoted 3 lines · Jeff Garzik
If you signal a 40-wire cable too fast, you get trouble with a capital T.
Thanks everyone for graciously replying to my negative email. I was pretty irritated when I found I could not disable the downgrade.
That's fine if the driver nags about the cable, but it should up to the user to deal with it. And, like any nag, it should be possible to shut if off.
As it stands, I will have to run these drives at ATA33. My only recourse is to hack the driver and disable the check. With *me* hacking on the code, I really run the risk of damaging my data.
Patches anyone?
____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/
Hi,
Quoted 9 lines · Craig Block
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Craig Block wrote:
I'm having a problem with the 80-wire/40-wire cable detection
Quoted 3 lines · Jeff Garzik
If you signal a 40-wire cable too fast, you get trouble with a capital T.
Quoted 6 lines
Thanks everyone for graciously replying to my negative email. I was pretty irritated when I found I could not disable the downgrade.
That's fine if the driver nags about the cable, but it should up to the user to deal with it. And, like any nag, it should be possible to shut if off.
"idex=ata66" parameter used to only override host side cable detection but to be able to deal with short 40-wire cables it now also overrides device side cable detection (patches were merged in Linus' tree, 2.6.23-rc1 will have them).
Quoted 5 lines
As it stands, I will have to run these drives at ATA33. My only recourse is to hack the driver and disable the check. With *me* hacking on the code, I really run the risk of damaging my data.
Patches anyone?
Please send the output of hdparm --Istdout for this drive.
"idex=ata66" or CONFIG_IDEDMA_IVB=y should also help but we really would like to detect and workaround such issues automatically, without the need for user headaches. ;)
Thanks,
Bart
Quoted 10 lines · --- Bartlomiej Zolnierkiewicz
Please send the output of hdparm --Istdout for this drive.
"idex=ata66" or
CONFIG_IDEDMA_IVB=yshould also help but we really would like to detect and workaround such issues automatically, without the need for user headaches. ;)Thanks,
Bart
Here ya go, hope that helps :)
/dev/hda:
045a 2959 0000 000f 7e00 5332 003f 0000 0000 5154 3837 3130 3038 3434 3731 3535 2020 2020 2020 2020 0003 0344 0004 4130 332e 3039 3030 5155 414e 5455 4d20 4649 5245 4241 4c4c 6c63 7431 3020 3035 2020 2020 2020 2020 2020 2020 2020 2020 8010 0000 0f00 4000 0200 0200 0007 2959 000f 003f a189 0098 0100 a189 0098 0000 0007 0003 0078 0078 0078 0078 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 001e 0011 346b 4001 4000 3469 0001 4000 101f 0003 0000 0000 fffe 2040 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222
Hi,
Quoted 7 lines · Craig Block
Quoted 4 lines · --- Bartlomiej Zolnierkiewicz
Please send the output of hdparm --Istdout for this drive.
"idex=ata66" or
CONFIG_IDEDMA_IVB=yshould also help but we really would
I initially missed the fact that you've already tried CONFIG_IDEDMA_IVB and that it didn't help (probably because of failed host side cable detection).
Quoted 9 lines
Quoted 6 lines
like to detect and workaround such issues automatically, without the need for user headaches. ;)
Thanks,
BartHere ya go, hope that helps :)
/dev/hda:
[...]
Thanks, could you try the patch below (it is against Linus tree)?
[PATCH] ide: add cable detection for early UDMA66 devices
* Move ide_in_drive_list() from ide-dma.c to ide-iops.c.
* Add ivb_list[] table for listening early UDMA66 devices which don't conform to ATA4 standard wrt cable detection (bit14 is zero, only bit13 is valid) and use only device side cable detection for them since host side cable detection may be unreliable.
* Add model "QUANTUM FIREBALLlct10 05" with firwmare "A03.0900" to the list (from Craig's bugreport).
--- drivers/ide/ide-dma.c | 19 ------------------- drivers/ide/ide-iops.c | 39 ++++++++++++++++++++++++++++++++++++--- include/linux/ide.h | 3 ++- 3 files changed, 38 insertions(+), 23 deletions(-)
drivers/ide/ide-dma.c +0 -19
@@ -135,25 +135,6 @@ static const struct drive_list_entry dri };/** -* ide_in_drive_list - look for drive in black/white list -* @id: drive identifier -* @drive_table: list to inspect -* -* Look for a drive in the blacklist and the whitelist tables -* Returns 1 if the drive is found in the table. -*/ - -int ide_in_drive_list (struct hd_driveid *id,const struct drive_list_entry *drive_table) -{ -for ( ; drive_table->id_model ; drive_table++) -if ((!strcmp (drive_table->id_model, id->model)) && - (!drive_table->id_firmware || -strstr (id->fw_rev, drive_table->id_firmware))) -return 1 ; -return 0 ; -} - -/** * ide_dma_intr - IDE DMA interrupt handler * @drive: the drive the interrupt is for *
drivers/ide/ide-iops.c +36 -3
@@ -565,6 +565,34 @@ int ide_wait_stat (ide_startstop_t *starEXPORT_SYMBOL (ide_wait_stat); +/** +* ide_in_drive_list - look for drive in black/white list +* @id: drive identifier +* @drive_table: list to inspect +* +* Look for a drive in the blacklist and the whitelist tables +* Returns 1 if the drive is found in the table. +*/ + +int ide_in_drive_list (struct hd_driveid *id,const struct drive_list_entry *drive_table) +{ +for ( ; drive_table->id_model ; drive_table++) +if ((!strcmp (drive_table->id_model, id->model)) && + (!drive_table->id_firmware || +strstr (id->fw_rev, drive_table->id_firmware))) +return 1 ; +return 0 ; +} + +/* +* Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. +* We list them here and depend on the device side cable detection for them. +*/ +static const struct drive_list_entry ivb_list[] = { + {"QUANTUM FIREBALLlct10 05" ,"A03.0900" }, + {NULL ,NULL } +}; +/* * All hosts that use the 80c ribbon must use! * The name is derived from upper byte of word 93 and the 80c ribbon.
@@ -573,11 +601,16 @@ u8 eighty_ninty_three (ide_drive_t *driv {ide_hwif_t *hwif = drive->hwif;struct hd_driveid *id = drive->id; +int ivb =ide_in_drive_list (id, ivb_list); + +if (ivb) +printk (KERN_DEBUG "%s: enabling IVB cable detection quirk\n" , + drive->name);if (hwif->cbl ==ATA_CBL_PATA40_SHORT )return 1 ; -if (hwif->cbl !=ATA_CBL_PATA80 ) +if (hwif->cbl !=ATA_CBL_PATA80 && !ivb) goto no_80w;/* Check for SATA but only if we are ATA5 or higher */
@@ -587,11 +620,11 @@ u8 eighty_ninty_three (ide_drive_t *driv/* * FIXME: * - change master/slave IDENTIFY order -* - force bit13 (80c cable present) check +* - force bit13 (80c cable present) check also for !ivb devices * (unless the slave device is pre-ATA3) */ #ifndef CONFIG_IDEDMA_IVB -if (id->hw_config &0x4000 ) +if ((id->hw_config &0x4000 ) || (ivb && (id->hw_config &0x2000 ))) #else if (id->hw_config & 0x6000)#endif
include/linux/ide.h +2 -1
@@ -1275,13 +1275,14 @@ void ide_init_sg_cmd(ide_drive_t *, stru#define BAD_DMA_DRIVE 0#define GOOD_DMA_DRIVE 1 -#ifdef CONFIG_BLK_DEV_IDEDMA struct drive_list_entry {const char *id_model;const char *id_firmware; };int ide_in_drive_list (struct hd_driveid *,const struct drive_list_entry *); + +#ifdef CONFIG_BLK_DEV_IDEDMA int __ide_dma_bad_drive (ide_drive_t *);int __ide_dma_good_drive (ide_drive_t *);u8 ide_max_dma_mode (ide_drive_t *);
Hello.
Quoted 54 lines · Bartlomiej Zolnierkiewicz
[PATCH] ide: add cable detection for early UDMA66 devices
* Move
ide_in_drive_list()fromide-dma.ctoide-iops.c.* Add ivb_list[] table for listening early UDMA66 devices which don't conform to ATA4 standard wrt cable detection (bit14 is zero, only bit13 is valid) and use only device side cable detection for them since host side cable detection may be unreliable.
* Add model "QUANTUM FIREBALLlct10 05" with firwmare "A03.0900" to the list (from Craig's bugreport).
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Index:
b/drivers/ide/ide-iops.c
===================================================================drivers/ide/ide-iops.c +28
-0@@ -565,6 +565,34 @@ int ide_wait_stat (ide_startstop_t *starEXPORT_SYMBOL (ide_wait_stat); +/** +* ide_in_drive_list - look for drive in black/white list +* @id: drive identifier +* @drive_table: list to inspect +* +* Look for a drive in the blacklist and the whitelist tables +* Returns 1 if the drive is found in the table. +*/ + +int ide_in_drive_list (struct hd_driveid *id,const struct drive_list_entry *drive_table) +{ +for ( ; drive_table->id_model ; drive_table++) +if ((!strcmp (drive_table->id_model, id->model)) && + (!drive_table->id_firmware || +strstr (id->fw_rev, drive_table->id_firmware))) +return 1 ; +return 0 ; +} + +/* +* Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. +* We list them here and depend on the device side cable detection for them. +*/ +static const struct drive_list_entry ivb_list[] = { + {"QUANTUM FIREBALLlct10 05" ,"A03.0900" }, + {NULL ,NULL } +}; +/* * All hosts that use the 80c ribbon must use! * The name is derived from upper byte of word 93 and the 80c ribbon.
drivers/ide/ide-iops.c u8 eighty_ninty_three (ide_drive_t *driv · line 608
Quoted 8 lines
drivers/ide/ide-iops.c +5
-0@@ -573,11 +601,16 @@ u8 eighty_ninty_three (ide_drive_t *driv {ide_hwif_t *hwif = drive->hwif;struct hd_driveid *id = drive->id; +int ivb =ide_in_drive_list (id, ivb_list); + +if (ivb) +printk (KERN_DEBUG "%s: enabling IVB cable detection quirk\n" , + drive->name);
Wound't more explicit message, something like "ignoring word 93 validity
check" be better?
Quoted 10 lines
drivers/ide/ide-iops.c +1
-1if (hwif->cbl ==ATA_CBL_PATA40_SHORT )return 1 ; -if (hwif->cbl !=ATA_CBL_PATA80 ) +if (hwif->cbl !=ATA_CBL_PATA80 && !ivb) goto no_80w;/* Check for SATA but only if we are ATA5 or higher */
drivers/ide/ide-iops.c u8 eighty_ninty_three (ide_drive_t *driv · line 627
Quoted 10 lines
drivers/ide/ide-iops.c +2
-2@@ -587,11 +620,11 @@ u8 eighty_ninty_three (ide_drive_t *driv/* * FIXME: * - change master/slave IDENTIFY order -* - force bit13 (80c cable present) check +* - force bit13 (80c cable present) check also for !ivb devices * (unless the slave device is pre-ATA3) */ #ifndef CONFIG_IDEDMA_IVB -if (id->hw_config &0x4000 ) +if ((id->hw_config &0x4000 ) || (ivb && (id->hw_config &0x2000 )))
I take it that change renders CONFIG_IDEDMA_IVB basically unneeded --
unless for the user which wants to see if his drive needs to be added to the list. Bbut then, the host side cable check may fail, so this doesn't seem a reliable test anyway -- so, this code either needs to be changed to behave as if the drive was foundin the list or removed completely, shouldn't it?
drivers/ide/ide-iops.c u8 eighty_ninty_three (ide_drive_t *driv · line 630
Quoted 3 lines
drivers/ide/ide-iops.c +0
-0#else if (id->hw_config & 0x6000)#endif
BTW, shouldn't ide_ata66_check() also be changed?
MBR, Sergei
Quoted 61 lines · Sergei Shtylyov
Hello.
Quoted 57 lines · Bartlomiej Zolnierkiewicz
[PATCH] ide: add cable detection for early UDMA66 devices
* Move
ide_in_drive_list()fromide-dma.ctoide-iops.c.* Add ivb_list[] table for listening early UDMA66 devices which don't conform to ATA4 standard wrt cable detection (bit14 is zero, only bit13 is valid) and use only device side cable detection for them since host side cable detection may be unreliable.
* Add model "QUANTUM FIREBALLlct10 05" with firwmare "A03.0900" to the list (from Craig's bugreport).
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Index:
b/drivers/ide/ide-iops.c
===================================================================drivers/ide/ide-iops.c +28
-0@@ -565,6 +565,34 @@ int ide_wait_stat (ide_startstop_t *starEXPORT_SYMBOL (ide_wait_stat); +/** +* ide_in_drive_list - look for drive in black/white list +* @id: drive identifier +* @drive_table: list to inspect +* +* Look for a drive in the blacklist and the whitelist tables +* Returns 1 if the drive is found in the table. +*/ + +int ide_in_drive_list (struct hd_driveid *id,const struct drive_list_entry *drive_table) +{ +for ( ; drive_table->id_model ; drive_table++) +if ((!strcmp (drive_table->id_model, id->model)) && + (!drive_table->id_firmware || +strstr (id->fw_rev, drive_table->id_firmware))) +return 1 ; +return 0 ; +} + +/* +* Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. +* We list them here and depend on the device side cable detection for them. +*/ +static const struct drive_list_entry ivb_list[] = { + {"QUANTUM FIREBALLlct10 05" ,"A03.0900" }, + {NULL ,NULL } +}; +/* * All hosts that use the 80c ribbon must use! * The name is derived from upper byte of word 93 and the 80c ribbon. @@ -573,11 +601,16 @@ u8 eighty_ninty_three (ide_drive_t *driv {ide_hwif_t *hwif = drive->hwif;struct hd_driveid *id = drive->id;
Quoted 8 lines
drivers/ide/ide-iops.c u8 eighty_ninty_three (ide_drive_t *driv · line 608
Quoted 5 lines
drivers/ide/ide-iops.c +5
-0+int ivb =ide_in_drive_list (id, ivb_list); + +if (ivb) +printk (KERN_DEBUG "%s: enabling IVB cable detection quirk\n" , + drive->name);Wound't more explicit message, something like "ignoring word 93 validity
check" be better?
It would, fixed in take 2.
Quoted 18 lines
Quoted 18 lines
drivers/ide/ide-iops.c +2
-2if (hwif->cbl ==ATA_CBL_PATA40_SHORT )return 1 ; -if (hwif->cbl !=ATA_CBL_PATA80 ) +if (hwif->cbl !=ATA_CBL_PATA80 && !ivb) goto no_80w;/* Check for SATA but only if we are ATA5 or higher */ @@ -587,11 +620,11 @@ u8 eighty_ninty_three (ide_drive_t *driv/* * FIXME: * - change master/slave IDENTIFY order -* - force bit13 (80c cable present) check +* - force bit13 (80c cable present) check also for !ivb devices * (unless the slave device is pre-ATA3) */ #ifndef CONFIG_IDEDMA_IVB
Quoted 8 lines
drivers/ide/ide-iops.c u8 eighty_ninty_three (ide_drive_t *driv · line 627
Quoted 2 lines
drivers/ide/ide-iops.c +1
-1-if (id->hw_config &0x4000 ) +if ((id->hw_config &0x4000 ) || (ivb && (id->hw_config &0x2000 )))I take it that change renders
CONFIG_IDEDMA_IVBbasically unneeded --
unless for the user which wants to see if his drive needs to be added to the list. Bbut then, the host side cable check may fail, so this doesn't seem a reliable test anyway -- so, this code either needs to be changed to behave as if the drive was foundin the list or removed completely, shouldn't it?
CONFIG_IDEDMA_IVB removal was on my TODO, just haven't got a time to do it.
Done... see the other mail. :)
Quoted 5 lines
drivers/ide/ide-iops.c u8 eighty_ninty_three (ide_drive_t *driv · line 630
Quoted 3 lines
drivers/ide/ide-iops.c +0
-0#else if (id->hw_config & 0x6000)#endif BTW, shouldn't
ide_ata66_check()also be changed?
Nowadays ide_ata66_check() uses eighty_ninty_three() internally.
Thanks,
Bart
Quoted 11 lines · Craig Block
Linux kernel: version 2.6.22.1
Chipset: VIA VT8363 + VT82C686A
Hard drives: Quantum Fireball LCT10 (UDMA66)I'm having a problem with the 80-wire/40-wire cable detection in the ata driver. Even when I configure the kernel with
IDEDMA_IVBset, I still get the 40-wire speed downgrade on hda.Why did you guys put that 80-wire/40-wire cable detection in the ata driver anyway? Since when is it your job to police me in making sure I'm using the correct cable on my drives.
Since it's required by the ATA standard for anything above UDMA/33 unless the cable is ludicrously short?
Quoted 3 lines
This is a pefect example of why I feel Linux isn't worth the trouble. If it weren't free of cost, I wouldn't go near it. But then again, I guess you get what you pay for so I shouldn't complain.
I think you'll find most modern BIOS implementations will nag you incessantly if you have a UDMA/66 and beyond device with a 40-core cable. As will most well-written Windows device drivers knock it down but they just don't have a big, noticable warning about it (I would never have known Intel Application Accelerator was doing it until I looked in it's diagnostics GUI and it told me so. Turns out I had broken my cable).
Most IDE chipsets have a register for this explicit purpose. Not checking it would be rather negligent on the part of the driver, not to mention if it enabled high speed operation on an unsuitable cable you would be waving bye-bye to all your data. That's exactly why there is no way to force it on most drivers, too.
You trade off l33t speed boosting for data integrity, you will only lose your data faster, in the end.
Signature · 2 lines
Matt Sealey <[email protected]> Genesi, Manager, Developer Relations