[1516] in linux-net channel archive

home help back first fref pref prev next nref lref last post

3c505 [patch]

daemon@ATHENA.MIT.EDU (Philip Blundell)
Tue Dec 12 22:46:53 1995

Date: Tue, 12 Dec 1995 15:12:45 +0000 (GMT)
From: Philip Blundell <pjb27@cam.ac.uk>
To: linux-net@vger.rutgers.edu

The current 3c505 driver autoprobes recklessly, without checking that the 
region it's attacking hasn't already been claimed.  This short patch 
fixes it to be slightly less antisocial.

--- linux-1.3.45-old/drivers/net/3c505.c	Sat Dec  2 15:41:04 1995
+++ linux/drivers/net/3c505.c	Mon Dec 11 19:34:33 1995
@@ -1284,9 +1284,13 @@
 	int addr=dev->base_addr;
 	const char *name=dev->name;
 	long flags;
+	byte orig_HCR, orig_HSR;
 
-	byte orig_HCR=inb_control(addr),
-		orig_HSR=inb_status(addr);
+	if (check_region(addr, 0xf)) 
+	  return -1;  
+
+	orig_HCR=inb_control(addr);
+	orig_HSR=inb_status(addr);
 
 	if (elp_debug > 0)
 		printk(search_msg, name, addr);


--
philip blundell trinity college cambridge 01223 356256 pjb27@cam.ac.uk


home help back first fref pref prev next nref lref last post