ms->current_req = NULL;
tp->current_req = NULL;
if (cmd) {
- struct scsi_pointer *scsi_pointer = mesh_scsi_pointer(cmd);
+ struct mesh_cmd_priv *mcmd = mesh_priv(cmd);
set_host_byte(cmd, ms->stat);
- set_status_byte(cmd, scsi_pointer->Status);
+ set_status_byte(cmd, mcmd->status);
if (ms->stat == DID_OK)
- scsi_msg_to_host_byte(cmd, scsi_pointer->Message);
+ scsi_msg_to_host_byte(cmd, mcmd->message);
if (DEBUG_TARGET(cmd)) {
printk(KERN_DEBUG "mesh_done: result = %x, data_ptr=%d, buflen=%d\n",
cmd->result, ms->data_ptr, scsi_bufflen(cmd));
}
#endif
}
- scsi_pointer->this_residual -= ms->data_ptr;
+ mcmd->this_residual -= ms->data_ptr;
scsi_done(cmd);
}
if (start_next) {
if (ms->n_msgin < msgin_length(ms))
goto reject;
if (cmd)
- mesh_scsi_pointer(cmd)->Message = code;
+ mesh_priv(cmd)->message = code;
switch (code) {
case COMMAND_COMPLETE:
break;
if (cmd) {
int nseg;
- mesh_scsi_pointer(cmd)->this_residual = scsi_bufflen(cmd);
+ mesh_priv(cmd)->this_residual = scsi_bufflen(cmd);
nseg = scsi_dma_map(cmd);
BUG_ON(nseg < 0);
break;
case statusing:
if (cmd) {
- struct scsi_pointer *scsi_pointer =
- mesh_scsi_pointer(cmd);
+ struct mesh_cmd_priv *mcmd = mesh_priv(cmd);
- scsi_pointer->Status = mr->fifo;
+ mcmd->status = mr->fifo;
if (DEBUG_TARGET(cmd))
printk(KERN_DEBUG "mesh: status is %x\n",
- scsi_pointer->Status);
+ mcmd->status);
}
ms->msgphase = msg_in;
break;
#define _MESH_H
struct mesh_cmd_priv {
- struct scsi_pointer scsi_pointer;
+ int this_residual;
+ int message;
+ int status;
};
-static inline struct scsi_pointer *mesh_scsi_pointer(struct scsi_cmnd *cmd)
+static inline struct mesh_cmd_priv *mesh_priv(struct scsi_cmnd *cmd)
{
- struct mesh_cmd_priv *mcmd = scsi_cmd_priv(cmd);
-
- return &mcmd->scsi_pointer;
+ return scsi_cmd_priv(cmd);
}
/*