aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-05-25 12:55:38 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-31 13:23:49 -0400
commit385d70b4e2659ae525a00e46a9f97146949cfc14 (patch)
tree35f34aefd41261f6bc2f4c31d308e1d0a75c4be0 /drivers/scsi/qla2xxx/qla_isr.c
parentb1192d5ebab2f1664295a748b6ee6e89f3b07188 (diff)
[SCSI] qla2xxx: convert to use the data buffer accessors
- remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 0f04258becbf..6ce532cdc4c1 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -889,19 +889,19 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
889 } 889 }
890 if (scsi_status & (SS_RESIDUAL_UNDER | SS_RESIDUAL_OVER)) { 890 if (scsi_status & (SS_RESIDUAL_UNDER | SS_RESIDUAL_OVER)) {
891 resid = resid_len; 891 resid = resid_len;
892 cp->resid = resid; 892 scsi_set_resid(cp, resid);
893 CMD_RESID_LEN(cp) = resid; 893 CMD_RESID_LEN(cp) = resid;
894 894
895 if (!lscsi_status && 895 if (!lscsi_status &&
896 ((unsigned)(cp->request_bufflen - resid) < 896 ((unsigned)(scsi_bufflen(cp) - resid) <
897 cp->underflow)) { 897 cp->underflow)) {
898 qla_printk(KERN_INFO, ha, 898 qla_printk(KERN_INFO, ha,
899 "scsi(%ld:%d:%d:%d): Mid-layer underflow " 899 "scsi(%ld:%d:%d:%d): Mid-layer underflow "
900 "detected (%x of %x bytes)...returning " 900 "detected (%x of %x bytes)...returning "
901 "error status.\n", ha->host_no, 901 "error status.\n", ha->host_no,
902 cp->device->channel, cp->device->id, 902 cp->device->channel, cp->device->id,
903 cp->device->lun, resid, 903 cp->device->lun, resid,
904 cp->request_bufflen); 904 scsi_bufflen(cp));
905 905
906 cp->result = DID_ERROR << 16; 906 cp->result = DID_ERROR << 16;
907 break; 907 break;
@@ -963,7 +963,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
963 resid = fw_resid_len; 963 resid = fw_resid_len;
964 964
965 if (scsi_status & SS_RESIDUAL_UNDER) { 965 if (scsi_status & SS_RESIDUAL_UNDER) {
966 cp->resid = resid; 966 scsi_set_resid(cp, resid);
967 CMD_RESID_LEN(cp) = resid; 967 CMD_RESID_LEN(cp) = resid;
968 } else { 968 } else {
969 DEBUG2(printk(KERN_INFO 969 DEBUG2(printk(KERN_INFO
@@ -1042,26 +1042,26 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
1042 */ 1042 */
1043 if (!(scsi_status & SS_RESIDUAL_UNDER)) { 1043 if (!(scsi_status & SS_RESIDUAL_UNDER)) {
1044 DEBUG2(printk("scsi(%ld:%d:%d:%d) Dropped " 1044 DEBUG2(printk("scsi(%ld:%d:%d:%d) Dropped "
1045 "frame(s) detected (%x of %x bytes)..." 1045 "frame(s) detected (%x of %x bytes)..."
1046 "retrying command.\n", ha->host_no, 1046 "retrying command.\n", ha->host_no,
1047 cp->device->channel, cp->device->id, 1047 cp->device->channel, cp->device->id,
1048 cp->device->lun, resid, 1048 cp->device->lun, resid,
1049 cp->request_bufflen)); 1049 scsi_bufflen(cp)));
1050 1050
1051 cp->result = DID_BUS_BUSY << 16; 1051 cp->result = DID_BUS_BUSY << 16;
1052 break; 1052 break;
1053 } 1053 }
1054 1054
1055 /* Handle mid-layer underflow */ 1055 /* Handle mid-layer underflow */
1056 if ((unsigned)(cp->request_bufflen - resid) < 1056 if ((unsigned)(scsi_bufflen(cp) - resid) <
1057 cp->underflow) { 1057 cp->underflow) {
1058 qla_printk(KERN_INFO, ha, 1058 qla_printk(KERN_INFO, ha,
1059 "scsi(%ld:%d:%d:%d): Mid-layer underflow " 1059 "scsi(%ld:%d:%d:%d): Mid-layer underflow "
1060 "detected (%x of %x bytes)...returning " 1060 "detected (%x of %x bytes)...returning "
1061 "error status.\n", ha->host_no, 1061 "error status.\n", ha->host_no,
1062 cp->device->channel, cp->device->id, 1062 cp->device->channel, cp->device->id,
1063 cp->device->lun, resid, 1063 cp->device->lun, resid,
1064 cp->request_bufflen); 1064 scsi_bufflen(cp));
1065 1065
1066 cp->result = DID_ERROR << 16; 1066 cp->result = DID_ERROR << 16;
1067 break; 1067 break;
@@ -1084,7 +1084,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
1084 DEBUG2(printk(KERN_INFO 1084 DEBUG2(printk(KERN_INFO
1085 "PID=0x%lx req=0x%x xtra=0x%x -- returning DID_ERROR " 1085 "PID=0x%lx req=0x%x xtra=0x%x -- returning DID_ERROR "
1086 "status!\n", 1086 "status!\n",
1087 cp->serial_number, cp->request_bufflen, resid_len)); 1087 cp->serial_number, scsi_bufflen(cp), resid_len));
1088 1088
1089 cp->result = DID_ERROR << 16; 1089 cp->result = DID_ERROR << 16;
1090 break; 1090 break;