diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-05-27 16:13:53 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:11 -0400 |
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 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) | |||
3413 | static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h) | 3413 | static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h) |
3414 | { | 3414 | { |
3415 | int i; | 3415 | int i; |
3416 | u32 trans_support; | ||
3417 | |||
3418 | trans_support = readl(&(h->cfgtable->TransportSupport)); | ||
3419 | if (!(trans_support & SIMPLE_MODE)) | ||
3420 | return -ENOTSUPP; | ||
3416 | 3421 | ||
3417 | h->max_commands = readl(&(h->cfgtable->CmdsOutMax)); | 3422 | h->max_commands = readl(&(h->cfgtable->CmdsOutMax)); |
3418 | /* Update the field, and then ring the doorbell */ | 3423 | /* Update the field, and then ring the doorbell */ |