aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-06-28 12:29:30 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-05 21:51:42 -0400
commitb51e9e5db0e36239f786692f1cac6e435ed30c66 (patch)
tree396f2da741820f25174f0ef2d05af957a8dafc22 /drivers/scsi/libata-core.c
parente6d902a3bfd53da375588e498251f4f4f6cd9650 (diff)
[PATCH] libata: add ap->pflags and move core dynamic flags to it
ap->flags is way too clamped. Separate out core dynamic flags to ap->pflags. ATA_FLAG_DISABLED is a dynamic flag but left alone as it's referenced by a lot of LLDs and it's gonna be removed once all LLDs are converted to new EH. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index fd0e6cc0619..ccab1d7cead 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -907,7 +907,7 @@ void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), void *data,
907{ 907{
908 int rc; 908 int rc;
909 909
910 if (ap->flags & ATA_FLAG_FLUSH_PORT_TASK) 910 if (ap->pflags & ATA_PFLAG_FLUSH_PORT_TASK)
911 return; 911 return;
912 912
913 PREPARE_WORK(&ap->port_task, fn, data); 913 PREPARE_WORK(&ap->port_task, fn, data);
@@ -938,7 +938,7 @@ void ata_port_flush_task(struct ata_port *ap)
938 DPRINTK("ENTER\n"); 938 DPRINTK("ENTER\n");
939 939
940 spin_lock_irqsave(ap->lock, flags); 940 spin_lock_irqsave(ap->lock, flags);
941 ap->flags |= ATA_FLAG_FLUSH_PORT_TASK; 941 ap->pflags |= ATA_PFLAG_FLUSH_PORT_TASK;
942 spin_unlock_irqrestore(ap->lock, flags); 942 spin_unlock_irqrestore(ap->lock, flags);
943 943
944 DPRINTK("flush #1\n"); 944 DPRINTK("flush #1\n");
@@ -957,7 +957,7 @@ void ata_port_flush_task(struct ata_port *ap)
957 } 957 }
958 958
959 spin_lock_irqsave(ap->lock, flags); 959 spin_lock_irqsave(ap->lock, flags);
960 ap->flags &= ~ATA_FLAG_FLUSH_PORT_TASK; 960 ap->pflags &= ~ATA_PFLAG_FLUSH_PORT_TASK;
961 spin_unlock_irqrestore(ap->lock, flags); 961 spin_unlock_irqrestore(ap->lock, flags);
962 962
963 if (ata_msg_ctl(ap)) 963 if (ata_msg_ctl(ap))
@@ -1009,7 +1009,7 @@ unsigned ata_exec_internal(struct ata_device *dev,
1009 spin_lock_irqsave(ap->lock, flags); 1009 spin_lock_irqsave(ap->lock, flags);
1010 1010
1011 /* no internal command while frozen */ 1011 /* no internal command while frozen */
1012 if (ap->flags & ATA_FLAG_FROZEN) { 1012 if (ap->pflags & ATA_PFLAG_FROZEN) {
1013 spin_unlock_irqrestore(ap->lock, flags); 1013 spin_unlock_irqrestore(ap->lock, flags);
1014 return AC_ERR_SYSTEM; 1014 return AC_ERR_SYSTEM;
1015 } 1015 }
@@ -2641,7 +2641,7 @@ int ata_std_prereset(struct ata_port *ap)
2641 2641
2642 /* if SATA, resume phy */ 2642 /* if SATA, resume phy */
2643 if (ap->cbl == ATA_CBL_SATA) { 2643 if (ap->cbl == ATA_CBL_SATA) {
2644 if (ap->flags & ATA_FLAG_LOADING) 2644 if (ap->pflags & ATA_PFLAG_LOADING)
2645 timing = sata_deb_timing_boot; 2645 timing = sata_deb_timing_boot;
2646 else 2646 else
2647 timing = sata_deb_timing_eh; 2647 timing = sata_deb_timing_eh;
@@ -4294,7 +4294,7 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
4294 unsigned int i; 4294 unsigned int i;
4295 4295
4296 /* no command while frozen */ 4296 /* no command while frozen */
4297 if (unlikely(ap->flags & ATA_FLAG_FROZEN)) 4297 if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
4298 return NULL; 4298 return NULL;
4299 4299
4300 /* the last tag is reserved for internal command. */ 4300 /* the last tag is reserved for internal command. */
@@ -4416,7 +4416,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
4416 * taken care of. 4416 * taken care of.
4417 */ 4417 */
4418 if (ap->ops->error_handler) { 4418 if (ap->ops->error_handler) {
4419 WARN_ON(ap->flags & ATA_FLAG_FROZEN); 4419 WARN_ON(ap->pflags & ATA_PFLAG_FROZEN);
4420 4420
4421 if (unlikely(qc->err_mask)) 4421 if (unlikely(qc->err_mask))
4422 qc->flags |= ATA_QCFLAG_FAILED; 4422 qc->flags |= ATA_QCFLAG_FAILED;
@@ -5051,13 +5051,13 @@ int ata_device_resume(struct ata_device *dev)
5051{ 5051{
5052 struct ata_port *ap = dev->ap; 5052 struct ata_port *ap = dev->ap;
5053 5053
5054 if (ap->flags & ATA_FLAG_SUSPENDED) { 5054 if (ap->pflags & ATA_PFLAG_SUSPENDED) {
5055 struct ata_device *failed_dev; 5055 struct ata_device *failed_dev;
5056 5056
5057 ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); 5057 ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT);
5058 ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); 5058 ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000);
5059 5059
5060 ap->flags &= ~ATA_FLAG_SUSPENDED; 5060 ap->pflags &= ~ATA_PFLAG_SUSPENDED;
5061 while (ata_set_mode(ap, &failed_dev)) 5061 while (ata_set_mode(ap, &failed_dev))
5062 ata_dev_disable(failed_dev); 5062 ata_dev_disable(failed_dev);
5063 } 5063 }
@@ -5088,7 +5088,7 @@ int ata_device_suspend(struct ata_device *dev, pm_message_t state)
5088 5088
5089 if (state.event != PM_EVENT_FREEZE) 5089 if (state.event != PM_EVENT_FREEZE)
5090 ata_standby_drive(dev); 5090 ata_standby_drive(dev);
5091 ap->flags |= ATA_FLAG_SUSPENDED; 5091 ap->pflags |= ATA_PFLAG_SUSPENDED;
5092 return 0; 5092 return 0;
5093} 5093}
5094 5094
@@ -5459,7 +5459,7 @@ int ata_device_add(const struct ata_probe_ent *ent)
5459 ap->eh_info.probe_mask = (1 << ATA_MAX_DEVICES) - 1; 5459 ap->eh_info.probe_mask = (1 << ATA_MAX_DEVICES) - 1;
5460 ap->eh_info.action |= ATA_EH_SOFTRESET; 5460 ap->eh_info.action |= ATA_EH_SOFTRESET;
5461 5461
5462 ap->flags |= ATA_FLAG_LOADING; 5462 ap->pflags |= ATA_PFLAG_LOADING;
5463 ata_port_schedule_eh(ap); 5463 ata_port_schedule_eh(ap);
5464 5464
5465 spin_unlock_irqrestore(ap->lock, flags); 5465 spin_unlock_irqrestore(ap->lock, flags);
@@ -5527,7 +5527,7 @@ void ata_port_detach(struct ata_port *ap)
5527 5527
5528 /* tell EH we're leaving & flush EH */ 5528 /* tell EH we're leaving & flush EH */
5529 spin_lock_irqsave(ap->lock, flags); 5529 spin_lock_irqsave(ap->lock, flags);
5530 ap->flags |= ATA_FLAG_UNLOADING; 5530 ap->pflags |= ATA_PFLAG_UNLOADING;
5531 spin_unlock_irqrestore(ap->lock, flags); 5531 spin_unlock_irqrestore(ap->lock, flags);
5532 5532
5533 ata_port_wait_eh(ap); 5533 ata_port_wait_eh(ap);