speedtch usbatm2.c,1.9,1.10
Duncan Sands
duncan at infradead.org
Mon Jan 24 09:41:34 EST 2005
Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv23151
Modified Files:
usbatm2.c
Log Message:
Fix some ATM initialisation buglets. I decided to leave the atm device
parameter in the atm_start/atm_stop calls for the moment.
Index: usbatm2.c
===================================================================
RCS file: /home/cvs/speedtch/usbatm2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- usbatm2.c 24 Jan 2005 10:52:55 -0000 1.9
+++ usbatm2.c 24 Jan 2005 14:41:31 -0000 1.10
@@ -779,6 +779,9 @@
{
struct usbatm_data *instance = dev->dev_data;
+ if (!instance)
+ return;
+
dev->dev_data = NULL;
udsl_put_instance(instance); /* taken in usbatm_atm_init */
}
@@ -976,7 +979,7 @@
goto fail;
}
- udsl_get_instance(instance); /* dropped in udsl_atm_dev_close */
+ instance->atm_dev = atm_dev;
atm_dev->ci_range.vpi_bits = ATM_CI_MAX;
atm_dev->ci_range.vci_bits = ATM_CI_MAX;
@@ -985,15 +988,12 @@
/* temp init ATM device, set to 128kbit */
atm_dev->link_rate = 128 * 1000 / 424;
- atm_dev = atm_dev;
-
if (instance->driver->atm_start && ((ret = instance->driver->atm_start(instance, atm_dev)) < 0))
goto fail_close;
- instance->atm_dev = atm_dev;
-
/* ready for ATM callbacks */
- wmb();
+ udsl_get_instance(instance); /* dropped in udsl_atm_dev_close */
+ mb();
atm_dev->dev_data = instance;
up(&instance->serialize);
@@ -1001,6 +1001,7 @@
return 0;
fail_close:
+ instance->atm_dev = NULL;
shutdown_atm_dev(atm_dev); /* udsl_atm_dev_close will eventually be called */
fail:
More information about the Usbatm-commits
mailing list