From: Jeff Garzik <jgarzik@pobox.com>
To: linux-kernel@vger.kernel.org
Cc: Petr Sebor <petr@scssoft.com>, jpaana@s2.org
Subject: [PATCH] Re: [sata] libata update
Date: Wed, 31 Mar 2004 03:24:21 -0500 [thread overview]
Message-ID: <406A8035.2080108@pobox.com> (raw)
In-Reply-To: <4069FBC3.2080104@scssoft.com>
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
Petr Sebor wrote:
> Hi Jeff,
>
> I have upgraded from 2.6.3 to 2.6.5-rc3 and can't see the secondary
> sata drive anymore...
>
> I am seeing this:
> -------------------------------------------------------------------
> libata version 1.02 loaded.
> sata_via version 0.20
> sata_via(0000:00:0f.0): routed to hard irq line 11
> ata1: SATA max UDMA/133 cmd 0xC400 ctl 0xC802 bmdma 0xD400 irq 20
> ata2: SATA max UDMA/133 cmd 0xCC00 ctl 0xD002 bmdma 0xD408 irq 20
> ata1: dev 0 cfg 49:2f00 82:346b 83:7f21 84:4003 85:3469 86:3c01 87:4003
> 88:203f
> ata1: dev 0 ATA, max UDMA/100, 488397168 sectors (lba48)
> ata1: dev 0 configured for UDMA/100
> scsi0 : sata_via
> ata2: no device found (phy stat 00000000)
Here's a potentially better patch, if you guys (or anyone else) would be
willing to give it a quick test...?
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1577 bytes --]
===== drivers/scsi/sata_via.c 1.10 vs edited =====
--- 1.10/drivers/scsi/sata_via.c Thu Mar 25 07:30:08 2004
+++ edited/drivers/scsi/sata_via.c Wed Mar 31 03:20:50 2004
@@ -39,9 +39,10 @@
enum {
via_sata = 0,
- SATA_CHAN_ENAB = 0x40,
- SATA_INT_GATE = 0x41,
- SATA_NATIVE_MODE = 0x42,
+ SATA_CHAN_ENAB = 0x40, /* SATA channel enable */
+ SATA_INT_GATE = 0x41, /* SATA interrupt gating */
+ SATA_NATIVE_MODE = 0x42, /* Native mode enable */
+ SATA_PATA_SHARING = 0x49, /* PATA/SATA sharing func ctrl */
PORT0 = (1 << 1),
PORT1 = (1 << 0),
@@ -51,6 +52,9 @@
INT_GATE_ALL = PORT0 | PORT1,
NATIVE_MODE_ALL = (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4),
+
+ SATA_EXT_PHY = (1 << 6), /* 0==use PATA, 1==ext phy */
+ SATA_2DEV = (1 << 5), /* SATA is master/slave */
};
static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -136,13 +140,7 @@
static unsigned long svia_scr_addr(unsigned long addr, unsigned int port)
{
- if (port >= 4)
- return 0; /* invalid port */
-
- addr &= ~((1 << 7) | (1 << 6));
- addr |= ((unsigned long)port << 6);
-
- return addr;
+ return addr + (port * 128);
}
/**
@@ -175,6 +173,13 @@
if (rc)
goto err_out;
+ pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8);
+ if ((tmp8 & (SATA_EXT_PHY | SATA_2DEV)) != SATA_EXT_PHY) {
+ printk(KERN_ERR DRV_NAME "(%s): PATA sharing not supported (0x%x)\n",
+ pci_name(pdev), (int) tmp8);
+ rc = -EIO;
+ goto err_out_regions;
+ }
for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
if ((pci_resource_start(pdev, i) == 0) ||
next prev parent reply other threads:[~2004-03-31 8:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-27 2:27 [sata] libata update Jeff Garzik
2004-03-30 22:59 ` Petr Sebor
2004-03-30 23:14 ` Jeff Garzik
2004-03-31 1:43 ` Jarno Paananen
2004-03-31 1:50 ` Jeff Garzik
2004-03-31 1:53 ` Jarno Paananen
2004-03-30 23:16 ` Jeff Garzik
2004-03-30 23:26 ` Petr Sebor
2004-03-30 23:39 ` Bartlomiej Zolnierkiewicz
2004-03-30 23:47 ` Jeff Garzik
2004-03-31 0:28 ` Bartlomiej Zolnierkiewicz
2004-03-31 2:33 ` Jeff Garzik
2004-03-31 8:24 ` Jeff Garzik [this message]
2004-03-31 11:50 ` [PATCH] " Petr Sebor
2004-03-31 16:41 ` Jarno Paananen
2004-03-31 16:48 ` Jeff Garzik
2004-03-31 17:21 ` Jarno Paananen
2004-03-31 21:04 ` Jeff Garzik
2004-04-01 7:35 ` Petr Sebor
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=406A8035.2080108@pobox.com \
--to=jgarzik@pobox.com \
--cc=jpaana@s2.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petr@scssoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox