abel deuring wrote: > Frank Zago wrote: > >>>[fujitsu] set_window_param >>>[fujitsu] Window set >>>[fujitsu] 000: 00 00 01 2c 01 2c 00 00 00 00 00 00 00 00 00 00 >>>[fujitsu] 016: 03 b0 00 00 05 89 00 00 00 02 08 00 00 00 00 00 >>>[fujitsu] 032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0 >>>[fujitsu] 048: 20 00 00 00 00 84 00 00 00 00 00 00 00 00 00 00 >>>[fujitsu] 5/38/0: Invalid field in parm list >>>[fujitsu] sanei_scsi_cmd: returning 0x00000004 >>>[fujitsu] sane_start: ERROR: failed to set window >> >>The scanner rejected the window parameter. If the scsi implementation is >>decent, >>the sense might contain the offset of the offending byte somewhere around byte >>16 oy 17. To get that, at the beginning of scsi_sense_handler, add this line: >> >> hexdump (MSG_IO, "Sense", sensed_data, sensed_data[7]+8); > > > Frank, > > you're right, the sense bytes 16 and 17 should point to the offending > byte, but unfortunately the Linux SCSI system returns only the first 16 > bytes of a SCSI command.
Are you sure of that? There are devices out there that return more than 100 bytes of data in the sense. I assume someone would have fixed such a problem. > But it might help to issue a REQUEST SENSE manually after the failing > SET WINDOW and print the result of this command. Unless the system caches the sense (and more than 16 bytes), the next request sense isn't going to return anything. Frank.