libata-sff: kill unused ata_bus_reset()
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Thu, 22 Apr 2010 16:03:35 +0000 (20:03 +0400)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 14 May 2010 21:08:02 +0000 (17:08 -0400)
... since I see no callers of it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Documentation/DocBook/libata.tmpl
drivers/ata/libata-sff.c
include/linux/libata.h

index ff3e5be..70b811e 100644 (file)
@@ -81,16 +81,14 @@ void (*port_disable) (struct ata_port *);
        </programlisting>
 
        <para>
-       Called from ata_bus_probe() and ata_bus_reset() error paths,
-       as well as when unregistering from the SCSI module (rmmod, hot
-       unplug).
+       Called from ata_bus_probe() error path, as well as when
+       unregistering from the SCSI module (rmmod, hot unplug).
        This function should do whatever needs to be done to take the
        port out of use.  In most cases, ata_port_disable() can be used
        as this hook.
        </para>
        <para>
        Called from ata_bus_probe() on a failed probe.
-       Called from ata_bus_reset() on a failed bus reset.
        Called from ata_scsi_release().
        </para>
 
index e3877b6..b313896 100644 (file)
@@ -2631,100 +2631,6 @@ u8 ata_bmdma_status(struct ata_port *ap)
 }
 EXPORT_SYMBOL_GPL(ata_bmdma_status);
 
-/**
- *     ata_bus_reset - reset host port and associated ATA channel
- *     @ap: port to reset
- *
- *     This is typically the first time we actually start issuing
- *     commands to the ATA channel.  We wait for BSY to clear, then
- *     issue EXECUTE DEVICE DIAGNOSTIC command, polling for its
- *     result.  Determine what devices, if any, are on the channel
- *     by looking at the device 0/1 error register.  Look at the signature
- *     stored in each device's taskfile registers, to determine if
- *     the device is ATA or ATAPI.
- *
- *     LOCKING:
- *     PCI/etc. bus probe sem.
- *     Obtains host lock.
- *
- *     SIDE EFFECTS:
- *     Sets ATA_FLAG_DISABLED if bus reset fails.
- *
- *     DEPRECATED:
- *     This function is only for drivers which still use old EH and
- *     will be removed soon.
- */
-void ata_bus_reset(struct ata_port *ap)
-{
-       struct ata_device *device = ap->link.device;
-       struct ata_ioports *ioaddr = &ap->ioaddr;
-       unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS;
-       u8 err;
-       unsigned int dev0, dev1 = 0, devmask = 0;
-       int rc;
-
-       DPRINTK("ENTER, host %u, port %u\n", ap->print_id, ap->port_no);
-
-       /* determine if device 0/1 are present */
-       if (ap->flags & ATA_FLAG_SATA_RESET)
-               dev0 = 1;
-       else {
-               dev0 = ata_devchk(ap, 0);
-               if (slave_possible)
-                       dev1 = ata_devchk(ap, 1);
-       }
-
-       if (dev0)
-               devmask |= (1 << 0);
-       if (dev1)
-               devmask |= (1 << 1);
-
-       /* select device 0 again */
-       ap->ops->sff_dev_select(ap, 0);
-
-       /* issue bus reset */
-       if (ap->flags & ATA_FLAG_SRST) {
-               rc = ata_bus_softreset(ap, devmask,
-                                      ata_deadline(jiffies, 40000));
-               if (rc && rc != -ENODEV)
-                       goto err_out;
-       }
-
-       /*
-        * determine by signature whether we have ATA or ATAPI devices
-        */
-       device[0].class = ata_sff_dev_classify(&device[0], dev0, &err);
-       if ((slave_possible) && (err != 0x81))
-               device[1].class = ata_sff_dev_classify(&device[1], dev1, &err);
-
-       /* is double-select really necessary? */
-       if (device[1].class != ATA_DEV_NONE)
-               ap->ops->sff_dev_select(ap, 1);
-       if (device[0].class != ATA_DEV_NONE)
-               ap->ops->sff_dev_select(ap, 0);
-
-       /* if no devices were detected, disable this port */
-       if ((device[0].class == ATA_DEV_NONE) &&
-           (device[1].class == ATA_DEV_NONE))
-               goto err_out;
-
-       if (ap->flags & (ATA_FLAG_SATA_RESET | ATA_FLAG_SRST)) {
-               /* set up device control for ATA_FLAG_SATA_RESET */
-               iowrite8(ap->ctl, ioaddr->ctl_addr);
-               ap->last_ctl = ap->ctl;
-       }
-
-       DPRINTK("EXIT\n");
-       return;
-
-err_out:
-       ata_port_printk(ap, KERN_ERR, "disabling port\n");
-       ata_port_disable(ap);
-
-       DPRINTK("EXIT\n");
-}
-EXPORT_SYMBOL_GPL(ata_bus_reset);
-
 #ifdef CONFIG_PCI
 
 /**
index b2f2003..4fa748e 100644 (file)
@@ -1631,7 +1631,6 @@ extern void ata_bmdma_setup(struct ata_queued_cmd *qc);
 extern void ata_bmdma_start(struct ata_queued_cmd *qc);
 extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
 extern u8 ata_bmdma_status(struct ata_port *ap);
-extern void ata_bus_reset(struct ata_port *ap);
 
 #ifdef CONFIG_PCI
 extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev);