Skip to contentSkip to conversation

IDE cleanup eats disks

DISCUSSION [email protected] 2 participants 2 messages Mar 3, 2002 – Mar 4, 2002

lore
Share & tools
lore
#0 lore raw

On one of my machines I lose two disk drives with 2.5.6-pre2 that still were present with 2.5.6-pre1. Looking why, I see that the cleanup of ide-pci.c cleaned them away.

This is not necessarily bad, leaving things as they are is certainly an option, although maybe I prefer the old situation, but I just report the fact that the cleanup changes behaviour.

In this case I had two disks hanging off a HPT366 card but no CONFIG_BLK_DEV_HPT366 selected. Until now this
worked: the values {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366} were always compiled in. On the other hand, 2.5.6-pre2 only knows about them when CONFIG_BLK_DEV_HPT366 is selected, so does not recognize the card and does not see the disks.

As a check I changed 2.5.6-pre2 by

 #ifdef CONFIG_BLK_DEV_HPT366
        {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, pci_init_hpt366, ...

+#else
+ {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, NULL, NULL,
+ IDE_NO_DRIVER, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+ OFF_BOARD, 240, ATA_F_IRQ | ATA_F_HPTHACK },
#endif

and indeed, this brings the drives back to life.

Andries

[Of course this is not a suggested patch. The same comment applies to all devices, not just HPT366.]
[Thus, the old situation was that if one did not use DMA then all just worked, and no special chipset code was required. The new situation is that one has to select DMA before encountering the CONFIG_BLK_DEV_HPT366 option.]

#1 lore raw
Quoted 26 lines · [email protected] wrote:

On one of my machines I lose two disk drives with 2.5.6-pre2 that still were present with 2.5.6-pre1. Looking why, I see that the cleanup of ide-pci.c cleaned them away.

This is not necessarily bad, leaving things as they are is certainly an option, although maybe I prefer the old situation, but I just report the fact that the cleanup changes behaviour.

In this case I had two disks hanging off a HPT366 card but no CONFIG_BLK_DEV_HPT366 selected. Until now this
worked: the values {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366} were always compiled in. On the other hand, 2.5.6-pre2 only knows about them when CONFIG_BLK_DEV_HPT366 is selected, so does not recognize the card and does not see the disks.

As a check I changed 2.5.6-pre2 by

 #ifdef CONFIG_BLK_DEV_HPT366
        {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, pci_init_hpt366, ...
(quoted diff) +4 -0
+#else
+       {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, NULL, NULL,
+        IDE_NO_DRIVER, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+	 OFF_BOARD, 240, ATA_F_IRQ | ATA_F_HPTHACK },
 #endif
Quoted 1 line

and indeed, this brings the drives back to life.

Well unfortunately there where ton's of changes there, so I would rather wonder myself if anything didn't break.

Thank you for fixing this! But instead of making the above addtional entries an preprocessor else, it would be better to just add them at the end of the list as duplicated fall-back cases.