]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/ata_piix.c
[PATCH] SCSI: make scsi_implement_eh() generic API for SCSI transports
[linux-2.6-omap-h63xx.git] / drivers / scsi / ata_piix.c
index a74e23d39ba931d8ba9f9646ab2b966aeebb6487..e3184a77a600248a4c24fe39b0cc70c84527818f 100644 (file)
@@ -93,7 +93,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "ata_piix"
-#define DRV_VERSION    "1.05"
+#define DRV_VERSION    "1.10"
 
 enum {
        PIIX_IOCFG              = 0x54, /* IDE I/O configuration register */
@@ -209,7 +209,6 @@ static struct scsi_host_template piix_sht = {
        .name                   = DRV_NAME,
        .ioctl                  = ata_scsi_ioctl,
        .queuecommand           = ata_scsi_queuecmd,
-       .eh_strategy_handler    = ata_scsi_error,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
        .sg_tablesize           = LIBATA_MAX_PRD,
@@ -244,7 +243,10 @@ static const struct ata_port_operations piix_pata_ops = {
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
 
-       .eng_timeout            = ata_eng_timeout,
+       .freeze                 = ata_bmdma_freeze,
+       .thaw                   = ata_bmdma_thaw,
+       .error_handler          = ata_bmdma_error_handler,
+       .post_internal_cmd      = ata_bmdma_post_internal_cmd,
 
        .irq_handler            = ata_interrupt,
        .irq_clear              = ata_bmdma_irq_clear,
@@ -272,7 +274,10 @@ static const struct ata_port_operations piix_sata_ops = {
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
 
-       .eng_timeout            = ata_eng_timeout,
+       .freeze                 = ata_bmdma_freeze,
+       .thaw                   = ata_bmdma_thaw,
+       .error_handler          = ata_bmdma_error_handler,
+       .post_internal_cmd      = ata_bmdma_post_internal_cmd,
 
        .irq_handler            = ata_interrupt,
        .irq_clear              = ata_bmdma_irq_clear,
@@ -301,7 +306,7 @@ static struct piix_map_db ich6_map_db = {
        .mask = 0x3,
        .map = {
                /* PM   PS   SM   SS       MAP */
-               {  P0,  P1,  P2,  P3 }, /* 00b */
+               {  P0,  P2,  P1,  P3 }, /* 00b */
                { IDE, IDE,  P1,  P3 }, /* 01b */
                {  P0,  P2, IDE, IDE }, /* 10b */
                {  RV,  RV,  RV,  RV },
@@ -312,7 +317,7 @@ static struct piix_map_db ich6m_map_db = {
        .mask = 0x3,
        .map = {
                /* PM   PS   SM   SS       MAP */
-               {  P0,  P1,  P2,  P3 }, /* 00b */
+               {  P0,  P2,  RV,  RV }, /* 00b */
                {  RV,  RV,  RV,  RV },
                {  P0,  P2, IDE, IDE }, /* 10b */
                {  RV,  RV,  RV,  RV },
@@ -485,7 +490,7 @@ static int piix_pata_probe_reset(struct ata_port *ap, unsigned int *classes)
        struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
 
        if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) {
-               printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
+               ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
                return 0;
        }
 
@@ -566,7 +571,7 @@ static unsigned int piix_sata_probe (struct ata_port *ap)
 static int piix_sata_probe_reset(struct ata_port *ap, unsigned int *classes)
 {
        if (!piix_sata_probe(ap)) {
-               printk(KERN_INFO "ata%u: SATA port has no device.\n", ap->id);
+               ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n");
                return 0;
        }
 
@@ -742,7 +747,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
 /**
  *     piix_check_450nx_errata -       Check for problem 450NX setup
  *     @ata_dev: the PCI device to check
- *     
+ *
  *     Check for the present of 450NX errata #19 and errata #25. If
  *     they are found return an error code so we can turn off DMA
  */
@@ -753,7 +758,7 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev)
        u16 cfg;
        u8 rev;
        int no_piix_dma = 0;
-       
+
        while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL)
        {
                /* Look for 450NX PXB. Check for problem configurations
@@ -772,7 +777,7 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev)
        if(no_piix_dma == 2)
                dev_printk(KERN_WARNING, &ata_dev->dev, "A BIOS update may resolve this.\n");
        return no_piix_dma;
-}              
+}
 
 static void __devinit piix_init_sata_map(struct pci_dev *pdev,
                                         struct ata_port_info *pinfo)