From: Tejun Heo <htejun@gmail.com>
To: Srihari Vijayaraghavan <sriharivijayaraghavan@yahoo.com.au>,
wolke.liu@amd.com, Jeff Garzik <jeff@garzik.org>
Cc: linux-ide@vger.kernel.org
Subject: [PATCH] ahci: disable 64bit dma on sb600
Date: Fri, 18 May 2007 16:23:19 +0200 [thread overview]
Message-ID: <464DB6D7.8040206@gmail.com> (raw)
In-Reply-To: <464DA7A6.3010303@gmail.com>
SB600 claims it can do 64bit DMA but it can't. Disable it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
Jeff, this one is for #upstream-fixes.
ahci.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index e00e1b9..bb94047 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -170,6 +170,7 @@ enum {
AHCI_FLAG_IGN_IRQ_IF_ERR = (1 << 25), /* ignore IRQ_IF_ERR */
AHCI_FLAG_HONOR_PI = (1 << 26), /* honor PORTS_IMPL */
AHCI_FLAG_IGN_SERR_INTERNAL = (1 << 27), /* ignore SERR_INTERNAL */
+ AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */
AHCI_FLAG_COMMON = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
@@ -354,7 +355,8 @@ static const struct ata_port_info ahci_p
/* board_ahci_sb600 */
{
.flags = AHCI_FLAG_COMMON |
- AHCI_FLAG_IGN_SERR_INTERNAL,
+ AHCI_FLAG_IGN_SERR_INTERNAL |
+ AHCI_FLAG_32BIT_ONLY,
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops,
@@ -492,6 +494,13 @@ static void ahci_save_initial_config(str
hpriv->saved_cap = cap = readl(mmio + HOST_CAP);
hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL);
+ /* some chips lie about 64bit support */
+ if ((cap & HOST_CAP_64) && (pi->flags & AHCI_FLAG_32BIT_ONLY)) {
+ dev_printk(KERN_INFO, &pdev->dev,
+ "controller can't do 64bit DMA, forcing 32bit\n");
+ cap &= ~HOST_CAP_64;
+ }
+
/* fixup zero port_map */
if (!port_map) {
port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1;
next prev parent reply other threads:[~2007-05-18 14:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <754241.548.qm@web52606.mail.re2.yahoo.com>
2007-05-06 9:33 ` ASUS M2A-VM - AMD690G - SB600 Non-Raid-5 SATA - problem Tejun Heo
2007-05-07 20:37 ` Srihari Vijayaraghavan
2007-05-08 8:39 ` Tejun Heo
2007-05-08 9:35 ` Srihari Vijayaraghavan
2007-05-08 11:12 ` Tejun Heo
2007-05-08 11:16 ` Tejun Heo
2007-05-08 12:42 ` Srihari Vijayaraghavan
2007-05-08 12:39 ` Srihari Vijayaraghavan
2007-05-08 13:35 ` Tejun Heo
2007-05-08 15:00 ` Conke Hu
2007-05-08 15:03 ` Tejun Heo
2007-05-13 5:05 ` Srihari Vijayaraghavan
2007-05-14 9:10 ` Tejun Heo
2007-05-18 12:39 ` Srihari Vijayaraghavan
2007-05-18 12:46 ` Tejun Heo
2007-05-18 13:18 ` [PATCH] ahci: disable 64bit dma on sb600 Tejun Heo
2007-05-18 14:19 ` Srihari Vijayaraghavan
2007-05-18 14:23 ` Tejun Heo [this message]
2007-05-21 23:58 ` Jeff Garzik
2007-05-22 6:59 Srihari Vijayaraghavan
[not found] <46560BFF.8000802@es.aau.dk>
[not found] ` <4656B7B1.1030707@gmail.com>
2007-05-25 22:14 ` Bo Nygaard Bai
2007-05-25 23:23 ` Bo Nygaard Bai
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=464DB6D7.8040206@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=sriharivijayaraghavan@yahoo.com.au \
--cc=wolke.liu@amd.com \
/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.