summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2002-07-25 02:18:12 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2002-07-25 02:18:12 +0000
commit5d68760cde9b70743da4d636206420ffa530a9d1 (patch)
tree7cc14a7a81879a23a1a80c8a277b02a9605a0e53
parent0e0f2c8d681fe03a20821eab98d5c349c7071166 (diff)
get rid of trailing whitespace
-rw-r--r--sys/dev/usb/ezload.c10
-rw-r--r--sys/dev/usb/hid.c32
-rw-r--r--sys/dev/usb/hid.h4
-rw-r--r--sys/dev/usb/if_aue.c16
-rw-r--r--sys/dev/usb/if_cue.c20
-rw-r--r--sys/dev/usb/if_kue.c12
-rw-r--r--sys/dev/usb/if_upl.c8
-rw-r--r--sys/dev/usb/if_url.c42
-rw-r--r--sys/dev/usb/ohcireg.h4
-rw-r--r--sys/dev/usb/uaudioreg.h4
-rw-r--r--sys/dev/usb/ucom.c40
-rw-r--r--sys/dev/usb/udsbr.c4
-rw-r--r--sys/dev/usb/uftdi.c10
-rw-r--r--sys/dev/usb/uftdireg.h64
-rw-r--r--sys/dev/usb/ugen.c14
-rw-r--r--sys/dev/usb/uhcireg.h6
-rw-r--r--sys/dev/usb/uhcivar.h8
-rw-r--r--sys/dev/usb/uhid.c12
-rw-r--r--sys/dev/usb/uhidev.c22
-rw-r--r--sys/dev/usb/uhub.c36
-rw-r--r--sys/dev/usb/ukbd.c30
-rw-r--r--sys/dev/usb/ukbdmap.c6
-rw-r--r--sys/dev/usb/ulpt.c10
-rw-r--r--sys/dev/usb/umass.c94
-rw-r--r--sys/dev/usb/umct.c16
-rw-r--r--sys/dev/usb/umidi.c8
-rw-r--r--sys/dev/usb/umidivar.h6
-rw-r--r--sys/dev/usb/umodem.c12
-rw-r--r--sys/dev/usb/ums.c10
-rw-r--r--sys/dev/usb/uplcom.c26
-rw-r--r--sys/dev/usb/urio.c12
-rw-r--r--sys/dev/usb/usb.c30
-rw-r--r--sys/dev/usb/usb.h12
-rw-r--r--sys/dev/usb/usb_mem.c12
-rw-r--r--sys/dev/usb/usb_mem.h4
-rw-r--r--sys/dev/usb/usb_port.h4
-rw-r--r--sys/dev/usb/usb_quirks.c8
-rw-r--r--sys/dev/usb/usb_subr.c44
-rw-r--r--sys/dev/usb/usbdevs4
-rw-r--r--sys/dev/usb/usbdevs.h6
-rw-r--r--sys/dev/usb/usbdevs_data.h4
-rw-r--r--sys/dev/usb/usbdi.c66
-rw-r--r--sys/dev/usb/usbdi.h8
-rw-r--r--sys/dev/usb/usbdi_util.c22
-rw-r--r--sys/dev/usb/usbdi_util.h8
-rw-r--r--sys/dev/usb/usbdivar.h6
-rw-r--r--sys/dev/usb/uscanner.c8
-rw-r--r--sys/dev/usb/usscanner.c16
-rw-r--r--sys/dev/usb/uvisor.c6
-rw-r--r--sys/dev/usb/uyap.c8
50 files changed, 437 insertions, 437 deletions
diff --git a/sys/dev/usb/ezload.c b/sys/dev/usb/ezload.c
index c060048c9ee..0ea3b9b980e 100644
--- a/sys/dev/usb/ezload.c
+++ b/sys/dev/usb/ezload.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ezload.c,v 1.4 2002/05/05 22:23:43 nate Exp $ */
+/* $OpenBSD: ezload.c,v 1.5 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ezload.c,v 1.4 2001/11/13 06:24:53 lukem Exp $ */
/*
@@ -93,7 +93,7 @@ ezload_reset(usbd_device_handle dev, int reset)
{
usb_device_request_t req;
uByte rst;
-
+
DPRINTF(("ezload_reset: reset=%d\n", reset));
rst = reset ? ANCHOR_RESET : 0;
@@ -112,9 +112,9 @@ ezload_download(usbd_device_handle dev, const struct ezdata *rec)
const struct ezdata *ptr;
usbd_status err;
u_int len, offs;
-
+
DPRINTF(("ezload_down record=%p\n", rec));
-
+
for (ptr = rec; ptr->length != 0; ptr++) {
#if 0
@@ -140,7 +140,7 @@ ezload_download(usbd_device_handle dev, const struct ezdata *rec)
if (err)
break;
}
-
+
return (err);
}
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c
index 81deacbd866..2f3823c2687 100644
--- a/sys/dev/usb/hid.c
+++ b/sys/dev/usb/hid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hid.c,v 1.12 2002/05/09 15:06:29 nate Exp $ */
+/* $OpenBSD: hid.c,v 1.13 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: hid.c,v 1.22 2002/01/12 17:11:03 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
@@ -45,7 +45,7 @@
#include <sys/kernel.h>
#endif
#include <sys/malloc.h>
-
+
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>
@@ -199,7 +199,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
printf("BAD LENGTH %d\n", bSize);
continue;
}
-
+
DPRINTFN(5,("hid_get_item: bType=%d bTag=%d dval=%d\n",
bType, bTag, dval));
switch (bType) {
@@ -221,8 +221,8 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
s->multi = 0;
c->loc.count = 1;
if (s->minset) {
- for (i = c->usage_minimum;
- i <= c->usage_maximum;
+ for (i = c->usage_minimum;
+ i <= c->usage_maximum;
i++) {
s->usages[s->nu] = i;
if (s->nu < MAXUSAGE-1)
@@ -235,7 +235,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->usage = c->_usage_page; /* XXX */
*h = *c;
h->next = NULL;
- c->loc.pos +=
+ c->loc.pos +=
c->loc.size * c->loc.count;
s->minset = 0;
s->nu = 0;
@@ -320,9 +320,9 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
case 2: /* Local */
switch (bTag) {
case 0:
- if (bSize == 1)
+ if (bSize == 1)
dval = c->_usage_page | (dval&0xff);
- else if (bSize == 2)
+ else if (bSize == 2)
dval = c->_usage_page | (dval&0xffff);
c->usage = dval;
if (s->nu < MAXUSAGE)
@@ -331,16 +331,16 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
break;
case 1:
s->minset = 1;
- if (bSize == 1)
+ if (bSize == 1)
dval = c->_usage_page | (dval&0xff);
- else if (bSize == 2)
+ else if (bSize == 2)
dval = c->_usage_page | (dval&0xffff);
c->usage_minimum = dval;
break;
case 2:
- if (bSize == 1)
+ if (bSize == 1)
dval = c->_usage_page | (dval&0xff);
- else if (bSize == 2)
+ else if (bSize == 2)
dval = c->_usage_page | (dval&0xffff);
c->usage_maximum = dval;
break;
@@ -421,7 +421,7 @@ hid_locate(void *desc, int size, u_int32_t u, u_int8_t id, enum hid_kind k,
for (d = hid_start_parse(desc, size, k); hid_get_item(d, &h); ) {
DPRINTFN(5,("hid_locate: usage=0x%x kind=%d id=%d flags=0x%x\n",
h.usage, h.kind, h.report_ID, h.flags));
- if (h.kind == k && !(h.flags & HIO_CONST) &&
+ if (h.kind == k && !(h.flags & HIO_CONST) &&
h.usage == u && h.report_ID == id) {
if (loc != NULL)
*loc = h.loc;
@@ -450,7 +450,7 @@ hid_get_data(u_char *buf, struct hid_location *loc)
return (0);
data = 0;
- s = hpos / 8;
+ s = hpos / 8;
for (i = hpos; i < hpos+hsize; i += 8)
data |= buf[i / 8] << ((i / 8 - s) * 8);
data >>= hpos % 8;
@@ -458,7 +458,7 @@ hid_get_data(u_char *buf, struct hid_location *loc)
hsize = 32 - hsize;
/* Sign extend */
data = ((int32_t)data << hsize) >> hsize;
- DPRINTFN(10,("hid_get_data: loc %d/%d = %lu\n",
+ DPRINTFN(10,("hid_get_data: loc %d/%d = %lu\n",
loc->pos, loc->size, (long)data));
return (data);
}
@@ -479,7 +479,7 @@ hid_is_collection(void *desc, int size, u_int8_t id, u_int32_t usage)
DPRINTFN(2,("hid_is_collection: kind=%d id=%d usage=0x%x"
"(0x%x)\n",
hi.kind, hi.report_ID, hi.usage, coll_usage));
- if (hi.kind == hid_collection &&
+ if (hi.kind == hid_collection &&
hi.collection == HCOLL_APPLICATION)
coll_usage = hi.usage;
if (hi.kind == hid_endcollection &&
diff --git a/sys/dev/usb/hid.h b/sys/dev/usb/hid.h
index 18dac5988e5..230c1bcbe85 100644
--- a/sys/dev/usb/hid.h
+++ b/sys/dev/usb/hid.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hid.h,v 1.7 2002/05/09 15:06:29 nate Exp $ */
+/* $OpenBSD: hid.h,v 1.8 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: hid.h,v 1.7 2001/12/28 17:32:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -39,7 +39,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-enum hid_kind {
+enum hid_kind {
hid_input,
hid_output,
hid_feature,
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index f412529e800..410fd59721c 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.24 2002/07/10 18:08:13 deraadt Exp $ */
+/* $OpenBSD: if_aue.c,v 1.25 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: if_aue.c,v 1.78 2002/07/08 17:46:23 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -118,7 +118,7 @@
#if defined(__NetBSD__)
#include <net/if_ether.h>
#ifdef INET
-#include <netinet/in.h>
+#include <netinet/in.h>
#include <netinet/if_inarp.h>
#endif
#endif /* defined(__NetBSD__) */
@@ -567,7 +567,7 @@ aue_miibus_statchg(device_ptr_t dev)
#define AUE_POLY 0xEDB88320
#define AUE_BITS 6
-Static u_int32_t
+Static u_int32_t
aue_crc(caddr_t addr)
{
u_int32_t idx, bit, data, crc;
@@ -677,10 +677,10 @@ aue_reset(struct aue_softc *sc)
*/
if (sc->aue_flags & LSYS) {
/* Grrr. LinkSys has to be different from everyone else. */
- aue_csr_write_1(sc, AUE_GPIO0,
+ aue_csr_write_1(sc, AUE_GPIO0,
AUE_GPIO_SEL0 | AUE_GPIO_SEL1);
} else {
- aue_csr_write_1(sc, AUE_GPIO0,
+ aue_csr_write_1(sc, AUE_GPIO0,
AUE_GPIO_OUT0 | AUE_GPIO_SEL0);
}
aue_csr_write_1(sc, AUE_GPIO0,
@@ -904,7 +904,7 @@ USB_DETACH(aue)
}
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->aue_udev,
+ usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->aue_udev,
USBDEV(sc->aue_dev));
return (0);
@@ -968,7 +968,7 @@ aue_newbuf(struct aue_softc *sc, struct aue_chain *c, struct mbuf *m)
return (0);
}
-Static int
+Static int
aue_rx_list_init(struct aue_softc *sc)
{
struct aue_cdata *cd;
@@ -1465,7 +1465,7 @@ aue_openpipes(struct aue_softc *sc)
}
err = usbd_open_pipe_intr(sc->aue_iface, sc->aue_ed[AUE_ENDPT_INTR],
USBD_EXCLUSIVE_USE, &sc->aue_ep[AUE_ENDPT_INTR], sc,
- &sc->aue_cdata.aue_ibuf, AUE_INTR_PKTLEN, aue_intr,
+ &sc->aue_cdata.aue_ibuf, AUE_INTR_PKTLEN, aue_intr,
AUE_INTR_INTERVAL);
if (err) {
printf("%s: open intr pipe failed: %s\n",
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 7bdc262e006..91cb154557c 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cue.c,v 1.15 2002/07/10 18:08:13 deraadt Exp $ */
+/* $OpenBSD: if_cue.c,v 1.16 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: if_cue.c,v 1.39 2002/07/08 17:46:24 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -96,7 +96,7 @@
#if defined(__NetBSD__)
#include <net/if_ether.h>
#ifdef INET
-#include <netinet/in.h>
+#include <netinet/in.h>
#include <netinet/if_inarp.h>
#endif
#endif /* defined(__NetBSD__) */
@@ -203,7 +203,7 @@ cue_csr_read_1(struct cue_softc *sc, int reg)
return (0);
}
- DPRINTFN(10,("%s: cue_csr_read_1 reg=0x%x val=0x%x\n",
+ DPRINTFN(10,("%s: cue_csr_read_1 reg=0x%x val=0x%x\n",
USBDEVNAME(sc->cue_dev), reg, val));
return (val);
@@ -227,7 +227,7 @@ cue_csr_read_2(struct cue_softc *sc, int reg)
err = usbd_do_request(sc->cue_udev, &req, &val);
- DPRINTFN(10,("%s: cue_csr_read_2 reg=0x%x val=0x%x\n",
+ DPRINTFN(10,("%s: cue_csr_read_2 reg=0x%x val=0x%x\n",
USBDEVNAME(sc->cue_dev), reg, UGETW(val)));
if (err) {
@@ -248,7 +248,7 @@ cue_csr_write_1(struct cue_softc *sc, int reg, int val)
if (sc->cue_dying)
return (0);
- DPRINTFN(10,("%s: cue_csr_write_1 reg=0x%x val=0x%x\n",
+ DPRINTFN(10,("%s: cue_csr_write_1 reg=0x%x val=0x%x\n",
USBDEVNAME(sc->cue_dev), reg, val));
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
@@ -265,7 +265,7 @@ cue_csr_write_1(struct cue_softc *sc, int reg, int val)
return (-1);
}
- DPRINTFN(20,("%s: cue_csr_write_1, after reg=0x%x val=0x%x\n",
+ DPRINTFN(20,("%s: cue_csr_write_1, after reg=0x%x val=0x%x\n",
USBDEVNAME(sc->cue_dev), reg, cue_csr_read_1(sc, reg)));
return (0);
@@ -283,7 +283,7 @@ cue_csr_write_2(struct cue_softc *sc, int reg, int aval)
if (sc->cue_dying)
return (0);
- DPRINTFN(10,("%s: cue_csr_write_2 reg=0x%x val=0x%x\n",
+ DPRINTFN(10,("%s: cue_csr_write_2 reg=0x%x val=0x%x\n",
USBDEVNAME(sc->cue_dev), reg, aval));
USETW(val, aval);
@@ -388,7 +388,7 @@ cue_setmulti(struct cue_softc *sc)
ifp = GET_IFP(sc);
- DPRINTFN(2,("%s: cue_setmulti if_flags=0x%x\n",
+ DPRINTFN(2,("%s: cue_setmulti if_flags=0x%x\n",
USBDEVNAME(sc->cue_dev), ifp->if_flags));
if (ifp->if_flags & IFF_PROMISC) {
@@ -417,7 +417,7 @@ allmulti:
goto allmulti;
h = cue_crc(enm->enm_addrlo);
- sc->cue_mctab[h >> 3] |= 1 << (h & 0x7);
+ sc->cue_mctab[h >> 3] |= 1 << (h & 0x7);
ETHER_NEXT_MULTI(step, enm);
}
@@ -429,7 +429,7 @@ allmulti:
*/
if (ifp->if_flags & IFF_BROADCAST) {
h = cue_crc(etherbroadcastaddr);
- sc->cue_mctab[h >> 3] |= 1 << (h & 0x7);
+ sc->cue_mctab[h >> 3] |= 1 << (h & 0x7);
}
cue_mem(sc, CUE_CMD_WRITESRAM, CUE_MCAST_TABLE_ADDR,
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index b6f2ae5bab0..39afbc6b1f6 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_kue.c,v 1.20 2002/07/10 18:08:13 deraadt Exp $ */
+/* $OpenBSD: if_kue.c,v 1.21 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: if_kue.c,v 1.48 2002/07/08 17:46:24 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -106,7 +106,7 @@
#if defined(__NetBSD__)
#include <net/if_ether.h>
#ifdef INET
-#include <netinet/in.h>
+#include <netinet/in.h>
#include <netinet/if_inarp.h>
#endif
#endif /* defined (__NetBSD__) */
@@ -281,7 +281,7 @@ kue_load_fw(struct kue_softc *sc)
USBDEVNAME(sc->kue_dev));
/* Load code segment */
- DPRINTFN(1,("%s: kue_load_fw: download code_seg\n",
+ DPRINTFN(1,("%s: kue_load_fw: download code_seg\n",
USBDEVNAME(sc->kue_dev)));
err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
0, (void *)kue_code_seg, sizeof(kue_code_seg));
@@ -292,7 +292,7 @@ kue_load_fw(struct kue_softc *sc)
}
/* Load fixup segment */
- DPRINTFN(1,("%s: kue_load_fw: download fix_seg\n",
+ DPRINTFN(1,("%s: kue_load_fw: download fix_seg\n",
USBDEVNAME(sc->kue_dev)));
err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
0, (void *)kue_fix_seg, sizeof(kue_fix_seg));
@@ -303,7 +303,7 @@ kue_load_fw(struct kue_softc *sc)
}
/* Send trigger command. */
- DPRINTFN(1,("%s: kue_load_fw: download trig_seg\n",
+ DPRINTFN(1,("%s: kue_load_fw: download trig_seg\n",
USBDEVNAME(sc->kue_dev)));
err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
0, (void *)kue_trig_seg, sizeof(kue_trig_seg));
@@ -754,7 +754,7 @@ kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL);
DPRINTFN(10,("%s: %s: total_len=%d len=%d\n", USBDEVNAME(sc->kue_dev),
- __func__, total_len,
+ __func__, total_len,
UGETW(mtod(c->kue_mbuf, u_int8_t *))));
if (total_len <= 1)
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index 5dc5918343e..92e14c10336 100644
--- a/sys/dev/usb/if_upl.c
+++ b/sys/dev/usb/if_upl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upl.c,v 1.10 2002/06/30 13:04:36 itojun Exp $ */
+/* $OpenBSD: if_upl.c,v 1.11 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: if_upl.c,v 1.15 2001/06/14 05:44:27 itojun Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -80,8 +80,8 @@
#if defined(__NetBSD__)
#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_var.h>
+#include <netinet/in.h>
+#include <netinet/in_var.h>
#include <netinet/if_inarp.h>
#else
#error upl without INET?
@@ -816,7 +816,7 @@ upl_openpipes(struct upl_softc *sc)
}
err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ed[UPL_ENDPT_INTR],
USBD_EXCLUSIVE_USE, &sc->sc_ep[UPL_ENDPT_INTR], sc,
- &sc->sc_ibuf, UPL_INTR_PKTLEN, upl_intr,
+ &sc->sc_ibuf, UPL_INTR_PKTLEN, upl_intr,
UPL_INTR_INTERVAL);
if (err) {
printf("%s: open intr pipe failed: %s\n",
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 283ef1db96a..bcedf7ffcf8 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_url.c,v 1.6 2002/07/10 18:08:13 deraadt Exp $ */
+/* $OpenBSD: if_url.c,v 1.7 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: if_url.c,v 1.2 2002/03/28 21:49:19 ichiro Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -82,7 +82,7 @@
#if defined(__NetBSD__)
#include <net/if_ether.h>
#ifdef INET
-#include <netinet/in.h>
+#include <netinet/in.h>
#include <netinet/if_inarp.h>
#endif
#endif /* defined(__NetBSD__) */
@@ -433,7 +433,7 @@ url_mem(struct url_softc *sc, int cmd, int offset, void *buf, int len)
USBDEVNAME(sc->sc_dev),
cmd == URL_CMD_READMEM ? "read" : "write",
offset, err));
- }
+ }
return (err);
}
@@ -449,7 +449,7 @@ url_csr_read_1(struct url_softc *sc, int reg)
if (sc->sc_dying)
return (0);
-
+
return (url_mem(sc, URL_CMD_READMEM, reg, &val, 1) ? 0 : val);
}
@@ -464,7 +464,7 @@ url_csr_read_2(struct url_softc *sc, int reg)
if (sc->sc_dying)
return (0);
-
+
USETW(val, 0);
return (url_mem(sc, URL_CMD_READMEM, reg, &val, 2) ? 0 : UGETW(val));
}
@@ -480,7 +480,7 @@ url_csr_write_1(struct url_softc *sc, int reg, int aval)
if (sc->sc_dying)
return (0);
-
+
return (url_mem(sc, URL_CMD_WRITEMEM, reg, &val, 1) ? -1 : 0);
}
@@ -497,7 +497,7 @@ url_csr_write_2(struct url_softc *sc, int reg, int aval)
if (sc->sc_dying)
return (0);
-
+
return (url_mem(sc, URL_CMD_WRITEMEM, reg, &val, 2) ? -1 : 0);
}
@@ -514,7 +514,7 @@ url_csr_write_4(struct url_softc *sc, int reg, int aval)
if (sc->sc_dying)
return (0);
-
+
return (url_mem(sc, URL_CMD_WRITEMEM, reg, &val, 4) ? -1 : 0);
}
@@ -527,7 +527,7 @@ url_init(struct ifnet *ifp)
int i, s;
DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__));
-
+
if (sc->sc_dying)
return (EIO);
@@ -563,7 +563,7 @@ url_init(struct ifnet *ifp)
else
URL_CLRBIT2(sc, URL_RCR, URL_RCR_AAM|URL_RCR_AAP);
-
+
/* Initialize transmit ring */
if (url_tx_list_init(sc) == ENOBUFS) {
printf("%s: tx list init failed\n", USBDEVNAME(sc->sc_dev));
@@ -607,7 +607,7 @@ Static void
url_reset(struct url_softc *sc)
{
int i;
-
+
DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__));
if (sc->sc_dying)
@@ -720,7 +720,7 @@ url_openpipes(struct url_softc *sc)
if (sc->sc_dying)
return (EIO);
-
+
sc->sc_refcnt++;
/* Open RX pipe */
@@ -732,7 +732,7 @@ url_openpipes(struct url_softc *sc)
error = EIO;
goto done;
}
-
+
/* Open TX pipe */
err = usbd_open_pipe(sc->sc_ctl_iface, sc->sc_bulkout_no,
USBD_EXCLUSIVE_USE, &sc->sc_pipe_tx);
@@ -774,7 +774,7 @@ url_openpipes(struct url_softc *sc)
done:
if (--sc->sc_refcnt < 0)
usb_detach_wakeup(USBDEV(sc->sc_dev));
-
+
return (error);
}
@@ -811,7 +811,7 @@ url_newbuf(struct url_softc *sc, struct url_chain *c, struct mbuf *m)
return (0);
}
-
+
Static int
url_rx_list_init(struct url_softc *sc)
@@ -840,7 +840,7 @@ url_rx_list_init(struct url_softc *sc)
}
}
}
-
+
return (0);
}
@@ -870,7 +870,7 @@ url_tx_list_init(struct url_softc *sc)
}
}
}
-
+
return (0);
}
@@ -879,7 +879,7 @@ url_start(struct ifnet *ifp)
{
struct url_softc *sc = ifp->if_softc;
struct mbuf *m_head = NULL;
-
+
DPRINTF(("%s: %s: enter, link=%d\n", USBDEVNAME(sc->sc_dev),
__func__, sc->sc_link));
@@ -1211,7 +1211,7 @@ url_watchdog(struct ifnet *ifp)
struct url_chain *c;
usbd_status stat;
int s;
-
+
DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__));
ifp->if_oerrors++;
@@ -1240,7 +1240,7 @@ url_stop(struct ifnet *ifp, int disable)
struct url_softc *sc = ifp->if_softc;
usbd_status err;
int i;
-
+
DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__));
ifp->if_timer = 0;
@@ -1642,7 +1642,7 @@ url_ext_miibus_redreg(device_ptr_t dev, int phy, int reg)
if (i == URL_TIMEOUT) {
printf("%s: MII read timed out\n", USBDEVNAME(sc->sc_dev));
}
-
+
val = url_csr_read_2(sc, URL_PHYDAT);
DPRINTF(("%s: %s: phy=%d reg=0x%04x => 0x%04x\n",
diff --git a/sys/dev/usb/ohcireg.h b/sys/dev/usb/ohcireg.h
index ab6f4cecf6b..0be0ac497c7 100644
--- a/sys/dev/usb/ohcireg.h
+++ b/sys/dev/usb/ohcireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohcireg.h,v 1.9 2000/11/08 18:10:37 aaron Exp $ */
+/* $OpenBSD: ohcireg.h,v 1.10 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ohcireg.h,v 1.18 2000/04/27 15:26:47 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohcireg.h,v 1.8 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -226,7 +226,7 @@ typedef struct {
} ohci_itd_t;
/* #define OHCI_ITD_SIZE 32 */
#define OHCI_ITD_ALIGN 32
-
+
#define OHCI_CC_NO_ERROR 0
#define OHCI_CC_CRC 1
diff --git a/sys/dev/usb/uaudioreg.h b/sys/dev/usb/uaudioreg.h
index 98923993375..149c968d9cc 100644
--- a/sys/dev/usb/uaudioreg.h
+++ b/sys/dev/usb/uaudioreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudioreg.h,v 1.8 2002/05/06 23:07:26 nate Exp $ */
+/* $OpenBSD: uaudioreg.h,v 1.9 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uaudioreg.h,v 1.8 2002/03/07 14:37:03 kent Exp $ */
/*
@@ -63,7 +63,7 @@ typedef struct {
uByte bmAttributes;
uWord wMaxPacketSize;
uByte bInterval;
- /*
+ /*
* The following two entries are only used by the Audio Class.
* And according to the specs the Audio Class is the only one
* allowed to extend the endpoint descriptor.
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 03f87deabb5..d548925cf94 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucom.c,v 1.14 2002/07/11 03:11:17 nate Exp $ */
+/* $OpenBSD: ucom.c,v 1.15 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ucom.c,v 1.42 2002/03/17 19:41:04 atatat Exp $ */
/*
@@ -217,7 +217,7 @@ USB_DETACH(ucom)
int maj, mn;
int s;
- DPRINTF(("ucom_detach: sc=%p flags=%d tp=%p, pipe=%d,%d\n",
+ DPRINTF(("ucom_detach: sc=%p flags=%d tp=%p, pipe=%d,%d\n",
sc, flags, tp, sc->sc_bulkin_no, sc->sc_bulkout_no));
sc->sc_dying = 1;
@@ -311,7 +311,7 @@ ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
struct tty *tp;
int s;
int error;
-
+
if (unit >= ucom_cd.cd_ndevs)
return (ENXIO);
sc = ucom_cd.cd_devs[unit];
@@ -346,7 +346,7 @@ ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
return (EIO);
}
sc->sc_opening = 1;
-
+
#if defined(__NetBSD__)
if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) {
#else
@@ -412,7 +412,7 @@ ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
&sc->sc_bulkin_pipe);
if (err) {
DPRINTF(("%s: open bulk out error (addr %d), err=%s\n",
- USBDEVNAME(sc->sc_dev), sc->sc_bulkin_no,
+ USBDEVNAME(sc->sc_dev), sc->sc_bulkin_no,
usbd_errstr(err)));
error = EIO;
goto fail_0;
@@ -426,7 +426,7 @@ ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
error = EIO;
goto fail_1;
}
-
+
/* Allocate a request and an input buffer and start reading. */
sc->sc_ixfer = usbd_alloc_xfer(sc->sc_udev);
if (sc->sc_ixfer == NULL) {
@@ -545,7 +545,7 @@ ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
return (0);
}
-
+
int
ucomread(dev_t dev, struct uio *uio, int flag)
{
@@ -555,14 +555,14 @@ ucomread(dev_t dev, struct uio *uio, int flag)
if (sc->sc_dying)
return (EIO);
-
+
sc->sc_refcnt++;
error = (*LINESW(tp, l_read))(tp, uio, flag);
if (--sc->sc_refcnt < 0)
usb_detach_wakeup(USBDEV(sc->sc_dev));
return (error);
}
-
+
int
ucomwrite(dev_t dev, struct uio *uio, int flag)
{
@@ -572,7 +572,7 @@ ucomwrite(dev_t dev, struct uio *uio, int flag)
if (sc->sc_dying)
return (EIO);
-
+
sc->sc_refcnt++;
error = (*LINESW(tp, l_write))(tp, uio, flag);
if (--sc->sc_refcnt < 0)
@@ -590,7 +590,7 @@ ucompoll(dev_t dev, int events, usb_proc_ptr p)
if (sc->sc_dying)
return (EIO);
-
+
sc->sc_refcnt++;
error = (*LINESW(tp, l_poll))(tp, events, p);
if (--sc->sc_refcnt < 0)
@@ -631,7 +631,7 @@ ucom_do_ioctl(struct ucom_softc *sc, u_long cmd, caddr_t data,
if (sc->sc_dying)
return (EIO);
-
+
DPRINTF(("ucomioctl: cmd=0x%08lx\n", cmd));
error = (*LINESW(tp, l_ioctl))(tp, cmd, data, flag, p);
@@ -676,7 +676,7 @@ ucom_do_ioctl(struct ucom_softc *sc, u_long cmd, caddr_t data,
break;
case TIOCSFLAGS:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p->p_ucred, &p->p_acflag);
if (error)
break;
sc->sc_swflags = *(int *)data;
@@ -712,7 +712,7 @@ tiocm_to_ucom(struct ucom_softc *sc, u_long how, int ttybits)
SET(combits, UMCR_DTR);
if (ISSET(ttybits, TIOCM_RTS))
SET(combits, UMCR_RTS);
-
+
switch (how) {
case TIOCMBIC:
CLR(sc->sc_mcr, combits);
@@ -783,7 +783,7 @@ ucom_dtr(struct ucom_softc *sc, int onoff)
DPRINTF(("ucom_dtr: onoff=%d\n", onoff));
if (sc->sc_methods->ucom_set != NULL)
- sc->sc_methods->ucom_set(sc->sc_parent, sc->sc_portno,
+ sc->sc_methods->ucom_set(sc->sc_parent, sc->sc_portno,
UCOM_SET_DTR, onoff);
}
@@ -793,7 +793,7 @@ ucom_rts(struct ucom_softc *sc, int onoff)
DPRINTF(("ucom_rts: onoff=%d\n", onoff));
if (sc->sc_methods->ucom_set != NULL)
- sc->sc_methods->ucom_set(sc->sc_parent, sc->sc_portno,
+ sc->sc_methods->ucom_set(sc->sc_parent, sc->sc_portno,
UCOM_SET_RTS, onoff);
}
@@ -962,7 +962,7 @@ ucomstart(struct tty *tp)
memcpy(sc->sc_obuf, data, cnt);
DPRINTFN(4,("ucomstart: %d chars\n", cnt));
- usbd_setup_xfer(sc->sc_oxfer, sc->sc_bulkout_pipe,
+ usbd_setup_xfer(sc->sc_oxfer, sc->sc_bulkout_pipe,
(usbd_private_handle)sc, sc->sc_obuf, cnt,
USBD_NO_COPY, USBD_NO_TIMEOUT, ucomwritecb);
/* What can we do on error? */
@@ -1052,8 +1052,8 @@ ucomstartread(struct ucom_softc *sc)
usbd_status err;
DPRINTFN(5,("ucomstartread: start\n"));
- usbd_setup_xfer(sc->sc_ixfer, sc->sc_bulkin_pipe,
- (usbd_private_handle)sc,
+ usbd_setup_xfer(sc->sc_ixfer, sc->sc_bulkin_pipe,
+ (usbd_private_handle)sc,
sc->sc_ibuf, sc->sc_ibufsize,
USBD_SHORT_XFER_OK | USBD_NO_COPY,
USBD_NO_TIMEOUT, ucomreadcb);
@@ -1064,7 +1064,7 @@ ucomstartread(struct ucom_softc *sc)
}
return (USBD_NORMAL_COMPLETION);
}
-
+
Static void
ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status)
{
diff --git a/sys/dev/usb/udsbr.c b/sys/dev/usb/udsbr.c
index 1ded0778657..1d9f0f99a52 100644
--- a/sys/dev/usb/udsbr.c
+++ b/sys/dev/usb/udsbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udsbr.c,v 1.3 2002/07/09 18:37:04 nate Exp $ */
+/* $OpenBSD: udsbr.c,v 1.4 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: udsbr.c,v 1.6 2002/02/12 10:51:49 tron Exp $ */
/*
@@ -229,7 +229,7 @@ udsbr_setfreq(struct udsbr_softc *sc, int freq)
* that the radio wants. This frequency is 10.7MHz above
* the actual frequency. We then need to convert to
* units of 12.5kHz. We add one to the IFM to make rounding
- * easier.
+ * easier.
*/
freq = (freq * 1000 + 10700001) / 12500;
(void)udsbr_req(sc, 0x01, (freq >> 8) & 0xff, freq & 0xff);
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 99c7dab87d3..f02d9ec0f20 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.7 2002/07/10 02:56:53 nate Exp $ */
+/* $OpenBSD: uftdi.c,v 1.8 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uftdi.c,v 1.10 2002/05/08 18:10:19 scw Exp $ */
/*
@@ -128,7 +128,7 @@ USB_DECLARE_DRIVER(uftdi);
USB_MATCH(uftdi)
{
USB_MATCH_START(uftdi, uaa);
-
+
if (uaa->iface != NULL)
return (UMATCH_NONE);
@@ -206,7 +206,7 @@ USB_ATTACH(uftdi)
": %s\n", devname, usbd_errstr(err));
goto bad;
}
-
+
addr = ed->bEndpointAddress;
dir = UE_GET_DIR(ed->bEndpointAddress);
attr = ed->bmAttributes & UE_XFERTYPE;
@@ -229,7 +229,7 @@ USB_ATTACH(uftdi)
USBDEVNAME(sc->sc_dev));
goto bad;
}
-
+
uca.portno = FTDI_PIT_SIOA;
/* bulkin, bulkout set above */
uca.ibufsize = UFTDIIBUFSIZE;
@@ -546,7 +546,7 @@ uftdi_break(void *vsc, int portno, int onoff)
int data;
DPRINTF(("uftdi_break: sc=%p, port=%d onoff=%d\n", vsc, portno,
- onoff));
+ onoff));
if (onoff) {
data = sc->last_lcr | FTDI_SIO_SET_BREAK;
diff --git a/sys/dev/usb/uftdireg.h b/sys/dev/usb/uftdireg.h
index 0cc61430cb3..7f3f8b74e34 100644
--- a/sys/dev/usb/uftdireg.h
+++ b/sys/dev/usb/uftdireg.h
@@ -1,11 +1,11 @@
-/* $OpenBSD: uftdireg.h,v 1.6 2002/07/10 02:56:53 nate Exp $ */
+/* $OpenBSD: uftdireg.h,v 1.7 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uftdireg.h,v 1.5 2002/05/08 18:10:19 scw Exp $ */
/*
- * Definitions for the FTDI USB Single Port Serial Converter -
- * known as FTDI_SIO (Serial Input/Output application of the chipset)
+ * Definitions for the FTDI USB Single Port Serial Converter -
+ * known as FTDI_SIO (Serial Input/Output application of the chipset)
*
- * The device is based on the FTDI FT8U100AX chip. It has a DB25 on one side,
+ * The device is based on the FTDI FT8U100AX chip. It has a DB25 on one side,
* USB on the other.
*
* Thanx to FTDI (http://www.ftdi.co.uk) for so kindly providing details
@@ -41,7 +41,7 @@ enum uftdi_type {
/*
* BmRequestType: 0100 0000B
* bRequest: FTDI_SIO_RESET
- * wValue: Control Value
+ * wValue: Control Value
* 0 = Reset SIO
* 1 = Purge RX buffer
* 2 = Purge TX buffer
@@ -79,8 +79,8 @@ enum uftdi_type {
*/
/* FTDI_SIO_SET_BAUDRATE */
enum {
- ftdi_sio_b300 = 0,
- ftdi_sio_b600 = 1,
+ ftdi_sio_b300 = 0,
+ ftdi_sio_b600 = 1,
ftdi_sio_b1200 = 2,
ftdi_sio_b2400 = 3,
ftdi_sio_b4800 = 4,
@@ -108,7 +108,7 @@ enum {
};
/*
- * BmRequestType: 0100 0000B
+ * BmRequestType: 0100 0000B
* bRequest: FTDI_SIO_SET_DATA
* wValue: Data characteristics (see below)
* wIndex: Port
@@ -144,7 +144,7 @@ enum {
#define FTDI_SIO_SET_BREAK (0x1 << 14)
-/*
+/*
* BmRequestType: 0100 0000B
* bRequest: FTDI_SIO_MODEM_CTRL
* wValue: ControlValue (see below)
@@ -186,7 +186,7 @@ enum {
* bRequest: FTDI_SIO_SET_FLOW_CTRL
* wValue: Xoff/Xon
* wIndex: Protocol/Port - hIndex is protocl / lIndex is port
- * wLength: 0
+ * wLength: 0
* Data: None
*
* hIndex protocol is:
@@ -204,15 +204,15 @@ enum {
*
* If Xon/Xoff handshaking is specified, the hValue field should contain the
* XOFF character and the lValue field contains the XON character.
- */
+ */
/* FTDI_SIO_SET_FLOW_CTRL */
-#define FTDI_SIO_DISABLE_FLOW_CTRL 0x0
+#define FTDI_SIO_DISABLE_FLOW_CTRL 0x0
#define FTDI_SIO_RTS_CTS_HS 0x1
#define FTDI_SIO_DTR_DSR_HS 0x2
#define FTDI_SIO_XON_XOFF_HS 0x4
-
-/*
+
+/*
* BmRequestType: 0100 0000b
* bRequest: FTDI_SIO_SET_EVENT_CHAR
* wValue: Event Char
@@ -227,7 +227,7 @@ enum {
* 1 = enabled
* B9..15 Reserved
*
- * FTDI_SIO_SET_EVENT_CHAR
+ * FTDI_SIO_SET_EVENT_CHAR
*
* Set the special event character for the specified communications port.
* If the device sees this character it will immediately return the
@@ -236,8 +236,8 @@ enum {
*/
-
-/*
+
+/*
* BmRequestType: 0100 0000b
* bRequest: FTDI_SIO_SET_ERROR_CHAR
* wValue: Error Char
@@ -259,15 +259,15 @@ enum {
*/
-/*
+/*
* BmRequestType: 1100 0000b
* bRequest: FTDI_SIO_GET_MODEM_STATUS
* wValue: zero
* wIndex: Port
* wLength: 1
* Data: Status
- *
- * One byte of data is returned
+ *
+ * One byte of data is returned
* B0..3 0
* B4 CTS
* 0 = inactive
@@ -280,7 +280,7 @@ enum {
* 1 = active
* B7 Receive Line Signal Detect (RLSD)
* 0 = inactive
- * 1 = active
+ * 1 = active
*
* FTDI_SIO_GET_MODEM_STATUS
* Retrieve the current value of the modem status register.
@@ -293,29 +293,29 @@ enum {
/*
- *
+ *
* DATA FORMAT
- *
+ *
* IN Endpoint
- *
+ *
* The device reserves the first two bytes of data on this endpoint to contain
* the current values of the modem and line status registers. In the absence of
* data, the device generates a message consisting of these two status bytes
* every 40 ms.
- *
+ *
* Byte 0: Modem Status
* NOTE: 4 upper bits have same layout as the MSR register in a 16550
- *
+ *
* Offset Description
* B0..3 Port
* B4 Clear to Send (CTS)
* B5 Data Set Ready (DSR)
* B6 Ring Indicator (RI)
* B7 Receive Line Signal Detect (RLSD)
- *
+ *
* Byte 1: Line Status
* NOTE: same layout as the LSR register in a 16550
- *
+ *
* Offset Description
* B0 Data Ready (DR)
* B1 Overrun Error (OE)
@@ -328,17 +328,17 @@ enum {
*
*
* OUT Endpoint
- *
+ *
* This device reserves the first bytes of data on this endpoint contain the
* length and port identifier of the message. For the FTDI USB Serial converter
* the port identifier is always 1.
- *
+ *
* Byte 0: Port & length
- *
+ *
* Offset Description
* B0..1 Port
* B2..7 Length of message - (not including Byte 0)
- *
+ *
*/
#define FTDI_PORT_MASK 0x0f
#define FTDI_MSR_MASK 0xf0
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index fffb0c2ee9b..2185251c785 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.23 2002/07/10 21:41:50 mickey Exp $ */
+/* $OpenBSD: ugen.c,v 1.24 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ugen.c,v 1.58 2002/02/20 20:30:12 christos Exp $ */
/* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -191,7 +191,7 @@ USB_ATTACH(ugen)
char devinfo[1024];
usbd_status err;
int conf;
-
+
usbd_devinfo(uaa->device, 0, devinfo);
USB_ATTACH_SETUP;
printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo);
@@ -464,7 +464,7 @@ ugenclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
continue;
DPRINTFN(5, ("ugenclose: endpt=%d dir=%d sce=%p\n",
endpt, dir, sce));
-
+
usbd_abort_pipe(sce->pipeh);
usbd_close_pipe(sce->pipeh);
sce->pipeh = NULL;
@@ -628,7 +628,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
splx(s);
break;
-
+
default:
return (ENXIO);
}
@@ -825,7 +825,7 @@ ugenintr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
ibuf[0], ibuf[1], ibuf[2]));
(void)b_to_q(ibuf, count, &sce->q);
-
+
if (sce->state & UGEN_ASLP) {
sce->state &= ~UGEN_ASLP;
DPRINTFN(5, ("ugen_intr: waking %p\n", sce));
@@ -910,7 +910,7 @@ ugen_set_interface(struct ugen_softc *sc, int ifaceidx, int altno)
return (err);
if (ifaceidx < 0 || ifaceidx >= niface)
return (USBD_INVAL);
-
+
err = usbd_device2interface_handle(sc->sc_udev, ifaceidx, &iface);
if (err)
return (err);
@@ -1034,7 +1034,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
return (0);
case USB_SET_TIMEOUT:
sce = &sc->sc_endpoints[endpt][IN];
- if (sce == NULL
+ if (sce == NULL
/* XXX this shouldn't happen, but the distinction between
input and output pipes isn't clear enough.
|| sce->pipeh == NULL */
diff --git a/sys/dev/usb/uhcireg.h b/sys/dev/usb/uhcireg.h
index d51b7492396..fa47455002d 100644
--- a/sys/dev/usb/uhcireg.h
+++ b/sys/dev/usb/uhcireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhcireg.h,v 1.11 2002/05/07 18:29:18 nate Exp $ */
+/* $OpenBSD: uhcireg.h,v 1.12 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uhcireg.h,v 1.14 2001/08/06 15:15:08 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhcireg.h,v 1.12 1999/11/17 22:33:42 n_hibma Exp $ */
@@ -85,7 +85,7 @@
#define UHCI_FRNUM 0x06
#define UHCI_FRNUM_MASK 0x03ff
-
+
#define UHCI_FLBASEADDR 0x08
@@ -122,7 +122,7 @@ typedef u_int32_t uhci_physaddr_t;
#define UHCI_PTR_QH 0x00000002
#define UHCI_PTR_VF 0x00000004
-/*
+/*
* Wait this long after a QH has been removed. This gives that HC a
* chance to stop looking at it before it's recycled.
*/
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index acf3d7cd860..6ec5b6fd01b 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhcivar.h,v 1.13 2002/05/07 18:29:18 nate Exp $ */
+/* $OpenBSD: uhcivar.h,v 1.14 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uhcivar.h,v 1.32 2000/08/13 16:18:09 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhcivar.h,v 1.14 1999/11/17 22:33:42 n_hibma Exp $ */
@@ -42,8 +42,8 @@
/*
* To avoid having 1024 TDs for each isochronous transfer we introduce
* a virtual frame list. Every UHCI_VFRAMELIST_COUNT entries in the real
- * frame list points to a non-active TD. These, in turn, form the
- * starts of the virtual frame list. This also has the advantage that it
+ * frame list points to a non-active TD. These, in turn, form the
+ * starts of the virtual frame list. This also has the advantage that it
* simplifies linking in/out of TDs/QHs in the schedule.
* Furthermore, initially each of the inactive TDs point to an inactive
* QH that forms the start of the interrupt traffic for that slot.
@@ -97,7 +97,7 @@ struct uhci_soft_td {
uhci_soft_td_qh_t link; /* soft version of the td_link field */
uhci_physaddr_t physaddr; /* TD's physical address. */
};
-/*
+/*
* Make the size such that it is a multiple of UHCI_TD_ALIGN. This way
* we can pack a number of soft TD together and have the real TD well
* aligned.
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 8131f4aa2f2..6dc30472289 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.21 2002/07/11 03:11:17 nate Exp $ */
+/* $OpenBSD: uhid.c,v 1.22 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uhid.c,v 1.51 2002/03/17 18:02:53 augustss Exp $ */
/*
@@ -132,7 +132,7 @@ USB_ATTACH(uhid)
struct uhidev_attach_arg *uha = (struct uhidev_attach_arg *)uaa;
int size, repid;
void *desc;
-
+
sc->sc_hdev.sc_intr = uhid_intr;
sc->sc_hdev.sc_parent = uha->parent;
sc->sc_hdev.sc_report_id = uha->reportid;
@@ -197,7 +197,7 @@ USB_DETACH(uhid)
vdevgone(maj, mn, mn, VCHR);
#if 0
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH,
+ usbd_add_drv_event(USB_EVENT_DRIVER_DETACH,
sc->sc_hdev.sc_parent->sc_udev,
USBDEV(sc->sc_hdev.sc_dev));
#endif
@@ -213,7 +213,7 @@ uhid_intr(struct uhidev *addr, void *data, u_int len)
#ifdef UHID_DEBUG
if (uhiddebug > 5) {
u_int32_t i;
-
+
DPRINTF(("uhid_intr: data ="));
for (i = 0; i < len; i++)
DPRINTF((" %02x", ((u_char *)data)[i]));
@@ -222,7 +222,7 @@ uhid_intr(struct uhidev *addr, void *data, u_int len)
#endif
(void)b_to_q(data, len, &sc->sc_q);
-
+
if (sc->sc_state & UHID_ASLP) {
sc->sc_state &= ~UHID_ASLP;
DPRINTFN(5, ("uhid_intr: waking %p\n", &sc->sc_q));
@@ -361,7 +361,7 @@ uhid_do_write(struct uhid_softc *sc, struct uio *uio, int flag)
usbd_status err;
DPRINTFN(1, ("uhidwrite\n"));
-
+
if (sc->sc_dying)
return (EIO);
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index c7af847f017..3a07d841d46 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.3 2002/05/09 15:06:29 nate Exp $ */
+/* $OpenBSD: uhidev.c,v 1.4 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uhidev.c,v 1.5 2002/02/27 01:30:50 augustss Exp $ */
/*
@@ -90,7 +90,7 @@ USB_MATCH(uhidev)
{
USB_MATCH_START(uhidev, uaa);
usb_interface_descriptor_t *id;
-
+
if (uaa->iface == NULL)
return (UMATCH_NONE);
id = usbd_get_interface_descriptor(uaa->iface);
@@ -116,7 +116,7 @@ USB_ATTACH(uhidev)
void *desc;
usbd_status err;
char devinfo[1024];
-
+
sc->sc_udev = uaa->device;
sc->sc_iface = iface;
id = usbd_get_interface_descriptor(iface);
@@ -145,7 +145,7 @@ USB_ATTACH(uhidev)
DPRINTFN(10,("uhidev_attach: bLength=%d bDescriptorType=%d "
"bEndpointAddress=%d-%s bmAttributes=%d wMaxPacketSize=%d"
" bInterval=%d\n",
- ed->bLength, ed->bDescriptorType,
+ ed->bLength, ed->bDescriptorType,
ed->bEndpointAddress & UE_ADDR,
UE_GET_DIR(ed->bEndpointAddress)==UE_DIR_IN? "in" : "out",
ed->bmAttributes & UE_XFERTYPE,
@@ -182,7 +182,7 @@ USB_ATTACH(uhidev)
sc->sc_dying = 1;
USB_ATTACH_ERROR_RETURN;
}
-
+
sc->sc_repdesc = desc;
sc->sc_repdesc_size = size;
@@ -362,7 +362,7 @@ uhidev_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
#ifdef UHIDEV_DEBUG
if (uhidevdebug > 5) {
u_int32_t i;
-
+
DPRINTF(("uhidev_intr: status=%d cc=%d\n", status, cc));
DPRINTF(("uhidev_intr: data ="));
for (i = 0; i < cc; i++)
@@ -433,8 +433,8 @@ uhidev_open(struct uhidev *scd)
/* Set up interrupt pipe. */
DPRINTF(("uhidev_open: isize=%d, ep=0x%02x\n", sc->sc_isize,
sc->sc_ep_addr));
- err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr,
- USBD_SHORT_XFER_OK, &sc->sc_intrpipe, sc, sc->sc_ibuf,
+ err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr,
+ USBD_SHORT_XFER_OK, &sc->sc_intrpipe, sc, sc->sc_ibuf,
sc->sc_isize, uhidev_intr, USBD_DEFAULT_INTERVAL);
if (err) {
DPRINTF(("uhidopen: usbd_open_pipe_intr failed, "
@@ -485,7 +485,7 @@ uhidev_set_report(struct uhidev *scd, int type, void *data, int len)
data = buf;
}
- return usbd_set_report(scd->sc_parent->sc_iface, type,
+ return usbd_set_report(scd->sc_parent->sc_iface, type,
scd->sc_report_id, data, len);
}
@@ -501,13 +501,13 @@ uhidev_set_report_async(struct uhidev *scd, int type, void *data, int len)
data = buf;
}
- usbd_set_report_async(scd->sc_parent->sc_iface, type,
+ usbd_set_report_async(scd->sc_parent->sc_iface, type,
scd->sc_report_id, data, len);
}
usbd_status
uhidev_get_report(struct uhidev *scd, int type, void *data, int len)
{
- return usbd_get_report(scd->sc_parent->sc_iface, type,
+ return usbd_get_report(scd->sc_parent->sc_iface, type,
scd->sc_report_id, data, len);
}
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index c8422aa8a50..2e1fa1b445f 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.17 2002/07/10 13:15:58 nate Exp $ */
+/* $OpenBSD: uhub.c,v 1.18 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: uhub.c,v 1.52 2001/10/26 17:53:59 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -90,7 +90,7 @@ Static bus_child_detached_t uhub_child_detached;
#endif
-/*
+/*
* We need two attachment points:
* hub to usb and hub to hub
* Every other driver only connects to hubs
@@ -107,7 +107,7 @@ struct cfattach uhub_uhub_ca = {
#elif defined(__FreeBSD__)
USB_DECLARE_DRIVER_INIT(uhub,
DEVMETHOD(bus_child_detached, uhub_child_detached));
-
+
/* Create the driver instance for the hub connected to usb case. */
devclass_t uhubroot_devclass;
@@ -130,9 +130,9 @@ USB_MATCH(uhub)
{
USB_MATCH_START(uhub, uaa);
usb_device_descriptor_t *dd = usbd_get_device_descriptor(uaa->device);
-
+
DPRINTFN(5,("uhub_match, dd=%p\n", dd));
- /*
+ /*
* The subclass for hubs seems to be 0 for some and 1 for others,
* so we just ignore the subclass.
*/
@@ -153,7 +153,7 @@ USB_ATTACH(uhub)
int p, port, nports, nremov, pwrdly;
usbd_interface_handle iface;
usb_endpoint_descriptor_t *ed;
-
+
DPRINTFN(1,("uhub_attach\n"));
sc->sc_hub = dev;
usbd_devinfo(dev, 1, devinfo);
@@ -207,11 +207,11 @@ USB_ATTACH(uhub)
dev->hub->hubsoftc = sc;
hub->explore = uhub_explore;
hub->hubdesc = hubdesc;
-
+
DPRINTFN(1,("usbhub_init_hub: selfpowered=%d, parent=%p, "
"parent->selfpowered=%d\n",
dev->self_powered, dev->powersrc->parent,
- dev->powersrc->parent ?
+ dev->powersrc->parent ?
dev->powersrc->parent->self_powered : 0));
if (!dev->self_powered && dev->powersrc->parent != NULL &&
@@ -238,10 +238,10 @@ USB_ATTACH(uhub)
}
err = usbd_open_pipe_intr(iface, ed->bEndpointAddress,
- USBD_SHORT_XFER_OK, &sc->sc_ipipe, sc, sc->sc_status,
+ USBD_SHORT_XFER_OK, &sc->sc_ipipe, sc, sc->sc_status,
sizeof(sc->sc_status), uhub_intr, UHUB_INTR_INTERVAL);
if (err) {
- printf("%s: cannot open interrupt pipe\n",
+ printf("%s: cannot open interrupt pipe\n",
USBDEVNAME(sc->sc_dev));
goto bad;
}
@@ -297,7 +297,7 @@ USB_ATTACH(uhub)
/* Turn the power on. */
err = usbd_set_port_feature(dev, port, UHF_PORT_POWER);
if (err)
- printf("%s: port %d power on failed, %s\n",
+ printf("%s: port %d power on failed, %s\n",
USBDEVNAME(sc->sc_dev), port,
usbd_errstr(err));
DPRINTF(("usb_init_port: turn on port %d power\n", port));
@@ -376,7 +376,7 @@ uhub_explore(usbd_device_handle dev)
if (up->device != NULL && up->device->hub != NULL)
up->device->hub->explore(up->device);
#if 0 && defined(DIAGNOSTIC)
- if (up->device == NULL &&
+ if (up->device == NULL &&
(status & UPS_CURRENT_CONNECT_STATUS))
printf("%s: connected, no device\n",
USBDEVNAME(sc->sc_dev));
@@ -403,7 +403,7 @@ uhub_explore(usbd_device_handle dev)
DPRINTF(("uhub_explore: device addr=%d disappeared "
"on port %d\n", up->device->address, port));
usb_disconnect_port(up, USBDEV(sc->sc_dev));
- usbd_clear_port_feature(dev, port,
+ usbd_clear_port_feature(dev, port,
UHF_C_PORT_CONNECTION);
}
if (!(status & UPS_CURRENT_CONNECT_STATUS)) {
@@ -447,8 +447,8 @@ uhub_explore(usbd_device_handle dev)
}
/* Get device info and set its address. */
- err = usbd_new_device(USBDEV(sc->sc_dev), dev->bus,
- dev->depth + 1, status & UPS_LOW_SPEED,
+ err = usbd_new_device(USBDEV(sc->sc_dev), dev->bus,
+ dev->depth + 1, status & UPS_LOW_SPEED,
port, up);
/* XXX retry a few times? */
if (err) {
@@ -457,7 +457,7 @@ uhub_explore(usbd_device_handle dev)
/* Avoid addressing problems by disabling. */
/* usbd_reset_port(dev, port, &up->status); */
- /*
+ /*
* The unit refused to accept a new address, or had
* some other serious problem. Since we cannot leave
* at 0 we have to disable the port instead.
@@ -536,7 +536,7 @@ USB_DETACH(uhub)
if (rup->device)
usb_disconnect_port(rup, self);
}
-
+
usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_hub,
USBDEV(sc->sc_dev));
@@ -558,7 +558,7 @@ uhub_child_detached(device_t self, device_t child)
int port;
int i;
- if (!devhub->hub)
+ if (!devhub->hub)
/* should never happen; children are only created after init */
panic("hub not fully initialised, but child deleted?");
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index b47f426c2cf..dd2fdc53047 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.15 2002/05/11 08:15:24 deraadt Exp $ */
+/* $OpenBSD: ukbd.c,v 1.16 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ukbd.c,v 1.79 2001/12/30 19:37:43 augustss Exp $ */
/*
@@ -103,7 +103,7 @@ struct ukbd_data {
#if defined(WSDISPLAY_COMPAT_RAWKBD)
#define NN 0 /* no translation */
-/*
+/*
* Translate USB keycodes to US keyboard XT scancodes.
* Scancodes >= 0x80 represent EXTENDED keycodes.
*
@@ -211,7 +211,7 @@ ukbdtracedump(void)
{
int i;
for (i = 0; i < UKBDTRACESIZE; i++) {
- struct ukbdtraceinfo *p =
+ struct ukbdtraceinfo *p =
&ukbdtracedata[(i+ukbdtraceindex)%UKBDTRACESIZE];
printf("%lu.%06lu: mod=0x%02x key0=0x%02x key1=0x%02x "
"key2=0x%02x key3=0x%02x\n",
@@ -275,7 +275,7 @@ USB_MATCH(ukbd)
struct uhidev_attach_arg *uha = (struct uhidev_attach_arg *)uaa;
int size;
void *desc;
-
+
uhidev_get_report_desc(uha->parent, &desc, &size);
if (!hid_is_collection(desc, size, uha->reportid,
HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_KEYBOARD)))
@@ -291,7 +291,7 @@ USB_ATTACH(ukbd)
u_int32_t qflags;
const char *parseerr;
struct wskbddev_attach_args a;
-
+
sc->sc_hdev.sc_intr = ukbd_intr;
sc->sc_hdev.sc_parent = uha->parent;
sc->sc_hdev.sc_report_id = uha->reportid;
@@ -302,7 +302,7 @@ USB_ATTACH(ukbd)
sc->sc_hdev.sc_dev.dv_xname, parseerr);
USB_ATTACH_ERROR_RETURN;
}
-
+
#ifdef DIAGNOSTIC
printf(": %d modifier keys, %d key codes", sc->sc_nmod,
sc->sc_nkeycode);
@@ -361,7 +361,7 @@ ukbd_enable(void *v, int on)
/* Should only be called to change state */
if (sc->sc_enabled == on) {
#ifdef UKBD_DEBUG
- printf("ukbd_enable: %s: bad call on=%d\n",
+ printf("ukbd_enable: %s: bad call on=%d\n",
USBDEVNAME(sc->sc_hdev.sc_dev), on);
#endif
return (EBUSY);
@@ -507,7 +507,7 @@ ukbd_decode(struct ukbd_softc *sc, struct ukbd_data *ud)
#define ADDKEY(c) ibuf[nkeys++] = (c)
#ifdef UKBD_DEBUG
- /*
+ /*
* Keep a trace of the last events. Using printf changes the
* timing, so this can be useful sometimes.
*/
@@ -539,10 +539,10 @@ ukbd_decode(struct ukbd_softc *sc, struct ukbd_data *ud)
omod = sc->sc_odata.modifiers;
if (mod != omod)
for (i = 0; i < sc->sc_nmod; i++)
- if (( mod & sc->sc_mods[i].mask) !=
+ if (( mod & sc->sc_mods[i].mask) !=
(omod & sc->sc_mods[i].mask))
- ADDKEY(sc->sc_mods[i].key |
- (mod & sc->sc_mods[i].mask
+ ADDKEY(sc->sc_mods[i].key |
+ (mod & sc->sc_mods[i].mask
? PRESS : RELEASE));
if (memcmp(ud->keycode, sc->sc_odata.keycode, sc->sc_nkeycode) != 0) {
/* Check for released keys. */
@@ -558,7 +558,7 @@ ukbd_decode(struct ukbd_softc *sc, struct ukbd_data *ud)
rfound:
;
}
-
+
/* Check for pressed keys. */
for (i = 0; i < sc->sc_nkeycode; i++) {
key = ud->keycode[i];
@@ -606,7 +606,7 @@ ukbd_decode(struct ukbd_softc *sc, struct ukbd_data *ud)
sc->sc_rep[npress++] = 0xe0;
sc->sc_rep[npress++] = c & 0x7f;
}
- DPRINTFN(1,("ukbd_intr: raw = %s0x%02x\n",
+ DPRINTFN(1,("ukbd_intr: raw = %s0x%02x\n",
c & 0x80 ? "0xe0 " : "",
cbuf[j]));
j++;
@@ -627,7 +627,7 @@ ukbd_decode(struct ukbd_softc *sc, struct ukbd_data *ud)
s = spltty();
for (i = 0; i < nkeys; i++) {
key = ibuf[i];
- wskbd_input(sc->sc_wskbddev,
+ wskbd_input(sc->sc_wskbddev,
key&RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN,
key&CODEMASK);
}
@@ -736,7 +736,7 @@ ukbd_cngetc(void *v, u_int *type, int *data)
sc->sc_polling = 0;
c = sc->sc_pollchars[0];
sc->sc_npollchar--;
- memcpy(sc->sc_pollchars, sc->sc_pollchars+1,
+ memcpy(sc->sc_pollchars, sc->sc_pollchars+1,
sc->sc_npollchar * sizeof(u_int16_t));
*type = c & RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN;
*data = c & CODEMASK;
diff --git a/sys/dev/usb/ukbdmap.c b/sys/dev/usb/ukbdmap.c
index b5f4bb01d69..ada175f0823 100644
--- a/sys/dev/usb/ukbdmap.c
+++ b/sys/dev/usb/ukbdmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbdmap.c,v 1.11 2002/05/07 18:29:18 nate Exp $ */
+/* $OpenBSD: ukbdmap.c,v 1.12 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ukbdmap.c,v 1.6 2001/04/04 05:31:57 toshii Exp $ */
/*
@@ -117,7 +117,7 @@ Static const keysym_t ukbd_keydesc_us[] = {
KC(70), KS_Print_Screen,
KC(71), KS_Hold_Screen,
KC(72), KS_Pause,
- KC(73), KS_Insert,
+ KC(73), KS_Insert,
KC(74), KS_Home,
KC(75), KS_Cmd_ScrollBack, KS_Prior,
KC(76), KS_Delete,
@@ -304,7 +304,7 @@ Static const keysym_t ukbd_keydesc_fr[] = {
KC(39), KS_agrave, KS_0, KS_at,
KC(45), KS_parenright, KS_degree, KS_bracketright,
KC(46), KS_equal, KS_plus, KS_braceright,
- KC(47), KS_dead_circumflex, KS_dead_diaeresis,
+ KC(47), KS_dead_circumflex, KS_dead_diaeresis,
KC(48), KS_dollar, KS_sterling, KS_currency,
KC(50), KS_asterisk, KS_mu,
KC(51), KS_m,
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index f2fa020887c..9bef174e627 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ulpt.c,v 1.11 2002/07/10 21:41:51 mickey Exp $ */
+/* $OpenBSD: ulpt.c,v 1.12 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: ulpt.c,v 1.49 2002/02/25 22:39:01 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
@@ -175,7 +175,7 @@ USB_MATCH(ulpt)
{
USB_MATCH_START(ulpt, uaa);
usb_interface_descriptor_t *id;
-
+
DPRINTFN(10,("ulpt_match\n"));
if (uaa->iface == NULL)
return (UMATCH_NONE);
@@ -203,14 +203,14 @@ USB_ATTACH(ulpt)
usb_endpoint_descriptor_t *ed;
u_int8_t epcount;
int i, altno;
-
+
DPRINTFN(10,("ulpt_attach: sc=%p\n", sc));
usbd_devinfo(dev, 0, devinfo);
USB_ATTACH_SETUP;
printf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev),
devinfo, ifcd->bInterfaceClass, ifcd->bInterfaceSubClass);
- /* XXX
+ /* XXX
* Stepping through the alternate settings needs to be abstracted out.
*/
cdesc = usbd_get_config_descriptor(dev);
@@ -666,7 +666,7 @@ ulpt_do_write(struct ulpt_softc *sc, struct uio *uio, int flags)
if (error)
break;
DPRINTFN(1, ("ulptwrite: transfer %d bytes\n", n));
- err = usbd_bulk_transfer(xfer, sc->sc_out_pipe, USBD_NO_COPY,
+ err = usbd_bulk_transfer(xfer, sc->sc_out_pipe, USBD_NO_COPY,
USBD_NO_TIMEOUT, bufp, &n, "ulptwr");
if (err) {
DPRINTF(("ulptwrite: error=%d\n", err));
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index b94f5363034..ad9d539ab9f 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass.c,v 1.17 2002/06/21 00:34:34 art Exp $ */
+/* $OpenBSD: umass.c,v 1.18 2002/07/25 02:18:10 nate Exp $ */
/* $NetBSD: umass.c,v 1.49 2001/01/21 18:56:38 augustss Exp $ */
/*-
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
@@ -237,7 +237,7 @@ int umassdebug = 0;
#define UMASS_SCSIID_HOST UMASS_SCSIID_MAX
#endif
-#define MS_TO_TICKS(ms) ((ms) * hz / 1000)
+#define MS_TO_TICKS(ms) ((ms) * hz / 1000)
/* Bulk-Only features */
@@ -311,7 +311,7 @@ typedef void (*transfer_cb_f)(struct umass_softc *sc, void *priv,
typedef void (*wire_reset_f)(struct umass_softc *sc, int status);
typedef void (*wire_transfer_f)(struct umass_softc *sc, int lun,
- void *cmd, int cmdlen, void *data, int datalen,
+ void *cmd, int cmdlen, void *data, int datalen,
int dir, transfer_cb_f cb, void *priv);
typedef void (*wire_state_f)(usbd_xfer_handle xfer,
usbd_private_handle priv, usbd_status err);
@@ -400,12 +400,12 @@ struct umass_softc {
*/
command_transform_f transform; /* command transform */
#endif
-
+
/* Bulk specific variables for transfers in progress */
umass_bbb_cbw_t cbw; /* command block wrapper */
umass_bbb_csw_t csw; /* command status wrapper*/
/* CBI specific variables for transfers in progress */
- umass_cbi_cbl_t cbl; /* command block */
+ umass_cbi_cbl_t cbl; /* command block */
umass_cbi_sbl_t sbl; /* status block */
/* generic variables for transfers in progress */
@@ -427,7 +427,7 @@ struct umass_softc {
# define XFER_BBB_RESET1 6
# define XFER_BBB_RESET2 7
# define XFER_BBB_RESET3 8
-
+
# define XFER_CBI_CB 0 /* CBI */
# define XFER_CBI_DATA 1
# define XFER_CBI_STATUS 2
@@ -446,7 +446,7 @@ struct umass_softc {
int transfer_dir; /* data direction */
void *transfer_data; /* data buffer */
int transfer_datalen; /* (maximum) length */
- int transfer_actlen; /* actual length */
+ int transfer_actlen; /* actual length */
transfer_cb_f transfer_cb; /* callback */
void *transfer_priv; /* for callback */
int transfer_status;
@@ -558,7 +558,7 @@ Static usbd_status umass_setup_transfer(struct umass_softc *sc,
Static usbd_status umass_setup_ctrl_transfer(struct umass_softc *sc,
usbd_device_handle dev,
usb_device_request_t *req,
- void *buffer, int buflen, int flags,
+ void *buffer, int buflen, int flags,
usbd_xfer_handle xfer);
Static void umass_clear_endpoint_stall(struct umass_softc *sc,
u_int8_t endpt, usbd_pipe_handle pipe,
@@ -786,7 +786,7 @@ umass_match_proto(sc, iface, dev)
return (UMATCH_NONE);
if (vendor == USB_VENDOR_SONY && id->bInterfaceSubClass == 0xff) {
- /*
+ /*
* Sony DSC devices set the sub class to 0xff
* instead of 1 (RBC). Fix that here.
*/
@@ -801,7 +801,7 @@ umass_match_proto(sc, iface, dev)
sc->subclass = id->bInterfaceSubClass;
sc->protocol = id->bInterfaceProtocol;
-
+
switch (sc->subclass) {
case UISUBCLASS_SCSI:
sc->proto |= PROTO_SCSI;
@@ -954,7 +954,7 @@ USB_ATTACH(umass)
sProto = "unknown";
break;
}
- printf("%s: using %s over %s\n", USBDEVNAME(sc->sc_dev), sSubclass,
+ printf("%s: using %s over %s\n", USBDEVNAME(sc->sc_dev), sSubclass,
sProto);
if (sc->drive == INSYSTEM_USBCABLE) {
@@ -1047,7 +1047,7 @@ USB_ATTACH(umass)
umass_disco(sc);
USB_ATTACH_ERROR_RETURN;
}
- /*
+ /*
* Open the intr-in pipe if the protocol is CBI with CCI.
* Note: early versions of the Zip drive do have an interrupt pipe, but
* this pipe is unused
@@ -1094,7 +1094,7 @@ USB_ATTACH(umass)
case PROTO_CBI_I:
bno = XFER_CBI_DATA;
dalloc:
- sc->data_buffer = usbd_alloc_buffer(sc->transfer_xfer[bno],
+ sc->data_buffer = usbd_alloc_buffer(sc->transfer_xfer[bno],
UMASS_MAX_TRANSFER_SIZE);
if (sc->data_buffer == NULL) {
umass_disco(sc);
@@ -1129,7 +1129,7 @@ USB_ATTACH(umass)
*/
sc->sc_adapter.scsipi_cmd = umass_scsipi_cmd;
sc->sc_adapter.scsipi_minphys = umass_scsipi_minphys;
-
+
/*
* fill in the prototype scsipi_link.
*/
@@ -1144,7 +1144,7 @@ USB_ATTACH(umass)
sc->u.sc_link.flags &= ~SDEV_ATAPI;
sc->u.sc_link.adapter_buswidth = 2;
- sc->u.sc_link.adapter_target = UMASS_SCSIID_HOST;
+ sc->u.sc_link.adapter_target = UMASS_SCSIID_HOST;
sc->u.sc_link.luns = sc->maxlun + 1;
sc->u.sc_link.adapter_softc = sc;
@@ -1158,7 +1158,7 @@ USB_ATTACH(umass)
default:
- printf("%s: proto=0x%x not supported yet\n",
+ printf("%s: proto=0x%x not supported yet\n",
USBDEVNAME(sc->sc_dev), sc->proto);
umass_disco(sc);
USB_ATTACH_ERROR_RETURN;
@@ -1289,7 +1289,7 @@ umass_activate(self, act)
Static void
umass_disco(sc)
struct umass_softc *sc;
-{
+{
int i;
DPRINTF(UDMASS_GEN, ("umass_disco\n"));
@@ -1458,7 +1458,7 @@ umass_bbb_reset(struct umass_softc *sc, int status)
DPRINTF(UDMASS_BBB, ("%s: Bulk Reset\n",
USBDEVNAME(sc->sc_dev)));
-
+
sc->transfer_state = TSTATE_BBB_RESET1;
sc->transfer_status = status;
@@ -1496,7 +1496,7 @@ umass_bbb_transfer(struct umass_softc *sc, int lun, void *cmd, int cmdlen,
* is stored in the buffer pointed to by data.
*
* umass_bbb_transfer initialises the transfer and lets the state
- * machine in umass_bbb_state handle the completion. It uses the
+ * machine in umass_bbb_state handle the completion. It uses the
* following states:
* TSTATE_BBB_COMMAND
* -> TSTATE_BBB_DATA
@@ -1638,7 +1638,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
return;
} else if (sc->transfer_dir == DIR_OUT) {
- memcpy(sc->data_buffer, sc->transfer_data,
+ memcpy(sc->data_buffer, sc->transfer_data,
sc->transfer_datalen);
if (umass_setup_transfer(sc, sc->bulkout_pipe,
sc->data_buffer, sc->transfer_datalen,
@@ -1712,7 +1712,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
umass_bbb_reset(sc, STATUS_WIRE_FAILED);
return;
}
-
+
/* Status transport phase, setup transfer */
if (sc->transfer_state == TSTATE_BBB_COMMAND ||
sc->transfer_state == TSTATE_BBB_DATA ||
@@ -1798,7 +1798,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
printf("%s: Phase Error, residue = %d\n",
USBDEVNAME(sc->sc_dev),
UGETDW(sc->csw.dCSWDataResidue));
-
+
umass_bbb_reset(sc, STATUS_WIRE_FAILED);
return;
@@ -1807,7 +1807,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
panic("%s: transferred %d bytes instead of %d bytes\n",
USBDEVNAME(sc->sc_dev),
sc->transfer_actlen, sc->transfer_datalen);
- }
+ }
#if 0
else if (sc->transfer_datalen - sc->transfer_actlen
!= UGETDW(sc->csw.dCSWDataResidue)) {
@@ -1926,7 +1926,7 @@ umass_cbi_reset(struct umass_softc *sc, int status)
/*
* Command Block Reset Protocol
- *
+ *
* First send a reset request to the device. Then clear
* any possibly stalled bulk endpoints.
@@ -1940,7 +1940,7 @@ umass_cbi_reset(struct umass_softc *sc, int status)
DPRINTF(UDMASS_CBI, ("%s: CBI Reset\n",
USBDEVNAME(sc->sc_dev)));
-
+
KASSERT(sizeof(sc->cbl) >= SEND_DIAGNOSTIC_CMDLEN,
("%s: CBL struct is too small (%d < %d)\n",
USBDEVNAME(sc->sc_dev),
@@ -1986,7 +1986,7 @@ umass_cbi_transfer(struct umass_softc *sc, int lun,
* is stored in the buffer pointed to by data.
*
* umass_cbi_transfer initialises the transfer and lets the state
- * machine in umass_cbi_state handle the completion. It uses the
+ * machine in umass_cbi_state handle the completion. It uses the
* following states:
* TSTATE_CBI_COMMAND
* -> XXX fill in
@@ -2068,7 +2068,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv,
return;
}
-
+
sc->transfer_state = TSTATE_CBI_DATA;
if (sc->transfer_dir == DIR_IN) {
if (umass_setup_transfer(sc, sc->bulkin_pipe,
@@ -2078,7 +2078,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv,
umass_cbi_reset(sc, STATUS_WIRE_FAILED);
} else if (sc->transfer_dir == DIR_OUT) {
- memcpy(sc->data_buffer, sc->transfer_data,
+ memcpy(sc->data_buffer, sc->transfer_data,
sc->transfer_datalen);
if (umass_setup_transfer(sc, sc->bulkout_pipe,
sc->transfer_data, sc->transfer_datalen,
@@ -2182,7 +2182,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv,
if (sc->proto & PROTO_UFI) {
int status;
-
+
/* Section 3.4.3.1.3 specifies that the UFI command
* protocol returns an ASC and ASCQ in the interrupt
* data block.
@@ -2470,7 +2470,7 @@ umass_cam_attach(struct umass_softc *sc)
UMASS_SCSIID_MAX, __FILE__);
return(1);
}
-
+
#ifdef UMASS_DO_CAM_RESCAN
if (!cold) {
/* Notify CAM of the new device. Any failure is benign, as the
@@ -2713,7 +2713,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
ccb->ccb_h.status = CAM_REQ_INPROG;
umass_reset(sc, umass_cam_cb, (void *) ccb);
break;
- }
+ }
case XPT_GET_TRAN_SETTINGS:
{
struct ccb_trans_settings *cts = &ccb->cts;
@@ -2861,7 +2861,7 @@ umass_cam_cb(struct umass_softc *sc, void *priv, int residue, int status)
} else {
#ifdef UMASS_DEBUG
panic("transform(REQUEST_SENSE) failed\n");
-#else
+#else
csio->resid = sc->transfer_datalen;
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
xpt_done(ccb);
@@ -3154,7 +3154,7 @@ umass_scsipi_cmd(xs)
DPRINTF(UDMASS_CMD, ("%s: umass_scsi_cmd: %d:%d xs=%p cmd=0x%02x "
"(quirks=0x%x, poll=%d)\n", USBDEVNAME(sc->sc_dev),
SCSI_LINK_TARGET(sc_link), SCSI_LINK_LUN(sc_link),
- xs, xs->cmd->opcode, sc_link->quirks,
+ xs, xs->cmd->opcode, sc_link->quirks,
xs->xs_control & XS_CTL_POLL));
#endif
@@ -3172,8 +3172,8 @@ umass_scsipi_cmd(xs)
#ifdef UMASS_DEBUG
#if defined(__NetBSD__)
- if ((sc_link->type == BUS_ATAPI ?
- sc_link->scsipi_atapi.drive : SCSI_LINK_TARGET(sc_link))
+ if ((sc_link->type == BUS_ATAPI ?
+ sc_link->scsipi_atapi.drive : SCSI_LINK_TARGET(sc_link))
!= UMASS_SCSIID_DEVICE) {
DPRINTF(UDMASS_SCSI, ("%s: wrong SCSI ID %d\n",
USBDEVNAME(sc->sc_dev),
@@ -3257,7 +3257,7 @@ umass_scsipi_cmd(xs)
sc->transfer(sc, SCSI_LINK_LUN(sc_link), cmd, cmdlen,
xs->data, xs->datalen, dir, 0, xs);
sc->sc_xfer_flags = 0;
- DPRINTF(UDMASS_SCSI, ("umass_scsi_cmd: done err=%d\n",
+ DPRINTF(UDMASS_SCSI, ("umass_scsi_cmd: done err=%d\n",
sc->sc_sync_status));
switch (sc->sc_sync_status) {
case USBD_NORMAL_COMPLETION:
@@ -3288,7 +3288,7 @@ umass_scsipi_cmd(xs)
#if defined(__OpenBSD__)
xs->flags |= ITSDONE;
#endif
-
+
scsipi_done(xs);
if (xs->xs_control & XS_CTL_POLL)
return (COMPLETE);
@@ -3340,7 +3340,7 @@ umass_scsipi_cb(struct umass_softc *sc, void *priv, int residue, int status)
microtime(&tv);
delta = (tv.tv_sec - sc->tv.tv_sec) * 1000000 + tv.tv_usec - sc->tv.tv_usec;
#endif
-
+
DPRINTF(UDMASS_CMD,("umass_scsipi_cb: at %lu.%06lu, delta=%u: xs=%p residue=%d"
" status=%d\n", tv.tv_sec, tv.tv_usec, delta, xs, residue, status));
xs->resid = residue;
@@ -3397,7 +3397,7 @@ umass_scsipi_cb(struct umass_softc *sc, void *priv, int residue, int status)
splx(s);
}
-/*
+/*
* Finalise a completed autosense operation
*/
Static void
@@ -3426,8 +3426,8 @@ umass_scsipi_sense_cb(struct umass_softc *sc, void *priv, int residue,
bytes_received = sizeof(xs->sense) - residue;
- if (bytes_received < 8 ||
- (bytes_received < xs->sense.extra_len + 8))
+ if (bytes_received < 8 ||
+ (bytes_received < xs->sense.extra_len + 8))
xs->error = XS_SHORTSENSE;
else
xs->error = XS_SENSE;
@@ -3441,7 +3441,7 @@ umass_scsipi_sense_cb(struct umass_softc *sc, void *priv, int residue,
(xs->sense.flags == 0))
xs->error = XS_NOERROR;
#endif
-
+
break;
default:
DPRINTF(UDMASS_SCSI, ("%s: Autosense failed, status %d\n",
@@ -3471,7 +3471,7 @@ umass_scsipi_sense_cb(struct umass_softc *sc, void *priv, int residue,
*/
Static int
-umass_ufi_transform(struct umass_softc *sc, struct scsipi_generic *cmd,
+umass_ufi_transform(struct umass_softc *sc, struct scsipi_generic *cmd,
int cmdlen, struct scsipi_generic *rcmd, int *rcmdlen)
{
*rcmdlen = UFI_COMMAND_LENGTH;
@@ -3489,7 +3489,7 @@ umass_ufi_transform(struct umass_softc *sc, struct scsipi_generic *cmd,
rcmd->opcode = START_STOP;
rcmd->bytes[3] = SSS_START;
return 1;
- }
+ }
switch (cmd->opcode) {
/* Commands of which the format has been verified. They should work. */
@@ -3511,7 +3511,7 @@ umass_ufi_transform(struct umass_softc *sc, struct scsipi_generic *cmd,
memcpy(rcmd, cmd, cmdlen);
return (1); /* success */
- /*
+ /*
* Other UFI commands: FORMAT_UNIT, MODE_SELECT, READ_FORMAT_CAPACITY,
* VERIFY, WRITE_AND_VERIFY.
* These should be checked whether they somehow can be made to fit.
@@ -3550,11 +3550,11 @@ umass_atapi_probedev(atapi, target)
if (atapi->sc_link[target])
return;
- sc_link = malloc(sizeof(*sc_link), M_DEVBUF, M_NOWAIT);
+ sc_link = malloc(sizeof(*sc_link), M_DEVBUF, M_NOWAIT);
if (sc_link == NULL) {
printf("%s: can't allocate link for drive %d\n",
atapi->sc_dev.dv_xname, target);
- return;
+ return;
}
*sc_link = *atapi->adapter_link;
diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c
index 6ebd3768811..541be52c093 100644
--- a/sys/dev/usb/umct.c
+++ b/sys/dev/usb/umct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umct.c,v 1.3 2002/06/11 06:42:17 nate Exp $ */
+/* $OpenBSD: umct.c,v 1.4 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: umct.c,v 1.7 2001/12/17 14:19:39 ichiro Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@ USB_ATTACH(umct)
usb_config_descriptor_t *cdesc;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
-
+
char devinfo[1024];
char *devname = USBDEVNAME(sc->sc_dev);
usbd_status err;
@@ -188,7 +188,7 @@ USB_ATTACH(umct)
DPRINTF(("\n\numct attach: sc=%p\n", sc));
- /* initialize endpoints */
+ /* initialize endpoints */
uca.bulkin = uca.bulkout = -1;
sc->sc_intr_number = -1;
sc->sc_intr_pipe = NULL;
@@ -213,7 +213,7 @@ USB_ATTACH(umct)
}
/* get the interface */
- err = usbd_device2interface_handle(dev, UMCT_IFACE_INDEX,
+ err = usbd_device2interface_handle(dev, UMCT_IFACE_INDEX,
&sc->sc_iface);
if (err) {
printf("\n%s: failed to get interface, err=%s\n",
@@ -531,7 +531,7 @@ umct_open(void *addr, int portno)
{
struct umct_softc *sc = addr;
int err, lcr_data;
-
+
if (sc->sc_dying)
return (EIO);
@@ -540,7 +540,7 @@ umct_open(void *addr, int portno)
/* initialize LCR */
lcr_data = LCR_DATA_BITS_8 | LCR_PARITY_NONE |
LCR_STOP_BITS_1;
- umct_set_lcr(sc, lcr_data);
+ umct_set_lcr(sc, lcr_data);
if (sc->sc_intr_number != -1 && sc->sc_intr_pipe == NULL) {
sc->sc_status = 0; /* clear status bit */
@@ -560,7 +560,7 @@ umct_open(void *addr, int portno)
}
void
-umct_close(void *addr, int portno)
+umct_close(void *addr, int portno)
{
struct umct_softc *sc = addr;
int err;
@@ -589,7 +589,7 @@ umct_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
{
struct umct_softc *sc = priv;
u_char *buf = sc->sc_intr_buf;
- u_char mstatus, lstatus;
+ u_char mstatus, lstatus;
if (sc->sc_dying)
return;
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index b081ed5ae9f..8829f586750 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umidi.c,v 1.4 2002/07/09 15:22:08 nate Exp $ */
+/* $OpenBSD: umidi.c,v 1.5 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: umidi.c,v 1.15 2002/06/19 13:51:34 tshiozak Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -150,7 +150,7 @@ USB_MATCH(umidi)
return UMATCH_IFACECLASS_IFACESUBCLASS;
id = usbd_get_interface_descriptor(uaa->iface);
- if (id!=NULL &&
+ if (id!=NULL &&
id->bInterfaceClass==UICLASS_AUDIO &&
id->bInterfaceSubClass==UISUBCLASS_MIDISTREAM)
return UMATCH_IFACECLASS_IFACESUBCLASS;
@@ -218,7 +218,7 @@ USB_ATTACH(umidi)
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH,
sc->sc_udev, USBDEV(sc->sc_dev));
-
+
USB_ATTACH_SUCCESS_RETURN;
error:
printf("%s: disabled.\n", USBDEVNAME(sc->sc_dev));
@@ -690,7 +690,7 @@ alloc_all_endpoints_genuine(struct umidi_softc *sc)
p->num_open = 0;
p++;
}
-
+
sc->sc_out_ep = sc->sc_out_num_endpoints ? sc->sc_endpoints : NULL;
sc->sc_in_ep =
sc->sc_in_num_endpoints ?
diff --git a/sys/dev/usb/umidivar.h b/sys/dev/usb/umidivar.h
index 7d471b20b5c..6a766b0a5bb 100644
--- a/sys/dev/usb/umidivar.h
+++ b/sys/dev/usb/umidivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: umidivar.h,v 1.3 2002/06/11 07:49:57 nate Exp $ */
+/* $OpenBSD: umidivar.h,v 1.4 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: umidivar.h,v 1.3 2001/02/03 18:50:32 tshiozak Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -60,8 +60,8 @@ struct umidi_packet {
* <-- parent child -->
*
* umidi(sc) -> endpoint -> jack <- (dynamically assignable) - mididev
- * ^ | ^ |
- * +-----+ +-----+
+ * ^ | ^ |
+ * +-----+ +-----+
*/
/* midi device */
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index f7aa0f57cc4..92ddb986339 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umodem.c,v 1.10 2002/06/11 02:59:15 nate Exp $ */
+/* $OpenBSD: umodem.c,v 1.11 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: umodem.c,v 1.41 2001/11/13 06:24:56 lukem Exp $ */
/*
@@ -234,8 +234,8 @@ USB_ATTACH(umodem)
goto bad;
}
- /*
- * Find the bulk endpoints.
+ /*
+ * Find the bulk endpoints.
* Iterate over all endpoints in the data interface and take note.
*/
uca.bulkin = uca.bulkout = -1;
@@ -463,7 +463,7 @@ umodem_get_caps(usbd_device_handle dev, int *cm, int *acm)
return;
}
*acm = cad->bmCapabilities;
-}
+}
void
umodem_get_status(void *addr, int portno, u_char *lsr, u_char *msr)
@@ -531,7 +531,7 @@ umodem_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag,
if (sc->sc_dying)
return (EIO);
-
+
DPRINTF(("umodemioctl: cmd=0x%08lx\n", cmd));
switch (cmd) {
@@ -658,7 +658,7 @@ umodem_set_line_coding(struct umodem_softc *sc, usb_cdc_line_state_t *state)
err = usbd_do_request(sc->sc_udev, &req, state);
if (err) {
- DPRINTF(("umodem_set_line_coding: failed, err=%s\n",
+ DPRINTF(("umodem_set_line_coding: failed, err=%s\n",
usbd_errstr(err)));
return (err);
}
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index 324e5119a2c..e557ea387c4 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ums.c,v 1.9 2002/05/09 15:06:29 nate Exp $ */
+/* $OpenBSD: ums.c,v 1.10 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: ums.c,v 1.55 2001/12/31 12:15:22 augustss Exp $ */
/*
@@ -132,7 +132,7 @@ USB_MATCH(ums)
struct uhidev_attach_arg *uha = (struct uhidev_attach_arg *)uaa;
int size;
void *desc;
-
+
uhidev_get_report_desc(uha->parent, &desc, &size);
if (!hid_is_collection(desc, size, uha->reportid,
HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)))
@@ -223,12 +223,12 @@ USB_ATTACH(ums)
#ifdef USB_DEBUG
DPRINTF(("ums_attach: sc=%p\n", sc));
- DPRINTF(("ums_attach: X\t%d/%d\n",
+ DPRINTF(("ums_attach: X\t%d/%d\n",
sc->sc_loc_x.pos, sc->sc_loc_x.size));
- DPRINTF(("ums_attach: Y\t%d/%d\n",
+ DPRINTF(("ums_attach: Y\t%d/%d\n",
sc->sc_loc_y.pos, sc->sc_loc_y.size));
if (sc->flags & UMS_Z)
- DPRINTF(("ums_attach: Z\t%d/%d\n",
+ DPRINTF(("ums_attach: Z\t%d/%d\n",
sc->sc_loc_z.pos, sc->sc_loc_z.size));
for (i = 1; i <= sc->nbuttons; i++) {
DPRINTF(("ums_attach: B%d\t%d/%d\n",
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index fb08012ef24..5c25c9a9c25 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uplcom.c,v 1.5 2002/07/10 03:02:50 nate Exp $ */
+/* $OpenBSD: uplcom.c,v 1.6 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: uplcom.c,v 1.27 2002/03/16 16:10:19 ichiro Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -188,7 +188,7 @@ USB_ATTACH(uplcom)
usb_config_descriptor_t *cdesc;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
-
+
char devinfo[1024];
char *devname = USBDEVNAME(sc->sc_dev);
usbd_status err;
@@ -203,7 +203,7 @@ USB_ATTACH(uplcom)
DPRINTF(("\n\nuplcom attach: sc=%p\n", sc));
- /* initialize endpoints */
+ /* initialize endpoints */
uca.bulkin = uca.bulkout = -1;
sc->sc_intr_number = -1;
sc->sc_intr_pipe = NULL;
@@ -228,7 +228,7 @@ USB_ATTACH(uplcom)
}
/* get the (first/common) interface */
- err = usbd_device2interface_handle(dev, UPLCOM_IFACE_INDEX,
+ err = usbd_device2interface_handle(dev, UPLCOM_IFACE_INDEX,
&sc->sc_iface);
if (err) {
printf("\n%s: failed to get interface, err=%s\n",
@@ -255,7 +255,7 @@ USB_ATTACH(uplcom)
UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) {
sc->sc_intr_number = ed->bEndpointAddress;
sc->sc_isize = UGETW(ed->wMaxPacketSize);
- }
+ }
}
if (sc->sc_intr_number== -1) {
@@ -277,11 +277,11 @@ USB_ATTACH(uplcom)
* Interrupt(0x81) | Interrupt(0x81)
* -----------------+ BulkIN(0x02)
* Interface 1 | BulkOUT(0x83)
- * BulkIN(0x02) |
+ * BulkIN(0x02) |
* BulkOUT(0x83) |
*/
if (cdesc->bNumInterface == 2) {
- err = usbd_device2interface_handle(dev,
+ err = usbd_device2interface_handle(dev,
UPLCOM_SECOND_IFACE_INDEX, &sc->sc_iface);
if (err) {
printf("\n%s: failed to get second interface, err=%s\n",
@@ -289,7 +289,7 @@ USB_ATTACH(uplcom)
sc->sc_dying = 1;
USB_ATTACH_ERROR_RETURN;
}
- }
+ }
/* Find the bulk{in,out} endpoints */
@@ -416,9 +416,9 @@ uplcom_reset(struct uplcom_softc *sc)
req.bRequest = UPLCOM_SET_REQUEST;
USETW(req.wValue, 0);
USETW(req.wIndex, sc->sc_iface_number);
- USETW(req.wLength, 0);
-
- err = usbd_do_request(sc->sc_udev, &req, 0);
+ USETW(req.wLength, 0);
+
+ err = usbd_do_request(sc->sc_udev, &req, 0);
if (err)
return (EIO);
@@ -619,7 +619,7 @@ uplcom_open(void *addr, int portno)
{
struct uplcom_softc *sc = addr;
int err;
-
+
if (sc->sc_dying)
return (EIO);
@@ -643,7 +643,7 @@ uplcom_open(void *addr, int portno)
}
void
-uplcom_close(void *addr, int portno)
+uplcom_close(void *addr, int portno)
{
struct uplcom_softc *sc = addr;
int err;
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index d1d0e25f699..b923c49a536 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urio.c,v 1.12 2002/07/10 21:41:51 mickey Exp $ */
+/* $OpenBSD: urio.c,v 1.13 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: urio.c,v 1.11 2002/02/11 15:11:49 augustss Exp $ */
/*
@@ -300,7 +300,7 @@ urioopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
USB_GET_SC_OPEN(urio, URIOUNIT(dev), sc);
- DPRINTFN(5, ("urioopen: flag=%d, mode=%d, unit=%d\n",
+ DPRINTFN(5, ("urioopen: flag=%d, mode=%d, unit=%d\n",
flag, mode, URIOUNIT(dev)));
if (sc->sc_dying)
@@ -417,7 +417,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag)
USB_GET_SC(urio, URIOUNIT(dev), sc);
- DPRINTFN(5, ("uriowrite: unit=%d, len=%ld\n", URIOUNIT(dev),
+ DPRINTFN(5, ("uriowrite: unit=%d, len=%ld\n", URIOUNIT(dev),
(long)uio->uio_resid));
if (sc->sc_dying)
@@ -460,7 +460,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag)
if (--sc->sc_refcnt < 0)
usb_detach_wakeup(USBDEV(sc->sc_dev));
- DPRINTFN(5, ("uriowrite: done unit=%d, error=%d\n", URIOUNIT(dev),
+ DPRINTFN(5, ("uriowrite: done unit=%d, error=%d\n", URIOUNIT(dev),
error));
return (error);
@@ -509,7 +509,7 @@ urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
len = rcmd->length;
DPRINTFN(1,("urio_ioctl: cmd=0x%08lx reqtype=0x%0x req=0x%0x "
- "value=0x%0x index=0x%0x len=0x%0x\n",
+ "value=0x%0x index=0x%0x len=0x%0x\n",
cmd, requesttype, rcmd->request, rcmd->value,
rcmd->index, len));
@@ -530,7 +530,7 @@ urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
uio.uio_resid = len;
uio.uio_offset = 0;
uio.uio_segflg = UIO_USERSPACE;
- uio.uio_rw = req.bmRequestType & UT_READ ?
+ uio.uio_rw = req.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_procp = p;
ptr = malloc(len, M_TEMP, M_WAITOK);
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index b6f325ab0af..2d703ec4e33 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.22 2002/07/11 03:11:17 nate Exp $ */
+/* $OpenBSD: usb.c,v 1.23 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb.c,v 1.53 2001/01/23 17:04:30 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb.c,v 1.20 1999/11/17 22:33:46 n_hibma Exp $ */
@@ -79,7 +79,7 @@ int uhcidebug;
#ifdef OHCI_DEBUG
int ohcidebug;
#endif
-/*
+/*
* 0 - do usual exploration
* 1 - do not use timeout exploration
* >1 - do no exploration
@@ -116,7 +116,7 @@ struct usb_event_q {
struct usb_event ue;
SIMPLEQ_ENTRY(usb_event_q) next;
};
-Static SIMPLEQ_HEAD(, usb_event_q) usb_events =
+Static SIMPLEQ_HEAD(, usb_event_q) usb_events =
SIMPLEQ_HEAD_INITIALIZER(usb_events);
Static int usb_nevents = 0;
Static struct selinfo usb_selevent;
@@ -143,7 +143,7 @@ USB_ATTACH(usb)
usbd_status err;
int usbrev;
struct usb_event ue;
-
+
DPRINTF(("usbd_attach\n"));
usbd_init();
@@ -175,13 +175,13 @@ USB_ATTACH(usb)
dev = sc->sc_port.device;
if (dev->hub == NULL) {
sc->sc_dying = 1;
- printf("%s: root device is not a hub\n",
+ printf("%s: root device is not a hub\n",
USBDEVNAME(sc->sc_dev));
USB_ATTACH_ERROR_RETURN;
}
sc->sc_bus->root_hub = dev;
#if 1
- /*
+ /*
* Turning this code off will delay attachment of USB devices
* until the USB event thread is running, which means that
* the keyboard will not work until after cold boot.
@@ -190,8 +190,8 @@ USB_ATTACH(usb)
dev->hub->explore(sc->sc_bus->root_hub);
#endif
} else {
- printf("%s: root hub problem, error=%d\n",
- USBDEVNAME(sc->sc_dev), err);
+ printf("%s: root hub problem, error=%d\n",
+ USBDEVNAME(sc->sc_dev), err);
sc->sc_dying = 1;
}
if (cold)
@@ -382,7 +382,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
case FIONBIO:
/* All handled in the upper FS layer. */
return (0);
-
+
case FIOASYNC:
if (*(int *)data)
usb_async_proc = p;
@@ -426,7 +426,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
DPRINTF(("usbioctl: USB_REQUEST addr=%d len=%d\n", addr, len));
if (len < 0 || len > 32768)
return (EINVAL);
- if (addr < 0 || addr >= USB_MAX_DEVICES ||
+ if (addr < 0 || addr >= USB_MAX_DEVICES ||
sc->sc_bus->devices[addr] == 0)
return (EINVAL);
if (len != 0) {
@@ -438,7 +438,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
uio.uio_offset = 0;
uio.uio_segflg = UIO_USERSPACE;
uio.uio_rw =
- ur->ucr_request.bmRequestType & UT_READ ?
+ ur->ucr_request.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_procp = p;
ptr = malloc(len, M_TEMP, M_WAITOK);
@@ -501,14 +501,14 @@ usbpoll(dev_t dev, int events, struct proc *p)
if (minor(dev) == USB_DEV_MINOR) {
revents = 0;
mask = POLLIN | POLLRDNORM;
-
+
s = splusb();
if (events & mask && usb_nevents > 0)
revents |= events & mask;
if (revents == 0 && events & mask)
selrecord(p, &usb_selevent);
splx(s);
-
+
return (revents);
} else {
return (ENXIO);
@@ -526,7 +526,7 @@ usb_discover(void *v)
if (usb_noexplore > 1)
return;
#endif
- /*
+ /*
* We need mutual exclusion while traversing the device tree,
* but this is guaranteed since this function is only called
* from the event thread for the controller.
@@ -576,7 +576,7 @@ usbd_add_drv_event(int type, usbd_device_handle udev, device_ptr_t dev)
struct usb_event ue;
ue.u.ue_driver.ue_cookie = udev->cookie;
- strncpy(ue.u.ue_driver.ue_devname, USBDEVPTRNAME(dev),
+ strncpy(ue.u.ue_driver.ue_devname, USBDEVPTRNAME(dev),
sizeof ue.u.ue_driver.ue_devname);
usb_add_event(type, &ue);
}
diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h
index 08139911857..38764f82edb 100644
--- a/sys/dev/usb/usb.h
+++ b/sys/dev/usb/usb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.h,v 1.19 2002/06/11 03:47:29 nate Exp $ */
+/* $OpenBSD: usb.h,v 1.20 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb.h,v 1.52 2001/07/23 15:17:50 nathanw Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */
@@ -97,7 +97,7 @@ typedef u_int8_t uDWord[4];
(w)[2] = (u_int8_t)((v) >> 16), \
(w)[3] = (u_int8_t)((v) >> 24))
#else
-/*
+/*
* On little-endian machines that can handle unanliged accesses
* (e.g. i386) these macros can be replaced by the following.
*/
@@ -406,7 +406,7 @@ typedef struct {
#define UIPROTO_DATA_Q921M 0x50 /* Management for Q921 */
#define UIPROTO_DATA_Q921 0x51 /* Data for Q921 */
#define UIPROTO_DATA_Q921TM 0x52 /* TEI multiplexer for Q921 */
-#define UIPROTO_DATA_V42BIS 0x90 /* Data compression */
+#define UIPROTO_DATA_V42BIS 0x90 /* Data compression */
#define UIPROTO_DATA_Q931 0x91 /* Euro-ISDN */
#define UIPROTO_DATA_V120 0x92 /* V.24 rate adaption */
#define UIPROTO_DATA_CAPI 0x93 /* CAPI 2.0 commands */
@@ -422,8 +422,8 @@ typedef struct {
#define USB_HUB_MAX_DEPTH 5
-/*
- * Minimum time a device needs to be powered down to go through
+/*
+ * Minimum time a device needs to be powered down to go through
* a power cycle. XXX Are these time in the spec?
*/
#define USB_POWER_DOWN_TIME 200 /* ms */
@@ -574,7 +574,7 @@ struct usb_event {
struct {
usb_event_cookie_t ue_cookie;
char ue_devname[16];
- } ue_driver;
+ } ue_driver;
} u;
};
diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c
index a24c44ba309..bd917fd6486 100644
--- a/sys/dev/usb/usb_mem.c
+++ b/sys/dev/usb/usb_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_mem.c,v 1.12 2002/05/05 22:23:43 nate Exp $ */
+/* $OpenBSD: usb_mem.c,v 1.13 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb_mem.c,v 1.22 2001/11/13 06:24:56 lukem Exp $ */
/*
@@ -86,7 +86,7 @@ Static usbd_status usb_block_allocmem(bus_dma_tag_t, size_t, size_t,
usb_dma_block_t **);
Static void usb_block_freemem(usb_dma_block_t *);
-Static LIST_HEAD(, usb_dma_block) usb_blk_freelist =
+Static LIST_HEAD(, usb_dma_block) usb_blk_freelist =
LIST_HEAD_INITIALIZER(usb_blk_freelist);
Static int usb_blk_nfree = 0;
/* XXX should have different free list for different tags (for speed) */
@@ -101,7 +101,7 @@ usb_block_allocmem(bus_dma_tag_t tag, size_t size, size_t align,
usb_dma_block_t *p;
int s;
- DPRINTFN(5, ("usb_block_allocmem: size=%lu align=%lu\n",
+ DPRINTFN(5, ("usb_block_allocmem: size=%lu align=%lu\n",
(u_long)size, (u_long)align));
#ifdef DIAGNOSTIC
@@ -148,7 +148,7 @@ usb_block_allocmem(bus_dma_tag_t tag, size_t size, size_t align,
if (error)
return (USBD_NOMEM);
- error = bus_dmamem_map(tag, p->segs, p->nsegs, p->size,
+ error = bus_dmamem_map(tag, p->segs, p->nsegs, p->size,
&p->kaddr, BUS_DMA_NOWAIT|BUS_DMA_COHERENT);
if (error)
goto free;
@@ -158,7 +158,7 @@ usb_block_allocmem(bus_dma_tag_t tag, size_t size, size_t align,
if (error)
goto unmap;
- error = bus_dmamap_load(tag, p->map, p->kaddr, p->size, NULL,
+ error = bus_dmamap_load(tag, p->map, p->kaddr, p->size, NULL,
BUS_DMA_NOWAIT);
if (error)
goto destroy;
@@ -229,7 +229,7 @@ usb_allocmem(usbd_bus_handle bus, size_t size, size_t align, usb_dma_t *p)
}
return (err);
}
-
+
s = splusb();
/* Check for free fragments. */
for (f = LIST_FIRST(&usb_frag_freelist); f; f = LIST_NEXT(f, next))
diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h
index 23879b7e546..9c7d91b3ae2 100644
--- a/sys/dev/usb/usb_mem.h
+++ b/sys/dev/usb/usb_mem.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_mem.h,v 1.8 2000/11/08 18:10:39 aaron Exp $ */
+/* $OpenBSD: usb_mem.h,v 1.9 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb_mem.h,v 1.15 2000/06/28 16:39:27 mrg Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_mem.h,v 1.9 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -60,7 +60,7 @@ void usb_freemem(usbd_bus_handle, usb_dma_t *);
#elif defined(__FreeBSD__)
-/*
+/*
* FreeBSD does not have special functions for dma memory, so let's keep it
* simple for now.
*/
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 70e08be1137..4b4d3004cc0 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_port.h,v 1.39 2002/05/19 18:45:42 miod Exp $ */
+/* $OpenBSD: usb_port.h,v 1.40 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb_port.h,v 1.44 2001/05/14 20:35:29 bouyer Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -42,7 +42,7 @@
#ifndef _USB_PORT_H
#define _USB_PORT_H
-/*
+/*
* Macro's to cope with the differences between operating systems.
*/
diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c
index 29ee6f87b7c..5556b98b020 100644
--- a/sys/dev/usb/usb_quirks.c
+++ b/sys/dev/usb/usb_quirks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_quirks.c,v 1.13 2002/05/07 20:06:28 nate Exp $ */
+/* $OpenBSD: usb_quirks.c,v 1.14 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb_quirks.c,v 1.39 2001/11/13 06:24:56 lukem Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.13 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -41,7 +41,7 @@
#include <sys/param.h>
#include <sys/systm.h>
-
+
#include <dev/usb/usb.h>
#include <dev/usb/usbdevs.h>
@@ -60,7 +60,7 @@ Static const struct usbd_quirk_entry {
struct usbd_quirks quirks;
} usb_quirks[] = {
{ USB_VENDOR_KYE, USB_PRODUCT_KYE_NICHE, 0x100, { UQ_NO_SET_PROTO}},
- { USB_VENDOR_INSIDEOUT, USB_PRODUCT_INSIDEOUT_EDGEPORT4,
+ { USB_VENDOR_INSIDEOUT, USB_PRODUCT_INSIDEOUT_EDGEPORT4,
0x094, { UQ_SWAP_UNICODE}},
{ USB_VENDOR_BTC, USB_PRODUCT_BTC_BTC7932, 0x100, { UQ_NO_STRINGS }},
{ USB_VENDOR_ADS, USB_PRODUCT_ADS_UBS10BT, 0x002, { UQ_NO_STRINGS }},
@@ -110,7 +110,7 @@ usbd_find_quirk(usb_device_descriptor_t *d)
}
#ifdef USB_DEBUG
if (usbdebug && t->quirks.uq_flags)
- logprintf("usbd_find_quirk 0x%04x/0x%04x/%x: %d\n",
+ logprintf("usbd_find_quirk 0x%04x/0x%04x/%x: %d\n",
UGETW(d->idVendor), UGETW(d->idProduct),
UGETW(d->bcdDevice), t->quirks.uq_flags);
#endif
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 2845b2ddafc..703d5f2515b 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_subr.c,v 1.21 2002/05/07 18:29:18 nate Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.22 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usb_subr.c,v 1.87 2001/08/15 00:04:59 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -203,7 +203,7 @@ usbd_get_string(usbd_device_handle dev, int si, char *buf)
*s++ = c;
else if ((c & 0x00ff) == 0 && swap)
*s++ = c >> 8;
- else
+ else
*s++ = '?';
}
*s++ = 0;
@@ -254,7 +254,7 @@ usbd_devinfo_vp(usbd_device_handle dev, char *v, char *p, int usedev)
for(kdp = usb_knowndevs;
kdp->vendorname != NULL;
kdp++) {
- if (kdp->vendor == UGETW(udd->idVendor) &&
+ if (kdp->vendor == UGETW(udd->idVendor) &&
(kdp->product == UGETW(udd->idProduct) ||
(kdp->flags & USB_KNOWNDEV_NOPROD) != 0))
break;
@@ -331,7 +331,7 @@ usbd_reset_port(usbd_device_handle dev, int port, usb_port_status_t *ps)
usb_device_request_t req;
usbd_status err;
int n;
-
+
req.bmRequestType = UT_WRITE_CLASS_OTHER;
req.bRequest = UR_SET_FEATURE;
USETW(req.wValue, UHF_PORT_RESET);
@@ -378,7 +378,7 @@ usbd_find_idesc(usb_config_descriptor_t *cd, int ifaceidx, int altidx)
for (curidx = lastidx = -1; p < end; ) {
d = (usb_interface_descriptor_t *)p;
DPRINTFN(4,("usbd_find_idesc: idx=%d(%d) altidx=%d(%d) len=%d "
- "type=%d\n",
+ "type=%d\n",
ifaceidx, curidx, altidx, curaidx,
d->bLength, d->bDescriptorType));
if (d->bLength == 0) /* bad descriptor */
@@ -399,7 +399,7 @@ usbd_find_idesc(usb_config_descriptor_t *cd, int ifaceidx, int altidx)
}
usb_endpoint_descriptor_t *
-usbd_find_edesc(usb_config_descriptor_t *cd, int ifaceidx, int altidx,
+usbd_find_edesc(usb_config_descriptor_t *cd, int ifaceidx, int altidx,
int endptidx)
{
char *p = (char *)cd;
@@ -636,7 +636,7 @@ usbd_set_config_index(usbd_device_handle dev, int index, int msg)
}
DPRINTF(("usbd_set_config_index: (addr %d) cno=%d attr=0x%02x, "
"selfpowered=%d, power=%d\n",
- cdp->bConfigurationValue, dev->address, cdp->bmAttributes,
+ cdp->bConfigurationValue, dev->address, cdp->bmAttributes,
selfpowered, cdp->bMaxPower * 2));
/* Check if we have enough power. */
@@ -653,8 +653,8 @@ usbd_set_config_index(usbd_device_handle dev, int index, int msg)
if (msg)
printf("%s: device addr %d (config %d) exceeds power "
"budget, %d mA > %d mA\n",
- USBDEVNAME(dev->bus->bdev), dev->address,
- cdp->bConfigurationValue,
+ USBDEVNAME(dev->bus->bdev), dev->address,
+ cdp->bConfigurationValue,
power, dev->powersrc->power);
err = USBD_NO_POWER;
goto bad;
@@ -675,7 +675,7 @@ usbd_set_config_index(usbd_device_handle dev, int index, int msg)
/* Allocate and fill interface data. */
nifc = cdp->bNumInterface;
- dev->ifaces = malloc(nifc * sizeof(struct usbd_interface),
+ dev->ifaces = malloc(nifc * sizeof(struct usbd_interface),
M_USB, M_NOWAIT);
if (dev->ifaces == NULL) {
err = USBD_NOMEM;
@@ -774,7 +774,7 @@ usbd_probe_and_attach(device_ptr_t parent, usbd_device_handle dev,
usbd_interface_handle ifaces[256]; /* 256 is the absolute max */
#if defined(__FreeBSD__)
- /*
+ /*
* XXX uaa is a static var. Not a problem as it _should_ be used only
* during probe and attach. Should be changed however.
*/
@@ -906,7 +906,7 @@ usbd_probe_and_attach(device_ptr_t parent, usbd_device_handle dev,
return (USBD_NORMAL_COMPLETION);
}
- /*
+ /*
* The generic attach failed, but leave the device as it is.
* We just did not find any drivers, that's all. The device is
* fully operational and not harming anyone.
@@ -939,7 +939,7 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
bus, port, depth, lowspeed));
addr = usbd_getnewaddr(bus);
if (addr < 0) {
- printf("%s: No free USB addresses, new device ignored.\n",
+ printf("%s: No free USB addresses, new device ignored.\n",
USBDEVNAME(bus->bdev));
return (USBD_NO_ADDR);
}
@@ -997,9 +997,9 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
}
DPRINTF(("usbd_new_device: adding unit addr=%d, rev=%02x, class=%d, "
- "subclass=%d, protocol=%d, maxpacket=%d, len=%d, ls=%d\n",
+ "subclass=%d, protocol=%d, maxpacket=%d, len=%d, ls=%d\n",
addr,UGETW(dd->bcdUSB), dd->bDeviceClass, dd->bDeviceSubClass,
- dd->bDeviceProtocol, dd->bMaxPacketSize, dd->bLength,
+ dd->bDeviceProtocol, dd->bMaxPacketSize, dd->bLength,
dev->lowspeed));
if (dd->bDescriptorType != UDESC_DEVICE) {
@@ -1045,9 +1045,9 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
dev->power = USB_MIN_POWER;
dev->self_powered = 0;
- DPRINTF(("usbd_new_device: new dev (addr %d), dev=%p, parent=%p\n",
+ DPRINTF(("usbd_new_device: new dev (addr %d), dev=%p, parent=%p\n",
addr, dev, parent));
-
+
usbd_add_dev_event(USB_EVENT_DEVICE_ATTACH, dev);
err = usbd_probe_and_attach(parent, dev, port, addr);
@@ -1079,7 +1079,7 @@ void
usbd_remove_device(usbd_device_handle dev, struct usbd_port *up)
{
DPRINTF(("usbd_remove_device: %p\n", dev));
-
+
if (dev->default_pipe != NULL)
usbd_kill_pipe(dev->default_pipe);
up->device = 0;
@@ -1109,7 +1109,7 @@ usbd_print(void *aux, const char *pnp)
if (uaa->ifaceno != UHUB_UNK_INTERFACE)
printf(" interface %d", uaa->ifaceno);
#if 0
- /*
+ /*
* It gets very crowded with these locators on the attach line.
* They are not really needed since they are printed in the clear
* by each driver.
@@ -1219,7 +1219,7 @@ usbd_fill_deviceinfo(usbd_device_handle dev, struct usb_device_info *di,
di->udi_devnames[i][0] = 0; /* empty */
if (dev->hub) {
- for (i = 0;
+ for (i = 0;
i < sizeof(di->udi_ports) / sizeof(di->udi_ports[0]) &&
i < dev->hub->hubdesc.bNbrPorts;
i++) {
@@ -1288,7 +1288,7 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent)
char *hubname = USBDEVPTRNAME(parent);
int i;
- DPRINTFN(3,("uhub_disconnect: up=%p dev=%p port=%d\n",
+ DPRINTFN(3,("uhub_disconnect: up=%p dev=%p port=%d\n",
up, dev, up->portno));
#ifdef DIAGNOSTIC
@@ -1301,7 +1301,7 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent)
if (dev->subdevs != NULL) {
DPRINTFN(3,("usb_disconnect_port: disconnect subdevs\n"));
for (i = 0; dev->subdevs[i]; i++) {
- printf("%s: at %s", USBDEVPTRNAME(dev->subdevs[i]),
+ printf("%s: at %s", USBDEVPTRNAME(dev->subdevs[i]),
hubname);
if (up->portno != 0)
printf(" port %d", up->portno);
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 7c50e70d24a..4534ff78e1c 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -1,4 +1,4 @@
-$OpenBSD: usbdevs,v 1.52 2002/07/25 00:07:08 nate Exp $
+$OpenBSD: usbdevs,v 1.53 2002/07/25 02:18:11 nate Exp $
/* $NetBSD: usbdevs,v 1.257 2002/06/20 09:20:36 augustss Exp $ */
/*
@@ -1236,7 +1236,7 @@ product TANGTOP USBPS2 0x0001 USBPS2
/* Taugagreining products */
product TAUGA CAMERAMATE 0x0005 CameraMate (DPCM_USB)
-
+
/* TDK products */
product TDK UPA9664 0x0115 USB-PDC Adapter UPA9664
product TDK UCA1464 0x0116 USB-cdmaOne Adapter UCA1464
diff --git a/sys/dev/usb/usbdevs.h b/sys/dev/usb/usbdevs.h
index 569bdcc83e4..28481400110 100644
--- a/sys/dev/usb/usbdevs.h
+++ b/sys/dev/usb/usbdevs.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: usbdevs.h,v 1.54 2002/07/25 00:07:37 nate Exp $ */
+/* $OpenBSD: usbdevs.h,v 1.55 2002/07/25 02:18:11 nate Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * OpenBSD: usbdevs,v 1.52 2002/07/25 00:07:08 nate Exp
+ * OpenBSD: usbdevs,v 1.52 2002/07/25 00:07:08 nate Exp
*/
/* $NetBSD: usbdevs,v 1.257 2002/06/20 09:20:36 augustss Exp $ */
@@ -1243,7 +1243,7 @@
/* Taugagreining products */
#define USB_PRODUCT_TAUGA_CAMERAMATE 0x0005 /* CameraMate (DPCM_USB) */
-
+
/* TDK products */
#define USB_PRODUCT_TDK_UPA9664 0x0115 /* USB-PDC Adapter UPA9664 */
#define USB_PRODUCT_TDK_UCA1464 0x0116 /* USB-cdmaOne Adapter UCA1464 */
diff --git a/sys/dev/usb/usbdevs_data.h b/sys/dev/usb/usbdevs_data.h
index 8c92465e0a1..0d03e4871e1 100644
--- a/sys/dev/usb/usbdevs_data.h
+++ b/sys/dev/usb/usbdevs_data.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: usbdevs_data.h,v 1.54 2002/07/25 00:07:37 nate Exp $ */
+/* $OpenBSD: usbdevs_data.h,v 1.55 2002/07/25 02:18:11 nate Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * OpenBSD: usbdevs,v 1.52 2002/07/25 00:07:08 nate Exp
+ * OpenBSD: usbdevs,v 1.52 2002/07/25 00:07:08 nate Exp
*/
/* $NetBSD: usbdevs,v 1.257 2002/06/20 09:20:36 augustss Exp $ */
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 069457a94a6..9e2570cf152 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.c,v 1.19 2002/07/09 17:41:02 nate Exp $ */
+/* $OpenBSD: usbdi.c,v 1.20 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usbdi.c,v 1.81 2001/04/17 00:05:33 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -78,7 +78,7 @@ extern int usbdebug;
#endif
Static usbd_status usbd_ar_pipe(usbd_pipe_handle pipe);
-Static void usbd_do_request_async_cb
+Static void usbd_do_request_async_cb
(usbd_xfer_handle, usbd_private_handle, usbd_status);
Static void usbd_start_next(usbd_pipe_handle pipe);
Static usbd_status usbd_open_pipe_ival
@@ -124,18 +124,18 @@ usbd_dump_queue(usbd_pipe_handle pipe)
}
#endif
-usbd_status
+usbd_status
usbd_open_pipe(usbd_interface_handle iface, u_int8_t address,
u_int8_t flags, usbd_pipe_handle *pipe)
-{
- return (usbd_open_pipe_ival(iface, address, flags, pipe,
+{
+ return (usbd_open_pipe_ival(iface, address, flags, pipe,
USBD_DEFAULT_INTERVAL));
}
-usbd_status
+usbd_status
usbd_open_pipe_ival(usbd_interface_handle iface, u_int8_t address,
u_int8_t flags, usbd_pipe_handle *pipe, int ival)
-{
+{
usbd_pipe_handle p;
struct usbd_endpoint *ep;
usbd_status err;
@@ -163,7 +163,7 @@ usbd_open_pipe_ival(usbd_interface_handle iface, u_int8_t address,
return (USBD_NORMAL_COMPLETION);
}
-usbd_status
+usbd_status
usbd_open_pipe_intr(usbd_interface_handle iface, u_int8_t address,
u_int8_t flags, usbd_pipe_handle *pipe,
usbd_private_handle priv, void *buffer, u_int32_t len,
@@ -176,7 +176,7 @@ usbd_open_pipe_intr(usbd_interface_handle iface, u_int8_t address,
DPRINTFN(3,("usbd_open_pipe_intr: address=0x%x flags=0x%x len=%d\n",
address, flags, len));
- err = usbd_open_pipe_ival(iface, address, USBD_EXCLUSIVE_USE,
+ err = usbd_open_pipe_ival(iface, address, USBD_EXCLUSIVE_USE,
&ipipe, ival);
if (err)
return (err);
@@ -269,7 +269,7 @@ usbd_transfer(usbd_xfer_handle xfer)
}
/* Copy data if going out. */
- if (!(xfer->flags & USBD_NO_COPY) && size != 0 &&
+ if (!(xfer->flags & USBD_NO_COPY) && size != 0 &&
!usbd_xfer_isread(xfer))
memcpy(KERNADDR(dmap), xfer->buffer, size);
@@ -343,7 +343,7 @@ usbd_get_buffer(usbd_xfer_handle xfer)
return (KERNADDR(&xfer->dmabuf));
}
-usbd_xfer_handle
+usbd_xfer_handle
usbd_alloc_xfer(usbd_device_handle dev)
{
usbd_xfer_handle xfer;
@@ -357,7 +357,7 @@ usbd_alloc_xfer(usbd_device_handle dev)
return (xfer);
}
-usbd_status
+usbd_status
usbd_free_xfer(usbd_xfer_handle xfer)
{
DPRINTFN(5,("usbd_free_xfer: %p\n", xfer));
@@ -484,7 +484,7 @@ usbd_interface2endpoint_descriptor(usbd_interface_handle iface, u_int8_t index)
return (iface->endpoints[index].edesc);
}
-usbd_status
+usbd_status
usbd_abort_pipe(usbd_pipe_handle pipe)
{
usbd_status err;
@@ -501,8 +501,8 @@ usbd_abort_pipe(usbd_pipe_handle pipe)
splx(s);
return (err);
}
-
-usbd_status
+
+usbd_status
usbd_clear_endpoint_stall(usbd_pipe_handle pipe)
{
usbd_device_handle dev = pipe->device;
@@ -511,7 +511,7 @@ usbd_clear_endpoint_stall(usbd_pipe_handle pipe)
DPRINTFN(8, ("usbd_clear_endpoint_stall\n"));
- /*
+ /*
* Clearing en endpoint stall resets the enpoint toggle, so
* do the same to the HC toggle.
*/
@@ -533,7 +533,7 @@ XXX should we do this?
return (err);
}
-usbd_status
+usbd_status
usbd_clear_endpoint_stall_async(usbd_pipe_handle pipe)
{
usbd_device_handle dev = pipe->device;
@@ -558,7 +558,7 @@ usbd_clear_endpoint_toggle(usbd_pipe_handle pipe)
pipe->methods->cleartoggle(pipe);
}
-usbd_status
+usbd_status
usbd_endpoint_count(usbd_interface_handle iface, u_int8_t *count)
{
#ifdef DIAGNOSTIC
@@ -571,7 +571,7 @@ usbd_endpoint_count(usbd_interface_handle iface, u_int8_t *count)
return (USBD_NORMAL_COMPLETION);
}
-usbd_status
+usbd_status
usbd_interface_count(usbd_device_handle dev, u_int8_t *count)
{
if (dev->cdesc == NULL)
@@ -580,7 +580,7 @@ usbd_interface_count(usbd_device_handle dev, u_int8_t *count)
return (USBD_NORMAL_COMPLETION);
}
-usbd_status
+usbd_status
usbd_interface2device_handle(usbd_interface_handle iface,
usbd_device_handle *dev)
{
@@ -588,7 +588,7 @@ usbd_interface2device_handle(usbd_interface_handle iface,
return (USBD_NORMAL_COMPLETION);
}
-usbd_status
+usbd_status
usbd_device2interface_handle(usbd_device_handle dev,
u_int8_t ifaceno, usbd_interface_handle *iface)
{
@@ -651,7 +651,7 @@ usbd_get_no_alts(usb_config_descriptor_t *cdesc, int ifaceno)
for (n = 0; p < end; p += d->bLength) {
d = (usb_interface_descriptor_t *)p;
- if (p + d->bLength <= end &&
+ if (p + d->bLength <= end &&
d->bDescriptorType == UDESC_INTERFACE &&
d->bInterfaceNumber == ifaceno)
n++;
@@ -696,7 +696,7 @@ usbd_ar_pipe(usbd_pipe_handle pipe)
pipe->repeat = 0;
pipe->aborting = 1;
while ((xfer = SIMPLEQ_FIRST(&pipe->queue)) != NULL) {
- DPRINTFN(2,("usbd_ar_pipe: pipe=%p xfer=%p (methods=%p)\n",
+ DPRINTFN(2,("usbd_ar_pipe: pipe=%p xfer=%p (methods=%p)\n",
pipe, xfer, pipe->methods));
/* Make the HC abort it (and invoke the callback). */
pipe->methods->abort(xfer);
@@ -761,7 +761,7 @@ usb_transfer_complete(usbd_xfer_handle xfer)
#endif
SIMPLEQ_REMOVE_HEAD(&pipe->queue, xfer, next);
}
- DPRINTFN(5,("usb_transfer_complete: repeat=%d new head=%p\n",
+ DPRINTFN(5,("usb_transfer_complete: repeat=%d new head=%p\n",
repeat, SIMPLEQ_FIRST(&pipe->queue)));
/* Count completed transfers. */
@@ -809,7 +809,7 @@ usb_insert_transfer(usbd_xfer_handle xfer)
usbd_status err;
int s;
- DPRINTFN(5,("usb_insert_transfer: pipe=%p running=%d timeout=%d\n",
+ DPRINTFN(5,("usb_insert_transfer: pipe=%p running=%d timeout=%d\n",
pipe, pipe->running, xfer->timeout));
s = splusb();
SIMPLEQ_INSERT_TAIL(&pipe->queue, xfer, next);
@@ -869,7 +869,7 @@ usbd_status
usbd_do_request_flags(usbd_device_handle dev, usb_device_request_t *req,
void *data, u_int16_t flags, int *actlen, u_int32_t timo)
{
- return (usbd_do_request_flags_pipe(dev, dev->default_pipe, req,
+ return (usbd_do_request_flags_pipe(dev, dev->default_pipe, req,
data, flags, actlen, timo));
}
@@ -905,14 +905,14 @@ usbd_do_request_flags_pipe(usbd_device_handle dev, usbd_pipe_handle pipe,
"%02x val=%d index=%d rlen=%d length=%d actlen=%d\n",
dev->address, xfer->request.bmRequestType,
xfer->request.bRequest, UGETW(xfer->request.wValue),
- UGETW(xfer->request.wIndex),
- UGETW(xfer->request.wLength),
+ UGETW(xfer->request.wIndex),
+ UGETW(xfer->request.wLength),
xfer->length, xfer->actlen));
#endif
if (actlen != NULL)
*actlen = xfer->actlen;
if (err == USBD_STALLED) {
- /*
+ /*
* The control endpoint has stalled. Control endpoints
* should not halt, but some may do so anyway so clear
* any halt condition.
@@ -962,11 +962,11 @@ usbd_do_request_async_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
if (xfer->actlen > xfer->length)
DPRINTF(("usbd_do_request: overrun addr=%d type=0x%02x req=0x"
"%02x val=%d index=%d rlen=%d length=%d actlen=%d\n",
- xfer->pipe->device->address,
+ xfer->pipe->device->address,
xfer->request.bmRequestType,
xfer->request.bRequest, UGETW(xfer->request.wValue),
- UGETW(xfer->request.wIndex),
- UGETW(xfer->request.wLength),
+ UGETW(xfer->request.wIndex),
+ UGETW(xfer->request.wLength),
xfer->length, xfer->actlen));
#endif
usbd_free_xfer(xfer);
@@ -1080,7 +1080,7 @@ int
usbd_driver_load(module_t mod, int what, void *arg)
{
/* XXX should implement something like a function that removes all generic devices */
-
+
return (0);
}
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 1c25a18911c..fc879569bd2 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.h,v 1.17 2002/07/09 17:41:02 nate Exp $ */
+/* $OpenBSD: usbdi.h,v 1.18 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usbdi.h,v 1.53 2001/08/15 00:04:59 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -46,7 +46,7 @@ typedef struct usbd_pipe *usbd_pipe_handle;
typedef struct usbd_xfer *usbd_xfer_handle;
typedef void *usbd_private_handle;
-typedef enum { /* keep in sync with usbd_status_msgs */
+typedef enum { /* keep in sync with usbd_status_msgs */
USBD_NORMAL_COMPLETION = 0, /* must be 0 */
USBD_IN_PROGRESS,
/* errors */
@@ -138,7 +138,7 @@ usbd_status usbd_do_request(usbd_device_handle pipe, usb_device_request_t *req,
usbd_status usbd_do_request_async(usbd_device_handle pipe,
usb_device_request_t *req, void *data);
usbd_status usbd_do_request_flags(usbd_device_handle pipe,
- usb_device_request_t *req,
+ usb_device_request_t *req,
void *data, u_int16_t flags, int*, u_int32_t);
usbd_status usbd_do_request_flags_pipe(
usbd_device_handle dev, usbd_pipe_handle pipe,
@@ -157,7 +157,7 @@ int usbd_get_interface_altindex(usbd_interface_handle iface);
usb_interface_descriptor_t *usbd_find_idesc(usb_config_descriptor_t *cd,
int iindex, int ano);
usb_endpoint_descriptor_t *usbd_find_edesc(usb_config_descriptor_t *cd,
- int ifaceidx, int altidx,
+ int ifaceidx, int altidx,
int endptidx);
void usbd_dopoll(usbd_interface_handle);
diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c
index ae09e7c919e..196e0a3cb6e 100644
--- a/sys/dev/usb/usbdi_util.c
+++ b/sys/dev/usb/usbdi_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi_util.c,v 1.13 2002/05/07 18:29:19 nate Exp $ */
+/* $OpenBSD: usbdi_util.c,v 1.14 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usbdi_util.c,v 1.35 2001/10/26 17:58:21 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi_util.c,v 1.14 1999/11/17 22:33:50 n_hibma Exp $ */
@@ -82,13 +82,13 @@ usbd_get_desc(usbd_device_handle dev, int type, int index, int len, void *desc)
}
usbd_status
-usbd_get_config_desc(usbd_device_handle dev, int confidx,
+usbd_get_config_desc(usbd_device_handle dev, int confidx,
usb_config_descriptor_t *d)
{
usbd_status err;
DPRINTFN(3,("usbd_get_config_desc: confidx=%d\n", confidx));
- err = usbd_get_desc(dev, UDESC_CONFIG, confidx,
+ err = usbd_get_desc(dev, UDESC_CONFIG, confidx,
USB_CONFIG_DESCRIPTOR_SIZE, d);
if (err)
return (err);
@@ -112,7 +112,7 @@ usbd_status
usbd_get_device_desc(usbd_device_handle dev, usb_device_descriptor_t *d)
{
DPRINTFN(3,("usbd_get_device_desc:\n"));
- return (usbd_get_desc(dev, UDESC_DEVICE,
+ return (usbd_get_desc(dev, UDESC_DEVICE,
0, USB_DEVICE_DESCRIPTOR_SIZE, d));
}
@@ -127,7 +127,7 @@ usbd_get_device_status(usbd_device_handle dev, usb_status_t *st)
USETW(req.wIndex, 0);
USETW(req.wLength, sizeof(usb_status_t));
return (usbd_do_request(dev, &req, st));
-}
+}
usbd_status
usbd_get_hub_status(usbd_device_handle dev, usb_hub_status_t *st)
@@ -140,7 +140,7 @@ usbd_get_hub_status(usbd_device_handle dev, usb_hub_status_t *st)
USETW(req.wIndex, 0);
USETW(req.wLength, sizeof(usb_hub_status_t));
return (usbd_do_request(dev, &req, st));
-}
+}
usbd_status
usbd_set_address(usbd_device_handle dev, int addr)
@@ -245,7 +245,7 @@ usbd_set_protocol(usbd_interface_handle iface, int report)
}
usbd_status
-usbd_set_report(usbd_interface_handle iface, int type, int id, void *data,
+usbd_set_report(usbd_interface_handle iface, int type, int id, void *data,
int len)
{
usb_interface_descriptor_t *ifd = usbd_get_interface_descriptor(iface);
@@ -411,7 +411,7 @@ usbd_read_report_desc(usbd_interface_handle ifc, void **descp, int *sizep,
return (USBD_NORMAL_COMPLETION);
}
-usbd_status
+usbd_status
usbd_get_config(usbd_device_handle dev, u_int8_t *conf)
{
usb_device_request_t req;
@@ -434,7 +434,7 @@ usbd_bulk_transfer_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
}
usbd_status
-usbd_bulk_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe,
+usbd_bulk_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe,
u_int16_t flags, u_int32_t timeout, void *buf,
u_int32_t *size, char *lbl)
{
@@ -474,11 +474,11 @@ usb_detach_wait(device_ptr_t dv)
printf("usb_detach_wait: %s didn't detach\n",
USBDEVPTRNAME(dv));
DPRINTF(("usb_detach_wait: %s done\n", USBDEVPTRNAME(dv)));
-}
+}
void
usb_detach_wakeup(device_ptr_t dv)
{
DPRINTF(("usb_detach_wakeup: for %s\n", USBDEVPTRNAME(dv)));
wakeup(dv);
-}
+}
diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h
index aef2affe9f7..0e707710a4d 100644
--- a/sys/dev/usb/usbdi_util.h
+++ b/sys/dev/usb/usbdi_util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi_util.h,v 1.10 2002/05/07 18:29:19 nate Exp $ */
+/* $OpenBSD: usbdi_util.h,v 1.11 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usbdi_util.h,v 1.23 2001/10/26 17:58:22 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi_util.h,v 1.9 1999/11/17 22:33:50 n_hibma Exp $ */
@@ -39,15 +39,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-usbd_status usbd_get_desc(usbd_device_handle dev, int type,
+usbd_status usbd_get_desc(usbd_device_handle dev, int type,
int index, int len, void *desc);
-usbd_status usbd_get_config_desc(usbd_device_handle, int,
+usbd_status usbd_get_config_desc(usbd_device_handle, int,
usb_config_descriptor_t *);
usbd_status usbd_get_config_desc_full(usbd_device_handle, int, void *, int);
usbd_status usbd_get_device_desc(usbd_device_handle dev,
usb_device_descriptor_t *d);
usbd_status usbd_set_address(usbd_device_handle dev, int addr);
-usbd_status usbd_get_port_status(usbd_device_handle,
+usbd_status usbd_get_port_status(usbd_device_handle,
int, usb_port_status_t *);
usbd_status usbd_set_hub_feature(usbd_device_handle dev, int);
usbd_status usbd_clear_hub_feature(usbd_device_handle, int);
diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h
index 5bf053ed879..0b1b6d69f30 100644
--- a/sys/dev/usb/usbdivar.h
+++ b/sys/dev/usb/usbdivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdivar.h,v 1.16 2002/05/07 18:29:19 nate Exp $ */
+/* $OpenBSD: usbdivar.h,v 1.17 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usbdivar.h,v 1.63 2001/01/21 19:00:06 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
@@ -237,9 +237,9 @@ usbd_status usbd_setup_pipe(usbd_device_handle dev,
usbd_interface_handle iface,
struct usbd_endpoint *, int,
usbd_pipe_handle *pipe);
-usbd_status usbd_new_device(device_ptr_t parent,
+usbd_status usbd_new_device(device_ptr_t parent,
usbd_bus_handle bus, int depth,
- int lowspeed, int port,
+ int lowspeed, int port,
struct usbd_port *);
void usbd_remove_device(usbd_device_handle, struct usbd_port *);
int usbd_printBCD(char *cp, int bcd);
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index 3b0c7546ad4..a057977ba10 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uscanner.c,v 1.10 2002/07/12 12:03:51 todd Exp $ */
+/* $OpenBSD: uscanner.c,v 1.11 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: uscanner.c,v 1.29 2002/06/18 00:32:30 augustss Exp $ */
/*
@@ -372,7 +372,7 @@ uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p)
USB_GET_SC_OPEN(uscanner, unit, sc);
- DPRINTFN(5, ("uscanneropen: flag=%d, mode=%d, unit=%d\n",
+ DPRINTFN(5, ("uscanneropen: flag=%d, mode=%d, unit=%d\n",
flag, mode, unit));
if (sc->sc_dying)
@@ -676,12 +676,12 @@ uscannerpoll(dev_t dev, int events, usb_proc_ptr p)
if (sc->sc_dying)
return (EIO);
- /*
+ /*
* We have no easy way of determining if a read will
* yield any data or a write will happen.
* Pretend they will.
*/
- revents |= events &
+ revents |= events &
(POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM);
return (revents);
diff --git a/sys/dev/usb/usscanner.c b/sys/dev/usb/usscanner.c
index c8c7a530c34..8c8ba11d4aa 100644
--- a/sys/dev/usb/usscanner.c
+++ b/sys/dev/usb/usscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usscanner.c,v 1.5 2002/05/07 18:29:19 nate Exp $ */
+/* $OpenBSD: usscanner.c,v 1.6 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: usscanner.c,v 1.6 2001/01/23 14:04:14 augustss Exp $ */
/*
@@ -243,7 +243,7 @@ USB_ATTACH(usscanner)
sc->sc_out_addr = ed->bEndpointAddress;
}
}
- if (sc->sc_in_addr == -1 || sc->sc_intr_addr == -1 ||
+ if (sc->sc_in_addr == -1 || sc->sc_intr_addr == -1 ||
sc->sc_out_addr == -1) {
printf("%s: missing endpoint\n", USBDEVNAME(sc->sc_dev));
USB_ATTACH_ERROR_RETURN;
@@ -285,7 +285,7 @@ USB_ATTACH(usscanner)
}
/* XXX too big */
- sc->sc_cmd_buffer = usbd_alloc_buffer(sc->sc_cmd_xfer,
+ sc->sc_cmd_buffer = usbd_alloc_buffer(sc->sc_cmd_xfer,
USSCANNER_MAX_TRANSFER_SIZE);
if (sc->sc_cmd_buffer == NULL) {
printf("%s: alloc cmd buffer failed, err=%d\n",
@@ -309,7 +309,7 @@ USB_ATTACH(usscanner)
usscanner_cleanup(sc);
USB_ATTACH_ERROR_RETURN;
}
- sc->sc_data_buffer = usbd_alloc_buffer(sc->sc_data_xfer,
+ sc->sc_data_buffer = usbd_alloc_buffer(sc->sc_data_xfer,
USSCANNER_MAX_TRANSFER_SIZE);
if (sc->sc_data_buffer == NULL) {
printf("%s: alloc data buffer failed, err=%d\n",
@@ -323,7 +323,7 @@ USB_ATTACH(usscanner)
*/
sc->sc_adapter.scsipi_cmd = usscanner_scsipi_cmd;
sc->sc_adapter.scsipi_minphys = usscanner_scsipi_minphys;
-
+
/*
* fill in the prototype scsipi_link.
*/
@@ -346,7 +346,7 @@ USB_ATTACH(usscanner)
sc->sc_link.scsipi_scsi.max_target = USSCANNER_SCSIID_DEVICE;
sc->sc_link.scsipi_scsi.max_lun = 0;
#endif
-
+
sc->sc_child = config_found(&sc->sc_dev, &sc->sc_link, scsiprint);
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
@@ -462,7 +462,7 @@ usscanner_sense(struct usscanner_softc *sc)
sc->sc_state = UAS_SENSECMD;
memcpy(sc->sc_cmd_buffer, &sense_cmd, sizeof sense_cmd);
usbd_setup_xfer(sc->sc_cmd_xfer, sc->sc_out_pipe, sc, sc->sc_cmd_buffer,
- sizeof sense_cmd, USBD_NO_COPY, USSCANNER_TIMEOUT,
+ sizeof sense_cmd, USBD_NO_COPY, USSCANNER_TIMEOUT,
usscanner_sensecmd_cb);
err = usbd_transfer(sc->sc_cmd_xfer);
if (err == USBD_IN_PROGRESS)
@@ -492,7 +492,7 @@ usscanner_intr_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
/* XXX what should we do on non-0 status */
sc->sc_state = UAS_IDLE;
-
+
sc->sc_xs->xs_status |= XS_STS_DONE;
s = splbio();
scsipi_done(sc->sc_xs);
diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c
index 424e7fc1625..f547a35ce82 100644
--- a/sys/dev/usb/uvisor.c
+++ b/sys/dev/usb/uvisor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvisor.c,v 1.10 2002/07/09 17:41:02 nate Exp $ */
+/* $OpenBSD: uvisor.c,v 1.11 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: uvisor.c,v 1.15 2002/06/16 15:01:31 augustss Exp $ */
/*
@@ -172,7 +172,7 @@ USB_DECLARE_DRIVER(uvisor);
USB_MATCH(uvisor)
{
USB_MATCH_START(uvisor, uaa);
-
+
if (uaa->iface != NULL)
return (UMATCH_NONE);
@@ -416,6 +416,6 @@ uvisor_close(void *addr, int portno)
USETW(req.wValue, 0);
USETW(req.wIndex, 0);
USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE);
- (void)usbd_do_request_flags(sc->sc_udev, &req, &coninfo,
+ (void)usbd_do_request_flags(sc->sc_udev, &req, &coninfo,
USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT);
}
diff --git a/sys/dev/usb/uyap.c b/sys/dev/usb/uyap.c
index ade6503df08..53c1fba9048 100644
--- a/sys/dev/usb/uyap.c
+++ b/sys/dev/usb/uyap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uyap.c,v 1.4 2002/05/06 05:40:43 nate Exp $ */
+/* $OpenBSD: uyap.c,v 1.5 2002/07/25 02:18:11 nate Exp $ */
/* $NetBSD: uyap.c,v 1.5 2001/11/13 06:24:57 lukem Exp $ */
/*
@@ -68,7 +68,7 @@ USB_DECLARE_DRIVER(uyap);
USB_MATCH(uyap)
{
USB_MATCH_START(uyap, uaa);
-
+
if (uaa->iface != NULL)
return (UMATCH_NONE);
@@ -86,7 +86,7 @@ USB_ATTACH(uyap)
usbd_device_handle dev = uaa->device;
usbd_status err;
char devinfo[1024];
-
+
usbd_devinfo(dev, 0, devinfo);
USB_ATTACH_SETUP;
printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo);
@@ -98,7 +98,7 @@ USB_ATTACH(uyap)
USBDEVNAME(sc->sc_dev), usbd_errstr(err));
USB_ATTACH_ERROR_RETURN;
}
-
+
printf("%s: firmware download complete, disconnecting.\n",
USBDEVNAME(sc->sc_dev));
USB_ATTACH_SUCCESS_RETURN;