summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/port.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-06 17:36:38 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:04:47 -0700
commit4b33981ade7cf723f3f32809e34192376c9a10f8 (patch)
tree576eda3b06d27e9911203bfbf2e5818ce63cac08 /drivers/scsi/isci/port.c
parenta98a7426bc91700ac8613701daf8470efe2ad2d2 (diff)
downloadop-kernel-dev-4b33981ade7cf723f3f32809e34192376c9a10f8.zip
op-kernel-dev-4b33981ade7cf723f3f32809e34192376c9a10f8.tar.gz
isci: unify phy data structures
Make scic_sds_phy a member of isci_phy and merge their lifetimes which means removing the phy table from scic_sds_controller in favor of the one at that isci_host level. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/port.c')
-rw-r--r--drivers/scsi/isci/port.c42
1 files changed, 12 insertions, 30 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 6110306..5e87fed 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -120,44 +120,26 @@ static void isci_port_change_state(
spin_unlock_irqrestore(&isci_port->state_lock, flags);
}
-void isci_port_bc_change_received(
- struct isci_host *isci_host,
- struct scic_sds_port *port,
- struct scic_sds_phy *phy)
+void isci_port_bc_change_received(struct isci_host *ihost,
+ struct scic_sds_port *sci_port,
+ struct scic_sds_phy *sci_phy)
{
- struct isci_phy *isci_phy = phy->iphy;
+ struct isci_phy *iphy = sci_phy_to_iphy(sci_phy);
- dev_dbg(&isci_host->pdev->dev,
- "%s: isci_phy = %p, sas_phy = %p\n",
- __func__,
- isci_phy,
- &isci_phy->sas_phy);
-
- isci_host->sas_ha.notify_port_event(
- &isci_phy->sas_phy,
- PORTE_BROADCAST_RCVD
- );
+ dev_dbg(&ihost->pdev->dev, "%s: iphy = %p, sas_phy = %p\n",
+ __func__, iphy, &iphy->sas_phy);
- scic_port_enable_broadcast_change_notification(port);
+ ihost->sas_ha.notify_port_event(&iphy->sas_phy, PORTE_BROADCAST_RCVD);
+ scic_port_enable_broadcast_change_notification(sci_port);
}
-/**
- * isci_port_link_up() - This function is called by the sci core when a link
- * becomes active. the identify address frame is retrieved from the core and
- * a notify port event is sent to libsas.
- * @isci_host: This parameter specifies the isci host object.
- * @port: This parameter specifies the sci port with the active link.
- * @phy: This parameter specifies the sci phy with the active link.
- *
- */
-void isci_port_link_up(
- struct isci_host *isci_host,
- struct scic_sds_port *port,
- struct scic_sds_phy *phy)
+void isci_port_link_up(struct isci_host *isci_host,
+ struct scic_sds_port *port,
+ struct scic_sds_phy *phy)
{
unsigned long flags;
struct scic_port_properties properties;
- struct isci_phy *isci_phy = phy->iphy;
+ struct isci_phy *isci_phy = sci_phy_to_iphy(phy);
struct isci_port *isci_port = port->iport;
unsigned long success = true;
OpenPOWER on IntegriCloud