summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>1998-11-23 19:56:52 +0000
committerJason Wright <jason@cvs.openbsd.org>1998-11-23 19:56:52 +0000
commit5c4af75d659e4a8f975cf7fefd5c5d3402f191c0 (patch)
tree87cd450dd40e7761cbc4c6a5593197607941f4cd /sys/dev
parenta4e025274481e053fac8a96719745d61d193b016 (diff)
clean up, make more quiet, and nuke unused 'csr' variable
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_xl.c16
-rw-r--r--sys/dev/pci/if_xlreg.h4
2 files changed, 13 insertions, 7 deletions
diff --git a/sys/dev/pci/if_xl.c b/sys/dev/pci/if_xl.c
index 69f45fded6a..65326971de8 100644
--- a/sys/dev/pci/if_xl.c
+++ b/sys/dev/pci/if_xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xl.c,v 1.14 1998/11/16 15:29:18 jason Exp $ */
+/* $OpenBSD: if_xl.c,v 1.15 1998/11/23 19:56:50 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1848,8 +1848,10 @@ static int xl_newbuf(sc, c)
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
+#if defined(__FreeBSD__)
printf("xl%d: no memory for rx list -- packet dropped!\n",
sc->xl_unit);
+#endif
return(ENOBUFS);
}
@@ -1861,8 +1863,10 @@ static int xl_newbuf(sc, c)
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
+#if defined(__FreeBSD__)
printf("xl%d: no memory for rx list -- packet dropped!\n",
sc->xl_unit);
+#endif
m_freem(m_new);
return(ENOBUFS);
}
@@ -2291,15 +2295,19 @@ static int xl_encap(sc, c, m_head)
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
+#if defined(__FreeBSD__)
printf("xl%d: no memory for tx list", sc->xl_unit);
+#endif
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
+#if defined(__FreeBSD__)
printf("xl%d: no memory for tx list",
sc->xl_unit);
+#endif
return(1);
}
}
@@ -3054,8 +3062,7 @@ xl_attach(parent, self, aux)
sc->sc_st = pa->pa_iot;
#else
if (!(command & PCI_COMMAND_MEM_ENABLE)) {
- printf("%s: failed to enable memory mapping\n",
- sc->sc_dev.dv_xname);
+ printf(": failed to enable memory mapping\n");
return;
}
if (pci_mem_find(pc, pa->pa_tag, XL_PCI_LOMEM, &iobase, &iosize, NULL)){
@@ -3066,7 +3073,6 @@ xl_attach(parent, self, aux)
printf(": can't map mem space\n");
return;
}
- sc->csr = (volatile caddr_t)&iobase;
sc->sc_st = pa->pa_memt;
#endif
@@ -3096,7 +3102,7 @@ xl_attach(parent, self, aux)
* Get station address from the EEPROM.
*/
if (xl_read_eeprom(sc, (caddr_t)&enaddr, XL_EE_OEM_ADR0, 3, 1)) {
- printf("%s: failed to read station address\n",
+ printf("\n%s: failed to read station address\n",
sc->sc_dev.dv_xname);
return;
}
diff --git a/sys/dev/pci/if_xlreg.h b/sys/dev/pci/if_xlreg.h
index 009150c7291..f124a1355ef 100644
--- a/sys/dev/pci/if_xlreg.h
+++ b/sys/dev/pci/if_xlreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xlreg.h,v 1.7 1998/11/11 23:25:02 jason Exp $ */
+/* $OpenBSD: if_xlreg.h,v 1.8 1998/11/23 19:56:51 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -548,7 +548,7 @@ struct xl_softc {
struct arpcom arpcom; /* interface info */
struct ifmedia ifmedia; /* media info */
u_int32_t iobase; /* pointer to PIO space */
-#ifndef XL_USEIOSPACE
+#if defined(XL_USEIOSPACE) && defined(__FreeBSD__)
volatile caddr_t csr; /* pointer to register map */
#endif
struct xl_type *xl_info; /* 3Com adapter info */