From: mathieu.poirier@linaro.org
To: JBottomley@parallels.com
Cc: megaraidlinux@lsi.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, arnd@arndb.de,
mathieu.poirier@linaro.org
Subject: [PATCH 2/7] scsi/nsp32: don't pass large values into udelay
Date: Fri, 11 May 2012 16:09:23 -0600 [thread overview]
Message-ID: <1336774168-26577-3-git-send-email-mathieu.poirier@linaro.org> (raw)
In-Reply-To: <1336774168-26577-1-git-send-email-mathieu.poirier@linaro.org>
From: Arnd Bergmann <arnd@arndb.de>
This results in __bad_udelay warnings on some architectures.
Found on ARM randconfig builds.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
drivers/scsi/nsp32.c | 3 ++-
drivers/scsi/nsp32.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 62b6168..cc36543 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2926,7 +2926,8 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)
* reset SCSI bus
*/
nsp32_write1(base, SCSI_BUS_CONTROL, BUSCTL_RST);
- udelay(RESET_HOLD_TIME);
+ /* FIXME: we should not run with IRQs disabled for 10ms here */
+ mdelay(RESET_HOLD_TIME);
nsp32_write1(base, SCSI_BUS_CONTROL, 0);
for(i = 0; i < 5; i++) {
intrdat = nsp32_read2(base, IRQ_STATUS); /* dummy read */
diff --git a/drivers/scsi/nsp32.h b/drivers/scsi/nsp32.h
index c022182..b2b3dc6 100644
--- a/drivers/scsi/nsp32.h
+++ b/drivers/scsi/nsp32.h
@@ -605,7 +605,7 @@ typedef struct _nsp32_hw_data {
/*
* TIME definition
*/
-#define RESET_HOLD_TIME 10000 /* reset time in us (SCSI-2 says the
+#define RESET_HOLD_TIME 10 /* reset time in ms (SCSI-2 says the
minimum is 25us) */
#define SEL_TIMEOUT_TIME 10000 /* 250ms defined in SCSI specification
(25.6us/1unit) */
--
1.7.5.4
next prev parent reply other threads:[~2012-05-11 22:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 22:09 [PATCH 0/7] drivers/scsi: randconfig patches for kernel 3.4.patch mathieu.poirier
2012-05-11 22:09 ` [PATCH 1/7] scsi: mark SCSI_SRP as experimental mathieu.poirier
2012-05-11 22:09 ` mathieu.poirier [this message]
2012-05-11 22:09 ` [PATCH 3/7] drivers/scsi: use correct __devexit_p annotation mathieu.poirier
2012-05-11 22:09 ` [PATCH 4/7] scsi/advansys: do not build on ARM mathieu.poirier
2012-05-11 22:09 ` [PATCH 5/7] scsi/atp870u: use mdelay instead of large udelay mathieu.poirier
2012-05-11 22:09 ` [PATCH 6/7] scsi/megaraid: fix sparse warnings mathieu.poirier
2012-05-11 22:29 ` adam radford
2012-05-12 13:02 ` Arnd Bergmann
2012-05-11 22:09 ` [PATCH 7/7] drivers/scsi: some ISA drivers need ISA_DMA_API mathieu.poirier
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=1336774168-26577-3-git-send-email-mathieu.poirier@linaro.org \
--to=mathieu.poirier@linaro.org \
--cc=JBottomley@parallels.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=megaraidlinux@lsi.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
all inboxes | Powered by JetHome®