When performing our register test, be careful
authorPeter Avalos <pavalos@dragonflybsd.org>
Thu, 5 Jul 2007 05:17:39 +0000 (05:17 +0000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Thu, 5 Jul 2007 05:17:39 +0000 (05:17 +0000)
commit848751dd86f457fdf6702dc6524799f4957cced4
treeeea9d60369b907d08365eba11910afc9ab3833c2
parent75f637b985d0a2d999c8309cecb48cbfeccf0d10
When performing our register test, be careful
to avoid resetting the chip when pausing the
controller.  The test reads the HCNTRL register
and then writes it back with the PAUSE bit
explicitly set.  If the last write to the controller
before our probe is to reset it, the CHIPRST
bit will still be set, so we must mask it off
before the PAUSE operation.  On some chip versions,
we cannot access registers for a few 100us after
a reset, so this inadvertant reset was causing PCI
errors to occur on the read to check for paused
status.

Obtained-from: FreeBSD
sys/dev/disk/aic7xxx/aic79xx_pci.c
sys/dev/disk/aic7xxx/aic7xxx_pci.c