[PATCH] update info about available iseries_veth interfaces

Olaf Hering olh at suse.de
Wed Jun 2 03:51:39 EST 2004


 On Fri, May 14, Dave Boutcher wrote:

> Cooperative patch developed by olh and ntl that fixes a couple of nasty
> lurking bugs in viopath.c and adds information required to know if the
> iseries_veth module should be loaded on legacy iSeries systems.
>

/proc/iSeries/config contains now the number of configured virtual
ethernet adapters.
AVAILABLE_VETH should only indicate if there is at least one interface
available, iseries_veth must be loaded in this case.

printing the entire map will give installers some hints about what
interface numbers will appear and how the MAC address may look like.


diff -p -purN linux-2.6.7-rc2-bk2/arch/ppc64/kernel/viopath.c linux-2.6.7-rc2-bk2.ppc64/arch/ppc64/kernel/viopath.c
--- linux-2.6.7-rc2-bk2/arch/ppc64/kernel/viopath.c	2004-06-01 18:58:45.000000000 +0200
+++ linux-2.6.7-rc2-bk2.ppc64/arch/ppc64/kernel/viopath.c	2004-06-01 19:02:34.000000000 +0200
@@ -191,7 +191,6 @@ static int proc_viopath_show(struct seq_
 {
 	char *buf;
 	u16 vlanMap;
-	int vlanIndex;
 	dma_addr_t handle;
 	HvLpEvent_Rc hvrc;
 	DECLARE_MUTEX_LOCKED(Semaphore);
@@ -219,17 +218,10 @@ static int proc_viopath_show(struct seq_
 	down(&Semaphore);

 	vlanMap = HvLpConfig_getVirtualLanIndexMap();
-	vlanIndex = 0;
-	while (vlanMap != 0){
-		if (vlanMap & 0x8000)
-			vlanIndex++;;
-		vlanMap = vlanMap << 1;
-	}

 	buf[PAGE_SIZE-1] = '\0';
 	seq_printf(m, "%s", buf);
-
-	seq_printf(m, "AVAILABLE_VETH=%d\n", vlanIndex );
+	seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap);
 	seq_printf(m, "SRLNBR=%c%c%c%c%c%c%c\n",
 		   e2a(xItExtVpdPanel.mfgID[2]),
 		   e2a(xItExtVpdPanel.mfgID[3]),


--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list