# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.674.3.4 -> 1.674.3.5
#	drivers/net/wan/lmc/lmc_main.c	1.8     -> 1.9    
#	drivers/net/aironet4500_card.c	1.9     -> 1.10   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/04	bcollins@debian.org	1.696.1.1
# [PATCH] IEEE1394 updates to 2.5.40
# 
# - Fixup for new tq changes
# - Fix dv1394 for use without devfs
# - Fix dv1394 for PAL capture
# - Fix a hard to trigger bug in nodemgr.c
# - Add another broken firmware device to sbp2's list
# --------------------------------------------
# 02/10/04	bcollins@debian.org	1.696.1.2
# [PATCH] More 1394 updates
# 
# This incorporates security fixes from Alan that I brought from the
# 2.4.20-pre9 tree.
# --------------------------------------------
# 02/10/04	torvalds@penguin.transmeta.com	1.699
# Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5
# into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
# --------------------------------------------
# 02/10/04	torvalds@penguin.transmeta.com	1.700
# IO scheduler is a subsystem, not a driver. Initialize it as such.
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.701
# [PATCH] deadline updates
# 
# o Remove unused drq entry in deadline_merge()
# o Quit if insertion point found in deadline_merge()
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.702
# [PATCH] ide-cd updates
# 
# Here starts some new ide updates.
# 
# o Don't turn on dma before after having sent the packet cdb
# o Clear sense data given in generic command, otherwise the user cannot
#   trust it. I already sent this patch for 2.4.20-pre inclusion.
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.703
# [PATCH] ide config.in
# 
# o Make CONFIG_BLK_DEV_IDEPCI read 'PCI IDE chipset support' and not
#   'Generic...', it's just confusing.
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.704
# [PATCH] cleanup taskfile submit
# 
# We don't need to care about the request, just look purely at the
# taskfile itself.
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.705
# [PATCH] remove _P/_p delaying iops
# 
# Lets kill these off for good.
# 
# o Remove OUT_BYTE/IN_BYTE and variants. We defaulted to the fast ones
#   even before
# 
# o Add read barrier for ppc, it needs it
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.706
# [PATCH] ide low level driver updates
# 
# All of them in a single patch, would be silly to split. Does two things:
# 
# o Inc module usage count to forcefully pin the module
# 
# o Make the chipset init data __devinitdata
# 
# o Kill ->init_setup() and just make it generic
# --------------------------------------------
# 02/10/04	axboe@suse.de	1.707
# [PATCH] pass elevator type by reference, not value
# 
# Ingo spotted this one too, it's a leftover from when the elevator type
# wasn't a variable. Also don't pass in &q->elevator, it can always be
# deduced from queue itself of course.
# --------------------------------------------
# 02/10/04	torvalds@penguin.transmeta.com	1.708
# Oops, it's 'xxx_initcall()', not 'xxx_init()' (except for the
# legacy module_init(), just to confuse people).
# --------------------------------------------
# 02/10/04	greg@kroah.com	1.674.3.5
# PCI: remove usages of pcibios_find_class()
# --------------------------------------------
#
diff -Nru a/drivers/net/aironet4500_card.c b/drivers/net/aironet4500_card.c
--- a/drivers/net/aironet4500_card.c	Fri Oct  4 13:47:26 2002
+++ b/drivers/net/aironet4500_card.c	Fri Oct  4 13:47:26 2002
@@ -70,9 +70,6 @@
 MODULE_LICENSE("GPL");
 
 
-static int reverse_probe;
-
-
 static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
  			int ioaddr, int cis_addr, int mem_addr,u8 pci_irq_line) ;
 
