From: "Jean-François Stenuit" <jfs@keytradebank.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
Keith Mannthey <kmannth@gmail.com>, "0602@eq.cz" <0602@eq.cz>,
Linux-ide <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] ata_piix: ignore all zero PCS value on ICH5's
Date: Mon, 05 Dec 2005 11:07:25 +0100 [thread overview]
Message-ID: <4394115D.2020603@keytradebank.com> (raw)
In-Reply-To: <20051202032605.GA15528@htj.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 2765 bytes --]
Hi Tejun,
Back to work this morning. I applied this patch to 2.6.15-rc5 to test my
problematic HP DL140G2.
Result of the tests :
Reboot 1 : successfull, patch code used
Reboot 2 : successfull, patch code not used
Reboot 3 : successfull, patch code used
Reboot 4 : successfull, patch code not used
Reboot 5 : successfull, patch code used
Cold boot 1 : successfull, patch code used
Cold boot 2 : successfull, patch code not used
Cold boot 3 : successfull, patch code not used
Cold boot 4 : successfull, patch code used
Cold boot 5 : successfull, patch code used
Seems the patch is working.
Tejun Heo wrote:
>Some ICH5's report 0 for PCS even when they have active working ports.
>This patch makes piix_sata_probe() ignore 0 PCS value on ICH5's and
>probe all ports in such cases. And while at it, remove bogus
>assignment to mask.
>
>Signed-off-by: Tejun Heo <htejun@gmail.com>
>
>--
>
>Hi, Jean-Francois (sorry, cannot type that character) and 0602.
>
>Can you guys please verify that this patch works? This patch is
>supposed to do the same thing as my previous patch with
>override_PCS=1.
>
>
>diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
>index 887b2b9..482995b 100644
>--- a/drivers/scsi/ata_piix.c
>+++ b/drivers/scsi/ata_piix.c
>@@ -58,6 +58,7 @@ enum {
> ICH5_PCS = 0x92, /* port control and status */
> PIIX_SCC = 0x0A, /* sub-class code register */
>
>+ PIIX_FLAG_UNRELIABLE_PCS= (1 << 27), /* PCS bits are unreliable */
> PIIX_FLAG_AHCI = (1 << 28), /* AHCI possible */
> PIIX_FLAG_CHECKINTR = (1 << 29), /* make sure PCI INTx enabled */
> PIIX_FLAG_COMBINED = (1 << 30), /* combined mode possible */
>@@ -223,7 +224,8 @@ static struct ata_port_info piix_port_in
> {
> .sht = &piix_sht,
> .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST |
>- PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR,
>+ PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR |
>+ PIIX_FLAG_UNRELIABLE_PCS,
> .pio_mask = 0x1f, /* pio0-4 */
> .mwdma_mask = 0x07, /* mwdma0-2 */
> .udma_mask = 0x7f, /* udma0-6 */
>@@ -362,12 +364,15 @@ static int piix_sata_probe (struct ata_p
> int orig_mask, mask, i;
> u8 pcs;
>
>- mask = (PIIX_PORT_PRESENT << ap->hard_port_no) |
>- (PIIX_PORT_ENABLED << ap->hard_port_no);
>-
> pci_read_config_byte(pdev, ICH5_PCS, &pcs);
> orig_mask = (int) pcs & 0xff;
>
>+ if (orig_mask == 0 && ap->flags & PIIX_FLAG_UNRELIABLE_PCS) {
>+ printk(KERN_INFO "ata%u: PIIX PCS reports 0x00, ignoring PCS\n",
>+ ap->id);
>+ return 1;
>+ }
>+
> /* TODO: this is vaguely wrong for ICH6 combined mode,
> * where only two of the four SATA ports are mapped
> * onto a single ATA channel. It is also vaguely inaccurate
>
>
>
--
Jean-François "Jef" Stenuit
Network & Security manager
Keytrade Bank SA
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3182 bytes --]
next prev parent reply other threads:[~2005-12-05 10:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <438B6E05.8070009@eq.cz>
2005-11-30 4:35 ` totally random "VFS: Cannot open root device" Tejun Heo
2005-11-30 9:05 ` Jean-François Stenuit
2005-11-30 16:30 ` Randy.Dunlap
2005-12-01 9:42 ` Jean-François Stenuit
2005-12-01 11:20 ` Jean-François Stenuit
2005-11-30 13:07 ` 0602
2005-11-30 22:05 ` Keith Mannthey
2005-12-01 9:40 ` Jean-François Stenuit
2005-12-01 11:20 ` Tejun Heo
2005-12-01 12:59 ` Jean-François Stenuit
2005-12-01 13:29 ` Tejun Heo
2005-12-01 15:34 ` 0602
2005-12-02 1:53 ` Jeff Garzik
2005-12-02 3:00 ` Tejun Heo
2005-12-02 3:26 ` [PATCH] ata_piix: ignore all zero PCS value on ICH5's Tejun Heo
2005-12-02 12:40 ` 0602
2005-12-05 10:07 ` Jean-François Stenuit [this message]
2005-12-05 10:17 ` Tejun Heo
2006-01-29 5:22 ` Jeff Garzik
2006-02-01 2:01 ` Tejun Heo
2006-02-09 9:23 ` 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=4394115D.2020603@keytradebank.com \
--to=jfs@keytradebank.com \
--cc=0602@eq.cz \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=kmannth@gmail.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).