*BSD News Article 15225


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!uunet!pipex!uknet!mcsun!sunic!isgate!veda.is!adam
From: adam@veda.is (Adam David)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Fixing SCSI DMA / cache problem
Message-ID: <C6596w.x7@veda.is>
Date: 27 Apr 93 13:23:05 GMT
References: <C637wx.3HA@veda.is>
Organization: Veda Systems, Iceland
Lines: 32

Please scrap the patch I posted yesterday, it is dangerous because it does
the cache invalidation too late. I was under the mistaken impression that
only successful operations needed to be tweaked, and didn't bother to tweak
other cases.

>This relies on the otherwise unused INVALIDATE_CACHE macro that just happened
>to be in the same file, perhaps there is a more strategic positioning for this
>call. The macro could be improved on to allow the external cache to be enabled.

The same comments still apply. Take note, this patch is only for Julian's
aha1542 driver. The same method can be applied to drivers for other busmaster
devices. At present it is only useful for systems with a 486 CPU and a chipset
with a badly designed cache controller. If anyone knows how to invalidate the
external cache so it can be enabled, please speak up.

Here's the patch:
==============================================================================
*** aha1542.c.old	Tue Apr 27 13:03:22 1993
--- aha1542.c	Tue Apr 27 13:03:49 1993
***************
*** 833,836 ****
--- 833,839 ----
  	struct	scsi_xfer *xs = ccb->xfer;
  
+ #ifdef BROKEN_CACHE
+ 	INVALIDATE_CACHE
+ #endif
  	if(scsi_debug & PRINTROUTINES )
  		printf("aha_done ");
==============================================================================
--
Adam D. (adam@veda.is)