diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-07-01 14:41:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:52 -0400 |
commit | dc00c8b6940aa10ab1ce6a4d10b1bfe7b848781b (patch) | |
tree | 2f62620a348a5f6635413db4f5a0725c248a222b /drivers/scsi/isci/host.h | |
parent | 4e4dca3de9658f364d34924e072f2b64e5c3d267 (diff) |
isci: cleanup silicon revision detection
Perform checking per-pci device (even though all systems will only have
1 pci device in this generation), and delete support for silicon that
does not report a proper revision (i.e. A0).
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r-- | drivers/scsi/isci/host.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index ec0bba5367ba..062101a39f79 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h | |||
@@ -416,33 +416,25 @@ static inline struct device *scirdev_to_dev(struct isci_remote_device *idev) | |||
416 | return &idev->isci_port->isci_host->pdev->dev; | 416 | return &idev->isci_port->isci_host->pdev->dev; |
417 | } | 417 | } |
418 | 418 | ||
419 | enum { | 419 | static inline bool is_a2(struct pci_dev *pdev) |
420 | ISCI_SI_REVA0, | ||
421 | ISCI_SI_REVA2, | ||
422 | ISCI_SI_REVB0, | ||
423 | ISCI_SI_REVC0 | ||
424 | }; | ||
425 | |||
426 | extern int isci_si_rev; | ||
427 | |||
428 | static inline bool is_a0(void) | ||
429 | { | ||
430 | return isci_si_rev == ISCI_SI_REVA0; | ||
431 | } | ||
432 | |||
433 | static inline bool is_a2(void) | ||
434 | { | 420 | { |
435 | return isci_si_rev == ISCI_SI_REVA2; | 421 | if (pdev->revision < 4) |
422 | return true; | ||
423 | return false; | ||
436 | } | 424 | } |
437 | 425 | ||
438 | static inline bool is_b0(void) | 426 | static inline bool is_b0(struct pci_dev *pdev) |
439 | { | 427 | { |
440 | return isci_si_rev == ISCI_SI_REVB0; | 428 | if (pdev->revision == 4) |
429 | return true; | ||
430 | return false; | ||
441 | } | 431 | } |
442 | 432 | ||
443 | static inline bool is_c0(void) | 433 | static inline bool is_c0(struct pci_dev *pdev) |
444 | { | 434 | { |
445 | return isci_si_rev > ISCI_SI_REVB0; | 435 | if (pdev->revision >= 5) |
436 | return true; | ||
437 | return false; | ||
446 | } | 438 | } |
447 | 439 | ||
448 | void sci_controller_post_request(struct isci_host *ihost, | 440 | void sci_controller_post_request(struct isci_host *ihost, |