X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fata%2Fpata_sis.c;h=e82c66e8d31bdd211568a5bdbc9e3ae719633c17;hb=821d22cdcd3c2944b93ac5f217ec0b6593ae6f48;hp=3ed628670cd733d275981d0e8d2875b96636c963;hpb=029cfd6b74fc5c517865fad78cf4a3ea8d9b664a;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 3ed628670cd..e82c66e8d31 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c @@ -156,23 +156,10 @@ static int sis_pre_reset(struct ata_link *link, unsigned long deadline) /* Clear the FIFO settings. We can't enable the FIFO until we know we are poking at a disk */ pci_write_config_byte(pdev, 0x4B, 0); - return ata_std_prereset(link, deadline); + return ata_sff_prereset(link, deadline); } -/** - * sis_error_handler - Probe specified port on PATA host controller - * @ap: Port to probe - * - * LOCKING: - * None (inherited from caller). - */ - -static void sis_error_handler(struct ata_port *ap) -{ - ata_bmdma_drive_eh(ap, sis_pre_reset, ata_std_softreset, NULL, ata_std_postreset); -} - /** * sis_set_fifo - Set RWP fifo bits for this device * @ap: Port @@ -526,7 +513,7 @@ static struct ata_port_operations sis_133_for_sata_ops = { static struct ata_port_operations sis_base_ops = { .inherits = &ata_bmdma_port_ops, - .error_handler = sis_error_handler, + .prereset = sis_pre_reset, }; static struct ata_port_operations sis_133_ops = { @@ -565,7 +552,6 @@ static struct ata_port_operations sis_old_ops = { }; static const struct ata_port_info sis_info = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, @@ -573,7 +559,6 @@ static const struct ata_port_info sis_info = { .port_ops = &sis_old_ops, }; static const struct ata_port_info sis_info33 = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, @@ -581,42 +566,36 @@ static const struct ata_port_info sis_info33 = { .port_ops = &sis_old_ops, }; static const struct ata_port_info sis_info66 = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA4, /* UDMA 66 */ .port_ops = &sis_66_ops, }; static const struct ata_port_info sis_info100 = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA5, .port_ops = &sis_100_ops, }; static const struct ata_port_info sis_info100_early = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .udma_mask = ATA_UDMA5, .pio_mask = 0x1f, /* pio0-4 */ .port_ops = &sis_66_ops, }; static const struct ata_port_info sis_info133 = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, .port_ops = &sis_133_ops, }; const struct ata_port_info sis_info133_for_sata = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, .port_ops = &sis_133_for_sata_ops, }; static const struct ata_port_info sis_info133_early = { - .sht = &sis_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, @@ -698,8 +677,7 @@ static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis) static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { static int printed_version; - struct ata_port_info port; - const struct ata_port_info *ppi[] = { &port, NULL }; + const struct ata_port_info *ppi[] = { NULL, NULL }; struct pci_dev *host = NULL; struct sis_chipset *chipset = NULL; struct sis_chipset *sets; @@ -839,12 +817,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) if (chipset == NULL) return -ENODEV; - port = *chipset->info; - port.private_data = chipset; + ppi[0] = chipset->info; sis_fixup(pdev, chipset); - return ata_pci_init_one(pdev, ppi); + return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset); } static const struct pci_device_id sis_pci_tbl[] = {