public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Martins Krikis <mkrikis@yahoo.com>
Cc: linux-kernel@vger.kernel.org,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [RFC PATCH 2.4] ata_piix on ich6r in RAID mode
Date: Fri, 28 Jan 2005 20:30:20 -0500	[thread overview]
Message-ID: <41FAE72C.1010905@pobox.com> (raw)
In-Reply-To: <87acqte8xr.fsf@yahoo.com>

Martins Krikis wrote:
> Without this patch, if the BIOS of an ICH6R box has IDE set to "RAID"
> mode then ata_piix will not find any SATA disks because it incorrectly
> tries the legacy mode. With the patch all 4 SATA drives become visible.
> I don't think it would break any other vendor's SATA, but you can be
> the judge of that. If so, perhaps we can restrict the test some more
> by checking vendor/device IDs.

> --- linux-2.4.29/drivers/scsi/libata-core.c	2005-01-28 12:07:56.000000000 -0500
> +++ linux-2.4.29-iswraid/drivers/scsi/libata-core.c	2005-01-28 12:14:43.000000000 -0500
> @@ -3605,6 +3605,9 @@ int ata_pci_init_one (struct pci_dev *pd
>  			legacy_mode = (1 << 3);
>  	}
>  
> +	if ((pdev->class >> 8) == PCI_CLASS_STORAGE_RAID)
> +		legacy_mode = 0;
> +
>  	/* FIXME... */
>  	if ((!legacy_mode) && (n_ports > 1)) {
>  		printk(KERN_ERR "ata: BUG: native mode, n_ports > 1\n");


hmmmmmm.  Maybe "!= PCI_CLASS_STORAGE_IDE" instead?

Overall, however, I am worried about your report of the driver's 
behavior based on that BIOS's configuration.  The driver follows the PCI 
IDE standard (previously SFF 8038i), where a register indicates whether 
its in legacy or native mode.  As it see it, either
a) the driver logic for reading that register is wrong, or
b) BIOS incorrectly configuring the device, or
c) that register is only applicable for PCI_CLASS_STORAGE_IDE devices.

Comments either way?

	Jeff



  reply	other threads:[~2005-01-29  1:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28 17:54 [RFC PATCH 2.4] ata_piix on ich6r in RAID mode Martins Krikis
2005-01-29  1:30 ` Jeff Garzik [this message]
2005-01-29  2:54   ` Martins Krikis

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=41FAE72C.1010905@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkrikis@yahoo.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