2002-07-17 13:28:41

by Geert Uytterhoeven

[permalink] [raw]
Subject: 2.4.19-rc2 and !CONFIG_BLK_DEV_IDEPCI

Hi,

I need the following patch to compile 2.4.19-rc2 for m68k because struct hwif_s
contains no pci_devid field if CONFIG_BLK_DEV_IDEPCI is not defined.

--- linux-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 15:03:10 2002
+++ linux-m68k-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 15:12:28 2002
@@ -245,8 +245,10 @@
*/
byte eighty_ninty_three (ide_drive_t *drive)
{
+#ifdef CONFIG_BLK_DEV_IDEPCI
if (HWIF(drive)->pci_devid.vid==0x105a)
return(HWIF(drive)->udma_four);
+#endif
/* PDC202XX: that's because some HDD will return wrong info */
return ((byte) ((HWIF(drive)->udma_four) &&
#ifndef CONFIG_IDEDMA_IVB

Or perhaps all eighty_ninty_three() stuff should be protected by #ifdef
CONFIG_BLK_DEV_IDEDMA? That seems to work as well (alternative patch below)...

--- linux-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 09:53:15 2002
+++ linux-m68k-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 13:06:52 2002
@@ -240,6 +240,7 @@
return 0;
}

+#ifdef CONFIG_BLK_DEV_IDEDMA
/*
* All hosts that use the 80c ribbon mus use!
*/
@@ -254,6 +255,7 @@
#endif /* CONFIG_IDEDMA_IVB */
(drive->id->hw_config & 0x6000)) ? 1 : 0);
}
+#endif // CONFIG_BLK_DEV_IDEDMA

/*
* Similar to ide_wait_stat(), except it never calls ide_error internally.
@@ -374,6 +376,8 @@
EXPORT_SYMBOL(ide_driveid_update);
EXPORT_SYMBOL(ide_ata66_check);
EXPORT_SYMBOL(set_transfer);
+#ifdef CONFIG_BLK_DEV_IDEDMA
EXPORT_SYMBOL(eighty_ninty_three);
+#endif // CONFIG_BLK_DEV_IDEDMA
EXPORT_SYMBOL(ide_config_drive_speed);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2002-07-17 14:38:35

by James Mayer

[permalink] [raw]
Subject: Re: 2.4.19-rc2 and !CONFIG_BLK_DEV_IDEPCI

Hi,

I've reproduced the same problem here, as well, on x86 ISA IDE.
Geert's first patch worked for me.

James

2002-07-17 16:50:53

by Andre Hedrick

[permalink] [raw]
Subject: Re: 2.4.19-rc2 and !CONFIG_BLK_DEV_IDEPCI


Already addressed in a test patch to be run in a LAD-ide-2.5.26-2.patch
soon. Also "ide-features.c " becomes a deleted file.

On Wed, 17 Jul 2002, Geert Uytterhoeven wrote:

> Hi,
>
> I need the following patch to compile 2.4.19-rc2 for m68k because struct hwif_s
> contains no pci_devid field if CONFIG_BLK_DEV_IDEPCI is not defined.
>
> --- linux-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 15:03:10 2002
> +++ linux-m68k-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 15:12:28 2002
> @@ -245,8 +245,10 @@
> */
> byte eighty_ninty_three (ide_drive_t *drive)
> {
> +#ifdef CONFIG_BLK_DEV_IDEPCI
> if (HWIF(drive)->pci_devid.vid==0x105a)
> return(HWIF(drive)->udma_four);
> +#endif
> /* PDC202XX: that's because some HDD will return wrong info */
> return ((byte) ((HWIF(drive)->udma_four) &&
> #ifndef CONFIG_IDEDMA_IVB
>
> Or perhaps all eighty_ninty_three() stuff should be protected by #ifdef
> CONFIG_BLK_DEV_IDEDMA? That seems to work as well (alternative patch below)...
>
> --- linux-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 09:53:15 2002
> +++ linux-m68k-2.4.19-rc2/drivers/ide/ide-features.c Wed Jul 17 13:06:52 2002
> @@ -240,6 +240,7 @@
> return 0;
> }
>
> +#ifdef CONFIG_BLK_DEV_IDEDMA
> /*
> * All hosts that use the 80c ribbon mus use!
> */
> @@ -254,6 +255,7 @@
> #endif /* CONFIG_IDEDMA_IVB */
> (drive->id->hw_config & 0x6000)) ? 1 : 0);
> }
> +#endif // CONFIG_BLK_DEV_IDEDMA
>
> /*
> * Similar to ide_wait_stat(), except it never calls ide_error internally.
> @@ -374,6 +376,8 @@
> EXPORT_SYMBOL(ide_driveid_update);
> EXPORT_SYMBOL(ide_ata66_check);
> EXPORT_SYMBOL(set_transfer);
> +#ifdef CONFIG_BLK_DEV_IDEDMA
> EXPORT_SYMBOL(eighty_ninty_three);
> +#endif // CONFIG_BLK_DEV_IDEDMA
> EXPORT_SYMBOL(ide_config_drive_speed);
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>

Andre Hedrick
LAD Storage Consulting Group