[parisc-linux-cvs] 2.4.18-pa11, fixed pcnet32 driver, removed harmony debugging message

Helge Deller deller@gmx.de
Tue, 26 Mar 2002 21:58:53 +0100


--------------Boundary-00=_5AMLNKH3I6ELNRFXAQ9U
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

On Tuesday 26 March 2002 21:59, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux
> Changes by:	deller	02/03/26 13:59:01
>
> Modified files:
> 	.              : Makefile
> 	drivers/sound  : harmony.c
> 	drivers/net    : pcnet32.c
>
> Log message:
> 2.4.18-pa11:
> - fixed pcnet32 again and removed a bug which prevented it to work as module 
> - removed a harmony debugging message



--------------Boundary-00=_5AMLNKH3I6ELNRFXAQ9U
Content-Type: text/plain;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="diff"

Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.281
diff -u -p -r1.281 Makefile
--- Makefile	2002/03/26 05:20:22	1.281
+++ Makefile	2002/03/26 20:57:15
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 18
-EXTRAVERSION = -pa10
+EXTRAVERSION = -pa11
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: drivers/sound/harmony.c
===================================================================
RCS file: /var/cvs/linux/drivers/sound/harmony.c,v
retrieving revision 1.26
diff -u -p -r1.26 harmony.c
--- drivers/sound/harmony.c	2002/03/25 22:11:40	1.26
+++ drivers/sound/harmony.c	2002/03/26 20:57:16
@@ -646,8 +646,9 @@ static int harmony_audio_ioctl(struct in
 						ival = AFMT_S16_BE;
 						break; 
 			default: {
-				printk(KERN_WARNING PFX "unsupported sound format 0x%04x requested.\n",
-						ival);
+				DPRINTK(KERN_WARNING PFX 
+					"unsupported sound format 0x%04x requested.\n",
+					ival);
 				return -EINVAL;
 			}
 			}
Index: drivers/net/pcnet32.c
===================================================================
RCS file: /var/cvs/linux/drivers/net/pcnet32.c,v
retrieving revision 1.17
diff -u -p -r1.17 pcnet32.c
--- drivers/net/pcnet32.c	2002/02/26 00:45:09	1.17
+++ drivers/net/pcnet32.c	2002/03/26 20:57:18
@@ -12,26 +12,7 @@
  *
  *	This driver is for PCnet32 and PCnetPCI based ethercards
  */
-<<<<<<< pcnet32.c
 
-=======
-/**************************************************************************
- *  23 Oct, 2000.
- *  Fixed a few bugs, related to running the controller in 32bit mode.
- *
- *  Carsten Langgaard, carstenl@mips.com
- *  Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
- *
- *************************************************************************/
-
-#define DRV_NAME	"pcnet32"
-#define DRV_VERSION	"1.25kf"
-#define DRV_RELDATE	"17.11.2001"
-
-static const char *version =
-DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n";
-
->>>>>>> 1.1.1.13
 #include <linux/module.h>
 
 #include <linux/kernel.h>
@@ -45,8 +26,6 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELD
 #include <linux/pci.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#include <linux/ethtool.h>
-#include <linux/mii.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -60,8 +39,8 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELD
 #include <linux/spinlock.h>
 
 #define DRV_NAME	"pcnet32"
-#define DRV_VERSION	"v1.27"
-#define DRV_DATE	"2001/10/06"
+#define DRV_VERSION	"v1.27a"
+#define DRV_DATE	"2002/03/26"
 #define PFX		DRV_NAME ": "
 
 static char version[] __devinitdata =
@@ -97,15 +76,15 @@ static struct net_device *pcnet32_dev;
 static int max_interrupt_work = 80;
 static int rx_copybreak = 200;
 
-#define PCNET32_PORT_AUI      0x00
-#define PCNET32_PORT_10BT     0x01
-#define PCNET32_PORT_GPSI     0x02
-#define PCNET32_PORT_MII      0x03
-
-#define PCNET32_PORT_PORTSEL  0x03
-#define PCNET32_PORT_ASEL     0x04
-#define PCNET32_PORT_100      0x40
-#define PCNET32_PORT_FD	      0x80
+#define PORT_AUI      0x00
+#define PORT_10BT     0x01
+#define PORT_GPSI     0x02
+#define PORT_MII      0x03
+
+#define PORT_PORTSEL  0x03
+#define PORT_ASEL     0x04
+#define PORT_100      0x40
+#define PORT_FD	      0x80
 
 #define PCNET32_DMA_MASK 0xffffffff
 
