diff options
author | Martin Blapp <mbr@FreeBSD.org> | 2003-01-10 08:12:20 +0000 |
---|---|---|
committer | Martin Blapp <mbr@FreeBSD.org> | 2003-01-10 08:12:20 +0000 |
commit | 91f8432fab824bf1183c3c94dc5cceef034f2613 (patch) | |
tree | 606684be3a7f6210fb5af3b3ecbf721f0ccc4221 /sys/pci/if_sis.c | |
parent | e808cf62608edd2a48eafa3d0b267f6817ec635e (diff) | |
download | src-91f8432fab824bf1183c3c94dc5cceef034f2613.tar.gz src-91f8432fab824bf1183c3c94dc5cceef034f2613.zip |
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
Notes
Notes:
svn path=/head/; revision=109059
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r-- | sys/pci/if_sis.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 33352b46a0d3..b8fc13053300 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); |