summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron2010-05-27 22:13:53 +0200
committerJames Bottomley2010-07-27 19:01:11 +0200
commitcda7612d4b96d51324c6fc4d5e47d629da6cb500 (patch)
tree31b0696f7873bc77b2425f3c56936547e70b9eca /drivers/scsi/hpsa.c
parent[SCSI] hpsa: factor out hpsa_enter_simple_mode (diff)
downloadkernel-qcow2-linux-cda7612d4b96d51324c6fc4d5e47d629da6cb500.tar.gz
kernel-qcow2-linux-cda7612d4b96d51324c6fc4d5e47d629da6cb500.tar.xz
kernel-qcow2-linux-cda7612d4b96d51324c6fc4d5e47d629da6cb500.zip
[SCSI] hpsa: check that simple mode is supported
before trying to enter simple mode transport method. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 4d4ecca399ae..57d038045adc 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3413,6 +3413,11 @@ static inline void hpsa_p600_dma_prefetch_quirk(struct ctlr_info *h)
static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h)
{
int i;
+ u32 trans_support;
+
+ trans_support = readl(&(h->cfgtable->TransportSupport));
+ if (!(trans_support & SIMPLE_MODE))
+ return -ENOTSUPP;
h->max_commands = readl(&(h->cfgtable->CmdsOutMax));
/* Update the field, and then ring the doorbell */