summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-10-19 14:26:05 -0500
committerMike Isely <isely@pobox.com>2008-10-19 14:26:05 -0500
commitfb62eda9894fa969ba3b15cce9f32fd74bdc42e7 (patch)
tree7d30343c4e32a488872c27f18270e0176c031e86 /linux
parent3beaddc560d35b83ba5793dcbe8c3a49ac58cdc7 (diff)
downloadmediapointer-dvb-s2-fb62eda9894fa969ba3b15cce9f32fd74bdc42e7.tar.gz
mediapointer-dvb-s2-fb62eda9894fa969ba3b15cce9f32fd74bdc42e7.tar.bz2
pvrusb2: Fix deadlock problem
From: Mike Isely <isely@pobox.com> Fix deadlock problem in 2.6.27 caused by new USB core behavior in response to a USB device reset request. With older kernels, the USB device reset was "in line"; the reset simply took place and the driver retained its association with the hardware. However now this reset triggers a disconnect, and worse still the disconnect callback happens in the context of the caller who asked for the device reset. This results in an attempt by the pvrusb2 driver to recursively take a mutex it already has, which deadlocks the driver's worker thread. (Even if the disconnect callback were to happen on a different thread we'd still have problems however - because while the driver should survive and correctly disconnect / reconnect, it will then trigger another device reset during the repeated initialization, which will then cause another disconect, etc, forever.) The fix here is simply to not attempt the device reset (it was of marginal value anyway). Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index b79829f8a..6a1edbe93 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -61,7 +61,6 @@ static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL};
static DEFINE_MUTEX(pvr2_unit_mtx);
static int ctlchg;
-static int initusbreset = 1;
static int procreload;
static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 };
static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 };
@@ -72,8 +71,6 @@ module_param(ctlchg, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value");
module_param(init_pause_msec, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(init_pause_msec, "hardware initialization settling delay");
-module_param(initusbreset, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(initusbreset, "Do USB reset device on probe");
module_param(procreload, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(procreload,
"Attempt init failure recovery with firmware reload");
@@ -1984,9 +1981,6 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
}
hdw->fw1_state = FW1_STATE_OK;
- if (initusbreset) {
- pvr2_hdw_device_reset(hdw);
- }
if (!pvr2_hdw_dev_ok(hdw)) return;
for (idx = 0; idx < hdw->hdw_desc->client_modules.cnt; idx++) {