@@ -166,7 +166,7 @@ csio_scsi_fcp_cmnd(struct csio_ioreq *req, void *addr)
166
166
struct scsi_cmnd * scmnd = csio_scsi_cmnd (req );
167
167
168
168
/* Check for Task Management */
169
- if (likely (scmnd -> SCp . Message == 0 )) {
169
+ if (likely (csio_priv ( scmnd ) -> fc_tm_flags == 0 )) {
170
170
int_to_scsilun (scmnd -> device -> lun , & fcp_cmnd -> fc_lun );
171
171
fcp_cmnd -> fc_tm_flags = 0 ;
172
172
fcp_cmnd -> fc_cmdref = 0 ;
@@ -185,7 +185,7 @@ csio_scsi_fcp_cmnd(struct csio_ioreq *req, void *addr)
185
185
} else {
186
186
memset (fcp_cmnd , 0 , sizeof (* fcp_cmnd ));
187
187
int_to_scsilun (scmnd -> device -> lun , & fcp_cmnd -> fc_lun );
188
- fcp_cmnd -> fc_tm_flags = ( uint8_t ) scmnd -> SCp . Message ;
188
+ fcp_cmnd -> fc_tm_flags = csio_priv ( scmnd ) -> fc_tm_flags ;
189
189
}
190
190
}
191
191
@@ -1855,7 +1855,7 @@ csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd)
1855
1855
1856
1856
/* Needed during abort */
1857
1857
cmnd -> host_scribble = (unsigned char * )ioreq ;
1858
- cmnd -> SCp . Message = 0 ;
1858
+ csio_priv ( cmnd ) -> fc_tm_flags = 0 ;
1859
1859
1860
1860
/* Kick off SCSI IO SM on the ioreq */
1861
1861
spin_lock_irqsave (& hw -> lock , flags );
@@ -2026,7 +2026,7 @@ csio_tm_cbfn(struct csio_hw *hw, struct csio_ioreq *req)
2026
2026
req , req -> wr_status );
2027
2027
2028
2028
/* Cache FW return status */
2029
- cmnd -> SCp . Status = req -> wr_status ;
2029
+ csio_priv ( cmnd ) -> wr_status = req -> wr_status ;
2030
2030
2031
2031
/* Special handling based on FCP response */
2032
2032
@@ -2049,7 +2049,7 @@ csio_tm_cbfn(struct csio_hw *hw, struct csio_ioreq *req)
2049
2049
/* Modify return status if flags indicate success */
2050
2050
if (flags & FCP_RSP_LEN_VAL )
2051
2051
if (rsp_info -> rsp_code == FCP_TMF_CMPL )
2052
- cmnd -> SCp . Status = FW_SUCCESS ;
2052
+ csio_priv ( cmnd ) -> wr_status = FW_SUCCESS ;
2053
2053
2054
2054
csio_dbg (hw , "TM FCP rsp code: %d\n" , rsp_info -> rsp_code );
2055
2055
}
@@ -2125,9 +2125,9 @@ csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd)
2125
2125
2126
2126
csio_scsi_cmnd (ioreq ) = cmnd ;
2127
2127
cmnd -> host_scribble = (unsigned char * )ioreq ;
2128
- cmnd -> SCp . Status = 0 ;
2128
+ csio_priv ( cmnd ) -> wr_status = 0 ;
2129
2129
2130
- cmnd -> SCp . Message = FCP_TMF_LUN_RESET ;
2130
+ csio_priv ( cmnd ) -> fc_tm_flags = FCP_TMF_LUN_RESET ;
2131
2131
ioreq -> tmo = CSIO_SCSI_LUNRST_TMO_MS / 1000 ;
2132
2132
2133
2133
/*
@@ -2178,9 +2178,10 @@ csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd)
2178
2178
}
2179
2179
2180
2180
/* LUN reset returned, check cached status */
2181
- if (cmnd -> SCp . Status != FW_SUCCESS ) {
2181
+ if (csio_priv ( cmnd ) -> wr_status != FW_SUCCESS ) {
2182
2182
csio_err (hw , "LUN reset failed (%d:%llu), status: %d\n" ,
2183
- cmnd -> device -> id , cmnd -> device -> lun , cmnd -> SCp .Status );
2183
+ cmnd -> device -> id , cmnd -> device -> lun ,
2184
+ csio_priv (cmnd )-> wr_status );
2184
2185
goto fail ;
2185
2186
}
2186
2187
@@ -2271,6 +2272,7 @@ struct scsi_host_template csio_fcoe_shost_template = {
2271
2272
.name = CSIO_DRV_DESC ,
2272
2273
.proc_name = KBUILD_MODNAME ,
2273
2274
.queuecommand = csio_queuecommand ,
2275
+ .cmd_size = sizeof (struct csio_cmd_priv ),
2274
2276
.eh_timed_out = fc_eh_timed_out ,
2275
2277
.eh_abort_handler = csio_eh_abort_handler ,
2276
2278
.eh_device_reset_handler = csio_eh_lun_reset_handler ,
0 commit comments