From: Ben Collins <bcollins@debian.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
"David S. Miller" <davem@redhat.com>,
alan@redhat.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: [PATCH] Fix ALi15x3 DMA on sparc64 (maybe others)
Date: Thu, 17 Jul 2003 14:14:10 -0400 [thread overview]
Message-ID: <20030717181410.GI1171@phunnypharm.org> (raw)
Attached is a patch that is known to fix atleast the DMA corruption
occuring on sparc64 in 2.4.x kernels for ALi15x3 IDE chipsets. I think
Alan hinted that someone also reported it fixed a similar problem on
alpha.
I've been using this patch for some time now, with great results, and
Debian unstable sparc64 users have unknowingly been testing the patch
aswell. No reports of problems.
Please apply for 2.4.22. Original patch was from Ivan Kokshaysky.
--- linux/drivers/ide/pci/alim15x3.c.orig Tue Apr 22 19:17:22 2003
+++ linux/drivers/ide/pci/alim15x3.c Tue May 27 17:42:17 2003
@@ -525,10 +525,14 @@ static int ali15x3_config_drive_for_dma(
drive->init_speed = 0;
+ /* Set reasonable PIO timings first - some of them are needed
+ for DMA as well. */
+ hwif->tuneproc(drive, 255);
+
if ((id->capability & 1) != 0 && drive->autodma) {
/* Consult the list of known "bad" drives */
if (hwif->ide_dma_bad_drive(drive))
- goto ata_pio;
+ goto no_dma_set;
if ((id->field_valid & 4) && (m5229_revision >= 0xC2)) {
if (id->dma_ultra & hwif->ultra_mask) {
/* Force if Capable UltraDMA */
@@ -550,11 +554,9 @@ try_dma_modes:
if (!config_chipset_for_dma(drive))
goto no_dma_set;
} else {
- goto ata_pio;
+ goto no_dma_set;
}
} else {
-ata_pio:
- hwif->tuneproc(drive, 255);
no_dma_set:
return hwif->ide_dma_off_quietly(drive);
}
--
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
next reply other threads:[~2003-07-17 18:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-17 18:14 Ben Collins [this message]
2003-07-18 6:38 ` [PATCH] Fix ALi15x3 DMA on sparc64 (maybe others) David S. Miller
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=20030717181410.GI1171@phunnypharm.org \
--to=bcollins@debian.org \
--cc=alan@redhat.com \
--cc=davem@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.