610-pci_ide_fix.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From: b.sander
  2. Subject: [PATCH] pci: IDE fix
  3. These are standard probing messages when using pdc202xx_old:
  4. pdc202xx_old 0000:00:01.0: IDE controller (0x105a:0x0d30 rev 0x02)
  5. PCI: Enabling device 0000:00:01.0 (0004 -> 0007)
  6. PCI: Fixing up device 0000:00:01.0
  7. 0000:00:01.0: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
  8. 0000:00:01.0: FORCING BURST BIT 0x00->0x01 ACTIVE
  9. pdc202xx_old 0000:00:01.0: 100% native mode on irq 6
  10. With the default MAX_HWIFS value after above we get:
  11. ide2: BM-DMA at 0x0400-0x0407
  12. ide3: BM-DMA at 0x0408-0x040f
  13. Probing IDE interface ide2...
  14. hde: CF500, CFA DISK drive
  15. As you can see it's ide2 + ide3 and hde.
  16. With this patch applied we get:
  17. ide0: BM-DMA at 0x0400-0x0407
  18. ide1: BM-DMA at 0x0408-0x040f
  19. Probing IDE interface ide0...
  20. hda: CF500, CFA DISK drive
  21. This fixes OpenWrt ticket #7061: https://dev.openwrt.org/ticket/7061
  22. ---
  23. --- a/include/linux/ide.h
  24. +++ b/include/linux/ide.h
  25. @@ -204,7 +204,11 @@ static inline void ide_std_init_ports(st
  26. hw->io_ports.ctl_addr = ctl_addr;
  27. }
  28. +#if defined CONFIG_BCM47XX
  29. +# define MAX_HWIFS 2
  30. +#else
  31. #define MAX_HWIFS 10
  32. +#endif
  33. /*
  34. * Now for the data we need to maintain per-drive: ide_drive_t