diff options
| author | Tejun Heo <htejun@gmail.com> | 2006-02-15 01:01:42 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 06:19:53 -0500 |
| commit | ccbe6d5ee0eb3182675ef1c84322810fd884586d (patch) | |
| tree | 0375faedb033b70b401933b956c1b8bf8fc2b3ae | |
| parent | 573db6b8f93b5e359abd9a05e620fd9a589b0209 (diff) | |
[PATCH] ata_piix: convert sata to new reset mechanism
Convert ata_piix sata ->phy_reset to new reset mechanism.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| -rw-r--r-- | drivers/scsi/ata_piix.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index d79c252a3f60..c662bf531514 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
| @@ -132,7 +132,7 @@ static int piix_init_one (struct pci_dev *pdev, | |||
| 132 | const struct pci_device_id *ent); | 132 | const struct pci_device_id *ent); |
| 133 | 133 | ||
| 134 | static int piix_pata_probe_reset(struct ata_port *ap, unsigned int *classes); | 134 | static int piix_pata_probe_reset(struct ata_port *ap, unsigned int *classes); |
| 135 | static void piix_sata_phy_reset(struct ata_port *ap); | 135 | static int piix_sata_probe_reset(struct ata_port *ap, unsigned int *classes); |
| 136 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev); | 136 | static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev); |
| 137 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev); | 137 | static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev); |
| 138 | 138 | ||
| @@ -235,7 +235,7 @@ static const struct ata_port_operations piix_sata_ops = { | |||
| 235 | .exec_command = ata_exec_command, | 235 | .exec_command = ata_exec_command, |
| 236 | .dev_select = ata_std_dev_select, | 236 | .dev_select = ata_std_dev_select, |
| 237 | 237 | ||
| 238 | .phy_reset = piix_sata_phy_reset, | 238 | .probe_reset = piix_sata_probe_reset, |
| 239 | 239 | ||
| 240 | .bmdma_setup = ata_bmdma_setup, | 240 | .bmdma_setup = ata_bmdma_setup, |
| 241 | .bmdma_start = ata_bmdma_start, | 241 | .bmdma_start = ata_bmdma_start, |
| @@ -272,8 +272,8 @@ static struct ata_port_info piix_port_info[] = { | |||
| 272 | /* ich5_sata */ | 272 | /* ich5_sata */ |
| 273 | { | 273 | { |
| 274 | .sht = &piix_sht, | 274 | .sht = &piix_sht, |
| 275 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | | 275 | .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED | |
| 276 | PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR, | 276 | PIIX_FLAG_CHECKINTR, |
| 277 | .pio_mask = 0x1f, /* pio0-4 */ | 277 | .pio_mask = 0x1f, /* pio0-4 */ |
| 278 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 278 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
| 279 | .udma_mask = 0x7f, /* udma0-6 */ | 279 | .udma_mask = 0x7f, /* udma0-6 */ |
| @@ -297,8 +297,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 297 | /* ich6_sata */ | 297 | /* ich6_sata */ |
| 298 | { | 298 | { |
| 299 | .sht = &piix_sht, | 299 | .sht = &piix_sht, |
| 300 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | | 300 | .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 | |
| 301 | PIIX_FLAG_COMBINED_ICH6 | | ||
| 302 | PIIX_FLAG_CHECKINTR | ATA_FLAG_SLAVE_POSS, | 301 | PIIX_FLAG_CHECKINTR | ATA_FLAG_SLAVE_POSS, |
| 303 | .pio_mask = 0x1f, /* pio0-4 */ | 302 | .pio_mask = 0x1f, /* pio0-4 */ |
| 304 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 303 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
| @@ -309,8 +308,7 @@ static struct ata_port_info piix_port_info[] = { | |||
| 309 | /* ich6_sata_ahci */ | 308 | /* ich6_sata_ahci */ |
| 310 | { | 309 | { |
| 311 | .sht = &piix_sht, | 310 | .sht = &piix_sht, |
| 312 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | | 311 | .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 | |
| 313 | PIIX_FLAG_COMBINED_ICH6 | | ||
| 314 | PIIX_FLAG_CHECKINTR | ATA_FLAG_SLAVE_POSS | | 312 | PIIX_FLAG_CHECKINTR | ATA_FLAG_SLAVE_POSS | |
| 315 | PIIX_FLAG_AHCI, | 313 | PIIX_FLAG_AHCI, |
| 316 | .pio_mask = 0x1f, /* pio0-4 */ | 314 | .pio_mask = 0x1f, /* pio0-4 */ |
| @@ -448,28 +446,25 @@ static int piix_sata_probe (struct ata_port *ap) | |||
| 448 | } | 446 | } |
| 449 | 447 | ||
| 450 | /** | 448 | /** |
| 451 | * piix_sata_phy_reset - Probe specified port on SATA host controller | 449 | * piix_sata_probe_reset - Perform reset on SATA port and classify |
| 452 | * @ap: Port to probe | 450 | * @ap: Port to reset |
| 451 | * @classes: Resulting classes of attached devices | ||
| 453 | * | 452 | * |
| 454 | * Probe SATA phy. | 453 | * Reset SATA phy and classify attached devices. |
| 455 | * | 454 | * |
| 456 | * LOCKING: | 455 | * LOCKING: |
| 457 | * None (inherited from caller). | 456 | * None (inherited from caller). |
| 458 | */ | 457 | */ |
| 459 | 458 | static int piix_sata_probe_reset(struct ata_port *ap, unsigned int *classes) | |
| 460 | static void piix_sata_phy_reset(struct ata_port *ap) | ||
| 461 | { | 459 | { |
| 462 | if (!piix_sata_probe(ap)) { | 460 | if (!piix_sata_probe(ap)) { |
| 463 | ata_port_disable(ap); | ||
| 464 | printk(KERN_INFO "ata%u: SATA port has no device.\n", ap->id); | 461 | printk(KERN_INFO "ata%u: SATA port has no device.\n", ap->id); |
| 465 | return; | 462 | return 0; |
| 466 | } | 463 | } |
| 467 | 464 | ||
| 468 | ap->cbl = ATA_CBL_SATA; | 465 | return ata_drive_probe_reset(ap, ata_std_probeinit, |
| 469 | 466 | ata_std_softreset, NULL, | |
| 470 | ata_port_probe(ap); | 467 | ata_std_postreset, classes); |
| 471 | |||
| 472 | ata_bus_reset(ap); | ||
| 473 | } | 468 | } |
| 474 | 469 | ||
| 475 | /** | 470 | /** |
