Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Vasquez
Date: Tuesday, February 19, 2008 - 7:55 pm

On Tue, 19 Feb 2008, James Bottomley wrote:


My guess is that the check should have been written as:

	...
	if (sts_entry->iscsiFlags &ISCSI_FLAG_RESIDUAL_UNDER)
		scsi_set_resid(cmd, residual);
		if ((scsi_bufflen(cmd) - residual) < cmd->underflow) {
			...

It looks to be a logic-error while porting from qla2xxx, where
scsi_status during CS_COMPLETE is the full 16-bit status (high-byte is
transport, low-byte SCSI status) from from the FCP_RSP frame (not so
in iSCSI, where it's just the SCSI-status) and the residual check
in qla_isr.c::qla2x00_status_entry() looks like:

	if (!lscsi_status &&
	    ((unsigned)(scsi_bufflen(cp) - resid) <
	     cp->underflow)) {
		...

I'll defer to Dave S. for verification.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, Adrian Bunk, (Tue Feb 19, 12:29 pm)
Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, James Bottomley, (Tue Feb 19, 7:13 pm)
Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, Andrew Vasquez, (Tue Feb 19, 7:35 pm)
Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, James Bottomley, (Tue Feb 19, 7:43 pm)
Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, Andrew Vasquez, (Tue Feb 19, 7:55 pm)
RE: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, David Somayajulu, (Thu Feb 21, 4:43 am)
Re: [2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code, Rolf Eike Beer, (Thu Feb 21, 4:51 am)