#include <linux/libata.h>
 
 #define DRV_NAME       "pata_hpt3x2n"
-#define DRV_VERSION    "0.3.15"
+#define DRV_VERSION    "0.3.16"
 
 enum {
        HPT_PCI_FAST    =       (1 << 31),
 {
        struct ata_port *ap = link->ap;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+       static const struct pci_bits hpt3x2n_enable_bits[] = {
+               { 0x50, 1, 0x04, 0x04 },
+               { 0x54, 1, 0x04, 0x04 }
+       };
+
+       if (!pci_test_config_bits(pdev, &hpt3x2n_enable_bits[ap->port_no]))
+               return -ENOENT;
 
        /* Reset the state machine */
        pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);