From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, linux-ide@vger.kernel.org,
Carlos.Pardo@siliconimage.com
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 13/13] sata_sil24: enable 64bit
Date: Fri, 7 Apr 2006 17:16:54 +0900 [thread overview]
Message-ID: <11443978142591-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <114439781363-git-send-email-htejun@gmail.com>
Enable 64bit.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/scsi/sata_sil24.c | 47 +++++++++++++++++++++++++++------------------
1 files changed, 28 insertions(+), 19 deletions(-)
96079f923aa282ccd853e1fcd71f289568384bd8
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index 0b96ab1..e78b758 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -486,6 +486,7 @@ static int sil24_softreset(struct ata_po
prb->fis[1] = 0; /* no PM yet */
writel((u32)paddr, port + PORT_CMD_ACTIVATE);
+ writel((u64)paddr >> 32, port + PORT_CMD_ACTIVATE + 4);
mask = (PORT_IRQ_COMPLETE | PORT_IRQ_ERROR) << PORT_IRQ_RAW_SHIFT;
irq_stat = ata_wait_register(port + PORT_IRQ_STAT, mask, 0x0,
@@ -645,6 +646,8 @@ static unsigned int sil24_qc_issue(struc
dma_addr_t paddr = pp->cmd_block_dma + qc->tag * sizeof(*pp->cmd_block);
writel((u32)paddr, port + PORT_CMD_ACTIVATE);
+ writel((u64)paddr >> 32, port + PORT_CMD_ACTIVATE + 4);
+
return 0;
}
@@ -981,22 +984,29 @@ static int sil24_init_one(struct pci_dev
/*
* Configure the device
*/
- /*
- * FIXME: This device is certainly 64-bit capable. We just
- * don't know how to use it. After fixing 32bit activation in
- * this function, enable 64bit masks here.
- */
- rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
- if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
- "32-bit DMA enable failed\n");
- goto out_free;
- }
- rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
- if (rc) {
- dev_printk(KERN_ERR, &pdev->dev,
- "32-bit consistent DMA enable failed\n");
- goto out_free;
+ if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
+ rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+ if (rc) {
+ rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+ if (rc) {
+ dev_printk(KERN_ERR, &pdev->dev,
+ "64-bit DMA enable failed\n");
+ goto out_free;
+ }
+ }
+ } else {
+ rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+ if (rc) {
+ dev_printk(KERN_ERR, &pdev->dev,
+ "32-bit DMA enable failed\n");
+ goto out_free;
+ }
+ rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+ if (rc) {
+ dev_printk(KERN_ERR, &pdev->dev,
+ "32-bit consistent DMA enable failed\n");
+ goto out_free;
+ }
}
/* GPIO off */
@@ -1054,9 +1064,8 @@ static int sil24_init_one(struct pci_dev
writel(0x0000, port + PORT_CRC_ERR_CNT);
writel(0x0000, port + PORT_HSHK_ERR_CNT);
- /* FIXME: 32bit activation? */
- writel(0, port + PORT_ACTIVATE_UPPER_ADDR);
- writel(PORT_CS_32BIT_ACTV, port + PORT_CTRL_STAT);
+ /* Always use 64bit activation */
+ writel(PORT_CS_32BIT_ACTV, port + PORT_CTRL_CLR);
/* Configure interrupts */
writel(0xffff, port + PORT_IRQ_ENABLE_CLR);
--
1.2.4
next prev parent reply other threads:[~2006-04-07 8:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-07 8:16 [PATCHSET] sata_sil24: fixes, errata workaround and reset updates, take 2 Tejun Heo
2006-04-07 8:16 ` [PATCH 05/13] sata_sil24: consolidate host flags into SIL24_COMMON_FLAGS Tejun Heo
2006-04-07 8:16 ` [PATCH 06/13] sata_sil24: implement loss of completion interrupt on PCI-X errta fix Tejun Heo
2006-04-11 8:34 ` [PATCH 06/13 (updated)] " Tejun Heo
2006-04-11 9:11 ` Tejun Heo
2006-04-07 8:16 ` [PATCH 04/13] sata_sil24: add more constants Tejun Heo
2006-04-07 8:16 ` [PATCH 02/13] sata_sil24: typo fix Tejun Heo
2006-04-07 8:16 ` [PATCH 07/13] sata_sil24: implement sil24_init_port() Tejun Heo
2006-04-07 8:16 ` [PATCH 01/13] libata: export ata_set_sata_spd() Tejun Heo
2006-04-07 8:16 ` [PATCH 03/13] sata_sil24: rename PORT_IRQ_SDB_FIS to PORT_IRQ_SDB_NOTIFY Tejun Heo
2006-04-07 8:16 ` [PATCH 08/13] sata_sil24: put port into known state before softresetting Tejun Heo
2006-04-07 8:16 ` Tejun Heo [this message]
2006-04-07 8:16 ` [PATCH 09/13] sata_sil24: kill 10ms sleep in softreset Tejun Heo
2006-04-07 8:16 ` [PATCH 11/13] sata_sil24: don't do hardreset during driver initialization Tejun Heo
2006-04-07 8:16 ` [PATCH 10/13] sata_sil24: reimplement hardreset Tejun Heo
2006-04-07 8:16 ` [PATCH 12/13] sata_sil24: fix on-memory structure byteorder Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2006-04-11 13:32 [PATCHSET 4/9] sata_sil24 fixes, errata workaround and reset updates, take 3 Tejun Heo
2006-04-11 13:32 ` [PATCH 13/13] sata_sil24: enable 64bit Tejun Heo
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=11443978142591-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=Carlos.Pardo@siliconimage.com \
--cc=jgarzik@pobox.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).