summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/task.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2011-05-04 17:53:24 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:04:46 -0700
commitaf5ae89350840b9d724fc4fb81d928673bffdd4d (patch)
tree954d27adccdce854c040442fd44d28571924ee13 /drivers/scsi/isci/task.h
parent0cfa890e5a8a9e3b01b75c17a7856cf96e026e27 (diff)
isci: Convert of sci_ssp_response_iu to ssp_response_iu
Converting to Linux native format. However the isci driver does a lot of the calculation based on the max size of this data structure and the Linux data structure only has a pointer to the response data. Thus the sizeof(struct ssp_response_iu) will be incorrect and we need to define the max size. 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/task.h')
-rw-r--r--drivers/scsi/isci/task.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index c5afd1cfbde7..77cc54dbe81f 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -99,7 +99,7 @@ struct isci_tmf {
struct completion *complete;
enum sas_protocol proto;
union {
- struct sci_ssp_response_iu resp_iu;
+ struct ssp_response_iu resp_iu;
struct dev_to_host_fis d2h_fis;
} resp;
unsigned char lun[8];
@@ -120,8 +120,7 @@ struct isci_tmf {
};
-static inline void isci_print_tmf(
- struct isci_tmf *tmf)
+static inline void isci_print_tmf(struct isci_tmf *tmf)
{
if (SAS_PROTOCOL_SATA == tmf->proto)
dev_dbg(&tmf->device->isci_port->isci_host->pdev->dev,
@@ -144,16 +143,13 @@ static inline void isci_print_tmf(
"tmf->resp.resp_iu.data[3] = %x\n",
__func__,
tmf->status,
- tmf->resp.resp_iu.data_present,
+ tmf->resp.resp_iu.datapres,
tmf->resp.resp_iu.status,
- (tmf->resp.resp_iu.response_data_length[0] << 24) +
- (tmf->resp.resp_iu.response_data_length[1] << 16) +
- (tmf->resp.resp_iu.response_data_length[2] << 8) +
- tmf->resp.resp_iu.response_data_length[3],
- tmf->resp.resp_iu.data[0],
- tmf->resp.resp_iu.data[1],
- tmf->resp.resp_iu.data[2],
- tmf->resp.resp_iu.data[3]);
+ be32_to_cpu(tmf->resp.resp_iu.response_data_len),
+ tmf->resp.resp_iu.resp_data[0],
+ tmf->resp.resp_iu.resp_data[1],
+ tmf->resp.resp_iu.resp_data[2],
+ tmf->resp.resp_iu.resp_data[3]);
}