Skip to content

Commit

Permalink
[SCSI] hpsa: check that simple mode is supported
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen M. Cameron authored and James Bottomley committed Jul 27, 2010
1 parent eb6b2ae commit cda7612
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit cda7612

Please sign in to comment.