@@ -114,22 +93,22 @@ static int rx_copybreak = 200;
  * to internal options
  */
 static unsigned char options_mapping[] = {
-    PCNET32_PORT_ASEL,			   /*  0 Auto-select	  */
-    PCNET32_PORT_AUI,			   /*  1 BNC/AUI	  */
-    PCNET32_PORT_AUI,			   /*  2 AUI/BNC	  */ 
-    PCNET32_PORT_ASEL,			   /*  3 not supported	  */
-    PCNET32_PORT_10BT | PCNET32_PORT_FD,	   /*  4 10baseT-FD	  */
-    PCNET32_PORT_ASEL,			   /*  5 not supported	  */
-    PCNET32_PORT_ASEL,			   /*  6 not supported	  */
-    PCNET32_PORT_ASEL,			   /*  7 not supported	  */
-    PCNET32_PORT_ASEL,			   /*  8 not supported	  */
-    PCNET32_PORT_MII,			   /*  9 MII 10baseT	  */
-    PCNET32_PORT_MII | PCNET32_PORT_FD,		   /* 10 MII 10baseT-FD	  */
-    PCNET32_PORT_MII,			   /* 11 MII (autosel)	  */
-    PCNET32_PORT_10BT,			   /* 12 10BaseT	  */
-    PCNET32_PORT_MII | PCNET32_PORT_100,	   /* 13 MII 100BaseTx	  */
-    PCNET32_PORT_MII | PCNET32_PORT_100 | PCNET32_PORT_FD, /* 14 MII 100BaseTx-FD */
-    PCNET32_PORT_ASEL			   /* 15 not supported	  */
+    PORT_ASEL,			   /*  0 Auto-select	  */
+    PORT_AUI,			   /*  1 BNC/AUI	  */
+    PORT_AUI,			   /*  2 AUI/BNC	  */ 
+    PORT_ASEL,			   /*  3 not supported	  */
+    PORT_10BT | PORT_FD,	   /*  4 10baseT-FD	  */
+    PORT_ASEL,			   /*  5 not supported	  */
+    PORT_ASEL,			   /*  6 not supported	  */
+    PORT_ASEL,			   /*  7 not supported	  */
+    PORT_ASEL,			   /*  8 not supported	  */
+    PORT_MII,			   /*  9 MII 10baseT	  */
+    PORT_MII | PORT_FD,		   /* 10 MII 10baseT-FD	  */
+    PORT_MII,			   /* 11 MII (autosel)	  */
+    PORT_10BT,			   /* 12 10BaseT	  */
+    PORT_MII | PORT_100,	   /* 13 MII 100BaseTx	  */
+    PORT_MII | PORT_100 | PORT_FD, /* 14 MII 100BaseTx-FD */
+    PORT_ASEL			   /* 15 not supported	  */
 };
 
 #define MAX_UNITS 8	/* More are supported, limit only on options */
@@ -219,6 +198,7 @@ static int full_duplex[MAX_UNITS];
  * 	   new pcnet32vlb module option, HP-PARISC support,
  * 	   added module parameter descriptions, 
  * 	   initial ethtool support - Helge Deller <deller@gmx.de>
+ * v1.27a  make it work as module - Helge Deller <deller@gmx.de>
  */
 
 
@@ -320,7 +300,6 @@ struct pcnet32_private {
     unsigned int	cur_rx, cur_tx;	/* The next free ring entry */
     unsigned int	dirty_rx, dirty_tx; /* The ring entries to be free()ed. */
     struct net_device_stats stats;
-<<<<<<< pcnet32.c
     char		tx_full;
     int			options;
     int	shared_irq:1,			/* shared irq possible */
@@ -329,18 +308,6 @@ struct pcnet32_private {
 	full_duplex:1,			/* full duplex possible */
 	mii:1;				/* mii port available */
     struct net_device	*next;
-=======
-    char tx_full;
-    int	 options;
-    int	 shared_irq:1,			/* shared irq possible */
-	ltint:1,
-#ifdef DO_DXSUFLO
-      dxsuflo:1,			    /* disable transmit stop on uflo */
-#endif
-	mii:1;					/* mii port available */
-    struct net_device *next;
-    struct mii_if_info mii_if;
->>>>>>> 1.1.1.13
 };
 
 static void pcnet32_probe_vlbus(void);
@@ -355,13 +322,7 @@ static void pcnet32_interrupt(int, void 
 static int  pcnet32_close(struct net_device *);
 static struct net_device_stats *pcnet32_get_stats(struct net_device *);
 static void pcnet32_set_multicast_list(struct net_device *);
-<<<<<<< pcnet32.c
 static int  pcnet32_ioctl(struct net_device *, struct ifreq *, int);
-=======
-static int  pcnet32_ioctl(struct net_device *, struct ifreq *, int);
-static int mdio_read(struct net_device *dev, int phy_id, int reg_num);
-static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val);
->>>>>>> 1.1.1.13
 
 enum pci_flags_bit {
     PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
@@ -494,9 +455,9 @@ pcnet32_probe_vlbus(void)
 	if (!check_region(ioaddr, PCNET32_TOTAL_SIZE)) {
 	    /* check if there is really a pcnet chip on that ioaddr */
 	    if ((inb(ioaddr + 14) == 0x57) &&
-		(inb(ioaddr + 15) == 0x57) &&
-		(pcnet32_probe1(ioaddr, 0, 0, cards_found, NULL) == 0))
-		cards_found++;
+		(inb(ioaddr + 15) == 0x57)) {
+		pcnet32_probe1(ioaddr, 0, 0, cards_found, NULL);
+	    }
 	}
     }
 }
