public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Lynch <rusty@linux.co.intel.com>
To: greg@kroah.com, harold.yang@intel.com, scottm@somanetworks.com
Cc: linux-kernel@vger.kernel.org, pcihpd-discuss@lists.sourceforge.net
Subject: Re:[BUG] cpci patch for kernel 2.4.19 bug
Date: Wed, 8 Jan 2003 11:46:54 -0800	[thread overview]
Message-ID: <200301081946.h08Jksh06332@linux.intel.com> (raw)

From: "Yang, Harold" <harold.yang@intel.com>
> 
> Hi, Scott & Greg:
> 
> I have applied the cpci patch for kernel 2.4.19, and test it
> thoroughly on ZT5084 platform. Two bugs are found:
> 
> 1. In my ZT5084, the driver can't correctly detect the cPCI
>    Hot Swap bridge device. Two DEC21154 exist on ZT5084,
>    however, only one is the right bridge. The driver can't 
>    distinguish them correctly.

I just got a couple of ZT5541 peripheral master boards
and can finally see what happens when an enumerable board
is plugged into a ZT5084 chassis using a ZT5550 system master 
board.

As of yet I have only tried a 2.5.54 kernel, but I see the 
same problems along with some other wacky behavior that I 
am trying to isolate.

Now about the multiple DEC21154 devices ==>  on my ZT5550 that
is in system master mode, the first DEC21154 device is a bridge
for the slots to the left of the system slots, and the second
DEC21154 is a bridge for the right of the system slots.

So if I boot the system master (I'll talk about problems with 
hotswaping in another email) with a peripheral board plugged
into one of the slots on the right of the master using the
current 2.5.54 kernel then I run into problems the first time 
cpci_hotplug_core.c::check_slots() runs because it only looks
at the first bus when trying to find the card that caused the
#ENUM.

The following patch will register each of the cpci busses instead
of just the first one detected.

NOTE: I'm a little worried that the right way to do this is to
      properly initialize the RSS bits, or at least see how the
      chassis is configured via the RSS bits to determine which 
      cpci bus to register.  The ZT5084 doesn't have near as many
      configurations as newer designs like the ZT5088.

===== cpcihp_zt5550.c 1.1 vs edited =====
--- 1.1/drivers/hotplug/cpcihp_zt5550.c	Fri Nov  1 11:48:05 2002
+++ edited/cpcihp_zt5550.c	Wed Jan  8 11:17:32 2003
@@ -191,6 +191,7 @@
 					 const struct pci_device_id *ent)
 {
 	int status;
+	struct pci_dev *tmp = 0;
 
 	status = zt5550_hc_config(pdev);
 	if(status != 0) {
@@ -220,20 +221,16 @@
 	}
 	dbg("registered controller");
 
-	/* Look for first device matching cPCI bus's bridge vendor and device IDs */
-	if(!(bus0_dev = pci_find_device(PCI_VENDOR_ID_DEC,
-					 PCI_DEVICE_ID_DEC_21154, NULL))) {
-		status = -ENODEV;
-		goto init_register_error;
-	}
-	bus0 = bus0_dev->subordinate;
+	while(tmp = pci_find_device(PCI_VENDOR_ID_DEC,
+				    PCI_DEVICE_ID_DEC_21154, tmp)) {
+		if(cpci_hp_register_bus(tmp->subordinate, 0x0a, 0x0f)) {
+			err("could not register cPCI hotplug bus #%i", 
+			    tmp->subordinate);
+			continue;
+		}
 
-	status = cpci_hp_register_bus(bus0, 0x0a, 0x0f);
-	if(status != 0) {
-		err("could not register cPCI hotplug bus");
-		goto init_register_error;
+		dbg("registered bus #%i", tmp->subordinate);
 	}
-	dbg("registered bus");
 
 	status = cpci_hp_start();
 	if(status != 0) {

             reply	other threads:[~2003-01-08 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-08 19:46 Rusty Lynch [this message]
2003-01-08 20:10 ` Re:[BUG] cpci patch for kernel 2.4.19 bug Scott Murray
2003-01-08 20:44   ` [Pcihpd-discuss] " Rusty Lynch
2003-01-08 20:59     ` Rusty Lynch
2003-01-10 22:08       ` Scott Murray

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=200301081946.h08Jksh06332@linux.intel.com \
    --to=rusty@linux.co.intel.com \
    --cc=greg@kroah.com \
    --cc=harold.yang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcihpd-discuss@lists.sourceforge.net \
    --cc=scottm@somanetworks.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