public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Oops pcnet32 ethernet driver on Compaq Deskpro 5100
@ 2001-08-04  4:46 kern
  2001-08-05 13:46 ` Szabolcs Szakacsits
  2001-08-10  7:56 ` Paul Gortmaker
  0 siblings, 2 replies; 3+ messages in thread
From: kern @ 2001-08-04  4:46 UTC (permalink / raw)
  To: linux-kernel

hey -

I am getting the following oops when I try to insert the pcnet32 ethernet
driver on an older Compaq 5100 (Pentium 100 with onboard ethernet
controller) and rh7.1

When the machine boots the module loads Ok, I only get this error when I
rmmod pcnet32 and then modprobe to reinsert it.

The ethernet card will not work - ifconfig will not show it although
ifconfig eth0 will show the interface.

any pointers about how I might get this onboard interface to work or am I
better advised to buy a pci ethernet card?

cheers
Mark


[root@pup /etc]# modprobe pcnet32
Note: /etc/modules.conf is more recent than /lib/modules/2.4.2-2/modules.dep
Unable to handle kernel paging request at virtual address c3833e20
 printing eip:
c019ee7d
pgd entry c1702c38: 00000000010ee063
pmd entry c1702c38: 00000000010ee063
pte entry c10ee0cc: 0000000000000000
... pte not present!
Oops: 0002
CPU:    0
EIP:    0010:[<c019ee7d>]
EFLAGS: 00010246
eax: c3833e20   ebx: c3824000   ecx: 00000040   edx: c0258164
esi: c3826e20   edi: 00000000   ebp: 00000060   esp: c16fff08
ds: 0018   es: 0018   ss: 0018
Process modprobe (pid: 666, stackpage=c16ff000)
Stack: c3824000 00000000 00000000 c3826124 c3826e20 c3824000 00000000 00000000
       00000060 c0116ff7 00000000 c1662000 00002e60 c1663000 00000060 ffffffea
       00000007 c232c800 00000060 c0256ce0 c3824060 00002fd0 00000000 00000000
Call Trace: [<c3824000>] [<c3826124>] [<c3826e20>] [<c3824000>] [<c0116ff7>] [<c3824060>] [<c0108fb3>]

Code: 89 30 8b 1d c8 60 26 c0 81 fb c8 60 26 c0 74 23 8d 76 00 53
Segmentation fault
pcnet32                12240   1  (initializing)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Oops pcnet32 ethernet driver on Compaq Deskpro 5100
  2001-08-04  4:46 Oops pcnet32 ethernet driver on Compaq Deskpro 5100 kern
@ 2001-08-05 13:46 ` Szabolcs Szakacsits
  2001-08-10  7:56 ` Paul Gortmaker
  1 sibling, 0 replies; 3+ messages in thread
From: Szabolcs Szakacsits @ 2001-08-05 13:46 UTC (permalink / raw)
  To: kern; +Cc: linux-kernel


On Sat, 4 Aug 2001 kern@wolf.ericsson.net.nz wrote:

> I am getting the following oops when I try to insert the pcnet32 ethernet
> driver on an older Compaq 5100 (Pentium 100 with onboard ethernet
> controller) and rh7.1

Get the RH 7.1 kernel update
	http://www.redhat.com/support/errata/RHSA-2001-084.html
or upgrade your kernel to a recent one. You have an old pcnet32 card
that needs 16 bit init first but some early 2.4 (and the RH 7.1 shipped)
kernel did 32 bit init.

	Szaka


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Oops pcnet32 ethernet driver on Compaq Deskpro 5100
  2001-08-04  4:46 Oops pcnet32 ethernet driver on Compaq Deskpro 5100 kern
  2001-08-05 13:46 ` Szabolcs Szakacsits
@ 2001-08-10  7:56 ` Paul Gortmaker
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 2001-08-10  7:56 UTC (permalink / raw)
  To: kern; +Cc: linux-kernel


kern@wolf.ericsson.net.nz wrote:
> 
> hey -
> 
> I am getting the following oops when I try to insert the pcnet32 ethernet
> driver on an older Compaq 5100 (Pentium 100 with onboard ethernet
> controller) and rh7.1
> 
> When the machine boots the module loads Ok, I only get this error when I
> rmmod pcnet32 and then modprobe to reinsert it.
 
I posted a fix for this in January, but looking at pcnet32 (2.4.7) I
see that it never made it in.  Hrrm, I see there is an I/O resource leak
in the driver as well.  Okay, this should fix both - please test.

Paul.

--- drivers/net/pcnet32.c~	Thu Aug  9 16:33:37 2001
+++ drivers/net/pcnet32.c	Thu Aug  9 18:35:30 2001
@@ -179,6 +179,7 @@
  * v1.25kf Added No Interrupt on successful Tx for some Tx's <kaf@fc.hp.com>
  * v1.26   Converted to pci_alloc_consistent, Jamey Hicks / George France
  *                                           <jamey@crl.dec.com>
+ * v1.26p Fix oops on rmmod+insmod; plug i/o resource leak - Paul Gortmaker
  */
 
 
@@ -510,6 +511,7 @@
 pcnet32_probe1(unsigned long ioaddr, unsigned char irq_line, int shared, int card_idx, struct pci_dev *pdev)
 {
     struct pcnet32_private *lp;
+    struct resource *res;
     dma_addr_t lp_dma_addr;
     int i,media,fdx = 0, mii = 0, fset = 0;
 #ifdef DO_DXSUFLO
@@ -682,11 +684,15 @@
     }
 
     dev->base_addr = ioaddr;
-    request_region(ioaddr, PCNET32_TOTAL_SIZE, chipname);
+    res = request_region(ioaddr, PCNET32_TOTAL_SIZE, chipname);
+    if (res == NULL)
+	return -EBUSY;
     
     /* pci_alloc_consistent returns page-aligned memory, so we do not have to check the alignment */
-    if ((lp = pci_alloc_consistent(pdev, sizeof(*lp), &lp_dma_addr)) == NULL)
+    if ((lp = pci_alloc_consistent(pdev, sizeof(*lp), &lp_dma_addr)) == NULL) {
+	release_resource(res);
 	return -ENOMEM;
+    }
 
     memset(lp, 0, sizeof(*lp));
     lp->dma_addr = lp_dma_addr;
@@ -715,6 +721,7 @@
     if (a == NULL) {
       printk(KERN_ERR "pcnet32: No access methods\n");
       pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr);
+      release_resource(res);
       return -ENODEV;
     }
     lp->a = *a;
@@ -762,6 +769,7 @@
 	else {
 	    printk(", failed to detect IRQ line.\n");
 	    pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr);
+	    release_resource(res);
 	    return -ENODEV;
 	}
     }
@@ -1579,6 +1587,8 @@
 	next_dev = lp->next;
 	unregister_netdev(pcnet32_dev);
 	release_region(pcnet32_dev->base_addr, PCNET32_TOTAL_SIZE);
+	if (lp->pci_dev != NULL)
+	    pci_unregister_driver(&pcnet32_driver);
         pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr);
 	kfree(pcnet32_dev);
 	pcnet32_dev = next_dev;



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-10  8:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-04  4:46 Oops pcnet32 ethernet driver on Compaq Deskpro 5100 kern
2001-08-05 13:46 ` Szabolcs Szakacsits
2001-08-10  7:56 ` Paul Gortmaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox