Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208301
b: refs/heads/master
c: 501b92c
h: refs/heads/master
i:
  208299: 5b31d5c
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Aug 7, 2010
1 parent a7cd4b0 commit 553c82e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afadbf4b9591f3318508792ad98c347336a1a95d
refs/heads/master: 501b92cd6b394ba56bb978fd55606b5639b4d3fb
18 changes: 13 additions & 5 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -4096,6 +4096,18 @@ static void __devinit cciss_find_board_params(ctlr_info_t *h)
}
}

static inline bool CISS_signature_present(ctlr_info_t *h)
{
if ((readb(&h->cfgtable->Signature[0]) != 'C') ||
(readb(&h->cfgtable->Signature[1]) != 'I') ||
(readb(&h->cfgtable->Signature[2]) != 'S') ||
(readb(&h->cfgtable->Signature[3]) != 'S')) {
dev_warn(&h->pdev->dev, "not a valid CISS config table\n");
return false;
}
return true;
}

static int __devinit cciss_pci_init(ctlr_info_t *c)
{
int prod_index, err;
Expand Down Expand Up @@ -4153,11 +4165,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c)
#endif /* CCISS_DEBUG */
cciss_find_board_params(c);

if ((readb(&c->cfgtable->Signature[0]) != 'C') ||
(readb(&c->cfgtable->Signature[1]) != 'I') ||
(readb(&c->cfgtable->Signature[2]) != 'S') ||
(readb(&c->cfgtable->Signature[3]) != 'S')) {
printk("Does not appear to be a valid CISS config table\n");
if (!CISS_signature_present(c)) {
err = -ENODEV;
goto err_out_free_res;
}
Expand Down

0 comments on commit 553c82e

Please sign in to comment.