This commit is contained in:
skrll 2016-03-13 07:01:43 +00:00
parent c3509e5280
commit 349519764b
6 changed files with 30 additions and 30 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ehci.c,v 1.247 2015/12/11 07:21:09 skrll Exp $ */
/* $NetBSD: ehci.c,v 1.248 2016/03/13 07:01:43 skrll Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.247 2015/12/11 07:21:09 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.248 2016/03/13 07:01:43 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@ -2789,7 +2789,7 @@ ehci_alloc_sqh(ehci_softc_t *sc)
#endif
if (err)
return (NULL);
for(i = 0; i < EHCI_SQH_CHUNK; i++) {
for (i = 0; i < EHCI_SQH_CHUNK; i++) {
offs = i * EHCI_SQH_SIZE;
sqh = KERNADDR(&dma, offs);
sqh->physaddr = DMAADDR(&dma, offs);
@ -2835,7 +2835,7 @@ ehci_alloc_sqtd(ehci_softc_t *sc)
if (err)
goto done;
for(i = 0; i < EHCI_SQTD_CHUNK; i++) {
for (i = 0; i < EHCI_SQTD_CHUNK; i++) {
offs = i * EHCI_SQTD_SIZE;
sqtd = KERNADDR(&dma, offs);
sqtd->physaddr = DMAADDR(&dma, offs);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ohci.c,v 1.258 2015/11/30 13:27:09 skrll Exp $ */
/* $NetBSD: ohci.c,v 1.259 2016/03/13 07:01:43 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.258 2015/11/30 13:27:09 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.259 2016/03/13 07:01:43 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -423,7 +423,7 @@ ohci_alloc_std(ohci_softc_t *sc)
OHCI_TD_ALIGN, &dma);
if (err)
return (NULL);
for(i = 0; i < OHCI_STD_CHUNK; i++) {
for (i = 0; i < OHCI_STD_CHUNK; i++) {
offs = i * OHCI_STD_SIZE;
std = KERNADDR(&dma, offs);
std->physaddr = DMAADDR(&dma, offs);
@ -585,7 +585,7 @@ ohci_alloc_sitd(ohci_softc_t *sc)
OHCI_ITD_ALIGN, &dma);
if (err)
return (NULL);
for(i = 0; i < OHCI_SITD_CHUNK; i++) {
for (i = 0; i < OHCI_SITD_CHUNK; i++) {
offs = i * OHCI_SITD_SIZE;
sitd = KERNADDR(&dma, offs);
sitd->physaddr = DMAADDR(&dma, offs);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uaudio.c,v 1.144 2015/01/26 20:56:44 gson Exp $ */
/* $NetBSD: uaudio.c,v 1.145 2016/03/13 07:01:43 skrll Exp $ */
/*
* Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.144 2015/01/26 20:56:44 gson Exp $");
__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.145 2016/03/13 07:01:43 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -2957,7 +2957,7 @@ uaudio_chan_rintr(usbd_xfer_handle xfer, usbd_private_handle priv,
* Transfer data from channel buffer to upper layer buffer, taking
* care of wrapping the upper layer buffer.
*/
for(i = 0; i < UAUDIO_NFRAMES; i++) {
for (i = 0; i < UAUDIO_NFRAMES; i++) {
frsize = cb->sizes[i];
n = min(frsize, ch->end - ch->cur);
memcpy(ch->cur, cb->buffer + cb->offsets[i], n);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ugen.c,v 1.131 2016/02/22 08:06:47 skrll Exp $ */
/* $NetBSD: ugen.c,v 1.132 2016/03/13 07:01:43 skrll Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.131 2016/02/22 08:06:47 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.132 2016/03/13 07:01:43 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -469,7 +469,7 @@ ugenopen(dev_t dev, int flag, int mode, struct lwp *l)
sce->ibuf = NULL;
return (EIO);
}
for(i = 0; i < UGEN_NISOREQS; ++i) {
for (i = 0; i < UGEN_NISOREQS; ++i) {
sce->isoreqs[i].sce = sce;
xfer = usbd_alloc_xfer(sc->sc_udev);
if (xfer == 0)
@ -482,7 +482,7 @@ ugenopen(dev_t dev, int flag, int mode, struct lwp *l)
goto bad;
}
sce->isoreqs[i].dmabuf = tbuf;
for(j = 0; j < UGEN_NISORFRMS; ++j)
for (j = 0; j < UGEN_NISORFRMS; ++j)
sce->isoreqs[i].sizes[j] = isize;
usbd_setup_isoc_xfer
(xfer, sce->pipeh, &sce->isoreqs[i],

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhci.c,v 1.266 2015/08/19 06:23:35 skrll Exp $ */
/* $NetBSD: uhci.c,v 1.267 2016/03/13 07:01:43 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.266 2015/08/19 06:23:35 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.267 2016/03/13 07:01:43 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -489,7 +489,7 @@ uhci_init(uhci_softc_t *sc)
* queue heads and the interrupt queue heads at the control
* queue head and point the physical frame list to the virtual.
*/
for(i = 0; i < UHCI_VFRAMELIST_COUNT; i++) {
for (i = 0; i < UHCI_VFRAMELIST_COUNT; i++) {
std = uhci_alloc_std(sc);
sqh = uhci_alloc_sqh(sc);
if (std == NULL || sqh == NULL)
@ -618,9 +618,9 @@ uhci_allocm(struct usbd_bus *bus, usb_dma_t *dma, u_int32_t size)
stds = kmem_alloc(sizeof(uhci_soft_td_t *) * n, KM_SLEEP);
if (!stds)
return USBD_NOMEM;
for(i = 0; i < n; i++)
for (i = 0; i < n; i++)
stds[i] = uhci_alloc_std(sc);
for(i = 0; i < n; i++)
for (i = 0; i < n; i++)
if (stds[i] != NULL)
uhci_free_std(sc, stds[i]);
kmem_free(stds, sizeof(uhci_soft_td_t *) * n);
@ -899,7 +899,7 @@ uhci_dump_tds(uhci_soft_td_t *std)
uhci_soft_td_t *td;
int stop;
for(td = std; td != NULL; td = td->link.std) {
for (td = std; td != NULL; td = td->link.std) {
uhci_dump_td(td);
/* Check whether the link pointer in this TD marks
@ -1783,7 +1783,7 @@ uhci_run(uhci_softc_t *sc, int run, int locked)
else
cmd &= ~UHCI_CMD_RS;
UHCICMD(sc, cmd);
for(n = 0; n < 10; n++) {
for (n = 0; n < 10; n++) {
running = !(UREAD2(sc, UHCI_STS) & UHCI_STS_HCH);
/* return when we've entered the state we want */
if (run == running) {
@ -1871,7 +1871,7 @@ uhci_alloc_sqh(uhci_softc_t *sc)
UHCI_QH_ALIGN, &dma);
if (err)
return (0);
for(i = 0; i < UHCI_SQH_CHUNK; i++) {
for (i = 0; i < UHCI_SQH_CHUNK; i++) {
offs = i * UHCI_SQH_SIZE;
sqh = KERNADDR(&dma, offs);
sqh->physaddr = DMAADDR(&dma, offs);
@ -2478,7 +2478,7 @@ uhci_device_intr_close(usbd_pipe_handle pipe)
*/
usb_delay_ms_locked(&sc->sc_bus, 2, &sc->sc_lock);
for(i = 0; i < npoll; i++)
for (i = 0; i < npoll; i++)
uhci_free_sqh(sc, upipe->u.intr.qhs[i]);
kmem_free(upipe->u.intr.qhs, npoll * sizeof(uhci_soft_qh_t *));
@ -3042,7 +3042,7 @@ uhci_device_intr_done(usbd_xfer_handle xfer)
KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
npoll = upipe->u.intr.npoll;
for(i = 0; i < npoll; i++) {
for (i = 0; i < npoll; i++) {
sqh = upipe->u.intr.qhs[i];
sqh->elink = NULL;
sqh->qh.qh_elink = htole32(UHCI_PTR_T);
@ -3277,7 +3277,7 @@ uhci_device_setintr(uhci_softc_t *sc, struct uhci_pipe *upipe, int ival)
DPRINTFN(1, ("uhci_device_setintr: bw=%d offs=%d\n", bestbw, bestoffs));
mutex_enter(&sc->sc_lock);
for(i = 0; i < npoll; i++) {
for (i = 0; i < npoll; i++) {
upipe->u.intr.qhs[i] = sqh = uhci_alloc_sqh(sc);
sqh->elink = NULL;
sqh->qh.qh_elink = htole32(UHCI_PTR_T);
@ -3290,7 +3290,7 @@ uhci_device_setintr(uhci_softc_t *sc, struct uhci_pipe *upipe, int ival)
#undef MOD
/* Enter QHs into the controller data structures. */
for(i = 0; i < npoll; i++)
for (i = 0; i < npoll; i++)
uhci_add_intr(sc, upipe->u.intr.qhs[i]);
mutex_exit(&sc->sc_lock);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhub.c,v 1.131 2016/02/16 07:51:13 skrll Exp $ */
/* $NetBSD: uhub.c,v 1.132 2016/03/13 07:01:43 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/*
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.131 2016/02/16 07:51:13 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.132 2016/03/13 07:01:43 skrll Exp $");
#include <sys/param.h>
@ -654,7 +654,7 @@ uhub_detach(device_t self, int flags)
KERNEL_LOCK(1, curlwp);
nports = hub->hubdesc.bNbrPorts;
for(port = 0; port < nports; port++) {
for (port = 0; port < nports; port++) {
rup = &hub->ports[port];
if (rup->device == NULL)
continue;