Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2008 18:35:46 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 132726 for review
Message-ID:  <200801071835.m07IZkF6099689@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132726

Change 132726 by hselasky@hselasky_laptop001 on 2008/01/07 18:35:22

	
	Fix a LOR. This code is called from the
	explore thread, so it is safe to drop the
	locks.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#100 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#100 (text+ko) ====

@@ -3371,6 +3371,8 @@
 				PRINTFN(0, ("alt setting no change\n"));
 				break;
 			}
+			mtx_unlock(xfer->priv_mtx);
+
 			usbd_detach_device(udev, req.wIndex[0], 1);
 
 			error = usbd_set_alt_interface_index(udev,
@@ -3378,14 +3380,17 @@
 			if (error) {
 				PRINTFN(0, ("alt setting failed %s\n",
 				    usbd_errstr(error)));
+				mtx_lock(xfer->priv_mtx);
 				goto tr_stalled;
 			}
 			error = usbd_probe_and_attach(udev,
 			    req.wIndex[0]);
 			if (error) {
 				PRINTFN(0, ("alt setting probe failed\n"));
+				mtx_lock(xfer->priv_mtx);
 				goto tr_stalled;
 			}
+			mtx_lock(xfer->priv_mtx);
 			break;
 		default:
 			goto tr_stalled;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801071835.m07IZkF6099689>