On Fri, 16 Nov 2007, RTE wrote:
> On Fri, 12 Oct 2007 00:18:11 +0400, Alan Stern <[EMAIL PROTECTED]> wrote:
> > I'd like you to try some more experiments
>
> sorry for the long period of silence - not enough free time :(
>
> 2.6.17-git21 whith patch
> after copying 700 MB file from flash to HDD
> errors in the copied file are not present
Okay, that's good. Now here's a comparable patch for 2.6.17-git22 or
later. Let's see what happens when the copied data does contain
errors.
Alan Stern
--- 2.6.17/drivers/scsi/sd.c1 2007-10-11 15:53:20.000000000 -0400
+++ 2.6.17/drivers/scsi/sd.c 2007-11-16 14:27:24.000000000 -0500
@@ -904,6 +904,8 @@ static void sd_rw_intr(struct scsi_cmnd
sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr);
if (sense_valid)
sense_deferred = scsi_sense_is_deferred(&sshdr);
+printk(KERN_INFO "driver_byte %x, sense key %x\n", driver_byte(result),
+sshdr.sense_key);
}
#ifdef CONFIG_SCSI_LOGGING
SCSI_LOG_HLCOMPLETE(1, printk("sd_rw_intr: %s: res=0x%x\n",
@@ -954,6 +956,9 @@ static void sd_rw_intr(struct scsi_cmnd
* the resolution of the device's medium.
*/
good_bytes = (bad_lba - start_lba)*SCpnt->device->sector_size;
+printk(KERN_INFO "error_sector %d, req_sector %d, resid %d, underflow %d\n",
+(int) bad_lba, (int) start_lba, (int) SCpnt->resid,
+(int) SCpnt->underflow);
break;
case RECOVERED_ERROR:
case NO_SENSE:
@@ -979,6 +984,9 @@ static void sd_rw_intr(struct scsi_cmnd
break;
}
out:
+if (good_bytes != xfer_size)
+printk(KERN_INFO "Adjusted good_bytes from %d to %d\n",
+xfer_size, good_bytes);
scsi_io_completion(SCpnt, good_bytes);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users