diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index f58b1fbf..c68182f0 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,8 @@ +2009-05-26 Mike Frysinger + + * src/tap/cable/xpc.c: fix crash when USB device is busy (Florian Fainelli) + + 2009-05-26 Arnim Laeuger * src/bus/bf561_ezkit.c, src/bus/sharc21065l.c, src/bus/bf537_stamp.c, diff --git a/urjtag/src/tap/cable/xpc.c b/urjtag/src/tap/cable/xpc.c index 777a397b..b080249f 100644 --- a/urjtag/src/tap/cable/xpc.c +++ b/urjtag/src/tap/cable/xpc.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,