diff options
author | Dave Jiang <dave.jiang@intel.com> | 2011-05-04 18:45:05 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:04:46 -0700 |
commit | 2d9c2240e0bad47e8d08091016b537287a263976 (patch) | |
tree | d4ca7bb9dbb3730ccc0f6ec89409b205c6206df7 /drivers/scsi/isci/remote_device.c | |
parent | 51a57cff7ca0549bcf87cbb36086269978f42568 (diff) |
isci: Using Linux SSP frame header
Removing of struct sci_ssp_frame_header and migrate to struct ssp_frame_hdr.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/remote_device.c')
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index e766b27bdc1..89cdd0a05ab 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c @@ -52,6 +52,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <scsi/sas.h> #include "intel_sas.h" #include "sas.h" #include "isci.h" @@ -305,15 +306,20 @@ enum sci_status scic_sds_remote_device_frame_handler(struct scic_sds_remote_devi case SCI_BASE_REMOTE_DEVICE_STATE_FAILED: case SCI_BASE_REMOTE_DEVICE_STATE_RESETTING: { struct scic_sds_request *sci_req; - struct sci_ssp_frame_header *hdr; + struct ssp_frame_hdr hdr; + void *frame_header; + ssize_t word_cnt; status = scic_sds_unsolicited_frame_control_get_header(&scic->uf_control, frame_index, - (void **)&hdr); + &frame_header); if (status != SCI_SUCCESS) return status; - sci_req = scic_sds_controller_get_io_request_from_tag(scic, hdr->tag); + word_cnt = sizeof(hdr) / sizeof(u32); + sci_swab32_cpy(&hdr, frame_header, word_cnt); + + sci_req = scic_request_by_tag(scic, be16_to_cpu(hdr.tag)); if (sci_req && sci_req->target_device == sci_dev) { /* The IO request is now in charge of releasing the frame */ status = sci_req->state_handlers->frame_handler(sci_req, |