@@ -669,7 +630,6 @@ pcnet32_probe1(unsigned long ioaddr, uns
 	dev->dev_addr[2*i] = val & 0x0ff;
 	dev->dev_addr[2*i+1] = (val >> 8) & 0x0ff;
     }
-<<<<<<< pcnet32.c
 
     /* read PROM address and compare with CSR address */
     for (i = 0; i < 6; i++)
@@ -689,26 +649,6 @@ pcnet32_probe1(unsigned long ioaddr, uns
 	memcpy(dev->dev_addr, promaddr, 6);
 #else
 	printk(KERN_INFO "    using CSR address of");
-=======
-    {
-	u8 promaddr[6];
-	for (i = 0; i < 6; i++) {
-	    promaddr[i] = inb(ioaddr + i);
-	}
-	if( memcmp( promaddr, dev->dev_addr, 6) )
-	{
-	    printk(" warning PROM address does not match CSR address\n");
-#if defined(__i386__)
-	    printk(KERN_WARNING "%s: Probably a Compaq, using the PROM address of", dev->name);
-	    memcpy(dev->dev_addr, promaddr, 6);
-#elif defined(__powerpc__)
-	    if (!is_valid_ether_addr(dev->dev_addr)
-		&& is_valid_ether_addr(promaddr)) {
-		    printk("\n" KERN_WARNING "%s: using PROM address:",
-			   dev->name);
-		    memcpy(dev->dev_addr, promaddr, 6);
-	    }
->>>>>>> 1.1.1.13
 #endif
     }
 				    
@@ -762,36 +702,18 @@ pcnet32_probe1(unsigned long ioaddr, uns
     dev->priv = lp;
     lp->name = chipname;
     lp->shared_irq = shared;
-<<<<<<< pcnet32.c
     lp->full_duplex = fdx;
-=======
-    lp->mii_if.full_duplex = fdx;
-#ifdef DO_DXSUFLO
->>>>>>> 1.1.1.13
     lp->dxsuflo = dxsuflo;
     lp->ltint = ltint;
     lp->mii = mii;
-<<<<<<< pcnet32.c
     if ((card_idx >= MAX_UNITS) || (options[card_idx] > sizeof(options_mapping)))
 	lp->options = PORT_ASEL;
-=======
-    if (options[card_idx] > sizeof (options_mapping))
-	lp->options = PCNET32_PORT_ASEL;
->>>>>>> 1.1.1.13
     else
 	lp->options = options_mapping[options[card_idx]];
-    lp->mii_if.dev = dev;
-    lp->mii_if.mdio_read = mdio_read;
-    lp->mii_if.mdio_write = mdio_write;
     
-<<<<<<< pcnet32.c
     if (fdx && !(lp->options & PORT_ASEL) && 
 		((card_idx>=MAX_UNITS) || full_duplex[card_idx]))
 	lp->options |= PORT_FD;
-=======
-    if (fdx && !(lp->options & PCNET32_PORT_ASEL) && full_duplex[card_idx])
-	lp->options |= PCNET32_PORT_FD;
->>>>>>> 1.1.1.13
     
     if (!a) {
       printk(KERN_ERR PFX "No access methods\n");
@@ -803,7 +725,7 @@ pcnet32_probe1(unsigned long ioaddr, uns
     
     /* detect special T1/E1 WAN card by checking for MAC address */
     if (dev->dev_addr[0] == 0x00 && dev->dev_addr[1] == 0xe0 && dev->dev_addr[2] == 0x75)
-	lp->options = PCNET32_PORT_FD | PCNET32_PORT_GPSI;
+	lp->options = PORT_FD | PORT_GPSI;
 
     lp->init_block.mode = le16_to_cpu(0x0003);	/* Disable Rx and Tx. */
     lp->init_block.tlen_rlen = le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); 
@@ -865,6 +787,9 @@ pcnet32_probe1(unsigned long ioaddr, uns
 
     /* Fill in the generic fields of the device structure. */
     ether_setup(dev);
+    
+    cards_found++;
+
     return 0;
 }
 
@@ -902,16 +827,16 @@ pcnet32_open(struct net_device *dev)
     
     /* set/reset autoselect bit */
     val = lp->a.read_bcr (ioaddr, 2) & ~2;
-    if (lp->options & PCNET32_PORT_ASEL)
+    if (lp->options & PORT_ASEL)
 	val |= 2;
     lp->a.write_bcr (ioaddr, 2, val);
     
     /* handle full duplex setting */
-    if (lp->mii_if.full_duplex) {
+    if (lp->full_duplex) {
 	val = lp->a.read_bcr (ioaddr, 9) & ~3;
-	if (lp->options & PCNET32_PORT_FD) {
+	if (lp->options & PORT_FD) {
 	    val |= 1;
-	    if (lp->options == (PCNET32_PORT_FD | PCNET32_PORT_AUI))
+	    if (lp->options == (PORT_FD | PORT_AUI))
 		val |= 2;
 	}
 	lp->a.write_bcr (ioaddr, 9, val);
@@ -919,19 +844,19 @@ pcnet32_open(struct net_device *dev)
     
     /* set/reset GPSI bit in test register */
     val = lp->a.read_csr (ioaddr, 124) & ~0x10;
-    if ((lp->options & PCNET32_PORT_PORTSEL) == PCNET32_PORT_GPSI)
+    if ((lp->options & PORT_PORTSEL) == PORT_GPSI)
 	val |= 0x10;
     lp->a.write_csr (ioaddr, 124, val);
     
-    if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) {
+    if (lp->mii && !(lp->options & PORT_ASEL)) {
 	val = lp->a.read_bcr (ioaddr, 32) & ~0x38; /* disable Auto Negotiation, set 10Mpbs, HD */
-	if (lp->options & PCNET32_PORT_FD)
+	if (lp->options & PORT_FD)
 	    val |= 0x10;
-	if (lp->options & PCNET32_PORT_100)
+	if (lp->options & PORT_100)
 	    val |= 0x08;
 	lp->a.write_bcr (ioaddr, 32, val);
     } else {
-	if (lp->options & PCNET32_PORT_ASEL) {  /* enable auto negotiate, setup, disable fd */
+	if (lp->options & PORT_ASEL) {  /* enable auto negotiate, setup, disable fd */
 		val = lp->a.read_bcr(ioaddr, 32) & ~0x98;
 		val |= 0x20;
 		lp->a.write_bcr (ioaddr, 32, val);
@@ -952,7 +877,7 @@ pcnet32_open(struct net_device *dev)
 	lp->a.write_csr (ioaddr, 5, val);
     }
    
-    lp->init_block.mode = le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7);
+    lp->init_block.mode = le16_to_cpu((lp->options & PORT_PORTSEL) << 7);
     lp->init_block.filter[0] = 0x00000000;
     lp->init_block.filter[1] = 0x00000000;
     if (pcnet32_init_ring(dev))
@@ -1561,9 +1486,9 @@ static void pcnet32_set_multicast_list(s
     if (dev->flags&IFF_PROMISC) {
 	/* Log any net taps. */
 	printk(KERN_INFO "%s: Promiscuous mode enabled.\n", dev->name);
-	lp->init_block.mode = le16_to_cpu(0x8000 | (lp->options & PCNET32_PORT_PORTSEL) << 7);
+	lp->init_block.mode = le16_to_cpu(0x8000 | (lp->options & PORT_PORTSEL) << 7);
     } else {
-	lp->init_block.mode = le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7);
+	lp->init_block.mode = le16_to_cpu((lp->options & PORT_PORTSEL) << 7);
 	pcnet32_load_multicast (dev);
     }
     
@@ -1572,7 +1497,6 @@ static void pcnet32_set_multicast_list(s
     pcnet32_restart(dev, 0x0042); /*  Resume normal operation */
 }
 
-<<<<<<< pcnet32.c
 
 /*
  * Provide ethtool interface
@@ -1609,144 +1533,11 @@ static int netdev_ethtool_ioctl(struct n
 /* Provide ioctl() calls to examine the MII xcvr state. */
 static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
-=======
-static int mdio_read(struct net_device *dev, int phy_id, int reg_num)
-{
-	struct pcnet32_private *lp = dev->priv;
-	unsigned long ioaddr = dev->base_addr;
-	u16 val_out;
-	int phyaddr;
-
-	if (!lp->mii)
-		return 0;
-		
-	phyaddr = lp->a.read_bcr(ioaddr, 33);
-
-	lp->a.write_bcr(ioaddr, 33, ((phy_id & 0x1f) << 5) | (reg_num & 0x1f));
-	val_out = lp->a.read_bcr(ioaddr, 34);
-	lp->a.write_bcr(ioaddr, 33, phyaddr);
-	
-	return val_out;
-}
-
-static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val)
-{
-	struct pcnet32_private *lp = dev->priv;
-	unsigned long ioaddr = dev->base_addr;
-	int phyaddr;
-
-	if (!lp->mii)
-		return;
-		
-	phyaddr = lp->a.read_bcr(ioaddr, 33);
-
-	lp->a.write_bcr(ioaddr, 33, ((phy_id & 0x1f) << 5) | (reg_num & 0x1f));
-	lp->a.write_bcr(ioaddr, 34, val);
-	lp->a.write_bcr(ioaddr, 33, phyaddr);
-}
-
-static int pcnet32_ethtool_ioctl (struct net_device *dev, void *useraddr)
-{
-	struct pcnet32_private *lp = dev->priv;
-	u32 ethcmd;
-	int phyaddr = 0;
-	int phy_id = 0;
-	unsigned long ioaddr = dev->base_addr;
-
-	if (lp->mii) {
-		phyaddr = lp->a.read_bcr (ioaddr, 33);
-		phy_id = (phyaddr >> 5) & 0x1f;
-		lp->mii_if.phy_id = phy_id;
-	}
-
-	if (copy_from_user (&ethcmd, useraddr, sizeof (ethcmd)))
-		return -EFAULT;
-
-	switch (ethcmd) {
-	case ETHTOOL_GDRVINFO: {
-		struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
-		strcpy (info.driver, DRV_NAME);
-		strcpy (info.version, DRV_VERSION);
-		if (lp->pci_dev)
-			strcpy (info.bus_info, lp->pci_dev->slot_name);
-		else
-			sprintf(info.bus_info, "VLB 0x%lx", dev->base_addr);
-		if (copy_to_user (useraddr, &info, sizeof (info)))
-			return -EFAULT;
-		return 0;
-	}
-
-	/* get settings */
-	case ETHTOOL_GSET: {
-		struct ethtool_cmd ecmd = { ETHTOOL_GSET };
-		spin_lock_irq(&lp->lock);
-		mii_ethtool_gset(&lp->mii_if, &ecmd);
-		spin_unlock_irq(&lp->lock);
-		if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
-			return -EFAULT;
-		return 0;
-	}
-	/* set settings */
-	case ETHTOOL_SSET: {
-		int r;
-		struct ethtool_cmd ecmd;
-		if (copy_from_user(&ecmd, useraddr, sizeof(ecmd)))
-			return -EFAULT;
-		spin_lock_irq(&lp->lock);
-		r = mii_ethtool_sset(&lp->mii_if, &ecmd);
-		spin_unlock_irq(&lp->lock);
-		return r;
-	}
-	/* restart autonegotiation */
-	case ETHTOOL_NWAY_RST: {
-		return mii_nway_restart(&lp->mii_if);
-	}
-	/* get link status */
-	case ETHTOOL_GLINK: {
-		struct ethtool_value edata = {ETHTOOL_GLINK};
-		edata.data = mii_link_ok(&lp->mii_if);
-		if (copy_to_user(useraddr, &edata, sizeof(edata)))
-			return -EFAULT;
-		return 0;
-	}
-
-	/* get message-level */
-	case ETHTOOL_GMSGLVL: {
-		struct ethtool_value edata = {ETHTOOL_GMSGLVL};
-		edata.data = pcnet32_debug;
-		if (copy_to_user(useraddr, &edata, sizeof(edata)))
-			return -EFAULT;
-		return 0;
-	}
-	/* set message-level */
-	case ETHTOOL_SMSGLVL: {
-		struct ethtool_value edata;
-		if (copy_from_user(&edata, useraddr, sizeof(edata)))
-			return -EFAULT;
-		pcnet32_debug = edata.data;
-		return 0;
-	}
-	default:
-		break;
-	}
-
-	return -EOPNOTSUPP;
-}
-
-static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-{
->>>>>>> 1.1.1.13
     unsigned long ioaddr = dev->base_addr;
     struct pcnet32_private *lp = dev->priv;	 
-<<<<<<< pcnet32.c
     struct mii_ioctl_data *data = (struct mii_ioctl_data *) &rq->ifr_data;
     int phyaddr = lp->a.read_bcr(ioaddr, 33);
-=======
-    struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;
-    int phyaddr = lp->a.read_bcr (ioaddr, 33);
->>>>>>> 1.1.1.13
 
-<<<<<<< pcnet32.c
     if (!lp || !lp->mii)
 	    return -ENODEV;
     
@@ -1776,54 +1567,14 @@ static int pcnet32_ioctl(struct net_devi
 	return -EOPNOTSUPP;
     } /* switch (cmd) */
 
-=======
-    if (cmd == SIOCETHTOOL)
-	return pcnet32_ethtool_ioctl(dev, (void *) rq->ifr_data);
-
-    if (lp->mii) {
-	switch(cmd) {
-	case SIOCGMIIPHY:		/* Get address of MII PHY in use. */
-	case SIOCDEVPRIVATE:		/* for binary compat, remove in 2.5 */
-	    data->phy_id = (phyaddr >> 5) & 0x1f;
-	    /* Fall Through */
-	case SIOCGMIIREG:		/* Read MII PHY register. */
-	case SIOCDEVPRIVATE+1:		/* for binary compat, remove in 2.5 */
-	    lp->a.write_bcr (ioaddr, 33, ((data->phy_id & 0x1f) << 5) | (data->reg_num & 0x1f));
-	    data->val_out = lp->a.read_bcr (ioaddr, 34);
-	    lp->a.write_bcr (ioaddr, 33, phyaddr);
-	    return 0;
-	case SIOCSMIIREG:		/* Write MII PHY register. */
-	case SIOCDEVPRIVATE+2:		/* for binary compat, remove in 2.5 */
-	    if (!capable(CAP_NET_ADMIN))
-		return -EPERM;
-	    lp->a.write_bcr (ioaddr, 33, ((data->phy_id & 0x1f) << 5) | (data->reg_num & 0x1f));
-	    lp->a.write_bcr (ioaddr, 34, data->val_in);
-	    lp->a.write_bcr (ioaddr, 33, phyaddr);
-	    return 0;
-	default:
-	    return -EOPNOTSUPP;
-	}
-    }
->>>>>>> 1.1.1.13
     return -EOPNOTSUPP;
 }
-<<<<<<< pcnet32.c
 
 
-=======
-					    
->>>>>>> 1.1.1.13
 static struct pci_driver pcnet32_driver = {
-<<<<<<< pcnet32.c
     name:	DRV_NAME,
     probe:	pcnet32_probe_pci,
     id_table:	pcnet32_pci_tbl,
-=======
-	name:		DRV_NAME,
-	probe:		pcnet32_probe_pci,
-	remove:		NULL,
-	id_table:	pcnet32_pci_tbl,
->>>>>>> 1.1.1.13
 };
 
 MODULE_PARM(debug, "i");
@@ -1843,6 +1594,7 @@ MODULE_PARM_DESC(full_duplex, DRV_NAME "
 
 MODULE_AUTHOR("Thomas Bogendoerfer");
 MODULE_DESCRIPTION("Driver for PCnet32 and PCnetPCI based ethercards");
+MODULE_LICENSE("GPL");
 
 /* An additional parameter that may be passed in... */
 static int debug = -1;
@@ -1866,7 +1618,8 @@ static int __init pcnet32_init_module(vo
 	pcnet32_probe_vlbus();
 
     if (cards_found)
-	printk(KERN_INFO PFX "%d cards_found.\n", cards_found);
+	printk(KERN_INFO PFX "%d card%s found.\n", cards_found, 
+			cards_found ==1 ? "":"s");
     
     return cards_found ? 0 : -ENODEV;
 }
@@ -1899,4 +1652,3 @@ module_exit(pcnet32_cleanup_module);
  *  tab-width: 8
  * End:
  */
-

--------------Boundary-00=_5AMLNKH3I6ELNRFXAQ9U--