Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 1995 14:17:44 +0000 ()
From:      Julian Elischer <julian@jules.DIALix.oz.au>
To:        offe@ludd.luth.se (Olof Johansson)
Cc:        hackers@freebsd.org
Subject:   Re: WD-7000 progress... (help!)
Message-ID:  <199501051417.OAA00505@jules.DIALix.oz.au>
In-Reply-To: <199501042348.AAA03125@father.ludd.luth.se> from "Olof Johansson" at Jan 5, 95 00:48:13 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> The current status of the WD-7000 driver is this:
> Reading and writing from/to character devices is working, at least to some
> extent. I can read and write my tape without errors (more than the one the
> streamer itself causes).
> 
> BUT I have _big_ problems getting it to work with a 105Mb Quantum disk I've
> borrowed when accessing it as a blockdevice. I haven't added scatter/gather
> support, I don't know if that may have something to do with it .

yes, definitly....
only rarely will the two pages in an 8k buffer be physically
adjoining..

> 
> When I do a 'dd if=/dev/zero of=/dev/sd0f bs=8k count=1000', and thereafter
> reads it (from the raw device to make sure it isn't garbled when reading)
> it only contains zeroes in the beginning (the two first blocks written usally),
probably you are getting 4k nulls and 4k rubbish..

I think you NEED scatter-gather, or to copy everything to a contiguous
buffer.. (unless hte boardhas a programmed IO interface as well
in which case you could use that.......)

> Since reading/writing from/to character devices works fine I wonder what the
> difference is for the driver? I can't see any. All it gets is a chunk of
> memory and a scsi command to pass to the controller.
yes, but raw devices DMA direct to user pages, while block devices DMA
to kernel buffer pages.. They are allocated at different times and
have a differnt probability of being contiguous.....

> One thing I observed was that getblk complained about only getting 4k blocks
> from my minphys. When i changed that, so it could read/write bigger blocks
> it stopped. Since I don't really know if I did something "illegal" I can't tell
> if that has anythign to do with my problems.
> 
4k is the maximum you can send safely withoud scatter/gather, and only
then if it is page alligned...


julian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501051417.OAA00505>