linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	muli@il.ibm.com, jdmason@kudzu.us, linux-ide@vger.kernel.org,
	linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
	discuss@x86-64.org
Subject: Re: pci_get_device_reverse(), why does Calgary need this?
Date: Wed, 13 Feb 2008 10:16:55 -0800	[thread overview]
Message-ID: <20080213181655.GB8960@kroah.com> (raw)
In-Reply-To: <20080213172824.GB10733@kroah.com>

On Wed, Feb 13, 2008 at 09:28:24AM -0800, Greg KH wrote:
> On Wed, Feb 13, 2008 at 01:34:12PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > On Wednesday 13 February 2008, Greg KH wrote:
> > > On Wed, Feb 13, 2008 at 02:17:37AM +0000, Alan Cox wrote:
> > > > > Why does the calgary driver need this?  Can we just use pci_get_device()
> > > > > instead?  Why do you need to walk the device list backwards?  Do you get
> > > > > false positives going forward?
> > > > 
> > > > It doesn't look to be performance critical so the driver can
> > > > pci_get_device until the end and use the final hit anyway.
> > > 
> > > That would make more sense.
> > > 
> > > > IDE reverse is more problematic but nobody seems to use it.
> > > 
> > > I've seen two posters say they use it.  I'm wondering what it is really
> > > solving if they use it, and why if it's really needed, scsi never had to
> > > implement such a hack...
> > 
> > It is no longer solving anything, just adds more pain. ;)
> > 
> > [ The option comes from 2.2.x (so long before LABEL=/ and /dev/disk/by-id/
> >   became popular).  Some "off-board" controllers integrated on motherboards
> >   used to appear before "on-board" IDE on PCI bus so this option was meant
> >   to preserve the legacy ordering. ]
> > 
> > Since it is valid only when "Probe IDE PCI devices in the PCI bus order
> > (DEPRECATED)" config option is used it is already on its way out (though
> > marking it as obsoleted would make it more explicit).
> > 
> > I think that removing "ide=reverse" in 2.6.26 would be OK...
> 
> Great, thanks for your blessing.  I'll make up a patch and send it to
> you for approval.

How does the patch below look?  I didn't want to remove the whole config
option, as there is more to the logic than just the "reverse order"
stuff there.

If you don't mind, can I take this through the PCI tree so as to allow
the removal of this pci function afterwards?

thanks,

greg k-h

--------
From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: IDE: remove ide=reverse IDE core

This option is obsolete and can be removed safely.

It allows us to remove the pci_get_device_reverse() function from the
PCI core.


Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ide/ide-scan-pci.c |    9 ++-------
 drivers/ide/ide.c          |   12 ------------
 include/linux/ide.h        |    1 -
 3 files changed, 2 insertions(+), 20 deletions(-)

--- a/drivers/ide/ide-scan-pci.c
+++ b/drivers/ide/ide-scan-pci.c
@@ -88,13 +88,8 @@ static int __init ide_scan_pcibus(void)
 	struct list_head *l, *n;
 
 	pre_init = 0;
-	if (!ide_scan_direction)
-		while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)))
-			ide_scan_pcidev(dev);
-	else
-		while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID,
-						     dev)))
-			ide_scan_pcidev(dev);
+	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)))
+		ide_scan_pcidev(dev);
 
 	/*
 	 *	Hand the drivers over to the PCI layer now we
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -92,10 +92,6 @@ static int system_bus_speed;	/* holds wh
 DEFINE_MUTEX(ide_cfg_mtx);
  __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock);
 
-#ifdef CONFIG_IDEPCI_PCIBUS_ORDER
-int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
-#endif
-
 int noautodma = 0;
 
 #ifdef CONFIG_BLK_DEV_IDEACPI
@@ -1227,14 +1223,6 @@ static int __init ide_setup(char *s)
 		goto obsolete_option;
 	}
 
-#ifdef CONFIG_IDEPCI_PCIBUS_ORDER
-	if (!strcmp(s, "ide=reverse")) {
-		ide_scan_direction = 1;
-		printk(" : Enabled support for IDE inverse scan order.\n");
-		return 1;
-	}
-#endif
-
 #ifdef CONFIG_BLK_DEV_IDEACPI
 	if (!strcmp(s, "ide=noacpi")) {
 		//printk(" : Disable IDE ACPI support.\n");
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -988,7 +988,6 @@ extern void do_ide_request(struct reques
 void ide_init_disk(struct gendisk *, ide_drive_t *);
 
 #ifdef CONFIG_IDEPCI_PCIBUS_ORDER
-extern int ide_scan_direction;
 extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name);
 #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME)
 #else

  reply	other threads:[~2008-02-13 18:19 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13  0:15 "ide=reverse" do we still need this? Greg KH
2008-02-13  0:16 ` pci_get_device_reverse(), why does Calgary " Greg KH
2008-02-13  2:17   ` Alan Cox
2008-02-13  4:45     ` Greg KH
2008-02-13 12:34       ` Bartlomiej Zolnierkiewicz
2008-02-13 17:28         ` Greg KH
2008-02-13 18:16           ` Greg KH [this message]
2008-02-13 22:20             ` Bartlomiej Zolnierkiewicz
2008-02-13 23:41               ` Greg KH
2008-02-14  0:02                 ` Bartlomiej Zolnierkiewicz
2008-02-14  4:58                   ` Greg KH
2008-02-14 13:09               ` Sergei Shtylyov
2008-02-14  7:44             ` [discuss] " Andreas Jaeger
2008-02-14 12:11               ` Bartlomiej Zolnierkiewicz
2008-02-15  7:17                 ` Greg KH
2008-02-20  0:39                 ` Greg KH
2008-02-13  9:32   ` Muli Ben-Yehuda
2008-02-13 17:32     ` Greg KH
2008-02-13 17:47       ` Muli Ben-Yehuda
2008-02-13 18:14         ` Greg KH
2008-02-15  7:17           ` Greg KH
2008-02-15  7:48             ` Muli Ben-Yehuda
2008-02-15 15:20               ` Greg KH
2008-02-15 15:31                 ` Sam Ravnborg
2008-02-15 15:46                   ` yong xue
2008-02-15 18:28                   ` Greg KH
2008-02-17  7:53                     ` Muli Ben-Yehuda
2008-02-13  1:41 ` "ide=reverse" do we still " Rene Herman
2008-02-13  4:44   ` Greg KH
2008-02-13 12:06     ` Rene Herman
2008-02-13 12:16       ` Michael Ellerman
2008-02-13 12:46         ` Rene Herman
2008-02-13 22:39           ` Michael Ellerman
2008-02-13 12:57       ` Rene Herman
2008-02-14 17:16     ` Bill Davidsen
2008-02-15 13:58       ` Matthew Wilcox
2008-02-13  2:43 ` Ken Moffat
2008-02-13  4:43   ` Greg KH
2008-02-13 15:32     ` Ken Moffat
2008-02-19 15:08       ` Ken Moffat
2008-02-13  7:54 ` [discuss] " Dirk GOUDERS
2008-02-13  8:26   ` Greg KH
2008-02-13  8:54     ` Dirk GOUDERS
2008-02-13 20:00     ` Dirk GOUDERS
2008-02-13 20:48       ` Greg KH

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=20080213181655.GB8960@kroah.com \
    --to=greg@kroah.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=discuss@x86-64.org \
    --cc=jdmason@kudzu.us \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=muli@il.ibm.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;
as well as URLs for NNTP newsgroup(s).