aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/port.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-07 13:11:43 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:47 -0400
commite531381e2f8a68b8737c63c7bb890ad80b2470bd (patch)
treeb3f4deb3286269fa62e5c2ff94338dab4743f2c9 /drivers/scsi/isci/port.h
parent4b33981ade7cf723f3f32809e34192376c9a10f8 (diff)
isci: unify port data structures
Make scic_sds_port a member of isci_port and merge their lifetimes which means removing the port table from scic_sds_controller in favor of the one at the isci_host level. Merge ihost->sas_ports into ihost->ports. _ Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/port.h')
-rw-r--r--drivers/scsi/isci/port.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/scsi/isci/port.h b/drivers/scsi/isci/port.h
index ac1ac86ead6f..355034542e4c 100644
--- a/drivers/scsi/isci/port.h
+++ b/drivers/scsi/isci/port.h
@@ -53,19 +53,12 @@
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 */ 54 */
55 55
56/** 56#ifndef _ISCI_PORT_H_
57 * This file contains the isci_port object definition.
58 *
59 * port.h
60 */
61
62#if !defined(_ISCI_PORT_H_)
63#define _ISCI_PORT_H_ 57#define _ISCI_PORT_H_
58#include "scic_sds_port.h"
64 59
65struct isci_phy; 60struct isci_phy;
66struct isci_host; 61struct isci_host;
67struct scic_sds_phy;
68
69 62
70enum isci_status { 63enum isci_status {
71 isci_freed = 0x00, 64 isci_freed = 0x00,
@@ -84,9 +77,6 @@ enum isci_status {
84 * 77 *
85 */ 78 */
86struct isci_port { 79struct isci_port {
87
88 struct scic_sds_port *sci_port_handle;
89
90 enum isci_status status; 80 enum isci_status status;
91 struct isci_host *isci_host; 81 struct isci_host *isci_host;
92 struct asd_sas_port sas_port; 82 struct asd_sas_port sas_port;
@@ -96,16 +86,19 @@ struct isci_port {
96 struct completion start_complete; 86 struct completion start_complete;
97 struct completion hard_reset_complete; 87 struct completion hard_reset_complete;
98 enum sci_status hard_reset_status; 88 enum sci_status hard_reset_status;
89 struct scic_sds_port sci;
99}; 90};
100 91
101#define to_isci_port(p) \ 92static inline struct isci_port *sci_port_to_iport(struct scic_sds_port *sci_port)
102 container_of(p, struct isci_port, sas_port); 93{
94 struct isci_port *iport = container_of(sci_port, typeof(*iport), sci);
95
96 return iport;
97}
103 98
104enum isci_status isci_port_get_state( 99enum isci_status isci_port_get_state(
105 struct isci_port *isci_port); 100 struct isci_port *isci_port);
106 101
107
108
109void isci_port_formed( 102void isci_port_formed(
110 struct asd_sas_phy *); 103 struct asd_sas_phy *);
111 104