diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2010-04-22 12:03:35 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-14 17:08:02 -0400 |
commit | 294440887b32c58d220fb54b73b7a58079b78f20 (patch) | |
tree | 83ad03746ca4e7e34fb74cdb2e42b075e085d4da /drivers/ata/libata-sff.c | |
parent | 4f2c774856708bccecb74c0e6296e9e2c9136ee1 (diff) |
libata-sff: kill unused ata_bus_reset()
... since I see no callers of it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r-- | drivers/ata/libata-sff.c | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index e3877b6843c9..b31389605bee 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -2631,100 +2631,6 @@ u8 ata_bmdma_status(struct ata_port *ap) | |||
2631 | } | 2631 | } |
2632 | EXPORT_SYMBOL_GPL(ata_bmdma_status); | 2632 | EXPORT_SYMBOL_GPL(ata_bmdma_status); |
2633 | 2633 | ||
2634 | /** | ||
2635 | * ata_bus_reset - reset host port and associated ATA channel | ||
2636 | * @ap: port to reset | ||
2637 | * | ||
2638 | * This is typically the first time we actually start issuing | ||
2639 | * commands to the ATA channel. We wait for BSY to clear, then | ||
2640 | * issue EXECUTE DEVICE DIAGNOSTIC command, polling for its | ||
2641 | * result. Determine what devices, if any, are on the channel | ||
2642 | * by looking at the device 0/1 error register. Look at the signature | ||
2643 | * stored in each device's taskfile registers, to determine if | ||
2644 | * the device is ATA or ATAPI. | ||
2645 | * | ||
2646 | * LOCKING: | ||
2647 | * PCI/etc. bus probe sem. | ||
2648 | * Obtains host lock. | ||
2649 | * | ||
2650 | * SIDE EFFECTS: | ||
2651 | * Sets ATA_FLAG_DISABLED if bus reset fails. | ||
2652 | * | ||
2653 | * DEPRECATED: | ||
2654 | * This function is only for drivers which still use old EH and | ||
2655 | * will be removed soon. | ||
2656 | */ | ||
2657 | void ata_bus_reset(struct ata_port *ap) | ||
2658 | { | ||
2659 | struct ata_device *device = ap->link.device; | ||
2660 | struct ata_ioports *ioaddr = &ap->ioaddr; | ||
2661 | unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; | ||
2662 | u8 err; | ||
2663 | unsigned int dev0, dev1 = 0, devmask = 0; | ||
2664 | int rc; | ||
2665 | |||
2666 | DPRINTK("ENTER, host %u, port %u\n", ap->print_id, ap->port_no); | ||
2667 | |||
2668 | /* determine if device 0/1 are present */ | ||
2669 | if (ap->flags & ATA_FLAG_SATA_RESET) | ||
2670 | dev0 = 1; | ||
2671 | else { | ||
2672 | dev0 = ata_devchk(ap, 0); | ||
2673 | if (slave_possible) | ||
2674 | dev1 = ata_devchk(ap, 1); | ||
2675 | } | ||
2676 | |||
2677 | if (dev0) | ||
2678 | devmask |= (1 << 0); | ||
2679 | if (dev1) | ||
2680 | devmask |= (1 << 1); | ||
2681 | |||
2682 | /* select device 0 again */ | ||
2683 | ap->ops->sff_dev_select(ap, 0); | ||
2684 | |||
2685 | /* issue bus reset */ | ||
2686 | if (ap->flags & ATA_FLAG_SRST) { | ||
2687 | rc = ata_bus_softreset(ap, devmask, | ||
2688 | ata_deadline(jiffies, 40000)); | ||
2689 | if (rc && rc != -ENODEV) | ||
2690 | goto err_out; | ||
2691 | } | ||
2692 | |||
2693 | /* | ||
2694 | * determine by signature whether we have ATA or ATAPI devices | ||
2695 | */ | ||
2696 | device[0].class = ata_sff_dev_classify(&device[0], dev0, &err); | ||
2697 | if ((slave_possible) && (err != 0x81)) | ||
2698 | device[1].class = ata_sff_dev_classify(&device[1], dev1, &err); | ||
2699 | |||
2700 | /* is double-select really necessary? */ | ||
2701 | if (device[1].class != ATA_DEV_NONE) | ||
2702 | ap->ops->sff_dev_select(ap, 1); | ||
2703 | if (device[0].class != ATA_DEV_NONE) | ||
2704 | ap->ops->sff_dev_select(ap, 0); | ||
2705 | |||
2706 | /* if no devices were detected, disable this port */ | ||
2707 | if ((device[0].class == ATA_DEV_NONE) && | ||
2708 | (device[1].class == ATA_DEV_NONE)) | ||
2709 | goto err_out; | ||
2710 | |||
2711 | if (ap->flags & (ATA_FLAG_SATA_RESET | ATA_FLAG_SRST)) { | ||
2712 | /* set up device control for ATA_FLAG_SATA_RESET */ | ||
2713 | iowrite8(ap->ctl, ioaddr->ctl_addr); | ||
2714 | ap->last_ctl = ap->ctl; | ||
2715 | } | ||
2716 | |||
2717 | DPRINTK("EXIT\n"); | ||
2718 | return; | ||
2719 | |||
2720 | err_out: | ||
2721 | ata_port_printk(ap, KERN_ERR, "disabling port\n"); | ||
2722 | ata_port_disable(ap); | ||
2723 | |||
2724 | DPRINTK("EXIT\n"); | ||
2725 | } | ||
2726 | EXPORT_SYMBOL_GPL(ata_bus_reset); | ||
2727 | |||
2728 | #ifdef CONFIG_PCI | 2634 | #ifdef CONFIG_PCI |
2729 | 2635 | ||
2730 | /** | 2636 | /** |