Subject: Re: read() EINVAL
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 05/22/2003 21:37:19
On Wed, May 21, 2003 at 02:58:12PM +0100, Patrick Welche wrote:
> No error messages. This is what debug has to say:
> 
> 2048 bytes @ blk 1212
>  command: 0x28,0x0,0x0,0x0,0x1,0x2f,0x0,0x0,0x1,0x0,0x0,0x0-[2048 bytes]
> 18432 bytes @ blk 1216 
>  command: 0x28,0x0,0x0,0x0,0x1,0x30,0x0,0x0,0x9,0x0,0x0,0x0-[18432 bytes] 
> 65536 bytes @ blk 1636
>  command: 0x28,0x0,0x0,0x0,0x1,0x99,0x0,0x0,0x20,0x0,0x0,0x0-[65536 bytes]
> 8192 bytes @ blk 1764
>  command: 0x28,0x0,0x0,0x0,0x1,0xb9,0x0,0x0,0x4,0x0,0x0,0x0-[8192 bytes]
> 8192 bytes @ blk 1764
>  command: 0x28,0x0,0x0,0x0,0x1,0xb9,0x0,0x0,0x4,0x0,0x0,0x0-[8192 bytes]
> ------------------------------
> 000: 00 16 c0 00 00 16 c0 bc 00 16 c1 a9 00 16 c2 cc
> 016: 00 16 c3 c2 00 16 c4 a0 00 16 c5 57 00 16 c6 22
> 032: 00 16 c6 cd 00 16 c7 ec 00 16 c8 f0 00 16 c9 c2
> 048: 00 16 ca 7e 00 16 cb 1b 00 16 cc 04 00 16 cc e2
> ------------------------------
> 18432 bytes @ blk 7638228 
>  command: 0x1e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0-[0 bytes]

Yes, this block looks too large.
Maybe try to tweak a few things in sys/dev/scsipi/scsipi_debug.h to get more
output.

> 
> Now, there's an odd block number..
> 
> BTW re doco, scsi(4) mentions options SCSIDEBUG, but I had to look in
> scsictl.c to find that you need options SCSIPI_DEBUG, and scsictl(8) doesn't
> mention the debug command.. (Time for a patch? Does SCSIDEBUG do anything?)

Yes, there seems to be a doc bug here. SCSIDEBUG probably doesn't do anything,

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--