Date: Thu, 3 Aug 2006 15:00:59 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 103118 for review Message-ID: <200608031500.k73F0xf6035730@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103118 Change 103118 by hselasky@hselasky_mini_itx on 2006/08/03 15:00:54 Allow mutex passed to usbd_do_request_flags_mtx(), to be recursed. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#13 (text+ko) ==== @@ -1199,6 +1199,7 @@ struct usbd_config usbd_config[1] = { /* zero */ }; struct usbd_xfer *xfer = NULL; u_int16_t length = UGETW(req->wLength); + u_int32_t level = 0; usbd_status err; usbd_config[0].type = UE_CONTROL; @@ -1210,9 +1211,8 @@ usbd_config[0].callback = &usbd_default_callback; if (mtx) { - mtx_assert(mtx, MA_OWNED); + level = mtx_drop_recurse(mtx); mtx_unlock(mtx); - mtx_assert(mtx, MA_NOTOWNED); } /* setup transfer */ @@ -1221,6 +1221,7 @@ if (mtx) { mtx_lock(mtx); + mtx_pickup_recurse(mtx, level); } if(err)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608031500.k73F0xf6035730>