From 5f7186c841a13abff0bf81ee93754b4f46e19141 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 26 May 2007 14:08:20 +0900 Subject: [SCSI] qla4xxx: 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. Jens Axboe did the for_each_sg cleanup. Signed-off-by: FUJITA Tomonori Acked-by: David C Somayajulu Signed-off-by: James Bottomley --- drivers/scsi/qla4xxx/ql4_isr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/scsi/qla4xxx/ql4_isr.c') diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index 946e22b1e4b..b47bd85f114 100644 --- a/drivers/scsi/qla4xxx/ql4_isr.c +++ b/drivers/scsi/qla4xxx/ql4_isr.c @@ -95,7 +95,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, if (sts_entry->iscsiFlags & (ISCSI_FLAG_RESIDUAL_OVER|ISCSI_FLAG_RESIDUAL_UNDER)) - cmd->resid = residual; + scsi_set_resid(cmd, residual); cmd->result = DID_OK << 16 | scsi_status; @@ -179,14 +179,14 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, * Firmware detected a SCSI transport underrun * condition */ - cmd->resid = residual; + scsi_set_resid(cmd, residual); DEBUG2(printk("scsi%ld:%d:%d:%d: %s: UNDERRUN status " "detected, xferlen = 0x%x, residual = " "0x%x\n", ha->host_no, cmd->device->channel, cmd->device->id, cmd->device->lun, __func__, - cmd->request_bufflen, + scsi_bufflen(cmd), residual)); } @@ -230,7 +230,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, if ((sts_entry->iscsiFlags & ISCSI_FLAG_RESIDUAL_UNDER) == 0) { cmd->result = DID_BUS_BUSY << 16; - } else if ((cmd->request_bufflen - residual) < + } else if ((scsi_bufflen(cmd) - residual) < cmd->underflow) { /* * Handle mid-layer underflow??? @@ -251,7 +251,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, cmd->device->channel, cmd->device->id, cmd->device->lun, __func__, - cmd->request_bufflen, residual)); + scsi_bufflen(cmd), residual)); cmd->result = DID_ERROR << 16; } else { -- cgit v1.2.3-70-g09d2