usb_controller.c (199816) | usb_controller.c (205005) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/controller/usb_controller.c 199816 2009-11-26 00:43:17Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/controller/usb_controller.c 205005 2010-03-11 08:33:39Z thompsa $ */ |
2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 | 2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 |
27#include "opt_ddb.h" 28 |
|
27#include <sys/stdint.h> 28#include <sys/stddef.h> 29#include <sys/param.h> 30#include <sys/queue.h> 31#include <sys/types.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> --- 180 unchanged lines hidden (view full) --- 215 bus->do_probe = 0; 216 bus->driver_added_refcount++; 217 } 218 if (bus->driver_added_refcount == 0) { 219 /* avoid zero, hence that is memory default */ 220 bus->driver_added_refcount = 1; 221 } 222 | 29#include <sys/stdint.h> 30#include <sys/stddef.h> 31#include <sys/param.h> 32#include <sys/queue.h> 33#include <sys/types.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/bus.h> --- 180 unchanged lines hidden (view full) --- 217 bus->do_probe = 0; 218 bus->driver_added_refcount++; 219 } 220 if (bus->driver_added_refcount == 0) { 221 /* avoid zero, hence that is memory default */ 222 bus->driver_added_refcount = 1; 223 } 224 |
225#ifdef DDB |
|
223 /* 224 * The following three lines of code are only here to 225 * recover from DDB: 226 */ 227 usb_proc_rewakeup(&bus->control_xfer_proc); 228 usb_proc_rewakeup(&bus->giant_callback_proc); 229 usb_proc_rewakeup(&bus->non_giant_callback_proc); | 226 /* 227 * The following three lines of code are only here to 228 * recover from DDB: 229 */ 230 usb_proc_rewakeup(&bus->control_xfer_proc); 231 usb_proc_rewakeup(&bus->giant_callback_proc); 232 usb_proc_rewakeup(&bus->non_giant_callback_proc); |
233#endif |
|
230 231 USB_BUS_UNLOCK(bus); 232 233 /* 234 * First update the USB power state! 235 */ 236 usb_bus_powerd(bus); 237 --- 46 unchanged lines hidden (view full) --- 284{ 285 struct usb_bus *bus = arg; 286 287 USB_BUS_LOCK_ASSERT(bus, MA_OWNED); 288 289 usb_callout_reset(&bus->power_wdog, 290 4 * hz, usb_power_wdog, arg); 291 | 234 235 USB_BUS_UNLOCK(bus); 236 237 /* 238 * First update the USB power state! 239 */ 240 usb_bus_powerd(bus); 241 --- 46 unchanged lines hidden (view full) --- 288{ 289 struct usb_bus *bus = arg; 290 291 USB_BUS_LOCK_ASSERT(bus, MA_OWNED); 292 293 usb_callout_reset(&bus->power_wdog, 294 4 * hz, usb_power_wdog, arg); 295 |
296#ifdef DDB |
|
292 /* 293 * The following line of code is only here to recover from 294 * DDB: 295 */ 296 usb_proc_rewakeup(&bus->explore_proc); /* recover from DDB */ | 297 /* 298 * The following line of code is only here to recover from 299 * DDB: 300 */ 301 usb_proc_rewakeup(&bus->explore_proc); /* recover from DDB */ |
302#endif |
|
297 298 USB_BUS_UNLOCK(bus); 299 300 usb_bus_power_update(bus); 301 302 USB_BUS_LOCK(bus); 303} 304 --- 269 unchanged lines hidden --- | 303 304 USB_BUS_UNLOCK(bus); 305 306 usb_bus_power_update(bus); 307 308 USB_BUS_LOCK(bus); 309} 310 --- 269 unchanged lines hidden --- |