[SCSI] scsi_eh_prep_cmnd should save scmd->underflow

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>

authored by

Alan Stern and committed by
James Bottomley
12265709 af55ff67

+3
+2
drivers/scsi/scsi_error.c
··· 667 667 ses->sdb = scmd->sdb; 668 668 ses->next_rq = scmd->request->next_rq; 669 669 ses->result = scmd->result; 670 + ses->underflow = scmd->underflow; 670 671 ses->prot_op = scmd->prot_op; 671 672 672 673 scmd->prot_op = SCSI_PROT_NORMAL; ··· 728 727 scmd->sdb = ses->sdb; 729 728 scmd->request->next_rq = ses->next_rq; 730 729 scmd->result = ses->result; 730 + scmd->underflow = ses->underflow; 731 731 scmd->prot_op = ses->prot_op; 732 732 } 733 733 EXPORT_SYMBOL(scsi_eh_restore_cmnd);
+1
include/scsi/scsi_eh.h
··· 74 74 /* saved state */ 75 75 int result; 76 76 enum dma_data_direction data_direction; 77 + unsigned underflow; 77 78 unsigned char cmd_len; 78 79 unsigned char prot_op; 79 80 unsigned char *cmnd;