[PATCH] libata: improve SCSI sense data generation
[safe/jmp/linux-2.6] / drivers / ata / pata_ali.c
index 87af3b5..e6d2b84 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/dmi.h>
 
 #define DRV_NAME "pata_ali"
-#define DRV_VERSION "0.6.5"
+#define DRV_VERSION "0.6.6"
 
 /*
  *     Cable special cases
@@ -78,7 +78,7 @@ static int ali_c2_cable_detect(struct ata_port *ap)
           implement the detect logic */
 
        if (ali_cable_override(pdev))
-               return ATA_CBL_PATA80;
+               return ATA_CBL_PATA40_SHORT;
 
        /* Host view cable detect 0x4A bit 0 primary bit 1 secondary
           Bit set for 40 pin */
@@ -346,6 +346,7 @@ static struct scsi_host_template ali_sht = {
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
 };
 
@@ -630,7 +631,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
                pci_read_config_byte(pdev, 0x53, &tmp);
                if (rev <= 0x20)
                        tmp &= ~0x02;
-               if (rev == 0xc7)
+               if (rev >= 0xc7)
                        tmp |= 0x03;
                else
                        tmp |= 0x01;    /* CD_ROM enable for DMA */
@@ -644,10 +645,11 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
        return ata_pci_init_one(pdev, port_info, 2);
 }
 
-static struct pci_device_id ali[] = {
-       { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5228), },
-       { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229), },
-       { 0, },
+static const struct pci_device_id ali[] = {
+       { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), },
+       { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5229), },
+
+       { },
 };
 
 static struct pci_driver ali_pci_driver = {