summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2012-10-11 05:48:04 +0000
committeryongari <yongari@FreeBSD.org>2012-10-11 05:48:04 +0000
commita96edbf7e8726528efdee62013607365b66ca10a (patch)
tree7f5e5ef421258da45e9e0874ad1fe8070182ff99 /sys/security
parent251b0e8a48776676b7c2ff3812b39ab5ec270783 (diff)
downloadFreeBSD-src-a96edbf7e8726528efdee62013607365b66ca10a.zip
FreeBSD-src-a96edbf7e8726528efdee62013607365b66ca10a.tar.gz
Rework controller reset procedure. Previously driver saved
BGE_PCI_PCISTATE register before issuing global reset. After issuing reset, it reads BGE_PCI_PCISTATE register again and compares the saved register value and current value. It was used to know whether the global reset operation was completed or not. Unfortunately, this logic caused several issues on recent BCM5717/ 5718/5719 and BCM5720 controllers. It seems APE firmware accesses some registers while global reset is in progress such that reading BGE_PCI_PCISTATE register after reset does not yield old pre-reset state value. This resulted in consuming too much time in global reset and sometimes it couldn't successfully complete reset. The BGE_MISCCFG_RESET_CORE_CLOCKS of BGE_MISC_CFG register is self-clearing bit so driver is able to know the reset completion. But the core-lock reset will disable indirect/flat/standard access modes such that driver cannot poll BGE_MISCCFG_RESET_CORE_CLOCKS bit of BGE_MISC_CFG register. So just wait enough time for core-clock reset to complete. Data sheet says driver should wait 100us for PCI/PCI-X devices and 100ms for PCIe devices. I chose 1ms for PCI/PCI-X since this value was used for many years in bge(4). For PCIe devices, use 100ms as recommended by data sheet. bge_chipinit() also cleared BGE_MAC_MODE register which shall clear firmware configured mode information. I think this will result in losing ASF/IPMI link in device attachment. Let bge_reset() honor firmware configured BGE_MAC_MODE register and don't announce driver is UP in bge_reset(). Firmware should have control over driver until it's fully initialized by driver. While I'm here, enable workaround for PCI-X BCM5704 A0 in bge_reset(). This will prevent internal arbitration logic from switching to the other DMA engine after a retry cycle.
Diffstat (limited to 'sys/security')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud