svn commit: r339382 - projects/power8_bringup_hacks/sys/dev/bge
Leandro Lupori
luporl at FreeBSD.org
Tue Oct 16 16:36:03 UTC 2018
Author: luporl
Date: Tue Oct 16 16:36:02 2018
New Revision: 339382
URL: https://svnweb.freebsd.org/changeset/base/339382
Log:
bge(4): limit DMA address to 2GB
This is a temporary hack, to avoid POWER8 Broadcom NICs from becoming
unusable after transferring a reasonable amount of data.
The issue is the same as that of AHCI, where DMA addresses above 2GB
do not work and causes PCI errors.
Modified:
projects/power8_bringup_hacks/sys/dev/bge/if_bge.c
Modified: projects/power8_bringup_hacks/sys/dev/bge/if_bge.c
==============================================================================
--- projects/power8_bringup_hacks/sys/dev/bge/if_bge.c Tue Oct 16 16:03:17 2018 (r339381)
+++ projects/power8_bringup_hacks/sys/dev/bge/if_bge.c Tue Oct 16 16:36:02 2018 (r339382)
@@ -134,6 +134,8 @@ MODULE_DEPEND(bge, miibus, 1, 1, 1);
/* "device miibus" required. See GENERIC if you get errors here. */
#include "miibus_if.h"
+#define BGE_BUS_SPACE_MAXADDR_32BIT 0x7FFFFFFFU
+
/*
* Various supported device vendors/types and their names. Note: the
* spec seems to indicate that the hardware still has Alteon's vendor
@@ -3050,15 +3052,16 @@ bge_dma_alloc(struct bge_softc *sc)
/* Create parent tag for buffers. */
if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) {
+ lowaddr = BGE_BUS_SPACE_MAXADDR_32BIT;
/*
* XXX
* watchdog timeout issue was observed on BCM5704 which
* lives behind PCI-X bridge(e.g AMD 8131 PCI-X bridge).
* Both limiting DMA address space to 32bits and flushing
* mailbox write seem to address the issue.
- */
if (sc->bge_pcixcap != 0)
lowaddr = BUS_SPACE_MAXADDR_32BIT;
+ */
}
error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), 1, 0, lowaddr,
BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0,
More information about the svn-src-projects
mailing list