fix by Florian Fainelli:

I finally tracked down the issue being in the xpc_ext_done, which calls 
xpcu_output_enable while we could not claim the device, this simply fails 
since the usb_handler is not valid. The xpc_ext_done callback is there to 
reset the status of the JTAG cable on exit, but we should actually reset the 
state on initialization no matter what was the status before calling urjtag. 
Since we are performing the reset in the initilization callback, we can now 
remove xpc_ext_done and call urj_tap_cable_generic_usbconn_done().


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1630 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 16 years ago
parent 4e9a94cd7e
commit 85e8aec92e

@ -1,3 +1,8 @@
2009-05-26 Mike Frysinger <vapier@gentoo.org>
* src/tap/cable/xpc.c: fix crash when USB device is busy (Florian Fainelli)
2009-05-26 Arnim Laeuger <arniml>
* src/bus/bf561_ezkit.c, src/bus/sharc21065l.c, src/bus/bf537_stamp.c,

@ -388,6 +388,8 @@ xpc_ext_init (urj_cable_t *cable)
xpcu = ((urj_usbconn_libusb_param_t *) (cable->link.usb->params))->handle;
if (r == URJ_STATUS_OK)
r = xpcu_output_enable (xpcu, 0);
if (r == URJ_STATUS_OK)
r = xpcu_request_28 (xpcu, 0x11);
if (r == URJ_STATUS_OK)
@ -411,17 +413,6 @@ xpc_ext_init (urj_cable_t *cable)
/* ---------------------------------------------------------------------- */
static void
xpc_ext_done (urj_cable_t *cable)
{
struct usb_dev_handle *xpcu;
xpcu = ((urj_usbconn_libusb_param_t *) (cable->link.usb->params))->handle;
xpcu_output_enable (xpcu, 0);
urj_tap_cable_generic_usbconn_done (cable);
}
/* ---------------------------------------------------------------------- */
static void
xpc_ext_free (urj_cable_t *cable)
{
@ -722,7 +713,7 @@ urj_cable_driver_t urj_tap_cable_xpc_ext_driver = {
urj_tap_cable_generic_disconnect,
xpc_ext_free,
xpc_ext_init,
xpc_ext_done,
urj_tap_cable_generic_usbconn_done,
urj_tap_cable_generic_set_frequency,
xpc_ext_clock,
xpc_ext_get_tdo,

Loading…
Cancel
Save