Date: Tue, 9 Apr 2002 10:45:12 -0600 From: "Kenneth D. Merry" <ken@kdm.org> To: Yassar S <yassars@infy.com> Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: SCSI Callback function not getting called Message-ID: <20020409104512.B21330@panzer.kdm.org> In-Reply-To: <755FA95DB839D211856B0008C7287D930F3286E8@kecmsg02.ad.infosys.com>; from yassars@infy.com on Tue, Apr 09, 2002 at 09:08:16PM %2B0530 References: <755FA95DB839D211856B0008C7287D930F3286E8@kecmsg02.ad.infosys.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 09, 2002 at 21:08:16 +0530, Yassar S wrote: > I'm currently developing an application on FreeBSD3.1 > to test the SCSI devices (hard disks). Hmm, FreeBSD 3.1, and you work for Infosys, 'eh? I might just know something about that product. :) (could be something different, though.) > Whenever I do read/write on the SCSI disks, I'm not able > read or write more than 126 blocks in a single operation. > > Any pointers what could be the reason? How can I ovecome this > limitation? We limit things to 64K, because that is the maximum transfer size that some SCSI controllers (e.g. Adaptec 1542) can handle. There's more or less a hard limit of MAXPHYS (128K), since we're using vmapbuf() and vunmapbuf() to map buffers into and out of the kernel. You can go into cam_periph_mapmem() and change the comparison to DFLTPHYS to MAXPHYS, and that should give you a 128K limit on what you can send. The reason you're limited to 126 blocks is probably because your buffer doesn't start on a page boundary. If you start on a page boundary, you should be limited to 128 512 byte blocks, or 64K. The alternative, if you want to send more, is to use physical addresses in the CCB and set the CAM_DATA_PHYS flag. If this is the product I'm thinking of, it makes extensive use of that feature. :) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020409104512.B21330>