* 40-wire/80-wire detection
@ 2007-07-12 21:09 Craig Block
2007-07-12 21:28 ` Jeff Garzik
2007-07-13 0:26 ` Matt Sealey
0 siblings, 2 replies; 10+ messages in thread
From: Craig Block @ 2007-07-12 21:09 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-12 21:09 40-wire/80-wire detection Craig Block
@ 2007-07-12 21:28 ` Jeff Garzik
2007-07-13 12:04 ` Stephen Clark
2007-07-13 0:26 ` Matt Sealey
1 sibling, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2007-07-12 21:28 UTC (permalink / raw)
To: Craig Block; +Cc: linux-ide
Craig Block wrote:
> 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.
If you signal a 40-wire cable too fast, you get trouble with a capital T.
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-12 21:09 40-wire/80-wire detection Craig Block
2007-07-12 21:28 ` Jeff Garzik
@ 2007-07-13 0:26 ` Matt Sealey
1 sibling, 0 replies; 10+ messages in thread
From: Matt Sealey @ 2007-07-13 0:26 UTC (permalink / raw)
To: Craig Block; +Cc: jgarzik, linux-ide
Craig Block wrote:
> 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.
Since it's required by the ATA standard for anything above UDMA/33
unless the cable is ludicrously short?
> 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.
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-12 21:28 ` Jeff Garzik
@ 2007-07-13 12:04 ` Stephen Clark
2007-07-13 17:58 ` Craig Block
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Clark @ 2007-07-13 12:04 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Craig Block, linux-ide
Jeff Garzik wrote:
>Craig Block wrote:
>
>
>>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.
>>
>>
>
>If you signal a 40-wire cable too fast, you get trouble with a capital T.
>
> Jeff
>
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ide" in
>the body of a message to majordomo@vger.kernel.org
>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
--
"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)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-13 12:04 ` Stephen Clark
@ 2007-07-13 17:58 ` Craig Block
2007-07-13 21:39 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 10+ messages in thread
From: Craig Block @ 2007-07-13 17:58 UTC (permalink / raw)
To: Stephen.Clark, Jeff Garzik, Matt Sealey; +Cc: linux-ide
> >>Craig Block wrote:
> >>
> >>I'm having a problem with the 80-wire/40-wire cable detection
> Jeff Garzik wrote:
> >
> >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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-13 17:58 ` Craig Block
@ 2007-07-13 21:39 ` Bartlomiej Zolnierkiewicz
2007-07-14 8:37 ` Craig Block
0 siblings, 1 reply; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-13 21:39 UTC (permalink / raw)
To: Craig Block; +Cc: Stephen.Clark, Jeff Garzik, Matt Sealey, linux-ide
Hi,
On Friday 13 July 2007, Craig Block wrote:
> > >>Craig Block wrote:
> > >>
> > >>I'm having a problem with the 80-wire/40-wire cable detection
>
> > Jeff Garzik wrote:
> > >
> > >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.
"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).
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-13 21:39 ` Bartlomiej Zolnierkiewicz
@ 2007-07-14 8:37 ` Craig Block
2007-07-18 22:32 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 10+ messages in thread
From: Craig Block @ 2007-07-14 8:37 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Stephen.Clark, Jeff Garzik, Matt Sealey, linux-ide
--- Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> 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
>
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-14 8:37 ` Craig Block
@ 2007-07-18 22:32 ` Bartlomiej Zolnierkiewicz
2007-07-24 14:47 ` Sergei Shtylyov
0 siblings, 1 reply; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-18 22:32 UTC (permalink / raw)
To: Craig Block; +Cc: Stephen.Clark, Jeff Garzik, Matt Sealey, linux-ide
Hi,
On Saturday 14 July 2007, Craig Block wrote:
>
> --- Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> >
> > Please send the output of hdparm --Istdout for this drive.
> >
> > "idex=ata66" or CONFIG_IDEDMA_IVB=y should 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).
> > like to detect and workaround such issues automatically, without the need
> > for user headaches. ;)
> >
> > Thanks,
> > Bart
> >
> Here 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).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Craig Block <chblock3@yahoo.com>
---
drivers/ide/ide-dma.c | 19 -------------------
drivers/ide/ide-iops.c | 39 ++++++++++++++++++++++++++++++++++++---
include/linux/ide.h | 3 ++-
3 files changed, 38 insertions(+), 23 deletions(-)
Index: b/drivers/ide/ide-dma.c
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -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
*
Index: b/drivers/ide/ide-iops.c
===================================================================
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -565,6 +565,34 @@ int ide_wait_stat (ide_startstop_t *star
EXPORT_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
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -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 *);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-18 22:32 ` Bartlomiej Zolnierkiewicz
@ 2007-07-24 14:47 ` Sergei Shtylyov
2007-07-29 17:30 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 10+ messages in thread
From: Sergei Shtylyov @ 2007-07-24 14:47 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Craig Block, Stephen.Clark, Jeff Garzik, Matt Sealey, linux-ide
Hello.
Bartlomiej Zolnierkiewicz wrote:
> [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).
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Index: b/drivers/ide/ide-iops.c
> ===================================================================
> --- a/drivers/ide/ide-iops.c
> +++ b/drivers/ide/ide-iops.c
> @@ -565,6 +565,34 @@ int ide_wait_stat (ide_startstop_t *star
>
> EXPORT_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);
Wound't more explicit message, something like "ignoring word 93 validity
check" be better?
>
> 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)))
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?
> #else
> if (id->hw_config & 0x6000)
> #endif
BTW, shouldn't ide_ata66_check() also be changed?
MBR, Sergei
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 40-wire/80-wire detection
2007-07-24 14:47 ` Sergei Shtylyov
@ 2007-07-29 17:30 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-29 17:30 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Craig Block, Stephen.Clark, Jeff Garzik, Matt Sealey, linux-ide
On Tuesday 24 July 2007, Sergei Shtylyov wrote:
> Hello.
>
> Bartlomiej Zolnierkiewicz wrote:
>
> > [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).
>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> > Index: b/drivers/ide/ide-iops.c
> > ===================================================================
> > --- a/drivers/ide/ide-iops.c
> > +++ b/drivers/ide/ide-iops.c
> > @@ -565,6 +565,34 @@ int ide_wait_stat (ide_startstop_t *star
> >
> > EXPORT_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);
>
> Wound't more explicit message, something like "ignoring word 93 validity
> check" be better?
It would, fixed in take 2.
> >
> > 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)))
>
> 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?
CONFIG_IDEDMA_IVB removal was on my TODO, just haven't got a time to do it.
Done... see the other mail. :)
> > #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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-07-29 18:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-12 21:09 40-wire/80-wire detection Craig Block
2007-07-12 21:28 ` Jeff Garzik
2007-07-13 12:04 ` Stephen Clark
2007-07-13 17:58 ` Craig Block
2007-07-13 21:39 ` Bartlomiej Zolnierkiewicz
2007-07-14 8:37 ` Craig Block
2007-07-18 22:32 ` Bartlomiej Zolnierkiewicz
2007-07-24 14:47 ` Sergei Shtylyov
2007-07-29 17:30 ` Bartlomiej Zolnierkiewicz
2007-07-13 0:26 ` Matt Sealey
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).