To disable a channel we need to clear bit 2 or 3, not all other bits but

bit 2 or 3. Thanks to Takeshi Nakayama for catching it.
(With this mistake the code was still working for the first channel, because
the reset of the second channel would disable/enable the first one).
This commit is contained in:
bouyer 2005-08-07 10:12:39 +00:00
parent 111c13fe24
commit 27d425f60f
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aceride.c,v 1.17 2005/08/06 22:25:32 bouyer Exp $ */
/* $NetBSD: aceride.c,v 1.18 2005/08/07 10:12:39 bouyer Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.17 2005/08/06 22:25:32 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.18 2005/08/07 10:12:39 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -220,7 +220,7 @@ acer_do_reset(struct ata_channel *chp, int poll)
reg = pciide_pci_read(acer_sc->pcib_pa.pa_pc, acer_sc->pcib_pa.pa_tag,
ACER_PCIB_CTRL);
pciide_pci_write(acer_sc->pcib_pa.pa_pc, acer_sc->pcib_pa.pa_tag,
ACER_PCIB_CTRL, reg & ACER_PCIB_CTRL_ENCHAN(chp->ch_channel));
ACER_PCIB_CTRL, reg & ~ACER_PCIB_CTRL_ENCHAN(chp->ch_channel));
delay(1000);
pciide_pci_write(acer_sc->pcib_pa.pa_pc, acer_sc->pcib_pa.pa_tag,
ACER_PCIB_CTRL, reg);