public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB speedtouch: don't open a connection if no firmware
@ 2003-04-08  7:26 Duncan Sands
  2003-04-08 20:12 ` [linux-usb-devel] " Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Duncan Sands @ 2003-04-08  7:26 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: Greg KH, linux-kernel

People using Alcatel's closed source firmware loader "speedmgmt" may need
to sleep longer before launching pppd.

--- redux-2.5/drivers/usb/misc/speedtch.c	2003-04-08 08:49:33.000000000 +0200
+++ bollux-2.5/drivers/usb/misc/speedtch.c	2003-04-04 13:44:11.000000000 +0200
@@ -816,9 +816,6 @@
 		return -ENODEV;
 	}
 
-	if (!instance->firmware_loaded)
-		return -EAGAIN;
-
 	if (vcc->qos.aal != ATM_AAL5) {
 		dbg ("unsupported ATM type %d!", vcc->qos.aal);
 		return -EINVAL;
@@ -933,6 +930,11 @@
 	if (vcc->qos.aal != ATM_AAL5)
 		return -EINVAL;
 
+	if (!instance->firmware_loaded) {
+		dbg ("firmware not loaded!");
+		return -EAGAIN;
+	}
+
 	down (&instance->serialize); /* vs self, udsl_atm_close */
 
 	if (udsl_find_vcc (instance, vpi, vci)) {
@@ -967,13 +969,12 @@
 
 	dbg ("Allocated new SARLib vcc 0x%p with vpi %d vci %d", new, vpi, vci);
 
-	MOD_INC_USE_COUNT;
-
-	if (instance->firmware_loaded)
-		udsl_fire_receivers (instance);
+	udsl_fire_receivers (instance);
 
 	dbg ("udsl_atm_open successful");
 
+	MOD_INC_USE_COUNT;
+
 	return 0;
 }
 
@@ -1041,6 +1042,7 @@
 		int ret;
 
 		if ((ret = usb_set_interface (instance->usb_dev, 1, 1)) < 0) {
+			dbg ("usb_set_interface returned %d!", ret);
 			up (&instance->serialize);
 			return ret;
 		}

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <OF50785981.C7D592CC-ON85256D02.007454B5-85256D02.007ACB50@wsib.on.ca>]

end of thread, other threads:[~2003-04-09 23:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-08  7:26 [PATCH] USB speedtouch: don't open a connection if no firmware Duncan Sands
2003-04-08 20:12 ` [linux-usb-devel] " Greg KH
2003-04-08 20:22   ` Duncan Sands
2003-04-08 21:40     ` Greg KH
2003-04-09  8:28       ` Duncan Sands
2003-04-09 23:31         ` Greg KH
     [not found] <OF50785981.C7D592CC-ON85256D02.007454B5-85256D02.007ACB50@wsib.on.ca>
2003-04-09  8:31 ` Duncan Sands

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