From: Miquel van Smoorenburg <miquels@cistron.nl>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-kernel@vger.kernel.org
Subject: ata_piix doesn't work in combined mode if master is missing.
Date: Mon, 22 Mar 2004 14:23:38 +0100 [thread overview]
Message-ID: <20040322132336.GA12460@cistron.nl> (raw)
Hello,
I have a supermicro 1U server with 2 SATA swappable drives.
The chipset is Intel ICH5, and I'm using the ata_piix.c libata
driver. Works fine!
Except that if I remove the first drive, the second drive isn't
detected anymore. Now I have those drives set up with partitioned
RAID5, and if the first drive is missing or dead the system is
supposed to boot from the second disk - the BIOS does that, but
libata doesn't see the second drive.
A normal boot looks like this (dmesg output):
libata version 1.01 loaded.
ata_piix version 1.01
ata_piix: combined mode detected
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
ata1: dev 0 cfg 49:2f00 82:7c6b 83:7b09 84:4003 85:7c69 86:3a01 87:4003 88:407f
ata1: dev 0 ATA, max UDMA/133, 160086528 sectors
ata1: dev 1 cfg 49:2f00 82:7c6b 83:7b09 84:4003 85:7c69 86:3a01 87:4003 88:407f
ata1: dev 1 ATA, max UDMA/133, 160086528 sectors
ata1: dev 0 configured for UDMA/133
ata1: dev 1 configured for UDMA/133
scsi0 : ata_piix
A boot with the first disk removed looks like this:
ata_piix: combined mode detected
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
ata1: SATA port has no device. disabling.
scsi0 : ata_piix
(Note that this is serial console output, it apparently doesn't show
the "cfg" line on the serial console).
If I patch ata_piix.c to just ifdef out the "disabled" code, then I
can actually boot and run from the second disk, dmesg output:
ata_piix version 1.01
ata_piix: combined mode detected
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
ata1: dev 1 cfg 49:2f00 82:7c6b 83:7b09 84:4003 85:7c69 86:3a01 87:4003 88:407f
ata1: dev 1 ATA, max UDMA/133, 160086528 sectors
ata1: dev 1 configured for UDMA/133
scsi0 : ata_piix
If I enable "enhanced mode" instead of "combined mode" in the BIOS,
there is no problem - but as the system normally works in both modes,
and only fails in combined mode with the first disk missing, this
is risky - if you forget to put the BIOS in enhanced mode, you'll
only find out when it's too late.
The hack I used to reckognize the second disk is below. Is it
possible to fix this properly (i.e. check for slave in combined mode) ?
Thanks,
Mike.
--- linux-2.6.5-rc1.orig/drivers/scsi/ata_piix.c 2004-03-11 03:55:27.000000000 +0100
+++ linux-2.6.5-rc1/drivers/scsi/ata_piix.c 2004-03-22 13:14:59.000000000 +0100
@@ -342,6 +342,7 @@
return;
}
+#if 0 /* XXX miquels */
/* if port enabled but no device, disable port and exit */
if (!have_dev) {
piix_sata_port_disable(ap);
@@ -349,6 +350,7 @@
ap->id);
return;
}
+#endif
ap->cbl = ATA_CBL_SATA;
Mike.
--
Netu, v qba'g yvxr gur cynvagrkg :)
next reply other threads:[~2004-03-22 13:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-22 13:23 Miquel van Smoorenburg [this message]
2004-03-22 18:06 ` ata_piix and combined mode Jeff Garzik
2004-03-22 18:15 ` Jeff Garzik
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=20040322132336.GA12460@cistron.nl \
--to=miquels@cistron.nl \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@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
Powered by JetHome