summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/sci_environment.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-23 00:09:01 -0800
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:55:28 -0700
commit3c06c2839dac6db56a1e6bd11924db38eddfb2ed (patch)
treec3c1c5d1e56657bb2cef3fd21155da4e99217e90 /drivers/scsi/isci/sci_environment.h
parentd9def184b39b966b7496dfbfad126808d3cd701b (diff)
downloadop-kernel-dev-3c06c2839dac6db56a1e6bd11924db38eddfb2ed.zip
op-kernel-dev-3c06c2839dac6db56a1e6bd11924db38eddfb2ed.tar.gz
isci: clean up remaining silicon revision ifdefs in phy init
Use the dynamic revision detection code in scic_sds_phy_link_layer_initialization() and apply some coding style fixups (long deref chains). The compile time max link rate setting is removed in favor of honoring the user-parameter max. Reported-by: Krzysztof Wierzbicki <Krzysztof.Wierzbicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/sci_environment.h')
-rw-r--r--drivers/scsi/isci/sci_environment.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/isci/sci_environment.h b/drivers/scsi/isci/sci_environment.h
index e1020ee..8d57f95 100644
--- a/drivers/scsi/isci/sci_environment.h
+++ b/drivers/scsi/isci/sci_environment.h
@@ -108,5 +108,19 @@ enum {
extern int isci_si_rev;
+static inline bool is_a0(void)
+{
+ return isci_si_rev == ISCI_SI_REVA0;
+}
+
+static inline bool is_a2(void)
+{
+ return isci_si_rev == ISCI_SI_REVA2;
+}
+
+static inline bool is_b0(void)
+{
+ return isci_si_rev > ISCI_SI_REVA2;
+}
#endif
OpenPOWER on IntegriCloud