summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/host.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-07-01 22:41:21 +0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 15:04:52 +0400
commitdc00c8b6940aa10ab1ce6a4d10b1bfe7b848781b (patch)
tree2f62620a348a5f6635413db4f5a0725c248a222b /drivers/scsi/isci/host.h
parent4e4dca3de9658f364d34924e072f2b64e5c3d267 (diff)
downloadlinux-dc00c8b6940aa10ab1ce6a4d10b1bfe7b848781b.tar.xz
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.h32
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)
return &idev->isci_port->isci_host->pdev->dev;
}
-enum {
- ISCI_SI_REVA0,
- ISCI_SI_REVA2,
- ISCI_SI_REVB0,
- ISCI_SI_REVC0
-};
-
-extern int isci_si_rev;
-
-static inline bool is_a0(void)
-{
- return isci_si_rev == ISCI_SI_REVA0;
-}
-
-static inline bool is_a2(void)
+static inline bool is_a2(struct pci_dev *pdev)
{
- return isci_si_rev == ISCI_SI_REVA2;
+ if (pdev->revision < 4)
+ return true;
+ return false;
}
-static inline bool is_b0(void)
+static inline bool is_b0(struct pci_dev *pdev)
{
- return isci_si_rev == ISCI_SI_REVB0;
+ if (pdev->revision == 4)
+ return true;
+ return false;
}
-static inline bool is_c0(void)
+static inline bool is_c0(struct pci_dev *pdev)
{
- return isci_si_rev > ISCI_SI_REVB0;
+ if (pdev->revision >= 5)
+ return true;
+ return false;
}
void sci_controller_post_request(struct isci_host *ihost,