summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 08:16:23 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 08:16:23 +0000
commitc86f0c7a71e7ade3e38b325c186a9cf374e0411e (patch)
tree176f04f674860c7cfae9ac5d2ff4d4e1d73cb2b7 /sys/pci
parent423ba8f9bc23d93bfc244aca9b12563b1c9de90d (diff)
downloadFreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.zip
FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/aic7870.c16
-rw-r--r--sys/pci/if_de.c50
-rw-r--r--sys/pci/if_pdq.c4
-rw-r--r--sys/pci/ncr.c16
-rw-r--r--sys/pci/pci.c12
-rw-r--r--sys/pci/pcivar.h6
-rw-r--r--sys/pci/pdq.c25
-rw-r--r--sys/pci/pdqreg.h9
8 files changed, 73 insertions, 65 deletions
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c
index f07222b..6028455 100644
--- a/sys/pci/aic7870.c
+++ b/sys/pci/aic7870.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: aic7870.c,v 1.8 1995/03/31 14:08:33 gibbs Exp $
+ * $Id: aic7870.c,v 1.9 1995/04/15 21:38:34 gibbs Exp $
*/
#include <pci.h>
@@ -53,9 +53,9 @@ struct pci_device ahc_device = {
DATA_SET (pcidevice_set, ahc_device);
-static char*
+static char*
aic7870_probe (pcici_t tag, pcidi_t type)
-{
+{
switch(type) {
case PCI_DEVICE_ID_ADAPTEC_2940:
return ("Adaptec 294X SCSI host adapter");
@@ -74,8 +74,8 @@ void
aic7870_attach(config_id, unit)
pcici_t config_id;
int unit;
-{
- u_long io_port;
+{
+ u_long io_port;
unsigned opri = 0;
ahc_type ahc_t = AHC_NONE;
if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0)))
@@ -86,11 +86,11 @@ aic7870_attach(config_id, unit)
* set hence we subtract 0xc01 instead of the
* 0xc00 that you would expect.
*/
- io_port -= 0xc01ul;
+ io_port -= 0xc01ul;
switch (pci_conf_read (config_id, PCI_ID_REG)) {
case PCI_DEVICE_ID_ADAPTEC_2940:
- ahc_t = AHC_294;
+ ahc_t = AHC_294;
break;
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
ahc_t = AHC_AIC7870;
@@ -121,6 +121,6 @@ aic7870_attach(config_id, unit)
splx(opri);
}
return;
-}
+}
#endif /* NPCI > 0 */
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index 2767cce..7a0eee7 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.26 1995/05/22 13:32:24 davidg Exp $
+ * $Id: if_de.c,v 1.27 1995/05/26 02:02:44 davidg Exp $
*
*/
@@ -187,7 +187,7 @@ typedef struct {
* And the number of receive descriptors multiplied by the size
* of the receive buffers must equal the recevive space. This
* is so that we can manipulate the page tables so that even if a
- * packet wraps around the end of the receive space, we can
+ * packet wraps around the end of the receive space, we can
* treat it as virtually contiguous.
*
* The above used to be true (the stupid restriction is still true)
@@ -257,7 +257,7 @@ struct _tulip_softc_t {
#ifndef IFF_ALTPHYS
#define IFF_ALTPHYS IFF_LINK0 /* In case it isn't defined */
#endif
-static const char *tulip_chipdescs[] = {
+static const char *tulip_chipdescs[] = {
"DC21040 [10Mb/s]",
"DC21140 [10-100Mb/s]",
"DC21041 [10Mb/s]"
@@ -500,7 +500,7 @@ tulip_reset(
tulip_desc_t *di;
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
@@ -532,7 +532,7 @@ tulip_reset(
di->d_status = 0;
/*
- * We need to collect all the mbufs were on the
+ * We need to collect all the mbufs were on the
* receive ring before we reinit it either to put
* them back on or to know if we have to allocate
* more.
@@ -648,7 +648,7 @@ tulip_rx_intr(
if (((volatile tulip_desc_t *) eop)->d_status & TULIP_DSTS_OWNER)
break;
-
+
total_len = ((eop->d_status >> 16) & 0x7FF) - 4;
IF_DEQUEUE(&sc->tulip_rxq, m);
if ((eop->d_status & TULIP_DSTS_ERRSUM) == 0) {
@@ -1056,8 +1056,8 @@ tulip_idle_srom(
tulip_softc_t * const sc)
{
unsigned bit, csr;
-
- csr = SROMSEL | SROMRD; EMIT;
+
+ csr = SROMSEL | SROMRD; EMIT;
csr ^= SROMCS; EMIT;
csr ^= SROMCLKON; EMIT;
@@ -1073,12 +1073,12 @@ tulip_idle_srom(
csr = 0; EMIT;
}
-
+
static void
tulip_read_srom(
tulip_softc_t * const sc)
-{
- int idx;
+{
+ int idx;
const unsigned bitwidth = SROM_BITWIDTH;
const unsigned cmdmask = (SROMCMD_RD << bitwidth);
const unsigned msb = 1 << (bitwidth + 3 - 1);
@@ -1091,7 +1091,7 @@ tulip_read_srom(
csr = SROMSEL | SROMRD; EMIT;
csr ^= SROMCSON; EMIT;
csr ^= SROMCLKON; EMIT;
-
+
lastbit = 0;
for (bits = idx|cmdmask, bit = bitwidth + 3; bit > 0; bit--, bits <<= 1) {
const unsigned thisbit = bits & msb;
@@ -1106,7 +1106,7 @@ tulip_read_srom(
for (data = 0, bits = 0; bits < 16; bits++) {
data <<= 1;
- csr ^= SROMCLKON; EMIT; /* clock high; data valid */
+ csr ^= SROMCLKON; EMIT; /* clock high; data valid */
data |= TULIP_READ_CSR(sc, csr_srom_mii) & SROMDIN ? 1 : 0;
csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */
}
@@ -1227,7 +1227,7 @@ tulip_read_macaddr(
if (cksum >= 65535) cksum -= 65535;
rom_cksum = *(u_short *) &sc->tulip_rombuf[6];
-
+
if (cksum != rom_cksum)
return -1;
@@ -1274,8 +1274,8 @@ tulip_addr_filter(
ETHER_NEXT_MULTI(step, enm);
}
sc->tulip_flags |= TULIP_WANTHASH;
- sp[39] = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
- sp[40] = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
+ sp[39] = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
+ sp[40] = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
sp[41] = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
} else {
/*
@@ -1284,8 +1284,8 @@ tulip_addr_filter(
i = 0;
ETHER_FIRST_MULTI(step, &sc->tulip_ac, enm);
for (; enm != NULL; i++) {
- *sp++ = ((u_short *) enm->enm_addrlo)[0];
- *sp++ = ((u_short *) enm->enm_addrlo)[1];
+ *sp++ = ((u_short *) enm->enm_addrlo)[0];
+ *sp++ = ((u_short *) enm->enm_addrlo)[1];
*sp++ = ((u_short *) enm->enm_addrlo)[2];
ETHER_NEXT_MULTI(step, enm);
}
@@ -1302,8 +1302,8 @@ tulip_addr_filter(
* Pad the rest with our hardware address
*/
for (; i < 16; i++) {
- *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
- *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
+ *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
+ *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
*sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
}
}
@@ -1441,11 +1441,11 @@ tulip_attach(
ifp->if_ioctl = tulip_ioctl;
ifp->if_output = ether_output;
ifp->if_start = tulip_start;
-
+
#ifdef __FreeBSD__
printf("%s%d", sc->tulip_name, sc->tulip_unit);
#endif
- printf(": %s%s pass %d.%d Ethernet address %s\n",
+ printf(": %s%s pass %d.%d Ethernet address %s\n",
sc->tulip_boardsw->bd_description,
tulip_chipdescs[sc->tulip_chipid],
(sc->tulip_revinfo & 0xF0) >> 4,
@@ -1550,7 +1550,7 @@ tulip_pci_shutdown(
if (kdc->kdc_unit < NDE) {
tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(kdc->kdc_unit);
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
}
@@ -1595,7 +1595,7 @@ tulip_pci_shutdown(
{
tulip_softc_t * const sc = (tulip_softc_t *) arg;
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
}
@@ -1684,7 +1684,7 @@ tulip_pci_shutdown(
{
tulip_softc_t * const sc = (tulip_softc_t *) arg;
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
}
diff --git a/sys/pci/if_pdq.c b/sys/pci/if_pdq.c
index 577b2fe..2c8885bd 100644
--- a/sys/pci/if_pdq.c
+++ b/sys/pci/if_pdq.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_pdq.c,v 1.4 1995/03/25 22:06:27 bde Exp $
+ * $Id: if_pdq.c,v 1.5 1995/04/05 08:19:23 davidg Exp $
*
*/
@@ -417,7 +417,7 @@ pdq_ifattach(
ifp->if_ioctl = pdq_ifioctl;
ifp->if_output = fddi_output;
ifp->if_start = pdq_ifstart;
-
+
if_attach(ifp);
fddi_ifattach(ifp);
#if NBPFILTER > 0
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index 7b733ad..74fb3c5 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.35 1995/03/22 19:45:22 se Exp $
+** $Id: ncr.c,v 1.36 1995/03/31 00:05:08 se Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@@ -1216,7 +1216,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.35 1995/03/22 19:45:22 se Exp $\n";
+ "\n$Id: ncr.c,v 1.36 1995/03/31 00:05:08 se Exp $\n";
u_long ncr_version = NCR_VERSION
+ (u_long) sizeof (struct ncb)
@@ -2941,7 +2941,7 @@ static void ncr_script_copy_and_bind (struct script *script, ncb_p np)
start = src;
end = src + (sizeof(struct script) / 4);
-
+
while (src < end) {
*dst++ = opcode = *src++;
@@ -3449,7 +3449,7 @@ static INT32 ncr_start (struct scsi_xfer * xp)
int i, oldspl, segments, flags = xp->flags;
u_char ptr, nego, idmsg;
u_long msglen, msglen2;
-
+
/*---------------------------------------------
@@ -3592,7 +3592,7 @@ static INT32 ncr_start (struct scsi_xfer * xp)
/*
** negotiate synchronous transfers?
*/
-
+
if (!tp->period) {
if (tp->inqdata[7] & INQ7_SYNC) {
nego = NS_SYNC;
@@ -4560,7 +4560,7 @@ static void ncr_setmaxtags (tcb_p tp, u_long usrtags)
static void ncr_settags (tcb_p tp, lcb_p lp)
{
u_char reqtags, tmp;
-
+
if ((!tp) || (!lp)) return;
/*
@@ -6050,9 +6050,9 @@ static void ncr_alloc_ccb (ncb_p np, struct scsi_xfer * xp)
tp->getscr[4] = vtophys (&tp->wval);
tp->getscr[5] = np->paddr + offsetof (struct ncr_reg, nc_scntl3);
- assert (( (offsetof(struct ncr_reg, nc_sxfer) ^
+ assert (( (offsetof(struct ncr_reg, nc_sxfer) ^
offsetof(struct tcb , sval )) &3) == 0);
- assert (( (offsetof(struct ncr_reg, nc_scntl3) ^
+ assert (( (offsetof(struct ncr_reg, nc_scntl3) ^
offsetof(struct tcb , wval )) &3) == 0);
tp->call_lun.l_cmd = (SCR_CALL);
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index e124740..0d0c2f8 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.21 1995/03/23 06:14:44 davidg Exp $
+** $Id: pci.c,v 1.22 1995/05/04 06:57:11 davidg Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -113,7 +113,7 @@ struct pcicb {
static int
pci_externalize (struct proc *, struct kern_devconf *, void *, size_t);
-
+
static int
pci_internalize (struct proc *, struct kern_devconf *, void *, size_t);
@@ -234,7 +234,7 @@ pci_register_io (struct pcicb * cb, u_int base, u_int limit)
cb->pcicb_pupto = limit;
/*
- ** XXX should set bridge io mapping here
+ ** XXX should set bridge io mapping here
** but it can be mapped in 4k blocks only,
** leading to conflicts with isa/eisa ..
*/
@@ -1097,8 +1097,8 @@ pci_externalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t l)
return copyout(&buffer, u, sizeof buffer);
}
-
-
+
+
static int
pci_internalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t s)
{
@@ -1476,7 +1476,7 @@ static struct vt VendorTable[] = {
static const char *const majclasses[] = {
"old", "storage", "network", "display",
- "multimedia", "memory", "bridge"
+ "multimedia", "memory", "bridge"
};
void not_supported (pcici_t tag, u_long type)
diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h
index 712c670..207a743 100644
--- a/sys/pci/pcivar.h
+++ b/sys/pci/pcivar.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcivar.h,v 1.4 1995/03/21 23:01:06 se Exp $
+** $Id: pcivar.h,v 1.5 1995/03/25 21:10:38 bde Exp $
**
** Declarations for pci device drivers.
**
@@ -159,8 +159,8 @@ extern unsigned pci_maxdevice;
struct pci_info {
u_short pi_bus;
u_short pi_device;
-};
-
+};
+
#define PCI_EXT_CONF_LEN (16)
#define PCI_EXTERNAL_LEN (sizeof(struct pci_externalize_buffer))
diff --git a/sys/pci/pdq.c b/sys/pci/pdq.c
index 0460ee5..610458b 100644
--- a/sys/pci/pdq.c
+++ b/sys/pci/pdq.c
@@ -21,9 +21,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pdq.c,v 1.3 1995/03/25 22:40:48 bde Exp $
+ * $Id: pdq.c,v 1.4 1995/04/01 01:43:56 davidg Exp $
*
* $Log: pdq.c,v $
+ * Revision 1.4 1995/04/01 01:43:56 davidg
+ * Patch from Matt Thomas to fix mbuf leak in FDDI driver.
+ *
* Revision 1.3 1995/03/25 22:40:48 bde
* Remove wrong redeclarations of printf() and bzero(). Include the correct
* header to declare DELAY().
@@ -78,7 +81,7 @@
#if defined(PDQTEST) && !defined(PDQ_NOPRINTF)
#define PDQ_PRINTF(x) printf x
#else
-#define PDQ_PRINTF(x)
+#define PDQ_PRINTF(x)
#endif
const char * const pdq_halt_codes[] = {
@@ -93,7 +96,7 @@ const char * const pdq_adapter_states[] = {
};
/*
- * The following are used in conjunction with
+ * The following are used in conjunction with
* unsolicited events
*/
const char * const pdq_entities[] = {
@@ -177,7 +180,7 @@ const char * const pdq_pmd_types100[] = {
"Unshielded Twisted Pair"
};
-const char * const * const pdq_pmd_types[] = {
+const char * const * const pdq_pmd_types[] = {
pdq_pmd_types0, pdq_pmd_types100
};
@@ -764,7 +767,7 @@ pdq_process_received_data(
* the real length.
*/
pdulen = datalen - 4 /* CRC */ + 1 /* FC */;
- segcnt = (pdulen + PDQ_RX_FC_OFFSET + PDQ_OS_DATABUF_SIZE - 1) / PDQ_OS_DATABUF_SIZE;
+ segcnt = (pdulen + PDQ_RX_FC_OFFSET + PDQ_OS_DATABUF_SIZE - 1) / PDQ_OS_DATABUF_SIZE;
PDQ_OS_DATABUF_ALLOC(npdu);
if (npdu == NULL) {
printf("discard: no databuf #0\n");
@@ -784,7 +787,7 @@ pdq_process_received_data(
}
PDQ_OS_DATABUF_NEXT_SET(lpdu, NULL);
for (idx = 0; idx < PDQ_RX_SEGCNT; idx++) {
- buffers[(producer + idx) & ring_mask] =
+ buffers[(producer + idx) & ring_mask] =
buffers[(completion + idx) & ring_mask];
buffers[(completion + idx) & ring_mask] = NULL;
}
@@ -833,8 +836,8 @@ pdq_process_received_data(
rxd->rxd_pa_hi = 0;
rxd->rxd_seg_len_hi = PDQ_OS_DATABUF_SIZE / 16;
rxd->rxd_pa_lo = PDQ_OS_VA_TO_PA(PDQ_OS_DATABUF_PTR(buffers[rx->rx_producer]));
- PDQ_ADVANCE(rx->rx_producer, 1, ring_mask);
- PDQ_ADVANCE(producer, 1, ring_mask);
+ PDQ_ADVANCE(rx->rx_producer, 1, ring_mask);
+ PDQ_ADVANCE(producer, 1, ring_mask);
PDQ_ADVANCE(completion, 1, ring_mask);
}
}
@@ -995,7 +998,7 @@ pdq_flush_transmitter(
}
/*
- * The following routine brings the PDQ from whatever state it is
+ * The following routine brings the PDQ from whatever state it is
* in to DMA_UNAVAILABLE (ie. like a RESET but without doing a RESET).
*/
pdq_state_t
@@ -1125,7 +1128,7 @@ pdq_stop(
pdq->pdq_tx_info.tx_free = PDQ_RING_MASK(pdq->pdq_dbp->pdqdb_transmits);
/*
- * Allow the DEFPA to do DMA. Then program the physical
+ * Allow the DEFPA to do DMA. Then program the physical
* addresses of the consumer and descriptor blocks.
*/
if (pdq->pdq_type == PDQ_DEFPA) {
@@ -1169,7 +1172,7 @@ pdq_stop(
PDQ_OS_USEC_DELAY(1000);
}
PDQ_ASSERT(state == PDQS_DMA_AVAILABLE);
-
+
*csrs->csr_host_int_type_0 = 0xFF;
*csrs->csr_host_int_enable = 0 /* PDQ_HOST_INT_STATE_CHANGE
|PDQ_HOST_INT_FATAL_ERROR|PDQ_HOST_INT_CMD_RSP_ENABLE
diff --git a/sys/pci/pdqreg.h b/sys/pci/pdqreg.h
index d664aa9..08038f4 100644
--- a/sys/pci/pdqreg.h
+++ b/sys/pci/pdqreg.h
@@ -21,9 +21,14 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pdqreg.h,v 1.5 1995/03/10 17:41:55 thomas Exp $
+ * $Id: pdqreg.h,v 1.1 1995/03/14 09:16:07 davidg Exp $
*
* $Log: pdqreg.h,v $
+ * Revision 1.1 1995/03/14 09:16:07 davidg
+ * Added support for generic FDDI and the DEC DEFEA and DEFPA FDDI adapters.
+ *
+ * Submitted by: Matt Thomas
+ *
* Revision 1.5 1995/03/10 17:41:55 thomas
* Add DEFTA, DEFQA, and DEFAA
*
@@ -1046,7 +1051,7 @@ typedef enum {
PDQ_LINK_EVENT_ARGUMENT_REASON=0, /* pdq_rireason_t */
PDQ_LINK_EVENT_ARGUMENT_DATA_LINK_HEADER=1, /* pdq_dlhdr_t */
PDQ_LINK_EVENT_ARGUMENT_SOURCE=2, /* pdq_lanaddr_t */
- PDQ_LINK_EVENT_ARGUMENT_UPSTREAM_NEIGHBOR=3,/* pdq_lanaddr_t */
+ PDQ_LINK_EVENT_ARGUMENT_UPSTREAM_NEIGHBOR=3,/* pdq_lanaddr_t */
PDQ_LINK_EVENT_ARGUMENT_EOL=0xFF
} pdq_link_event_argument_t;
OpenPOWER on IntegriCloud