summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-08-14 22:28:48 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-08-14 22:28:48 +0000
commit5d695f0aeb21013be01df184f5acde7811d4104e (patch)
tree01db206d2a771d075064459c63148e0c268eb673 /sys/dev
parente42114e08413bf5e3272891ff728199a6707993b (diff)
KNF mostly spaces and make the dmesg line a bit shorter.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/bt8370.c6
-rw-r--r--sys/dev/pci/if_art.c12
-rw-r--r--sys/dev/pci/if_art.h4
-rw-r--r--sys/dev/pci/musycc.c38
-rw-r--r--sys/dev/pci/musycc_obsd.c12
-rw-r--r--sys/dev/pci/musyccvar.h4
6 files changed, 38 insertions, 38 deletions
diff --git a/sys/dev/pci/bt8370.c b/sys/dev/pci/bt8370.c
index 56248a7ee8d..02a7b77628c 100644
--- a/sys/dev/pci/bt8370.c
+++ b/sys/dev/pci/bt8370.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bt8370.c,v 1.2 2005/08/13 23:52:49 claudio Exp $ */
+/* $OpenBSD: bt8370.c,v 1.3 2005/08/14 22:28:47 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -791,7 +791,7 @@ bt8370_link_status(struct art_softc *ac)
if ((alm1 & (ALM1_RLOS)) ||
(alm2 & (ALM2_TSHORT)))
status = -1;
-
+
return (status);
}
@@ -911,7 +911,7 @@ bt8370_print_status(struct art_softc *ac)
printf("repeated one frame\n");
else
printf("deleted one frame\n");
- }
+ }
/* Loopback Status. */
loop = ebus_read(&ac->art_ebus, Bt8370_LOOP);
diff --git a/sys/dev/pci/if_art.c b/sys/dev/pci/if_art.c
index 0549b6208ea..1dc42bc6bb5 100644
--- a/sys/dev/pci/if_art.c
+++ b/sys/dev/pci/if_art.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_art.c,v 1.4 2005/08/14 21:50:49 claudio Exp $ */
+/* $OpenBSD: if_art.c,v 1.5 2005/08/14 22:28:47 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -76,9 +76,9 @@ art_softc_attach(struct device *parent, struct device *self, void *aux)
struct art_softc *sc = (struct art_softc *)self;
struct musycc_softc *psc = (struct musycc_softc *)parent;
struct musycc_attach_args *ma = aux;
-
+
printf(" \"%s\"", ma->ma_product);
-
+
if (ebus_attach_device(&sc->art_ebus, psc, ma->ma_base,
ma->ma_size) != 0) {
printf(": could not map framer\n");
@@ -95,7 +95,7 @@ art_softc_attach(struct device *parent, struct device *self, void *aux)
printf(": could not alloc channel descriptor\n");
return;
}
-
+
if (musycc_channel_attach(psc, sc->art_channel, self, sc->art_gnum) ==
-1) {
printf(": unable to attach to hdlc controller\n");
@@ -216,7 +216,7 @@ art_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
} else if ((ifr->ifr_flags & IFF_UP) == 0 &&
cc->cc_state == CHAN_RUNNING)
musycc_stop_channel(cc);
- rv = sppp_ioctl(ifp, command, data);
+ rv = sppp_ioctl(ifp, command, data);
break;
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
@@ -228,7 +228,7 @@ art_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
rv = EINVAL;
break;
default:
- rv = sppp_ioctl(ifp, command, data);
+ rv = sppp_ioctl(ifp, command, data);
break;
}
splx(s);
diff --git a/sys/dev/pci/if_art.h b/sys/dev/pci/if_art.h
index 4c8cf6ecd7d..011b54075dd 100644
--- a/sys/dev/pci/if_art.h
+++ b/sys/dev/pci/if_art.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_art.h,v 1.2 2005/08/13 23:52:49 claudio Exp $ */
+/* $OpenBSD: if_art.h,v 1.3 2005/08/14 22:28:47 claudio Exp $ */
/*
* Copyright (c) 2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -32,7 +32,7 @@ struct art_softc {
int art_status; /* if_media status */
u_int art_media; /* if_media media */
- u_int8_t art_gnum; /* group number */
+ u_int8_t art_gnum; /* group number */
u_int8_t art_port; /* port number */
char art_slot; /* TDM slot */
};
diff --git a/sys/dev/pci/musycc.c b/sys/dev/pci/musycc.c
index 253098e32a4..145fea55d49 100644
--- a/sys/dev/pci/musycc.c
+++ b/sys/dev/pci/musycc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: musycc.c,v 1.3 2005/08/14 21:50:49 claudio Exp $ */
+/* $OpenBSD: musycc.c,v 1.4 2005/08/14 22:28:47 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -453,9 +453,9 @@ musycc_set_chandesc(struct musycc_group *mg, int chan, int nslots, int proto)
if (idx > n)
return (EBUSY);
-
+
mg->mg_fifomask |= mask << idx;
-
+
/* setup channel descriptor */
mg->mg_group->tx_cconf[chan] = htole32(MUSYCC_CHAN_BUFIDX_SET(idx) |
MUSYCC_CHAN_BUFLEN_SET(nslots * 2 - 1) |
@@ -553,13 +553,13 @@ musycc_init_channel(struct channel_softc *cc, char slot)
musycc_activate_channel(mg, chan);
tsleep(cc, PZERO | PCATCH, "musycc", hz);
-
+
/*
* XXX we could actually check if the activation of the channels was
* successful but what type of error should we return?
*/
return (0);
-
+
fail:
splx(s);
cc->cc_state = CHAN_IDLE; /* force idle state */
@@ -625,7 +625,7 @@ musycc_free_channel(struct musycc_group *mg, int chan)
chan)
mg->mg_group->rx_tsmap[i] = 0;
}
-
+
/* clear channel descriptor, especially free FIFO space */
idx = MUSYCC_CHAN_BUFIDX_GET(letoh32(mg->mg_group->tx_cconf[chan]));
slots = MUSYCC_CHAN_BUFLEN_GET(letoh32(mg->mg_group->tx_cconf[chan]));
@@ -635,7 +635,7 @@ musycc_free_channel(struct musycc_group *mg, int chan)
mg->mg_fifomask &= ~mask;
mg->mg_group->tx_cconf[chan] = 0;
mg->mg_group->rx_cconf[chan] = 0;
-
+
/* free dma rings */
musycc_list_rx_free(mg, chan);
musycc_list_tx_free(mg, chan);
@@ -814,7 +814,7 @@ musycc_list_rx_init(struct musycc_group *mg, int c, int size)
dd->nextdesc = last;
dd->next = htole32(base + (caddr_t)last - mg->mg_listkva);
-
+
mg->mg_group->rx_headp[c] = htole32(base + (caddr_t)dd -
mg->mg_listkva);
@@ -831,7 +831,7 @@ musycc_list_tx_free(struct musycc_group *mg, int c)
struct dma_desc *dd, *tmp;
md = &mg->mg_dma_d[c];
-
+
ACCOOM_PRINTF(2, ("musycc_list_tx_free\n"));
dd = md->tx_pend;
do {
@@ -861,7 +861,7 @@ musycc_list_rx_free(struct musycc_group *mg, int c)
struct dma_desc *dd, *tmp;
md = &mg->mg_dma_d[c];
-
+
ACCOOM_PRINTF(2, ("musycc_list_rx_free\n"));
dd = md->rx_prod;
do {
@@ -1033,11 +1033,11 @@ musycc_encap(struct musycc_group *mg, struct mbuf *m_head, int c)
cur->status = htole32(status);
cur->data = htole32(map->dm_segs[i].ds_addr);
-
+
bus_dmamap_sync(mg->mg_dmat, mg->mg_listmap,
((caddr_t)cur - mg->mg_listkva), sizeof(struct dma_desc),
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-
+
if (++i >= map->dm_nsegs)
break;
cur = cur->nextdesc;
@@ -1117,7 +1117,7 @@ musycc_start(struct ifnet *ifp)
/* now we are committed to transmit the packet */
sppp_dequeue(ifp);
-
+
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m);
@@ -1482,7 +1482,7 @@ musycc_sreq(struct musycc_group *mg, int channel, u_int32_t req, int dir,
int needskick;
needskick = (mg->mg_sreqpend == mg->mg_sreqprod);
-
+
ACCOOM_PRINTF(4, ("musycc_sreq: g# %d c# %d req %x dir %x\n",
mg->mg_gnum, channel, req, dir));
@@ -1607,7 +1607,7 @@ musycc_attach_sppp(struct channel_softc *cc,
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_PPP, PPP_HEADER_LEN);
#endif /* NBPFILTER > 0 */
-
+
}
struct channel_softc *
@@ -1712,7 +1712,7 @@ musycc_dump_group(int level, struct musycc_group *mg)
int i;
if (level > accoom_debug)
- return;
+ return;
printf("%s: dumping group %d\n",
mg->mg_hdlc->mc_dev.dv_xname, mg->mg_gnum);
@@ -1800,7 +1800,7 @@ musycc_dump_desc(int level, struct musycc_group *mg)
int i;
if (level > accoom_debug)
- return;
+ return;
printf("%s: dumping descriptor %d\n",
mg->mg_hdlc->mc_dev.dv_xname, mg->mg_gnum);
@@ -1876,7 +1876,7 @@ musycc_dump_dma(int level, struct musycc_group *mg, int dir)
int i;
if (level > accoom_debug)
- return;
+ return;
printf("DMA Pointers:\n%8s %8s %8s %8s\n",
"tx head", "tx msg", "rx head", "rx msg");
@@ -1925,7 +1925,7 @@ musycc_dump_dma(int level, struct musycc_group *mg, int dir)
dd = mg->mg_dma_d[i].rx_prod;
do {
addr = htole32(base + ((caddr_t)dd - mg->mg_listkva));
- printf("%p %08x %08x %08x %08x %p\n", dd, addr,
+ printf("%p %08x %08x %08x %08x %p\n", dd, addr,
dd->next, dd->status, dd->data, dd->mbuf);
dd = dd->nextdesc;
} while (dd != mg->mg_dma_d[i].rx_prod);
diff --git a/sys/dev/pci/musycc_obsd.c b/sys/dev/pci/musycc_obsd.c
index 78df81033d6..340c014c720 100644
--- a/sys/dev/pci/musycc_obsd.c
+++ b/sys/dev/pci/musycc_obsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: musycc_obsd.c,v 1.5 2005/08/14 22:06:06 claudio Exp $ */
+/* $OpenBSD: musycc_obsd.c,v 1.6 2005/08/14 22:28:47 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -78,7 +78,7 @@ musycc_softc_attach(struct device *parent, struct device *self, void *aux)
pci_chipset_tag_t pc = pa->pa_pc;
pci_intr_handle_t ih;
const char *intrstr = NULL;
-
+
if (pci_mapreg_map(pa, MUSYCC_PCI_BAR,
PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
&sc->mc_st, &sc->mc_sh, NULL, &sc->mc_iosize, 0)) {
@@ -179,7 +179,7 @@ musycc_ebus_attach(struct device *parent, struct musycc_softc *esc,
intrstr = pci_intr_string(pc, ih);
esc->mc_ih = pci_intr_establish(pc, ih, IPL_NET, ebus_intr, esc,
- self->dv_xname);
+ esc->mc_dev.dv_xname);
if (esc->mc_ih == NULL) {
printf(": couldn't establish interrupt");
if (intrstr != NULL)
@@ -192,7 +192,7 @@ musycc_ebus_attach(struct device *parent, struct musycc_softc *esc,
printf(": %s\n", intrstr);
#endif
- if (ebus_attach_device(&rom, sc, 0, 0x400) != 0) {
+ if (ebus_attach_device(&rom, sc, 0, 0x400) != 0) {
printf(": failed to map rom @ %05p\n", 0);
goto failed;
}
@@ -216,11 +216,11 @@ musycc_ebus_attach(struct device *parent, struct musycc_softc *esc,
esc->mc_ledmask = baseconf.ledmask;
ebus_set_led(esc, 0);
- printf(": card rev %d \n", ntohs(baseconf.rev));
+ printf("\n");
for (i = 0; i < baseconf.numframer; i++) {
if (offset >= 0x400) {
- printf(": bad rom\n");
+ printf("%s: bad rom\n", esc->mc_dev.dv_xname);
goto failed;
}
ebus_read_buf(&rom, offset, &framerconf, sizeof(framerconf));
diff --git a/sys/dev/pci/musyccvar.h b/sys/dev/pci/musyccvar.h
index c7e1e49575a..42a99fd4864 100644
--- a/sys/dev/pci/musyccvar.h
+++ b/sys/dev/pci/musyccvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: musyccvar.h,v 1.3 2005/08/14 21:50:49 claudio Exp $ */
+/* $OpenBSD: musyccvar.h,v 1.4 2005/08/14 22:28:47 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -100,7 +100,7 @@ struct musycc_group {
int mg_freecnt;
struct {
- u_int32_t sreq;
+ u_int32_t sreq;
enum musycc_event event;
} mg_sreq[MUSYCC_SREQNUM];
int mg_sreqpend;