Subject: Re: CVS commit: src/sys/dev
To: None <bouyer@netbsd.org>
From: Takeshi Nakayama <tn@catvmics.ne.jp>
List: source-changes
Date: 08/07/2005 09:20:50
>>> Manuel Bouyer <bouyer@netbsd.org> wrote

> Module Name:	src
> Committed By:	bouyer
> Date:		Sat Aug  6 22:07:24 UTC 2005
> 
> Modified Files:
> 	src/sys/dev/ic: wdc.c wdcvar.h
> 	src/sys/dev/pci: aceride.c pciide_acer_reg.h
> 
> Log Message:
> Add an optionnal controller callback for channel reset. If the callback
> is set to NULL, use the generic reset code.
> Use this to work around a bug in some Acer IDE controllers (like the
> one found in some sparc systems) where a controller disable/enable
> is required after a reset to avoid data corruption when Ultra-DMA is
> used. Workaround from opensolaris, thanks to Hiroki Sato for testing.

OpenSolaris says bit 2 or 3 of register ACER_PCIB_CTRL set to 0,
then restore it.

So I guess ACER_PCIB_CTRL_ENCHAN(chp->ch_channel) in line 223 of
aceride.c should be ~ACER_PCIB_CTRL_ENCHAN(chp->ch_channel).

-- Takeshi Nakayama