summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/phy.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/phy.h')
-rw-r--r--drivers/scsi/isci/phy.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/drivers/scsi/isci/phy.h b/drivers/scsi/isci/phy.h
index 21f6050eadbe..93ec2d4a9c30 100644
--- a/drivers/scsi/isci/phy.h
+++ b/drivers/scsi/isci/phy.h
@@ -54,24 +54,17 @@
*/
-#if !defined(_ISCI_PHY_H_)
+#ifndef _ISCI_PHY_H_
#define _ISCI_PHY_H_
-#include "port.h"
-#include "host.h"
#include <scsi/sas.h>
#include <scsi/libsas.h>
-
-
-/**
- * struct isci_phy - This class implements the ISCI specific representation of
- * the phy object.
- *
- *
- */
+#include "scic_sds_phy.h"
+#include "port.h"
+#include "host.h"
struct isci_phy {
- struct scic_sds_phy *sci_phy_handle;
+ struct scic_sds_phy sci;
struct asd_sas_phy sas_phy;
struct isci_port *isci_port;
u8 sas_addr[SAS_ADDR_SIZE];
@@ -82,17 +75,21 @@ struct isci_phy {
} frame_rcvd;
};
-#define to_isci_phy(p) \
- container_of(p, struct isci_phy, sas_phy);
+static inline struct isci_phy *to_isci_phy(struct asd_sas_phy *sas_phy)
+{
+ struct isci_phy *iphy = container_of(sas_phy, typeof(*iphy), sas_phy);
+
+ return iphy;
+}
+
+static inline struct isci_phy *sci_phy_to_iphy(struct scic_sds_phy *sci_phy)
+{
+ struct isci_phy *iphy = container_of(sci_phy, typeof(*iphy), sci);
-void isci_phy_init(
- struct isci_phy *phy,
- struct isci_host *isci_host,
- int index);
+ return iphy;
+}
-int isci_phy_control(
- struct asd_sas_phy *phy,
- enum phy_func func,
- void *buf);
+void isci_phy_init(struct isci_phy *iphy, struct isci_host *ihost, int index);
+int isci_phy_control(struct asd_sas_phy *phy, enum phy_func func, void *buf);
#endif /* !defined(_ISCI_PHY_H_) */
OpenPOWER on IntegriCloud