diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-10 15:41:30 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-17 22:49:02 -0400 |
commit | 3e4ec3443f70fbe144799ccf0b1c3797f78d1715 (patch) | |
tree | cfb297e42075baacbbabfb6034e3e7c9a44c73b2 /drivers/scsi/ipr.c | |
parent | c7a8209f766961eea4cfc6f22d2d6e06ef63546c (diff) |
libata: kill ATA_FLAG_DISABLED
ATA_FLAG_DISABLED is only used by drivers which don't use
->error_handler framework and is largely broken. Its only meaningful
function is to make irq handlers skip processing if the flag is set,
which is largely useless and even harmful as it makes those ports more
likely to cause IRQ storms.
Kill ATA_FLAG_DISABLED and makes the callers disable attached devices
instead. ata_port_probe() and ata_port_disable() which manipulate the
flag are also killed.
This simplifies condition check in IRQ handlers. While updating IRQ
handlers, remove ap NULL check as libata guarantees consecutive port
allocation (unoccupied ports are initialized with dummies) and
long-obsolete ATA_QCFLAG_ACTIVE check (checked by ata_qc_from_tag()).
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 520461b9bc09..b90c118119d7 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -4295,7 +4295,7 @@ static void ipr_slave_destroy(struct scsi_device *sdev) | |||
4295 | res = (struct ipr_resource_entry *) sdev->hostdata; | 4295 | res = (struct ipr_resource_entry *) sdev->hostdata; |
4296 | if (res) { | 4296 | if (res) { |
4297 | if (res->sata_port) | 4297 | if (res->sata_port) |
4298 | ata_port_disable(res->sata_port->ap); | 4298 | res->sata_port->ap->link.device[0].class = ATA_DEV_NONE; |
4299 | sdev->hostdata = NULL; | 4299 | sdev->hostdata = NULL; |
4300 | res->sdev = NULL; | 4300 | res->sdev = NULL; |
4301 | res->sata_port = NULL; | 4301 | res->sata_port = NULL; |
@@ -5751,13 +5751,13 @@ static void ipr_ata_phy_reset(struct ata_port *ap) | |||
5751 | rc = ipr_device_reset(ioa_cfg, res); | 5751 | rc = ipr_device_reset(ioa_cfg, res); |
5752 | 5752 | ||
5753 | if (rc) { | 5753 | if (rc) { |
5754 | ata_port_disable(ap); | 5754 | ap->link.device[0].class = ATA_DEV_NONE; |
5755 | goto out_unlock; | 5755 | goto out_unlock; |
5756 | } | 5756 | } |
5757 | 5757 | ||
5758 | ap->link.device[0].class = res->ata_class; | 5758 | ap->link.device[0].class = res->ata_class; |
5759 | if (ap->link.device[0].class == ATA_DEV_UNKNOWN) | 5759 | if (ap->link.device[0].class == ATA_DEV_UNKNOWN) |
5760 | ata_port_disable(ap); | 5760 | ap->link.device[0].class = ATA_DEV_NONE; |
5761 | 5761 | ||
5762 | out_unlock: | 5762 | out_unlock: |
5763 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); | 5763 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); |