2.4.19-rc2 and !CONFIG_BLK_DEV_IDEPCI

From: Geert Uytterhoeven (geert@linux-m68k.org)
Date: Wed Jul 17 2002 - 08:30:31 EST


        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 -- geert@linux-m68k.org

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

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:23 EST