Re: [PATCH 4/9] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
On Sun, 2007-07-22 at 13:50 +0300, Boaz Harrosh wrote: NACK. Breaks data buffers accessors patch. (385d70b4e2659ae525a00e46a9f97146949cfc14) should be: This isn't bad enough to eject the entire qla enhancement from the tree on the day the merge window closes to force a rewrite. diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index fa21cd8..4a50b93 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1062,6 +1062,25 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) cp-device-id, cp-device-lun, cp, cp-serial_number)); + /* + * In case of a Underrun condition, set both the lscsi + * status and the completion status to appropriate + * values. + */ + if (resid + ((unsigned)(scsi_bufflen(cp) - resid) + cp-underflow)) { + DEBUG2(qla_printk(KERN_INFO, ha, + scsi(%ld:%d:%d:%d): Mid-layer underflow + detected (%x of %x bytes)...returning + error status.\n, ha-host_no, + cp-device-channel, cp-device-id, + cp-device-lun, resid, + scsi_bufflen(cp))); + + cp-result = DID_ERROR 16 | lscsi_status; + } + if (sense_len) DEBUG5(qla2x00_dump_buffer(cp-sense_buffer, CMD_ACTUAL_SNSLEN(cp))); Could you respin an update against scsi-misc for -rc1? Thanks, James - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/9] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
James Bottomley wrote: On Sun, 2007-07-22 at 13:50 +0300, Boaz Harrosh wrote: NACK. Breaks data buffers accessors patch. (385d70b4e2659ae525a00e46a9f97146949cfc14) should be: This isn't bad enough to eject the entire qla enhancement from the tree on the day the merge window closes to force a rewrite. Sorry I did not realize this was for the 2.6.23 merge window I assumed it is already for the next kernel. You are absolutely right I'm just nit picking here. Could you respin an update against scsi-misc for -rc1? Thanks, James You bet: From: Boaz Harrosh [EMAIL PROTECTED] Date: Sun, 22 Jul 2007 17:24:18 +0300 Subject: [PATCH] qla2xxx: Data accessors Cleanup of last merge - Left overs from last code merges of qla2xxx Sign-off-by: Boaz Harrosh [EMAIL PROTECTED] --- drivers/scsi/qla2xxx/qla_isr.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index b8f226a..50539da 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1068,7 +1068,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) * values. */ if (resid - ((unsigned)(cp-request_bufflen - resid) + ((unsigned)(scsi_bufflen(cp) - resid) cp-underflow)) { DEBUG2(qla_printk(KERN_INFO, ha, scsi(%ld:%d:%d:%d): Mid-layer underflow @@ -1076,7 +1076,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) error status.\n, ha-host_no, cp-device-channel, cp-device-id, cp-device-lun, resid, - cp-request_bufflen)); + scsi_bufflen(cp))); cp-result = DID_ERROR 16 | lscsi_status; } -- 1.5.2.2.249.g45fd - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/9] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
On Sun, 22 Jul 2007, Boaz Harrosh wrote: From: Boaz Harrosh [EMAIL PROTECTED] Date: Sun, 22 Jul 2007 17:24:18 +0300 Subject: [PATCH] qla2xxx: Data accessors Cleanup of last merge - Left overs from last code merges of qla2xxx Sign-off-by: Boaz Harrosh [EMAIL PROTECTED] Thanks for catching that. If need be: Acked-off-by: Andrew Vasquez [EMAIL PROTECTED] --- drivers/scsi/qla2xxx/qla_isr.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index b8f226a..50539da 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1068,7 +1068,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) * values. */ if (resid - ((unsigned)(cp-request_bufflen - resid) + ((unsigned)(scsi_bufflen(cp) - resid) cp-underflow)) { DEBUG2(qla_printk(KERN_INFO, ha, scsi(%ld:%d:%d:%d): Mid-layer underflow @@ -1076,7 +1076,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) error status.\n, ha-host_no, cp-device-channel, cp-device-id, cp-device-lun, resid, - cp-request_bufflen)); + scsi_bufflen(cp))); cp-result = DID_ERROR 16 | lscsi_status; } -- 1.5.2.2.249.g45fd - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/9] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
From: Shyam Sundar [EMAIL PROTECTED] Signed-off-by: Andrew Vasquez [EMAIL PROTECTED] --- drivers/scsi/qla2xxx/qla_isr.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index fa21cd8..4a50b93 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1062,6 +1062,25 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) cp-device-id, cp-device-lun, cp, cp-serial_number)); + /* +* In case of a Underrun condition, set both the lscsi +* status and the completion status to appropriate +* values. +*/ + if (resid + ((unsigned)(cp-request_bufflen - resid) +cp-underflow)) { + DEBUG2(qla_printk(KERN_INFO, ha, + scsi(%ld:%d:%d:%d): Mid-layer underflow + detected (%x of %x bytes)...returning + error status.\n, ha-host_no, + cp-device-channel, cp-device-id, + cp-device-lun, resid, + cp-request_bufflen)); + + cp-result = DID_ERROR 16 | lscsi_status; + } + if (sense_len) DEBUG5(qla2x00_dump_buffer(cp-sense_buffer, CMD_ACTUAL_SNSLEN(cp))); -- 1.5.3.rc2.4.g726f9 - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html