mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.70-bk[56] breaks disk partitioning with multiple IDE disks
Date: Sun, 1 Jun 2003 17:45:09 -0700	[thread overview]
Message-ID: <200306020045.h520j9v15291@freya.yggdrasil.com> (raw)

	To add to my own posting, here is a patch to 2.5.70-bk6
that reverts only the changes that replaced ata_unused with
idedeault_driver.drives.  This change makes bk6 work for me with
multiple IDE disk drives present.

	I have tried a number of smaller changes to stock
2.5.70-bk6/drivers/ide/ide.c, but, I have not yet found a change
simpler than this that works.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Miplitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."


--- linux-2.5.70-bk6/drivers/ide/ide.c	2003-06-01 12:01:28.000000000 -0700
+++ linux/drivers/ide/ide.c	2003-06-01 16:52:28.000000000 -0700
@@ -462,6 +462,7 @@
 	return -ENXIO;
 }
 
+static LIST_HEAD(ata_unused);
 static spinlock_t drives_lock = SPIN_LOCK_UNLOCKED;
 static spinlock_t drivers_lock = SPIN_LOCK_UNLOCKED;
 static LIST_HEAD(drivers);
@@ -1436,6 +1437,9 @@
 	spin_unlock(&drivers_lock);
 	if(idedefault_driver.attach(drive) != 0)
 		panic("ide: default attach failed");
+	spin_lock(&drives_lock);
+	list_add_tail(&drive->list, &ata_unused);
+	spin_unlock(&drives_lock);
 	return 1;
 }
 
@@ -2379,8 +2383,8 @@
 	spin_unlock_irqrestore(&ide_lock, flags);
 	spin_lock(&drives_lock);
 	list_del_init(&drive->list);
+	list_add(&drive->list, &drive->driver->drives);
 	spin_unlock(&drives_lock);
-	/* drive will be added to &idedefault_driver->drives in ata_attach() */
 	return 0;
 }
 
@@ -2403,9 +2407,9 @@
 	list_add(&driver->drivers, &drivers);
 	spin_unlock(&drivers_lock);
 
-	INIT_LIST_HEAD(&list);
 	spin_lock(&drives_lock);
-	list_splice_init(&idedefault_driver.drives, &list);
+	INIT_LIST_HEAD(&list);
+	list_splice_init(&ata_unused, &list);
 	spin_unlock(&drives_lock);
 
 	list_for_each_safe(list_loop, tmp_storage, &list) {

             reply	other threads:[~2003-06-02  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-02  0:45 Adam J. Richter [this message]
2003-06-02  6:05 ` William Lee Irwin III
  -- strict thread matches above, loose matches on Subject: below --
2003-06-01 22:59 Adam J. Richter

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=200306020045.h520j9v15291@freya.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=linux-ide@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®