patch-2.4.20 linux-2.4.20/drivers/net/wan/sdlamain.c

Next file: linux-2.4.20/drivers/net/wan/syncppp.c
Previous file: linux-2.4.20/drivers/net/wan/sdla_ft1.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/net/wan/sdlamain.c linux-2.4.20/drivers/net/wan/sdlamain.c
@@ -604,7 +604,13 @@
 
   	/* Reserve I/O region and schedule background task */
         if(card->hw.type != SDLA_S514 && !card->wandev.piggyback)
-                request_region(card->hw.port, card->hw.io_range, wandev->name);
+		if (!request_region(card->hw.port, card->hw.io_range, 
+				wandev->name)) {
+			printk(KERN_WARNING "port 0x%04x busy\n", card->hw.port);
+			release_hw(card);
+			wandev->state = WAN_UNCONFIGURED;
+			return -EBUSY;
+	  }
 
 	/* Only use the polling routine for the X25 protocol */
 	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)