diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-05-27 15:13:53 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 12:01:11 -0500 |
commit | cda7612d4b96d51324c6fc4d5e47d629da6cb500 (patch) | |
tree | 31b0696f7873bc77b2425f3c56936547e70b9eca /drivers/scsi/hpsa.c | |
parent | eb6b2ae9058accd183fe8b31f1985312bf333624 (diff) |
[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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 4d4ecca399a..57d038045ad 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 */ |