All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Max Kellermann <max@duempel.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: 2.6.14-rc4-mm1 and later: second ata_piix controller is invisible
Date: Sun, 30 Oct 2005 07:59:36 -0500	[thread overview]
Message-ID: <4364C3B8.1010909@pobox.com> (raw)
In-Reply-To: <20051025095646.GA24977@roonstrasse.net>

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

Max Kellermann wrote:
> Hi Andrew,
> 
> since 2.6.14-rc4-mm1, my second ata_piix (SATA) controller does not
> show up in dmesg, effectively hiding /dev/sdb.  2.6.14-rc2-mm2 and
> older (with the same kernel config) were ok, the same for Linus'
> kernels: 2.6.14-rc5 without -mm1 has /dev/sdb, too.

Attached is the patch I just checked in, which should play a bit more 
nicely with Alan's PATA drivers than the last patch.

I was able to reproduce your (Max's) problem locally, and verified that 
the attached patch fixed it.

	Jeff



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

fbf30fbaa61595e9026f628f3913888b0df2b288
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index b7fbf11..7f8aa1b 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -622,7 +622,7 @@ static int piix_init_one (struct pci_dev
 {
 	static int printed_version;
 	struct ata_port_info *port_info[2];
-	unsigned int combined = 0, n_ports = 1;
+	unsigned int combined = 0;
 	unsigned int pata_chan = 0, sata_chan = 0;
 
 	if (!printed_version++)
@@ -634,7 +634,7 @@ static int piix_init_one (struct pci_dev
 		return -ENODEV;
 
 	port_info[0] = &piix_port_info[ent->driver_data];
-	port_info[1] = NULL;
+	port_info[1] = &piix_port_info[ent->driver_data];
 
 	if (port_info[0]->host_flags & PIIX_FLAG_AHCI) {
 		u8 tmp;
@@ -672,14 +672,13 @@ static int piix_init_one (struct pci_dev
 		port_info[sata_chan] = &piix_port_info[ent->driver_data];
 		port_info[sata_chan]->host_flags |= ATA_FLAG_SLAVE_POSS;
 		port_info[pata_chan] = &piix_port_info[ich5_pata];
-		n_ports++;
 
 		dev_printk(KERN_WARNING, &pdev->dev,
 			   "combined mode detected (p=%u, s=%u)\n",
 			   pata_chan, sata_chan);
 	}
 
-	return ata_pci_init_one(pdev, port_info, n_ports);
+	return ata_pci_init_one(pdev, port_info, 2);
 }
 
 static int __init piix_init(void)

  parent reply	other threads:[~2005-10-30 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25  9:56 2.6.14-rc4-mm1 and later: second ata_piix controller is invisible Max Kellermann
2005-10-25 17:32 ` Andrew Morton
     [not found]   ` <20051025103310.51e1cdb2.akpm@osdl.org>
2005-10-26  6:50     ` Max Kellermann
2005-10-29 19:25 ` Jeff Garzik
2005-10-30 11:26 ` [PATCH] " Jeff Garzik
2005-10-30 12:59 ` Jeff Garzik [this message]
2005-10-31 10:33   ` Max Kellermann

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=4364C3B8.1010909@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@duempel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.