On Wed, 14 Jun 2006, Lev A. Melnikovsky wrote: > Dear Guennadi, > > On Fri, 9 Jun 2006 at 12:00am, Guennadi Liakhovetski wrote: > > > Nice pic, if you took a bit further West you'd scan Vladivostok - that's > > where I come from:-) > OK, moving West :-) > > http://kapitza.ras.ru/~leva/Vladik.jpg Nice, thanks, but, unfortunately "You don't have permission to access /~leva/Vladik.jpg on this server." :-) > > Well, I think, we just have to chose the right error-cods to return, this > > controls the mid-layer bahaviour - whether to abort, or to resubmit, or > > whatever. The error I returned (DID_SOFT_ERROR) means "retry". Honestly, I > > don't know what's the correct error-code here. I can only guess. Well, > > please, try DID_ABORT. > Unfortunately this does not help. The picture above was acquired using > DID_ABORT. There's probably some minor difference in the driver behaviour but > I can not reliably say anything yet. As you see, I couldn't see the picture, but I believe you it is not pretty:-) > > Also, you can strace the application with complete > Well, stracing sane will be the last thing I'm going to try, honestly :-) I would've thought so... But, actually, I don't think it would be bigger than the scsi log you took... So, if you directly save the output to a file, like strace -tt -xx -s4096 -o/tmp/scan.strace ... and, no, not sane but scanimage - just call it from the command line under strace, but only if just comparing sizes fails (below) > > Lev, an easier possibility to test if bytes are lost or repeated: just scan > > an image several times, saving it in an UNcompressed format, then, I think, > > the size should always be the same, right? Then you can just compare which > > file is bigger - the correct or the damaged one. > Image compression (jpeg) does not change the image dimensions. And dimensions > are always the same. Anyway, "sane" knows these dimensions beforehand... Emn, no, not image dimensions, but file-size. I would just put an image in the scanner, and without further touching it just call scanimage from the command-line several times, waiting to get 1 corrupted and 1 proper image. And, I think, jpeg compresses "graphically", so, jpeg files might differ even if you don't the image being scanned. Whereas uncompressed image-formats should produce constant-size files. That's what I would compare. Still, I think, at some point it would be interesting to compare the actual data coming from /dev/sg* in error and error-free cases. > I remember you mentioned TRM-S1040 datasheet, is it publicly available? How do > I get one? I think, I also mentioned that I wouldn't mind having it too. No, I didn't find it online and nobody offered me one until now. Thanks Guennadi --- Guennadi Liakhovetski - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html