aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
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
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')
-rw-r--r--drivers/scsi/ahci.c2
-rw-r--r--drivers/scsi/libata-core.c24
-rw-r--r--drivers/scsi/libata-eh.c50
-rw-r--r--drivers/scsi/libata-scsi.c2
-rw-r--r--drivers/scsi/sata_sil.c2
5 files changed, 40 insertions, 40 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 15f6cd4279b7..7447ba0374e8 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1052,7 +1052,7 @@ static void ahci_thaw(struct ata_port *ap)
1052 1052
1053static void ahci_error_handler(struct ata_port *ap) 1053static void ahci_error_handler(struct ata_port *ap)
1054{ 1054{
1055 if (!(ap->flags & ATA_FLAG_FROZEN)) { 1055 if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
1056 /* restart engine */ 1056 /* restart engine */
1057 ahci_stop_engine(ap); 1057 ahci_stop_engine(ap);
1058 ahci_start_engine(ap); 1058 ahci_start_engine(ap);
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index fd0e6cc0619f..ccab1d7ceada 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);
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c
index bf5a72aca8a4..f2f29a8bc38e 100644
--- a/drivers/scsi/libata-eh.c
+++ b/drivers/scsi/libata-eh.c
@@ -270,13 +270,13 @@ void ata_scsi_error(struct Scsi_Host *host)
270 ap->eh_context.i = ap->eh_info; 270 ap->eh_context.i = ap->eh_info;
271 memset(&ap->eh_info, 0, sizeof(ap->eh_info)); 271 memset(&ap->eh_info, 0, sizeof(ap->eh_info));
272 272
273 ap->flags |= ATA_FLAG_EH_IN_PROGRESS; 273 ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
274 ap->flags &= ~ATA_FLAG_EH_PENDING; 274 ap->pflags &= ~ATA_PFLAG_EH_PENDING;
275 275
276 spin_unlock_irqrestore(ap_lock, flags); 276 spin_unlock_irqrestore(ap_lock, flags);
277 277
278 /* invoke EH. if unloading, just finish failed qcs */ 278 /* invoke EH. if unloading, just finish failed qcs */
279 if (!(ap->flags & ATA_FLAG_UNLOADING)) 279 if (!(ap->pflags & ATA_PFLAG_UNLOADING))
280 ap->ops->error_handler(ap); 280 ap->ops->error_handler(ap);
281 else 281 else
282 ata_eh_finish(ap); 282 ata_eh_finish(ap);
@@ -287,7 +287,7 @@ void ata_scsi_error(struct Scsi_Host *host)
287 */ 287 */
288 spin_lock_irqsave(ap_lock, flags); 288 spin_lock_irqsave(ap_lock, flags);
289 289
290 if (ap->flags & ATA_FLAG_EH_PENDING) { 290 if (ap->pflags & ATA_PFLAG_EH_PENDING) {
291 if (--repeat_cnt) { 291 if (--repeat_cnt) {
292 ata_port_printk(ap, KERN_INFO, 292 ata_port_printk(ap, KERN_INFO,
293 "EH pending after completion, " 293 "EH pending after completion, "
@@ -323,19 +323,19 @@ void ata_scsi_error(struct Scsi_Host *host)
323 /* clean up */ 323 /* clean up */
324 spin_lock_irqsave(ap_lock, flags); 324 spin_lock_irqsave(ap_lock, flags);
325 325
326 if (ap->flags & ATA_FLAG_LOADING) { 326 if (ap->pflags & ATA_PFLAG_LOADING) {
327 ap->flags &= ~ATA_FLAG_LOADING; 327 ap->pflags &= ~ATA_PFLAG_LOADING;
328 } else { 328 } else {
329 if (ap->flags & ATA_FLAG_SCSI_HOTPLUG) 329 if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG)
330 queue_work(ata_aux_wq, &ap->hotplug_task); 330 queue_work(ata_aux_wq, &ap->hotplug_task);
331 if (ap->flags & ATA_FLAG_RECOVERED) 331 if (ap->pflags & ATA_PFLAG_RECOVERED)
332 ata_port_printk(ap, KERN_INFO, "EH complete\n"); 332 ata_port_printk(ap, KERN_INFO, "EH complete\n");
333 } 333 }
334 334
335 ap->flags &= ~(ATA_FLAG_SCSI_HOTPLUG | ATA_FLAG_RECOVERED); 335 ap->pflags &= ~(ATA_PFLAG_SCSI_HOTPLUG | ATA_PFLAG_RECOVERED);
336 336
337 /* tell wait_eh that we're done */ 337 /* tell wait_eh that we're done */
338 ap->flags &= ~ATA_FLAG_EH_IN_PROGRESS; 338 ap->pflags &= ~ATA_PFLAG_EH_IN_PROGRESS;
339 wake_up_all(&ap->eh_wait_q); 339 wake_up_all(&ap->eh_wait_q);
340 340
341 spin_unlock_irqrestore(ap_lock, flags); 341 spin_unlock_irqrestore(ap_lock, flags);
@@ -360,7 +360,7 @@ void ata_port_wait_eh(struct ata_port *ap)
360 retry: 360 retry:
361 spin_lock_irqsave(ap->lock, flags); 361 spin_lock_irqsave(ap->lock, flags);
362 362
363 while (ap->flags & (ATA_FLAG_EH_PENDING | ATA_FLAG_EH_IN_PROGRESS)) { 363 while (ap->pflags & (ATA_PFLAG_EH_PENDING | ATA_PFLAG_EH_IN_PROGRESS)) {
364 prepare_to_wait(&ap->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE); 364 prepare_to_wait(&ap->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE);
365 spin_unlock_irqrestore(ap->lock, flags); 365 spin_unlock_irqrestore(ap->lock, flags);
366 schedule(); 366 schedule();
@@ -489,7 +489,7 @@ void ata_qc_schedule_eh(struct ata_queued_cmd *qc)
489 WARN_ON(!ap->ops->error_handler); 489 WARN_ON(!ap->ops->error_handler);
490 490
491 qc->flags |= ATA_QCFLAG_FAILED; 491 qc->flags |= ATA_QCFLAG_FAILED;
492 qc->ap->flags |= ATA_FLAG_EH_PENDING; 492 qc->ap->pflags |= ATA_PFLAG_EH_PENDING;
493 493
494 /* The following will fail if timeout has already expired. 494 /* The following will fail if timeout has already expired.
495 * ata_scsi_error() takes care of such scmds on EH entry. 495 * ata_scsi_error() takes care of such scmds on EH entry.
@@ -513,7 +513,7 @@ void ata_port_schedule_eh(struct ata_port *ap)
513{ 513{
514 WARN_ON(!ap->ops->error_handler); 514 WARN_ON(!ap->ops->error_handler);
515 515
516 ap->flags |= ATA_FLAG_EH_PENDING; 516 ap->pflags |= ATA_PFLAG_EH_PENDING;
517 scsi_schedule_eh(ap->host); 517 scsi_schedule_eh(ap->host);
518 518
519 DPRINTK("port EH scheduled\n"); 519 DPRINTK("port EH scheduled\n");
@@ -578,7 +578,7 @@ static void __ata_port_freeze(struct ata_port *ap)
578 if (ap->ops->freeze) 578 if (ap->ops->freeze)
579 ap->ops->freeze(ap); 579 ap->ops->freeze(ap);
580 580
581 ap->flags |= ATA_FLAG_FROZEN; 581 ap->pflags |= ATA_PFLAG_FROZEN;
582 582
583 DPRINTK("ata%u port frozen\n", ap->id); 583 DPRINTK("ata%u port frozen\n", ap->id);
584} 584}
@@ -646,7 +646,7 @@ void ata_eh_thaw_port(struct ata_port *ap)
646 646
647 spin_lock_irqsave(ap->lock, flags); 647 spin_lock_irqsave(ap->lock, flags);
648 648
649 ap->flags &= ~ATA_FLAG_FROZEN; 649 ap->pflags &= ~ATA_PFLAG_FROZEN;
650 650
651 if (ap->ops->thaw) 651 if (ap->ops->thaw)
652 ap->ops->thaw(ap); 652 ap->ops->thaw(ap);
@@ -731,7 +731,7 @@ static void ata_eh_detach_dev(struct ata_device *dev)
731 731
732 if (ata_scsi_offline_dev(dev)) { 732 if (ata_scsi_offline_dev(dev)) {
733 dev->flags |= ATA_DFLAG_DETACHED; 733 dev->flags |= ATA_DFLAG_DETACHED;
734 ap->flags |= ATA_FLAG_SCSI_HOTPLUG; 734 ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
735 } 735 }
736 736
737 /* clear per-dev EH actions */ 737 /* clear per-dev EH actions */
@@ -761,7 +761,7 @@ static void ata_eh_about_to_do(struct ata_port *ap, struct ata_device *dev,
761 761
762 spin_lock_irqsave(ap->lock, flags); 762 spin_lock_irqsave(ap->lock, flags);
763 ata_eh_clear_action(dev, &ap->eh_info, action); 763 ata_eh_clear_action(dev, &ap->eh_info, action);
764 ap->flags |= ATA_FLAG_RECOVERED; 764 ap->pflags |= ATA_PFLAG_RECOVERED;
765 spin_unlock_irqrestore(ap->lock, flags); 765 spin_unlock_irqrestore(ap->lock, flags);
766} 766}
767 767
@@ -1027,7 +1027,7 @@ static void ata_eh_analyze_ncq_error(struct ata_port *ap)
1027 int tag, rc; 1027 int tag, rc;
1028 1028
1029 /* if frozen, we can't do much */ 1029 /* if frozen, we can't do much */
1030 if (ap->flags & ATA_FLAG_FROZEN) 1030 if (ap->pflags & ATA_PFLAG_FROZEN)
1031 return; 1031 return;
1032 1032
1033 /* is it NCQ device error? */ 1033 /* is it NCQ device error? */
@@ -1327,7 +1327,7 @@ static void ata_eh_autopsy(struct ata_port *ap)
1327 } 1327 }
1328 1328
1329 /* enforce default EH actions */ 1329 /* enforce default EH actions */
1330 if (ap->flags & ATA_FLAG_FROZEN || 1330 if (ap->pflags & ATA_PFLAG_FROZEN ||
1331 all_err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT)) 1331 all_err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT))
1332 action |= ATA_EH_SOFTRESET; 1332 action |= ATA_EH_SOFTRESET;
1333 else if (all_err_mask) 1333 else if (all_err_mask)
@@ -1385,7 +1385,7 @@ static void ata_eh_report(struct ata_port *ap)
1385 return; 1385 return;
1386 1386
1387 frozen = ""; 1387 frozen = "";
1388 if (ap->flags & ATA_FLAG_FROZEN) 1388 if (ap->pflags & ATA_PFLAG_FROZEN)
1389 frozen = " frozen"; 1389 frozen = " frozen";
1390 1390
1391 if (ehc->i.dev) { 1391 if (ehc->i.dev) {
@@ -1465,7 +1465,7 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1465 struct ata_eh_context *ehc = &ap->eh_context; 1465 struct ata_eh_context *ehc = &ap->eh_context;
1466 unsigned int *classes = ehc->classes; 1466 unsigned int *classes = ehc->classes;
1467 int tries = ATA_EH_RESET_TRIES; 1467 int tries = ATA_EH_RESET_TRIES;
1468 int verbose = !(ap->flags & ATA_FLAG_LOADING); 1468 int verbose = !(ap->pflags & ATA_PFLAG_LOADING);
1469 unsigned int action; 1469 unsigned int action;
1470 ata_reset_fn_t reset; 1470 ata_reset_fn_t reset;
1471 int i, did_followup_srst, rc; 1471 int i, did_followup_srst, rc;
@@ -1636,7 +1636,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
1636 } 1636 }
1637 1637
1638 spin_lock_irqsave(ap->lock, flags); 1638 spin_lock_irqsave(ap->lock, flags);
1639 ap->flags |= ATA_FLAG_SCSI_HOTPLUG; 1639 ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
1640 spin_unlock_irqrestore(ap->lock, flags); 1640 spin_unlock_irqrestore(ap->lock, flags);
1641 } 1641 }
1642 } 1642 }
@@ -1673,7 +1673,7 @@ static int ata_eh_skip_recovery(struct ata_port *ap)
1673 struct ata_eh_context *ehc = &ap->eh_context; 1673 struct ata_eh_context *ehc = &ap->eh_context;
1674 int i; 1674 int i;
1675 1675
1676 if (ap->flags & ATA_FLAG_FROZEN || ata_port_nr_enabled(ap)) 1676 if (ap->pflags & ATA_PFLAG_FROZEN || ata_port_nr_enabled(ap))
1677 return 0; 1677 return 0;
1678 1678
1679 /* skip if class codes for all vacant slots are ATA_DEV_NONE */ 1679 /* skip if class codes for all vacant slots are ATA_DEV_NONE */
@@ -1744,7 +1744,7 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
1744 rc = 0; 1744 rc = 0;
1745 1745
1746 /* if UNLOADING, finish immediately */ 1746 /* if UNLOADING, finish immediately */
1747 if (ap->flags & ATA_FLAG_UNLOADING) 1747 if (ap->pflags & ATA_PFLAG_UNLOADING)
1748 goto out; 1748 goto out;
1749 1749
1750 /* skip EH if possible. */ 1750 /* skip EH if possible. */
@@ -1908,7 +1908,7 @@ void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
1908 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 1908 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
1909 ata_postreset_fn_t postreset) 1909 ata_postreset_fn_t postreset)
1910{ 1910{
1911 if (!(ap->flags & ATA_FLAG_LOADING)) { 1911 if (!(ap->pflags & ATA_PFLAG_LOADING)) {
1912 ata_eh_autopsy(ap); 1912 ata_eh_autopsy(ap);
1913 ata_eh_report(ap); 1913 ata_eh_report(ap);
1914 } 1914 }
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 2915bca691e8..153452e77264 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2930,7 +2930,7 @@ void ata_scsi_hotplug(void *data)
2930 struct ata_port *ap = data; 2930 struct ata_port *ap = data;
2931 int i; 2931 int i;
2932 2932
2933 if (ap->flags & ATA_FLAG_UNLOADING) { 2933 if (ap->pflags & ATA_PFLAG_UNLOADING) {
2934 DPRINTK("ENTER/EXIT - unloading\n"); 2934 DPRINTK("ENTER/EXIT - unloading\n");
2935 return; 2935 return;
2936 } 2936 }
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
index 7aabb45c35e5..70dbfb8a7d51 100644
--- a/drivers/scsi/sata_sil.c
+++ b/drivers/scsi/sata_sil.c
@@ -370,7 +370,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
370 * during hardreset makes controllers with broken SIEN 370 * during hardreset makes controllers with broken SIEN
371 * repeat probing needlessly. 371 * repeat probing needlessly.
372 */ 372 */
373 if (!(ap->flags & ATA_FLAG_FROZEN)) { 373 if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
374 ata_ehi_hotplugged(&ap->eh_info); 374 ata_ehi_hotplugged(&ap->eh_info);
375 ap->eh_info.serror |= serror; 375 ap->eh_info.serror |= serror;
376 } 376 }