Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Some white space fixes from FreeBSD.
details: https://anonhg.NetBSD.org/src/rev/67ee6dee87a3
branches: trunk
changeset: 521694:67ee6dee87a3
user: augustss <augustss%NetBSD.org@localhost>
date: Sun Feb 03 18:15:20 2002 +0000
description:
Some white space fixes from FreeBSD.
diffstat:
sys/dev/usb/ohci.c | 135 ++++++++++++++++++++++++-------------------------
sys/dev/usb/uhci.c | 143 +++++++++++++++++++++++++---------------------------
sys/dev/usb/usb.c | 34 ++++++------
3 files changed, 152 insertions(+), 160 deletions(-)
diffs (truncated from 1256 to 300 lines):
diff -r b5d92d7230ab -r 67ee6dee87a3 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Sun Feb 03 17:41:03 2002 +0000
+++ b/sys/dev/usb/ohci.c Sun Feb 03 18:15:20 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.119 2001/12/31 12:20:35 augustss Exp $ */
+/* $NetBSD: ohci.c,v 1.120 2002/02/03 18:15:20 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
/*
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.119 2001/12/31 12:20:35 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.120 2002/02/03 18:15:20 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -200,10 +200,10 @@
Static void ohci_device_isoc_close(usbd_pipe_handle);
Static void ohci_device_isoc_done(usbd_xfer_handle);
-Static usbd_status ohci_device_setintr(ohci_softc_t *sc,
+Static usbd_status ohci_device_setintr(ohci_softc_t *sc,
struct ohci_pipe *pipe, int ival);
-Static int ohci_str(usb_string_descriptor_t *, int, char *);
+Static int ohci_str(usb_string_descriptor_t *, int, const char *);
Static void ohci_timeout(void *);
Static void ohci_timeout_task(void *);
@@ -238,7 +238,7 @@
#define OREAD4(sc, r) (OBARR(sc), bus_space_read_4((sc)->iot, (sc)->ioh, (r)))
/* Reverse the bits in a value 0 .. 31 */
-Static u_int8_t revbits[OHCI_NO_INTRS] =
+Static u_int8_t revbits[OHCI_NO_INTRS] =
{ 0x00, 0x10, 0x08, 0x18, 0x04, 0x14, 0x0c, 0x1c,
0x02, 0x12, 0x0a, 0x1a, 0x06, 0x16, 0x0e, 0x1e,
0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0d, 0x1d,
@@ -288,7 +288,7 @@
ohci_freex,
};
-Static struct usbd_pipe_methods ohci_root_ctrl_methods = {
+Static struct usbd_pipe_methods ohci_root_ctrl_methods = {
ohci_root_ctrl_transfer,
ohci_root_ctrl_start,
ohci_root_ctrl_abort,
@@ -297,7 +297,7 @@
ohci_root_ctrl_done,
};
-Static struct usbd_pipe_methods ohci_root_intr_methods = {
+Static struct usbd_pipe_methods ohci_root_intr_methods = {
ohci_root_intr_transfer,
ohci_root_intr_start,
ohci_root_intr_abort,
@@ -306,7 +306,7 @@
ohci_root_intr_done,
};
-Static struct usbd_pipe_methods ohci_device_ctrl_methods = {
+Static struct usbd_pipe_methods ohci_device_ctrl_methods = {
ohci_device_ctrl_transfer,
ohci_device_ctrl_start,
ohci_device_ctrl_abort,
@@ -315,7 +315,7 @@
ohci_device_ctrl_done,
};
-Static struct usbd_pipe_methods ohci_device_intr_methods = {
+Static struct usbd_pipe_methods ohci_device_intr_methods = {
ohci_device_intr_transfer,
ohci_device_intr_start,
ohci_device_intr_abort,
@@ -324,7 +324,7 @@
ohci_device_intr_done,
};
-Static struct usbd_pipe_methods ohci_device_bulk_methods = {
+Static struct usbd_pipe_methods ohci_device_bulk_methods = {
ohci_device_bulk_transfer,
ohci_device_bulk_start,
ohci_device_bulk_abort,
@@ -370,7 +370,7 @@
if (sc->sc_child != NULL)
rv = config_detach(sc->sc_child, flags);
-
+
if (rv != 0)
return (rv);
@@ -494,7 +494,7 @@
dataphys = DMAADDR(dma);
dataphysend = OHCI_PAGE(dataphys + len - 1);
tdflags = htole32(
- (rd ? OHCI_TD_IN : OHCI_TD_OUT) |
+ (rd ? OHCI_TD_IN : OHCI_TD_OUT) |
(flags & USBD_SHORT_XFER_OK ? OHCI_TD_R : 0) |
OHCI_TD_NOCC | OHCI_TD_TOGGLE_CARRY | OHCI_TD_NOINTR);
@@ -510,7 +510,7 @@
curlen = len;
} else {
/* must use multiple TDs, fill as much as possible. */
- curlen = 2 * OHCI_PAGE_SIZE -
+ curlen = 2 * OHCI_PAGE_SIZE -
(dataphys & (OHCI_PAGE_SIZE-1));
/* the length must be a multiple of the max size */
curlen -= curlen % UGETW(opipe->pipe.endpoint->edesc->wMaxPacketSize);
@@ -571,7 +571,7 @@
#if 0
Static void
-ohci_free_std_chain(ohci_softc_t *sc, ohci_soft_td_t *std,
+ohci_free_std_chain(ohci_softc_t *sc, ohci_soft_td_t *std,
ohci_soft_td_t *stdend)
{
ohci_soft_td_t *p;
@@ -662,7 +662,7 @@
OHCI_REV_LEGACY(rev) ? ", legacy support" : "");
if (OHCI_REV_HI(rev) != 1 || OHCI_REV_LO(rev) != 0) {
- printf("%s: unsupported OHCI revision\n",
+ printf("%s: unsupported OHCI revision\n",
USBDEVNAME(sc->sc_bus.bdev));
sc->sc_bus.usbrev = USBREV_UNKNOWN;
return (USBD_INVAL);
@@ -678,7 +678,7 @@
/* XXX determine alignment by R/W */
/* Allocate the HCCA area. */
- err = usb_allocmem(&sc->sc_bus, OHCI_HCCA_SIZE,
+ err = usb_allocmem(&sc->sc_bus, OHCI_HCCA_SIZE,
OHCI_HCCA_ALIGN, &sc->sc_hccadma);
if (err)
return (err);
@@ -730,12 +730,12 @@
sed->next = psed;
sed->ed.ed_nexted = htole32(psed->physaddr);
}
- /*
+ /*
* Fill HCCA interrupt table. The bit reversal is to get
* the tree set up properly to spread the interrupts.
*/
for (i = 0; i < OHCI_NO_INTRS; i++)
- sc->sc_hcca->hcca_interrupt_table[revbits[i]] =
+ sc->sc_hcca->hcca_interrupt_table[revbits[i]] =
htole32(sc->sc_eds[OHCI_NO_EDS-OHCI_NO_INTRS+i]->physaddr);
#ifdef OHCI_DEBUG
@@ -858,7 +858,7 @@
if (ohcidebug > 5)
ohci_dumpregs(sc);
#endif
-
+
/* Set up the bus struct. */
sc->sc_bus.methods = &ohci_bus_methods;
sc->sc_bus.pipe_size = sizeof(struct ohci_pipe);
@@ -1089,7 +1089,7 @@
return (0);
}
- return (ohci_intr1(sc));
+ return (ohci_intr1(sc));
}
Static int
@@ -1129,7 +1129,7 @@
sc->sc_bus.intr_context++;
sc->sc_bus.no_intrs++;
- DPRINTFN(7, ("ohci_intr: sc=%p intrs=0x%x(0x%x) eintrs=0x%x\n",
+ DPRINTFN(7, ("ohci_intr: sc=%p intrs=0x%x(0x%x) eintrs=0x%x\n",
sc, (u_int)intrs, OREAD4(sc, OHCI_INTERRUPT_STATUS),
(u_int)eintrs));
@@ -1161,7 +1161,7 @@
}
if (eintrs & OHCI_RHSC) {
ohci_rhsc(sc, sc->sc_intrxfer);
- /*
+ /*
* Disable RHSC interrupt for now, because it will be
* on until the port has been reset.
*/
@@ -1336,7 +1336,7 @@
* the endpoint.
*/
ohci_soft_td_t *p, *n;
- struct ohci_pipe *opipe =
+ struct ohci_pipe *opipe =
(struct ohci_pipe *)xfer->pipe;
DPRINTFN(15,("ohci_process_done: error cc=%d (%s)\n",
@@ -1390,7 +1390,7 @@
cc = OHCI_ITD_GET_CC(le32toh(sitd->itd.itd_flags));
if (cc == OHCI_CC_NO_ERROR) {
/* XXX compute length for input */
- struct ohci_pipe *opipe =
+ struct ohci_pipe *opipe =
(struct ohci_pipe *)xfer->pipe;
if (sitd->flags & OHCI_CALL_DONE) {
opipe->u.iso.inuse -= xfer->nframes;
@@ -1437,7 +1437,7 @@
ohci_soft_td_t *data, *tail;
- DPRINTFN(10,("ohci_intr_done: xfer=%p, actlen=%d\n",
+ DPRINTFN(10,("ohci_intr_done: xfer=%p, actlen=%d\n",
xfer, xfer->actlen));
xfer->hcpriv = NULL;
@@ -1450,9 +1450,9 @@
return;
}
tail->xfer = NULL;
-
+
data->td.td_flags = htole32(
- OHCI_TD_IN | OHCI_TD_NOCC |
+ OHCI_TD_IN | OHCI_TD_NOCC |
OHCI_TD_SET_DI(1) | OHCI_TD_TOGGLE_CARRY);
if (xfer->flags & USBD_SHORT_XFER_OK)
data->td.td_flags |= htole32(OHCI_TD_R);
@@ -1475,7 +1475,7 @@
void
ohci_device_bulk_done(usbd_xfer_handle xfer)
{
- DPRINTFN(10,("ohci_bulk_done: xfer=%p, actlen=%d\n",
+ DPRINTFN(10,("ohci_bulk_done: xfer=%p, actlen=%d\n",
xfer, xfer->actlen));
xfer->hcpriv = NULL;
@@ -1491,7 +1491,7 @@
int hstatus;
hstatus = OREAD4(sc, OHCI_RH_STATUS);
- DPRINTF(("ohci_rhsc: sc=%p xfer=%p hstatus=0x%08x\n",
+ DPRINTF(("ohci_rhsc: sc=%p xfer=%p hstatus=0x%08x\n",
sc, xfer, hstatus));
if (xfer == NULL) {
@@ -1605,7 +1605,7 @@
DPRINTFN(3,("ohci_device_control type=0x%02x, request=0x%02x, "
"wValue=0x%04x, wIndex=0x%04x len=%d, addr=%d, endpt=%d\n",
req->bmRequestType, req->bRequest, UGETW(req->wValue),
- UGETW(req->wIndex), len, addr,
+ UGETW(req->wIndex), len, addr,
opipe->pipe.endpoint->edesc->bEndpointAddress));
setup = opipe->tail.td;
@@ -1736,7 +1736,7 @@
void
ohci_rem_ed(ohci_soft_ed_t *sed, ohci_soft_ed_t *head)
{
- ohci_soft_ed_t *p;
+ ohci_soft_ed_t *p;
SPLUSBCHECK;
@@ -1786,7 +1786,7 @@
int h = HASH(a);
ohci_soft_td_t *std;
- for (std = LIST_FIRST(&sc->sc_hash_tds[h]);
+ for (std = LIST_FIRST(&sc->sc_hash_tds[h]);
std != NULL;
std = LIST_NEXT(std, hnext))
if (std->physaddr == a)
@@ -1802,7 +1802,7 @@
SPLUSBCHECK;
- DPRINTFN(10,("ohci_hash_add_itd: sitd=%p physaddr=0x%08lx\n",
+ DPRINTFN(10,("ohci_hash_add_itd: sitd=%p physaddr=0x%08lx\n",
sitd, (u_long)sitd->physaddr));
LIST_INSERT_HEAD(&sc->sc_hash_itds[h], sitd, hnext);
@@ -1814,7 +1814,7 @@
{
SPLUSBCHECK;
- DPRINTFN(10,("ohci_hash_rem_itd: sitd=%p physaddr=0x%08lx\n",
+ DPRINTFN(10,("ohci_hash_rem_itd: sitd=%p physaddr=0x%08lx\n",
sitd, (u_long)sitd->physaddr));
LIST_REMOVE(sitd, hnext);
@@ -1826,7 +1826,7 @@
int h = HASH(a);
ohci_soft_itd_t *sitd;
- for (sitd = LIST_FIRST(&sc->sc_hash_itds[h]);
+ for (sitd = LIST_FIRST(&sc->sc_hash_itds[h]);
sitd != NULL;
sitd = LIST_NEXT(sitd, hnext))
Home |
Main Index |
Thread Index |
Old Index