@@ -80,38 +77,29 @@
 int awc4500_pci_probe(struct net_device *dev)
 {
 	int cards_found = 0;
-	static int pci_index;	/* Static, for multiple probe calls. */
 	u8 pci_irq_line = 0;
 //	int p;
-
-	unsigned char awc_pci_dev, awc_pci_bus;
-
+	struct pci_dev *pdev = NULL;
+		
 	if (!pci_present()) 
 		return -1;
 
-	for (;pci_index < 0xff; pci_index++) {
-		u16 vendor, device, pci_command, new_command;
+	while ((pdev = pci_find_class (PCI_CLASS_NETWORK_OTHER << 8, pdev))) {
+		u16 pci_command, new_command;
 		u32 pci_memaddr;
 		u32 pci_ioaddr;
 		u32 pci_cisaddr;
-		struct pci_dev *pdev;
 
-		if (pcibios_find_class	(PCI_CLASS_NETWORK_OTHER << 8,
-			 reverse_probe ? 0xfe - pci_index : pci_index,
-				 &awc_pci_bus, &awc_pci_dev) != PCIBIOS_SUCCESSFUL){
-				if (reverse_probe){
-					continue;
-				} else {
-					break;
-				}
-		}
-		pdev = pci_find_slot(awc_pci_bus, awc_pci_dev);
-		if (!pdev)
+		if (pdev->vendor != PCI_VENDOR_ID_AIRONET)
+			continue;
+		if ((pdev->device != PCI_DEVICE_AIRONET_4800_1) &&
+		    (pdev->device != PCI_DEVICE_AIRONET_4800) &&
+		    (pdev->device != PCI_DEVICE_AIRONET_4500))
 			continue;
+
 		if (pci_enable_device(pdev))
 			continue;
-		vendor = pdev->vendor;
-		device = pdev->device;
+
 	        pci_irq_line = pdev->irq;
 		pci_memaddr = pci_resource_start (pdev, 0);
                 pci_cisaddr = pci_resource_start (pdev, 1);
@@ -120,13 +108,6 @@
 //		printk("\n pci capabilities %x and ptr %x \n",pci_caps,pci_caps_ptr);
 		/* Remove I/O space marker in bit 0. */
 
-		if (vendor != PCI_VENDOR_ID_AIRONET)
-			continue;
-		if (device != PCI_DEVICE_AIRONET_4800_1 && 
-				device != PCI_DEVICE_AIRONET_4800 &&
-				device != PCI_DEVICE_AIRONET_4500 )
-                        continue;
-
 //		if (check_region(pci_ioaddr, AIRONET4X00_IO_SIZE) ||
 //			check_region(pci_cisaddr, AIRONET4X00_CIS_SIZE) ||
 //			check_region(pci_memaddr, AIRONET4X00_MEM_SIZE)) {
@@ -151,7 +132,7 @@
 
 		udelay(1000);
 */
-		if (device == PCI_DEVICE_AIRONET_4800)
+		if (pdev->device == PCI_DEVICE_AIRONET_4800)
 			pci_write_config_dword(pdev, 0x40, 0x40000000);
 
 		if (awc_pci_init(dev, pdev, pci_ioaddr,pci_cisaddr,pci_memaddr,pci_irq_line)){
diff -Nru a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
--- a/drivers/net/wan/lmc/lmc_main.c	Fri Oct  4 13:47:26 2002
+++ b/drivers/net/wan/lmc/lmc_main.c	Fri Oct  4 13:47:26 2002
@@ -1045,8 +1045,8 @@
     unsigned int pci_irq_line;
     u16 vendor, subvendor, device, subdevice;
     u32 foundaddr = 0;
-    unsigned char pci_bus, pci_device_fn;
     u8 intcf = 0;
+    struct pci_dev *pdev = NULL;
 
     /* The card is only available on PCI, so if we don't have a
      * PCI bus, we are in trouble.
@@ -1057,21 +1057,7 @@
         return -1;
     }
     /* Loop basically until we don't find anymore. */
-    while (pci_index < 0xff){
-    	struct pci_dev *pdev;
-        /* The tulip is considered an ethernet class of card... */
-        if (pcibios_find_class (PCI_CLASS_NETWORK_ETHERNET << 8,
-                                pci_index, &pci_bus,
-                                &pci_device_fn) != PCIBIOS_SUCCESSFUL) {
-            /* No card found on this pass */
-            break;
-        }
-        /* Read the info we need to determine if this is
-         * our card or not
-         */
-	pdev = pci_find_slot (pci_bus, pci_device_fn);
-	if (!pdev) break;
-
+    while ((pdev = pci_find_class (PCI_CLASS_NETWORK_ETHERNET << 8, pdev))) {
 	if (pci_enable_device(pdev))
 		break;
 
