speedtch TODO, 1.1, 1.2 cxacru.c, 1.43, 1.44 usbatm.c, 1.63,
1.64 usbatm.h, 1.31, 1.32
Duncan Sands
duncan at infradead.org
Wed Feb 1 06:06:04 EST 2006
Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv15394
Modified Files:
TODO cxacru.c usbatm.c usbatm.h
Log Message:
Add TODO file. Resync with kernel tree (semaphore -> mutex changes). Don't
know what Kbuild is doing here - it didn't change.
Index: TODO
===================================================================
RCS file: /home/cvs/speedtch/TODO,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TODO 16 Jan 2006 19:38:30 -0000 1.1
+++ TODO 1 Feb 2006 11:06:01 -0000 1.2
@@ -4,3 +4,4 @@
-- work out why speed is limited to 4Mb
-- try to recover when a speedtch needing 512 download before
firmware upload is used with dl_512_first=0
+-- bandwidth problems when using iso?
Index: cxacru.c
===================================================================
RCS file: /home/cvs/speedtch/cxacru.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- cxacru.c 12 Jan 2006 15:04:05 -0000 1.43
+++ cxacru.c 1 Feb 2006 11:06:01 -0000 1.44
@@ -36,6 +36,7 @@
#include <linux/init.h>
#include <linux/device.h> /* FIXME: linux/firmware.h should include it itself */
#include <linux/firmware.h>
+#include <linux/mutex.h>
#include "usbatm.h"
@@ -160,7 +161,7 @@
struct work_struct poll_work;
/* contol handles */
- struct semaphore cm_serialize;
+ struct mutex cm_serialize;
u8 *rcv_buf;
u8 *snd_buf;
struct urb *rcv_urb;
@@ -219,7 +220,7 @@
goto fail;
}
- down(&instance->cm_serialize);
+ mutex_lock(&instance->cm_serialize);
/* submit reading urb before the writing one */
init_completion(&instance->rcv_done);
@@ -288,7 +289,7 @@
ret = offd;
dbg("cm %#x", cm);
fail:
- up(&instance->cm_serialize);
+ mutex_unlock(&instance->cm_serialize);
return ret;
}
@@ -717,7 +718,7 @@
instance->snd_buf, PAGE_SIZE,
cxacru_blocking_completion, &instance->snd_done, 4);
- init_MUTEX(&instance->cm_serialize);
+ mutex_init(&instance->cm_serialize);
INIT_WORK(&instance->poll_work, (void *)cxacru_poll_status, instance);
Index: usbatm.c
===================================================================
RCS file: /home/cvs/speedtch/usbatm.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- usbatm.c 12 Jan 2006 15:38:35 -0000 1.63
+++ usbatm.c 1 Feb 2006 11:06:01 -0000 1.64
@@ -207,7 +207,7 @@
** urbs **
************/
-static inline struct urb *usbatm_pop_urb(struct usbatm_channel *channel)
+static struct urb *usbatm_pop_urb(struct usbatm_channel *channel)
{
struct urb *urb;
@@ -224,7 +224,7 @@
return urb;
}
-static inline int usbatm_submit_urb(struct urb *urb)
+static int usbatm_submit_urb(struct urb *urb)
{
struct usbatm_channel *channel = urb->context;
int ret;
@@ -823,7 +823,7 @@
return -EINVAL;
}
- down(&instance->serialize); /* vs self, usbatm_atm_close, usbatm_usb_disconnect */
+ mutex_lock(&instance->serialize); /* vs self, usbatm_atm_close, usbatm_usb_disconnect */
if (instance->disconnected) {
atm_dbg(instance, "%s: disconnected!\n", __func__);
@@ -867,7 +867,7 @@
set_bit(ATM_VF_PARTIAL, &vcc->flags);
set_bit(ATM_VF_READY, &vcc->flags);
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
atm_dbg(instance, "%s: allocated vcc data 0x%p\n", __func__, new);
@@ -875,7 +875,7 @@
fail:
kfree(new);
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
return ret;
}
@@ -896,7 +896,7 @@
usbatm_cancel_send(instance, vcc);
- down(&instance->serialize); /* vs self, usbatm_atm_open, usbatm_usb_disconnect */
+ mutex_lock(&instance->serialize); /* vs self, usbatm_atm_open, usbatm_usb_disconnect */
tasklet_disable(&instance->rx_channel.tasklet);
if (instance->cached_vcc == vcc_data) {
@@ -919,7 +919,7 @@
clear_bit(ATM_VF_PARTIAL, &vcc->flags);
clear_bit(ATM_VF_ADDR, &vcc->flags);
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
atm_dbg(instance, "%s successful\n", __func__);
}
@@ -1009,9 +1009,9 @@
if (!ret)
ret = usbatm_atm_init(instance);
- down(&instance->serialize);
+ mutex_lock(&instance->serialize);
instance->thread_pid = -1;
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
complete_and_exit(&instance->thread_exited, ret);
}
@@ -1025,9 +1025,9 @@
return ret;
}
- down(&instance->serialize);
+ mutex_lock(&instance->serialize);
instance->thread_pid = ret;
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
wait_for_completion(&instance->thread_started);
@@ -1110,7 +1110,7 @@
/* private fields */
kref_init(&instance->refcount); /* dropped in usbatm_usb_disconnect */
- init_MUTEX(&instance->serialize);
+ mutex_init(&instance->serialize);
instance->thread_pid = -1;
init_completion(&instance->thread_started);
@@ -1273,18 +1273,18 @@
usb_set_intfdata(intf, NULL);
- down(&instance->serialize);
+ mutex_lock(&instance->serialize);
instance->disconnected = 1;
if (instance->thread_pid >= 0)
kill_proc(instance->thread_pid, SIGTERM, 1);
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
wait_for_completion(&instance->thread_exited);
- down(&instance->serialize);
+ mutex_lock(&instance->serialize);
list_for_each_entry(vcc_data, &instance->vcc_list, list)
vcc_release_async(vcc_data->vcc, -EPIPE);
- up(&instance->serialize);
+ mutex_unlock(&instance->serialize);
tasklet_disable(&instance->rx_channel.tasklet);
tasklet_disable(&instance->tx_channel.tasklet);
Index: usbatm.h
===================================================================
RCS file: /home/cvs/speedtch/usbatm.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- usbatm.h 12 Jan 2006 15:38:35 -0000 1.31
+++ usbatm.h 1 Feb 2006 11:06:01 -0000 1.32
@@ -34,6 +34,7 @@
#include <linux/list.h>
#include <linux/stringify.h>
#include <linux/usb.h>
+#include <linux/mutex.h>
/*
#define VERBOSE_DEBUG
@@ -171,7 +172,7 @@
********************************/
struct kref refcount;
- struct semaphore serialize;
+ struct mutex serialize;
int disconnected;
/* heavy init */
More information about the Usbatm-commits
mailing list