Loading drivers/ata/pata_artop.c +18 −8 Original line number Diff line number Diff line Loading @@ -49,8 +49,6 @@ static int artop6210_pre_reset(struct ata_port *ap) if (!pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) return -ENOENT; ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } Loading Loading @@ -85,18 +83,28 @@ static int artop6260_pre_reset(struct ata_port *ap) }; struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 tmp; /* Odd numbered device ids are the units with enable bits (the -R cards) */ if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) return -ENOENT; return ata_std_prereset(ap); } /** * artop6260_cable_detect - identify cable type * @ap: Port * * Identify the cable type for the ARTOp interface in question */ static int artop6260_cable_detect(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 tmp; pci_read_config_byte(pdev, 0x49, &tmp); if (tmp & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA40; else ap->cbl = ATA_CBL_PATA80; return ata_std_prereset(ap); return ATA_CBL_PATA40; return ATA_CBL_PATA80; } /** Loading Loading @@ -225,7 +233,7 @@ static void artop6260_set_piomode(struct ata_port *ap, struct ata_device *adev) /** * artop6210_set_dmamode - Initialize host controller PATA PIO timings * @ap: Port whose timings we are configuring * @adev: um * @adev: Device whose timings we are configuring * * Set DMA mode for device, in host controller PCI config space. * Loading Loading @@ -333,6 +341,7 @@ static const struct ata_port_operations artop6210_ops = { .thaw = ata_bmdma_thaw, .error_handler = artop6210_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading @@ -366,6 +375,7 @@ static const struct ata_port_operations artop6260_ops = { .thaw = ata_bmdma_thaw, .error_handler = artop6260_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = artop6260_cable_detect, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading drivers/ata/pata_cmd64x.c +9 −25 Original line number Diff line number Diff line Loading @@ -75,13 +75,7 @@ enum { DTPR1 = 0x7C }; static int cmd64x_pre_reset(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static int cmd648_pre_reset(struct ata_port *ap) static int cmd648_cable_detect(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 r; Loading @@ -89,21 +83,8 @@ static int cmd648_pre_reset(struct ata_port *ap) /* Check cable detect bits */ pci_read_config_byte(pdev, BMIDECSR, &r); if (r & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA80; else ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static void cmd64x_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, cmd64x_pre_reset, ata_std_softreset, NULL, ata_std_postreset); } static void cmd648_error_handler(struct ata_port *ap) { ata_bmdma_drive_eh(ap, cmd648_pre_reset, ata_std_softreset, NULL, ata_std_postreset); return ATA_CBL_PATA80; return ATA_CBL_PATA40; } /** Loading Loading @@ -304,8 +285,9 @@ static struct ata_port_operations cmd64x_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cmd64x_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading @@ -338,8 +320,9 @@ static struct ata_port_operations cmd646r1_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cmd64x_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading @@ -372,8 +355,9 @@ static struct ata_port_operations cmd648_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cmd648_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = cmd648_cable_detect, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading drivers/ata/pata_cs5520.c +2 −13 Original line number Diff line number Diff line Loading @@ -139,18 +139,6 @@ static void cs5520_set_piomode(struct ata_port *ap, struct ata_device *adev) cs5520_set_timings(ap, adev, adev->pio_mode); } static int cs5520_pre_reset(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static void cs5520_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, cs5520_pre_reset, ata_std_softreset, NULL, ata_std_postreset); } static struct scsi_host_template cs5520_sht = { .module = THIS_MODULE, .name = DRV_NAME, Loading Loading @@ -186,8 +174,9 @@ static struct ata_port_operations cs5520_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cs5520_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading drivers/ata/pata_cs5530.c +2 −13 Original line number Diff line number Diff line Loading @@ -160,18 +160,6 @@ static unsigned int cs5530_qc_issue_prot(struct ata_queued_cmd *qc) return ata_qc_issue_prot(qc); } static int cs5530_pre_reset(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static void cs5530_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, cs5530_pre_reset, ata_std_softreset, NULL, ata_std_postreset); } static struct scsi_host_template cs5530_sht = { .module = THIS_MODULE, .name = DRV_NAME, Loading Loading @@ -213,8 +201,9 @@ static struct ata_port_operations cs5530_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cs5530_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .qc_prep = ata_qc_prep, .qc_issue = cs5530_qc_issue_prot, Loading drivers/ata/pata_hpt3x3.c +2 −20 Original line number Diff line number Diff line Loading @@ -25,25 +25,6 @@ #define DRV_NAME "pata_hpt3x3" #define DRV_VERSION "0.4.2" static int hpt3x3_probe_init(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } /** * hpt3x3_probe_reset - reset the hpt3x3 bus * @ap: ATA port to reset * * Perform the housekeeping when doing an ATA bus reeset. We just * need to force the cable type. */ static void hpt3x3_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, hpt3x3_probe_init, ata_std_softreset, NULL, ata_std_postreset); } /** * hpt3x3_set_piomode - PIO setup * @ap: ATA interface Loading Loading @@ -139,8 +120,9 @@ static struct ata_port_operations hpt3x3_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = hpt3x3_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading
drivers/ata/pata_artop.c +18 −8 Original line number Diff line number Diff line Loading @@ -49,8 +49,6 @@ static int artop6210_pre_reset(struct ata_port *ap) if (!pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) return -ENOENT; ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } Loading Loading @@ -85,18 +83,28 @@ static int artop6260_pre_reset(struct ata_port *ap) }; struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 tmp; /* Odd numbered device ids are the units with enable bits (the -R cards) */ if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) return -ENOENT; return ata_std_prereset(ap); } /** * artop6260_cable_detect - identify cable type * @ap: Port * * Identify the cable type for the ARTOp interface in question */ static int artop6260_cable_detect(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 tmp; pci_read_config_byte(pdev, 0x49, &tmp); if (tmp & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA40; else ap->cbl = ATA_CBL_PATA80; return ata_std_prereset(ap); return ATA_CBL_PATA40; return ATA_CBL_PATA80; } /** Loading Loading @@ -225,7 +233,7 @@ static void artop6260_set_piomode(struct ata_port *ap, struct ata_device *adev) /** * artop6210_set_dmamode - Initialize host controller PATA PIO timings * @ap: Port whose timings we are configuring * @adev: um * @adev: Device whose timings we are configuring * * Set DMA mode for device, in host controller PCI config space. * Loading Loading @@ -333,6 +341,7 @@ static const struct ata_port_operations artop6210_ops = { .thaw = ata_bmdma_thaw, .error_handler = artop6210_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading @@ -366,6 +375,7 @@ static const struct ata_port_operations artop6260_ops = { .thaw = ata_bmdma_thaw, .error_handler = artop6260_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = artop6260_cable_detect, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading
drivers/ata/pata_cmd64x.c +9 −25 Original line number Diff line number Diff line Loading @@ -75,13 +75,7 @@ enum { DTPR1 = 0x7C }; static int cmd64x_pre_reset(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static int cmd648_pre_reset(struct ata_port *ap) static int cmd648_cable_detect(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); u8 r; Loading @@ -89,21 +83,8 @@ static int cmd648_pre_reset(struct ata_port *ap) /* Check cable detect bits */ pci_read_config_byte(pdev, BMIDECSR, &r); if (r & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA80; else ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static void cmd64x_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, cmd64x_pre_reset, ata_std_softreset, NULL, ata_std_postreset); } static void cmd648_error_handler(struct ata_port *ap) { ata_bmdma_drive_eh(ap, cmd648_pre_reset, ata_std_softreset, NULL, ata_std_postreset); return ATA_CBL_PATA80; return ATA_CBL_PATA40; } /** Loading Loading @@ -304,8 +285,9 @@ static struct ata_port_operations cmd64x_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cmd64x_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading @@ -338,8 +320,9 @@ static struct ata_port_operations cmd646r1_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cmd64x_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading Loading @@ -372,8 +355,9 @@ static struct ata_port_operations cmd648_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cmd648_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = cmd648_cable_detect, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading
drivers/ata/pata_cs5520.c +2 −13 Original line number Diff line number Diff line Loading @@ -139,18 +139,6 @@ static void cs5520_set_piomode(struct ata_port *ap, struct ata_device *adev) cs5520_set_timings(ap, adev, adev->pio_mode); } static int cs5520_pre_reset(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static void cs5520_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, cs5520_pre_reset, ata_std_softreset, NULL, ata_std_postreset); } static struct scsi_host_template cs5520_sht = { .module = THIS_MODULE, .name = DRV_NAME, Loading Loading @@ -186,8 +174,9 @@ static struct ata_port_operations cs5520_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cs5520_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading
drivers/ata/pata_cs5530.c +2 −13 Original line number Diff line number Diff line Loading @@ -160,18 +160,6 @@ static unsigned int cs5530_qc_issue_prot(struct ata_queued_cmd *qc) return ata_qc_issue_prot(qc); } static int cs5530_pre_reset(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } static void cs5530_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, cs5530_pre_reset, ata_std_softreset, NULL, ata_std_postreset); } static struct scsi_host_template cs5530_sht = { .module = THIS_MODULE, .name = DRV_NAME, Loading Loading @@ -213,8 +201,9 @@ static struct ata_port_operations cs5530_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = cs5530_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .qc_prep = ata_qc_prep, .qc_issue = cs5530_qc_issue_prot, Loading
drivers/ata/pata_hpt3x3.c +2 −20 Original line number Diff line number Diff line Loading @@ -25,25 +25,6 @@ #define DRV_NAME "pata_hpt3x3" #define DRV_VERSION "0.4.2" static int hpt3x3_probe_init(struct ata_port *ap) { ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } /** * hpt3x3_probe_reset - reset the hpt3x3 bus * @ap: ATA port to reset * * Perform the housekeeping when doing an ATA bus reeset. We just * need to force the cable type. */ static void hpt3x3_error_handler(struct ata_port *ap) { return ata_bmdma_drive_eh(ap, hpt3x3_probe_init, ata_std_softreset, NULL, ata_std_postreset); } /** * hpt3x3_set_piomode - PIO setup * @ap: ATA interface Loading Loading @@ -139,8 +120,9 @@ static struct ata_port_operations hpt3x3_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, .error_handler = hpt3x3_error_handler, .error_handler = ata_bmdma_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = ata_cable_40wire, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, Loading