Date: Thu, 30 Sep 1999 11:40:57 -0600 (MDT) From: "Kenneth D. Merry" <ken@kdm.org> To: bfischer@Techfak.Uni-Bielefeld.DE (Bjoern Fischer) Cc: mmuir@es.co.nz (Mike Muir), elie@uncle.cult.cu (Eliezer Rodriguez Gonzalez), freebsd-stable@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: check for unaligned buffers in CAM [was Re: Cdrecord problems...] Message-ID: <199909301740.LAA32290@panzer.kdm.org> In-Reply-To: <19990930115210.A325@frolic.no-support.loc> from Bjoern Fischer at "Sep 30, 1999 11:52:10 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Bjoern Fischer wrote... > On Thu, Sep 30, 1999 at 10:34:15AM +1200, Mike Muir wrote: > > Eliezer Rodriguez Gonzalez wrote: > > > > > > Hello everybody: > > > > > > Finally I was able to burn my own copy of 3.3-RELEASE, downloaded via ftp > > > from a mirror site. > > > I found out, by research and because Mr Fischer told me so, that while > > > using version 1.6.1 of cdrecord there was a problem using the internal > > > buffer, so I disabled that feature via the command option fs=0 and then > > > everything worked fine and I was able to burn my CD-ROM with the older > > > cdrecord version. > > > > This also happens when using 1.8a28 under -current.. not quite sure why, > > but i'm > > guessing for the same reasons outlined in an earlier posting in this > > thread. > > (I'm going to try a29 next). > > You could check for unaligned buffers in > sys/cam/cam_periph.c:cam_periph_mapmem() (around line 530 in -stable). > > One (Kenneth? me?) could also make this debugging hook permanent in > conjunction with one or more sysctl knobs which switch on the check > or/and -- even better -- send a signal (SIGBUS?) to the process on > unaligned buffers. That would make it very easy to debug not only > cdrecord but *any* userland process that uses cam transport. > > Any opinions? I think it would be better for userland code authors to use the tools available for debugging. It's pretty easy to do something like assert((ccb->csio.data_ptr & PAGE_MASK) == 0); Sending non-page-aligned buffers to the passthrough driver is not forbidden outright. The problem is sending buffers that are close (within a page) to the maximum size (64K) that are not page aligned. Joerg had a problem at one point in cdrecord with non page-aligned buffers, and he fixed it. My guess is that he has introduced a new problem. If you tell him about it, I'm sure he'll fix it. (I think he may be out of town at the moment, so it may be a little while before he responds.) In the mean time, you can get around the problem by changing the CAM version of scsi_maxdma() in libscg/scsi-bsd.c to return DFLTPHYS - PAGE_SIZE instead of DFLTPHYS. That will prevent the problem from occuring. 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?199909301740.LAA32290>