]> err.no Git - linux-2.6/commitdiff
[SCSI] scsi_eh_prep_cmnd should save scmd->underflow
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 21 Jul 2008 14:25:52 +0000 (10:25 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 26 Jul 2008 19:14:56 +0000 (15:14 -0400)
This patch (as1116) fixes a bug in scsi_eh_prep_cmnd() and
scsi_eh_restore_cmnd().  These routines are supposed to save any
values they change and restore them later, but someone forgot to
save & restore scmd->underflow.

This fixes part of the problem reported in Bugzilla #9638.

[jejb: fix up rejections around DIF/DIX]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_error.c
include/scsi/scsi_eh.h

index fc4b2d05f2e1df6b55bc0f6e889305ae3dced3f7..171b82d748cf796b97c628719e0508f25945d979 100644 (file)
@@ -667,6 +667,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
        ses->sdb = scmd->sdb;
        ses->next_rq = scmd->request->next_rq;
        ses->result = scmd->result;
+       ses->underflow = scmd->underflow;
        ses->prot_op = scmd->prot_op;
 
        scmd->prot_op = SCSI_PROT_NORMAL;
@@ -727,6 +728,7 @@ void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses)
        scmd->sdb = ses->sdb;
        scmd->request->next_rq = ses->next_rq;
        scmd->result = ses->result;
+       scmd->underflow = ses->underflow;
        scmd->prot_op = ses->prot_op;
 }
 EXPORT_SYMBOL(scsi_eh_restore_cmnd);
index e5499ed0e37631aaabbd2be82df183eb1435bf63..06a8790893ef60e15cdd100550134e698e6a5e2e 100644 (file)
@@ -74,6 +74,7 @@ struct scsi_eh_save {
        /* saved state */
        int result;
        enum dma_data_direction data_direction;
+       unsigned underflow;
        unsigned char cmd_len;
        unsigned char prot_op;
        unsigned char *cmnd;