diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-05-07 10:11:43 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:04:47 -0700 |
commit | e531381e2f8a68b8737c63c7bb890ad80b2470bd (patch) | |
tree | b3f4deb3286269fa62e5c2ff94338dab4743f2c9 /drivers/scsi/isci/port.h | |
parent | 4b33981ade7cf723f3f32809e34192376c9a10f8 (diff) | |
download | blackbird-op-linux-e531381e2f8a68b8737c63c7bb890ad80b2470bd.tar.gz blackbird-op-linux-e531381e2f8a68b8737c63c7bb890ad80b2470bd.zip |
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.h | 25 |
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 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * This file contains the isci_port object definition. - * - * port.h - */ - -#if !defined(_ISCI_PORT_H_) +#ifndef _ISCI_PORT_H_ #define _ISCI_PORT_H_ +#include "scic_sds_port.h" struct isci_phy; struct isci_host; -struct scic_sds_phy; - enum isci_status { isci_freed = 0x00, @@ -84,9 +77,6 @@ enum isci_status { * */ struct isci_port { - - struct scic_sds_port *sci_port_handle; - enum isci_status status; struct isci_host *isci_host; struct asd_sas_port sas_port; @@ -96,16 +86,19 @@ struct isci_port { struct completion start_complete; struct completion hard_reset_complete; enum sci_status hard_reset_status; + struct scic_sds_port sci; }; -#define to_isci_port(p) \ - container_of(p, struct isci_port, sas_port); +static inline struct isci_port *sci_port_to_iport(struct scic_sds_port *sci_port) +{ + struct isci_port *iport = container_of(sci_port, typeof(*iport), sci); + + return iport; +} enum isci_status isci_port_get_state( struct isci_port *isci_port); - - void isci_port_formed( struct asd_sas_phy *); |