summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sis.c
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-01-10 08:12:20 +0000
committermbr <mbr@FreeBSD.org>2003-01-10 08:12:20 +0000
commitd4ed6decdd7a22b69fb4ac7f58d952996eb04abd (patch)
tree606684be3a7f6210fb5af3b3ecbf721f0ccc4221 /sys/pci/if_sis.c
parent9f1243940bfab5bf1006a5d8a39c39a8d688f28e (diff)
downloadFreeBSD-src-d4ed6decdd7a22b69fb4ac7f58d952996eb04abd.zip
FreeBSD-src-d4ed6decdd7a22b69fb4ac7f58d952996eb04abd.tar.gz
SIS_CFG_EDB_MASTER_EN indicates the EDB bus is used instead of
the PCI bus. When this bit is set, the Max DMA Burst Size for TX/RX DMA should be no larger than 64 bytes. Reviewed by: luoqi Obtained from: (idea from linux driver source) MFC after: 2 weeks
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r--sys/pci/if_sis.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index 33352b4..b8fc130 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -1806,8 +1806,16 @@ sis_init(xsc)
CSR_WRITE_4(sc, SIS_RX_LISTPTR, sc->sis_cdata.sis_rx_paddr);
CSR_WRITE_4(sc, SIS_TX_LISTPTR, sc->sis_cdata.sis_tx_paddr);
- /* Set RX configuration */
- CSR_WRITE_4(sc, SIS_RX_CFG, SIS_RXCFG);
+ /* SIS_CFG_EDB_MASTER_EN indicates the EDB bus is used instead of
+ * the PCI bus. When this bit is set, the Max DMA Burst Size
+ * for TX/RX DMA should be no larger than 16 double words.
+ */
+ if (CSR_READ_4(sc, SIS_CFG) & SIS_CFG_EDB_MASTER_EN) {
+ CSR_WRITE_4(sc, SIS_RX_CFG, SIS_RXCFG64);
+ } else {
+ CSR_WRITE_4(sc, SIS_RX_CFG, SIS_RXCFG256);
+ }
+
/* Accept Long Packets for VLAN support */
SIS_SETBIT(sc, SIS_RX_CFG, SIS_RXCFG_RX_JABBER);
OpenPOWER on IntegriCloud