From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Linux SCSI Mailing List <linux-scsi@vger.kernel.org>,
James Bottomley <james.bottomley@steeleye.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>,
Seokmann Ju <seokmann.ju@qlogic.com>
Subject: [PATCH 3/6] qla2xxx: Add cond_resched() calls during HBA flash manipulation.
Date: Mon, 12 Mar 2007 10:41:28 -0700 [thread overview]
Message-ID: <11737212911259-git-send-email-andrew.vasquez@qlogic.com> (raw)
In-Reply-To: <20070312174019.GA1216@andrew-vasquezs-computer.local>
We're observing soft lockups during HBA FLASH retrieval and
update. Add cond_resched() each time around the tight-loops
during flash read()s/write()s.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
---
drivers/scsi/qla2xxx/qla_sup.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index ff1dd41..362d041 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -466,6 +466,7 @@ qla24xx_read_flash_dword(scsi_qla_host_t *ha, uint32_t addr)
udelay(10);
else
rval = QLA_FUNCTION_TIMEOUT;
+ cond_resched();
}
/* TODO: What happens if we time out? */
@@ -508,6 +509,7 @@ qla24xx_write_flash_dword(scsi_qla_host_t *ha, uint32_t addr, uint32_t data)
udelay(10);
else
rval = QLA_FUNCTION_TIMEOUT;
+ cond_resched();
}
return rval;
}
@@ -1255,6 +1257,7 @@ qla2x00_poll_flash(scsi_qla_host_t *ha, uint32_t addr, uint8_t poll_data,
}
udelay(10);
barrier();
+ cond_resched();
}
return status;
}
@@ -1403,6 +1406,7 @@ qla2x00_read_flash_data(scsi_qla_host_t *ha, uint8_t *tmp_buf, uint32_t saddr,
if (saddr % 100)
udelay(10);
*tmp_buf = data;
+ cond_resched();
}
}
@@ -1689,6 +1693,7 @@ update_flash:
rval = QLA_FUNCTION_FAILED;
break;
}
+ cond_resched();
}
} while (0);
qla2x00_flash_disable(ha);
--
1.5.0.3.382.g34572
next prev parent reply other threads:[~2007-03-12 17:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-12 17:40 [PATCH 0/6] qla2xxx: fixes for 2.6.21 [8.01.07-k6] Andrew Vasquez
2007-03-12 17:41 ` [PATCH 1/6] qla2xxx: fix RSCN handling on big-endian systems Andrew Vasquez
2007-03-12 17:41 ` [PATCH 2/6] qla2xxx: Add scan_[start|finish]() callbacks for ISP24xx HBAs Andrew Vasquez
2007-03-12 17:41 ` Andrew Vasquez [this message]
2007-03-12 17:41 ` [PATCH 4/6] qla2xxx: Drop acquisition of hardware_lock during flash manipulations Andrew Vasquez
2007-03-12 17:41 ` [PATCH 5/6] qla2xxx: Allow the extended-error-logging flag to be dynamic Andrew Vasquez
2007-03-12 17:41 ` [PATCH 6/6] qla2xxx: Update version number to 8.01.07-k6 Andrew Vasquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11737212911259-git-send-email-andrew.vasquez@qlogic.com \
--to=andrew.vasquez@qlogic.com \
--cc=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=seokmann.ju@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox