From: Ronny Buchmann <ronny-lkml@vlugnet.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Marko Kreen <marko@l-t.ee>
Subject: Re: [OOPS] 2.4.22 / HPT372N
Date: Fri, 12 Sep 2003 14:32:51 +0200 [thread overview]
Message-ID: <200309121432.51880.ronny-lkml@vlugnet.org> (raw)
In-Reply-To: <1063363684.5409.8.camel@dhcp23.swansea.linux.org.uk>
Am Freitag 12 September 2003 12:48 schrieb Alan Cox:
> On Gwe, 2003-09-12 at 10:41, Ronny Buchmann wrote:
> > I will test with cdrom attached later today.
> > Currently I have one disk on each channel.
> >
> > I had another look at hpt.c(from highpoint) and hpt366.c and found this:
> > --- linux-2.4.22-ac1/drivers/ide/pci/hpt366.c.orig 2003-09-11
> > 21:29:06.000000000 +0200
> > +++ linux-2.4.22-ac1/drivers/ide/pci/hpt366.c 2003-09-12
> > 01:05:44.000000000 +0200
> > @@ -713,7 +713,7 @@
> >
> > /* Reconnect channels to bus */
> > outb(0x00, hwif->dma_base+0x73);
> > - outb(0x00, hwif->dma_base+0x79);
> > + outb(0x00, hwif->dma_base+0x77);
> > }
>
> Which piece of documentation makes you think that ? So I can double
> check it.
from hpt.c
void INLINE Switching370Clock(PChannel pChan, UCHAR ucClockValue)
{
if((InPort(pChan->NextChannelBMI + BMI_STS) & BMI_STS_ACTIVE) == 0){
PUCHAR PrimaryMiscCtrlRegister = pChan->BaseBMI + 0x70;
PUCHAR SecondaryMiscCtrlRegister = pChan->BaseBMI + 0x74;
OutPort(PrimaryMiscCtrlRegister+3, 0x80); // tri-state the primary channel
OutPort(SecondaryMiscCtrlRegister+3, 0x80); // tri-state the secondary channel
OutPort((PUCHAR)((ULONG)pChan->BaseBMI+0x7B), ucClockValue); // switching the clock
OutPort((PUCHAR)((ULONG)pChan->BaseBMI+0x79), 0xC0); // reset two channels begin
OutPort(PrimaryMiscCtrlRegister, 0x37); // reset primary channel state machine
OutPort(SecondaryMiscCtrlRegister, 0x37); // reset secordary channel state machine
OutPort((PUCHAR)((ULONG)pChan->BaseBMI+0x79), 0x00); // reset two channels finished
OutPort(PrimaryMiscCtrlRegister+3, 0x00); // normal-state the primary channel
OutPort(SecondaryMiscCtrlRegister+3, 0x00); // normal-state the secondary channel
}
}
It's the equivalent to hpt372n_set_clock().
static void hpt372n_set_clock(ide_drive_t *drive, int mode)
{
ide_hwif_t *hwif = HWIF(drive);
/* FIXME: should we check for DMA active and BUG() */
/* Tristate the bus */
outb(0x80, hwif->dma_base+0x73);
outb(0x80, hwif->dma_base+0x77);
/* Switch clock and reset channels */
outb(mode, hwif->dma_base+0x7B);
outb(0xC0, hwif->dma_base+0x79);
/* Reset state machines */
outb(0x37, hwif->dma_base+0x70);
outb(0x37, hwif->dma_base+0x74);
/* Complete reset */
outb(0x00, hwif->dma_base+0x79);
/* Reconnect channels to bus */
outb(0x00, hwif->dma_base+0x73);
outb(0x00, hwif->dma_base+0x77);
}
> > - d->channels = 1;
> > + d->channels = 2;
>
> Need to work out which 372N and others are dual channel but yes
Are there actually single channel versions?
--
ronny
next prev parent reply other threads:[~2003-09-12 12:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-09 12:06 Ronny Buchmann
2003-09-11 12:34 ` Marko Kreen
2003-09-12 9:41 ` Ronny Buchmann
2003-09-12 10:48 ` Alan Cox
2003-09-12 12:32 ` Ronny Buchmann [this message]
2003-09-12 12:46 ` Alan Cox
2003-09-12 12:58 ` Bartlomiej Zolnierkiewicz
2003-09-12 14:24 ` Ronny Buchmann
2003-09-12 14:42 ` Bartlomiej Zolnierkiewicz
2003-09-12 15:26 ` Ronny Buchmann
2003-09-12 16:35 ` Bartlomiej Zolnierkiewicz
2003-09-12 20:32 ` Ronny Buchmann
-- strict thread matches above, loose matches on Subject: below --
2003-09-04 19:07 Marko Kreen
2003-09-04 21:46 ` Alan Cox
2003-09-05 14:54 ` Marko Kreen
2003-09-05 21:51 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200309121432.51880.ronny-lkml@vlugnet.org \
--to=ronny-lkml@vlugnet.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marko@l-t.ee \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®