From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Subject: [PATCH] au1xxx: fix au1xxx_set_pio_mode()
Date: Thu, 26 Jul 2007 21:55:19 +0200 [thread overview]
Message-ID: <200707262155.19693.bzolnier@gmail.com> (raw)
Set transfer mode on the device before programming the host controller for
the new timings (matches what auide_tune_chipset() is doing wrt DMA modes).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/mips/au1xxx-ide.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Index: b/drivers/ide/mips/au1xxx-ide.c
===================================================================
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -103,7 +103,9 @@ static void au1xxx_set_pio_mode(ide_driv
{
int mem_sttime;
int mem_stcfg;
- u8 speed;
+
+ if (ide_config_drive_speed(drive, pio + XFER_PIO_0))
+ return;
mem_sttime = 0;
mem_stcfg = au_readl(MEM_STCFG2);
@@ -164,9 +166,6 @@ static void au1xxx_set_pio_mode(ide_driv
au_writel(mem_sttime,MEM_STTIME2);
au_writel(mem_stcfg,MEM_STCFG2);
-
- speed = pio + XFER_PIO_0;
- ide_config_drive_speed(drive, speed);
}
static int auide_tune_chipset(ide_drive_t *drive, const u8 speed)
next reply other threads:[~2007-07-26 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 19:55 Bartlomiej Zolnierkiewicz [this message]
2007-07-26 20:20 ` [PATCH] au1xxx: fix au1xxx_set_pio_mode() Sergei Shtylyov
2007-07-28 21:57 ` Bartlomiej Zolnierkiewicz
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=200707262155.19693.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).