diff options
author | joe <joe@FreeBSD.org> | 2002-04-07 12:38:16 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-04-07 12:38:16 +0000 |
commit | 32884f59a7377d9539319421d6ec9e108ae5a46b (patch) | |
tree | 749c1d7f11e13f703d3f6efe890e757bbd735b9e /sys/dev/usb/usbdi.c | |
parent | 08b00aca9e269d2ad577b8847f9536347ec40d0d (diff) | |
download | FreeBSD-src-32884f59a7377d9539319421d6ec9e108ae5a46b.zip FreeBSD-src-32884f59a7377d9539319421d6ec9e108ae5a46b.tar.gz |
MFNetBSD:
revision 1.92
date: 2001/12/12 15:38:58; author: augustss; state: Exp; lines: +7 -3
Some more paranoia checks when DIAGNOSTIC.
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r-- | sys/dev/usb/usbdi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 99e61f4..9723e04 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.89 2001/12/02 23:25:25 augustss Exp $ */ +/* $NetBSD: usbdi.c,v 1.92 2001/12/12 15:38:58 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -358,9 +358,13 @@ usbd_alloc_buffer(usbd_xfer_handle xfer, u_int32_t size) struct usbd_bus *bus = xfer->device->bus; usbd_status err; +#ifdef DIAGNOSTIC + if (xfer->rqflags & (URQ_DEV_DMABUF | URQ_AUTO_DMABUF)) + printf("usbd_alloc_buffer: xfer already has a buffer\n"); +#endif err = bus->methods->allocm(bus, &xfer->dmabuf, size); if (err) - return (0); + return (NULL); xfer->rqflags |= URQ_DEV_DMABUF; return (KERNADDR(&xfer->dmabuf, 0)); } |