Commit 30ea0f1f authored by Alan Cox's avatar Alan Cox Committed by David Woodhouse

[PATCH] Fix scsi parts of iph5526

parent cd0bc81d
...@@ -3913,9 +3913,9 @@ int iph5526_queuecommand(Scsi_Cmnd *Cmnd, void (*done) (Scsi_Cmnd *)) ...@@ -3913,9 +3913,9 @@ int iph5526_queuecommand(Scsi_Cmnd *Cmnd, void (*done) (Scsi_Cmnd *))
int int_required = 0; int int_required = 0;
u_int r_ctl = FC4_DEVICE_DATA | UNSOLICITED_COMMAND; u_int r_ctl = FC4_DEVICE_DATA | UNSOLICITED_COMMAND;
u_int type = TYPE_FCP | SEQUENCE_INITIATIVE; u_int type = TYPE_FCP | SEQUENCE_INITIATIVE;
u_int frame_class = Cmnd->target; u_int frame_class = Cmnd->device->id;
u_short ox_id = OX_ID_FIRST_SEQUENCE; u_short ox_id = OX_ID_FIRST_SEQUENCE;
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->device->host;
struct iph5526_hostdata *hostdata = (struct iph5526_hostdata*)host->hostdata; struct iph5526_hostdata *hostdata = (struct iph5526_hostdata*)host->hostdata;
struct fc_info *fi = hostdata->fi; struct fc_info *fi = hostdata->fi;
struct fc_node_info *q; struct fc_node_info *q;
...@@ -3937,9 +3937,9 @@ u_long flags; ...@@ -3937,9 +3937,9 @@ u_long flags;
hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_ORDERED; hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_ORDERED;
break; break;
default: default:
if ((jiffies - hostdata->tag_ages[Cmnd->target]) > (5 * HZ)) { if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (5 * HZ)) {
hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_ORDERED; hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_ORDERED;
hostdata->tag_ages[Cmnd->target] = jiffies; hostdata->tag_ages[Cmnd->device->id] = jiffies;
} }
else else
hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_SIMPLE; hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_SIMPLE;
...@@ -3953,7 +3953,7 @@ u_long flags; ...@@ -3953,7 +3953,7 @@ u_long flags;
hostdata->cmnd.fcp_addr[3] = 0; hostdata->cmnd.fcp_addr[3] = 0;
hostdata->cmnd.fcp_addr[2] = 0; hostdata->cmnd.fcp_addr[2] = 0;
hostdata->cmnd.fcp_addr[1] = 0; hostdata->cmnd.fcp_addr[1] = 0;
hostdata->cmnd.fcp_addr[0] = htons(Cmnd->lun); hostdata->cmnd.fcp_addr[0] = htons(Cmnd->device->lun);
memcpy(&hostdata->cmnd.fcp_cdb, Cmnd->cmnd, Cmnd->cmd_len); memcpy(&hostdata->cmnd.fcp_cdb, Cmnd->cmnd, Cmnd->cmd_len);
hostdata->cmnd.fcp_data_len = htonl(Cmnd->request_bufflen); hostdata->cmnd.fcp_data_len = htonl(Cmnd->request_bufflen);
...@@ -3985,7 +3985,7 @@ u_long flags; ...@@ -3985,7 +3985,7 @@ u_long flags;
memcpy(fi->q.ptr_fcp_cmnd[fi->q.fcp_cmnd_indx], &(hostdata->cmnd), sizeof(fcp_cmd)); memcpy(fi->q.ptr_fcp_cmnd[fi->q.fcp_cmnd_indx], &(hostdata->cmnd), sizeof(fcp_cmd));
q = resolve_target(fi, Cmnd->target); q = resolve_target(fi, Cmnd->device->id);
if (q == NULL) { if (q == NULL) {
u_int bad_id = fi->g.my_ddaa | 0xFE; u_int bad_id = fi->g.my_ddaa | 0xFE;
...@@ -4022,7 +4022,7 @@ u_long flags; ...@@ -4022,7 +4022,7 @@ u_long flags;
int iph5526_abort(Scsi_Cmnd *Cmnd) int iph5526_abort(Scsi_Cmnd *Cmnd)
{ {
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->device->host;
struct iph5526_hostdata *hostdata = (struct iph5526_hostdata *)host->hostdata; struct iph5526_hostdata *hostdata = (struct iph5526_hostdata *)host->hostdata;
struct fc_info *fi = hostdata->fi; struct fc_info *fi = hostdata->fi;
struct fc_node_info *q; struct fc_node_info *q;
...@@ -4036,7 +4036,7 @@ u_long flags; ...@@ -4036,7 +4036,7 @@ u_long flags;
spin_lock_irqsave(&fi->fc_lock, flags); spin_lock_irqsave(&fi->fc_lock, flags);
q = resolve_target(fi, Cmnd->target); q = resolve_target(fi, Cmnd->device->id);
if (q == NULL) { if (q == NULL) {
u_int bad_id = fi->g.my_ddaa | 0xFE; u_int bad_id = fi->g.my_ddaa | 0xFE;
/* This should not happen as we should always be able to /* This should not happen as we should always be able to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment