From 30dabd3cefc0df7f5dc412214567a07429b4c368 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 23 Jun 2011 23:44:52 -0700 Subject: [PATCH] --- yaml --- r: 254563 b: refs/heads/master c: 4cffe13e0dfd00f90c86b0153c751dab61a1bf1d h: refs/heads/master i: 254561: e8b2bd7c57e0554f6720889d7b701c55e7d0e519 254559: d0c8659787a839cb19ba29ab6d9824a3fa534ddf v: v3 --- [refs] | 2 +- trunk/drivers/scsi/isci/phy.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 53188d8a0550..420252a0716c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7cafbf1bd56be44038148bb8f733ea6e6a6a2d53 +refs/heads/master: 4cffe13e0dfd00f90c86b0153c751dab61a1bf1d diff --git a/trunk/drivers/scsi/isci/phy.c b/trunk/drivers/scsi/isci/phy.c index 93a401dfbd30..c01d76210aa2 100644 --- a/trunk/drivers/scsi/isci/phy.c +++ b/trunk/drivers/scsi/isci/phy.c @@ -893,6 +893,7 @@ enum sci_status scic_sds_phy_frame_handler(struct scic_sds_phy *sci_phy, enum scic_sds_phy_states state = sci_phy->sm.current_state_id; struct scic_sds_controller *scic = sci_phy->owning_port->owning_controller; enum sci_status result; + unsigned long flags; switch (state) { case SCI_PHY_SUB_AWAIT_IAF_UF: { @@ -911,7 +912,9 @@ enum sci_status scic_sds_phy_frame_handler(struct scic_sds_phy *sci_phy, if (iaf.frame_type == 0) { u32 state; + spin_lock_irqsave(&iphy->sas_phy.frame_rcvd_lock, flags); memcpy(&iphy->frame_rcvd.iaf, &iaf, sizeof(iaf)); + spin_unlock_irqrestore(&iphy->sas_phy.frame_rcvd_lock, flags); if (iaf.smp_tport) { /* We got the IAF for an expander PHY go to the final * state since there are no power requirements for @@ -954,9 +957,11 @@ enum sci_status scic_sds_phy_frame_handler(struct scic_sds_phy *sci_phy, frame_index, (void **)&fis_frame_data); + spin_lock_irqsave(&iphy->sas_phy.frame_rcvd_lock, flags); scic_sds_controller_copy_sata_response(&iphy->frame_rcvd.fis, frame_header, fis_frame_data); + spin_unlock_irqrestore(&iphy->sas_phy.frame_rcvd_lock, flags); /* got IAF we can now go to the await spinup semaphore state */ sci_change_state(&sci_phy->sm, SCI_PHY_SUB_FINAL);