public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Patrik Wallstrom <pawal@blipp.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH #2] Re: SATA and 2.6.0-test9
Date: Thu, 30 Oct 2003 12:49:35 -0500	[thread overview]
Message-ID: <3FA14F2F.1080700@pobox.com> (raw)
In-Reply-To: <20031027181052.GG32168@vic20.blipp.com>

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

Patrik Wallstrom wrote:
> On Mon, 27 Oct 2003, Jeff Garzik wrote:
> 
> 
>>>>Jeff Garzik:
>>>>  o [libata] Merge Serial ATA core, and drivers for
>>>>  o [libata] Integrate Serial ATA driver into kernel tree
>>>
>>>I am happy to see these in the kernel now, but I have yet to get them
>>>working on my KT6 Delta KT600 motherboard with the VT8237 SATA
>>>southbridge controller or even the Promise controller.
>>
>>Does it improve things, if you change ATA_FLAG_SRST to
>>ATA_FLAG_SATA_RESET, in drivers/scsi/sata_via.c ?
> 
> 
> It doesn't hang any more, but the only result is:
> sata_via version 0.11
> ata3: SATA max UDMA/133 cmd 0xD800 ctl 0xD402 bmdma 0xC800 irq 16
> ata4: SATA max UDMA/133 cmd 0xD000 ctl 0xCC02 bmdma 0xC808 irq 16
> ata3: thread exiting
> scsi2 : sata_via
> ata4: thread exiting
> scsi3 : sata_via

Actually, attached is a better patch...

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2294 bytes --]

===== drivers/scsi/libata-core.c 1.5 vs edited =====
--- 1.5/drivers/scsi/libata-core.c	Wed Oct 22 22:25:32 2003
+++ edited/drivers/scsi/libata-core.c	Thu Oct 30 11:18:59 2003
@@ -1086,6 +1086,11 @@
 	if (ap->flags & ATA_FLAG_PORT_DISABLED)
 		return;
 
+	if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
+		ata_port_disable(ap);
+		return;
+	}
+
 	ata_bus_reset(ap);
 }
 
@@ -1339,9 +1344,13 @@
 		outb(ap->ctl, ioaddr->ctl_addr);
 
 	/* determine if device 0/1 are present */
-	dev0 = ata_dev_devchk(ap, 0);
-	if (slave_possible)
-		dev1 = ata_dev_devchk(ap, 1);
+	if (ap->flags & ATA_FLAG_SATA_RESET)
+		dev0 = 1;
+	else {
+		dev0 = ata_dev_devchk(ap, 0);
+		if (slave_possible)
+			dev1 = ata_dev_devchk(ap, 1);
+	}
 
 	if (dev0)
 		devmask |= (1 << 0);
===== drivers/scsi/sata_promise.c 1.8 vs edited =====
--- 1.8/drivers/scsi/sata_promise.c	Tue Oct 28 11:04:25 2003
+++ edited/drivers/scsi/sata_promise.c	Thu Oct 30 08:13:44 2003
@@ -176,7 +176,7 @@
 	{
 		.sht		= &pdc_sata_sht,
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
-				  ATA_FLAG_SRST | ATA_FLAG_MMIO,
+				  ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO,
 		.pio_mask	= 0x03, /* pio3-4 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &pdc_sata_ops,
@@ -186,7 +186,7 @@
 	{
 		.sht		= &pdc_sata_sht,
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
-				  ATA_FLAG_SRST | ATA_FLAG_MMIO,
+				  ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO,
 		.pio_mask	= 0x03, /* pio3-4 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &pdc_sata_ops,
@@ -207,6 +207,8 @@
 
 static struct pci_device_id pdc_sata_pci_tbl[] = {
 	{ PCI_VENDOR_ID_PROMISE, 0x3371, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  board_2037x },
+	{ PCI_VENDOR_ID_PROMISE, 0x3373, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 	  board_2037x },
 	{ PCI_VENDOR_ID_PROMISE, 0x3375, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 	  board_2037x },
===== drivers/scsi/sata_via.c 1.2 vs edited =====
--- 1.2/drivers/scsi/sata_via.c	Tue Oct 21 23:13:54 2003
+++ edited/drivers/scsi/sata_via.c	Wed Oct 29 20:27:43 2003
@@ -108,7 +108,7 @@
 	{
 		.sht		= &svia_sht,
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY
-				  | ATA_FLAG_SRST,
+				  | ATA_FLAG_SATA_RESET,
 		.pio_mask	= 0x03,	/* pio3-4 */
 		.udma_mask	= 0x7f,	/* udma0-6 ; FIXME */
 		.port_ops	= &svia_sata_ops,

  parent reply	other threads:[~2003-10-30 17:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-27 14:15 SATA and 2.6.0-test9 Patrik Wallstrom
2003-10-27 16:58 ` Jeff Garzik
2003-10-27 18:10   ` Patrik Wallstrom
2003-10-30  1:29     ` [PATCH] " Jeff Garzik
2003-10-30 17:49     ` Jeff Garzik [this message]
2003-10-30 22:25       ` [PATCH #2] " Patrik Wallstrom
2003-10-30 22:27         ` Jeff Garzik
2003-10-31 12:14       ` Oliver M. Bolzer

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=3FA14F2F.1080700@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pawal@blipp.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