linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jean-Fran?ois Stenuit <jfs@keytradebank.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: Sun, 29 Jan 2006 00:22:18 -0500	[thread overview]
Message-ID: <43DC510A.1090101@pobox.com> (raw)
In-Reply-To: <20051202032605.GA15528@htj.dyndns.org>

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;
> +	}
> +

I'm just not too thrilled about this.  I wonder if its an isolated 
incident related to power or something.  I would wait for more problem 
reports, before applying this.

	Jeff




  parent reply	other threads:[~2006-01-29  5:22 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
2005-12-05 10:17                       ` Tejun Heo
2006-01-29  5:22                     ` Jeff Garzik [this message]
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=43DC510A.1090101@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=0602@eq.cz \
    --cc=htejun@gmail.com \
    --cc=jfs@keytradebank.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).