Fix typo that prevents port reset after several retries.

This commit is contained in:
mlelstv 2007-06-30 09:17:45 +00:00
parent cbc58c76f0
commit e044ee54b9
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb_subr.c,v 1.147 2007/05/20 09:24:55 mlelstv Exp $ */
/* $NetBSD: usb_subr.c,v 1.148 2007/06/30 09:17:45 mlelstv Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.147 2007/05/20 09:24:55 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.148 2007/06/30 09:17:45 mlelstv Exp $");
#include "opt_compat_netbsd.h"
#include "opt_usbverbose.h"
@ -1051,7 +1051,7 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
if (!err)
break;
usbd_delay_ms(dev, 200);
if ((i % 3) == 3) {
if ((i & 3) == 3) {
DPRINTFN(-1,("usbd_new_device: set address %d "
"failed - trying a port reset\n", addr));
usbd_reset_port(up->parent, port, &ps);