From owner-freebsd-hackers Wed Jan 4 22:26:30 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id WAA26427 for hackers-outgoing; Wed, 4 Jan 1995 22:26:30 -0800 Received: from perth.DIALix.oz.au (jreuucp@perth.DIALix.oz.au [192.203.228.2]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id WAA26421 for ; Wed, 4 Jan 1995 22:26:25 -0800 Received: from jules.UUCP (jreuucp@localhost) by perth.DIALix.oz.au (8.6.9/8.6.9/DIALix) with UUCP id OAA24036; Thu, 5 Jan 1995 14:25:28 +0800 Received: by jules.DIALix.oz.au (8.6.9/25-eef) id OAA00505; Thu, 5 Jan 1995 14:17:44 GMT From: Julian Elischer Message-Id: <199501051417.OAA00505@jules.DIALix.oz.au> Subject: Re: WD-7000 progress... (help!) To: offe@ludd.luth.se (Olof Johansson) Date: Thu, 5 Jan 1995 14:17:44 +0000 () Cc: hackers@freebsd.org In-Reply-To: <199501042348.AAA03125@father.ludd.luth.se> from "Olof Johansson" at Jan 5, 95 00:48:13 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1824 Sender: hackers-owner@freebsd.org Precedence: bulk > > 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