summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/intel.h
diff options
context:
space:
mode:
authorMichael Brown2014-08-21 01:15:45 +0200
committerMichael Brown2014-08-21 01:40:22 +0200
commitead70bf9209155b9f85099ab8b3f34a5346261c6 (patch)
treea426d2210052fbd9294e96d706b6974d705f5ecc /src/drivers/net/intel.h
parent[intel] Display before and after values for both PBS and PBA (diff)
downloadipxe-ead70bf9209155b9f85099ab8b3f34a5346261c6.tar.gz
ipxe-ead70bf9209155b9f85099ab8b3f34a5346261c6.tar.xz
ipxe-ead70bf9209155b9f85099ab8b3f34a5346261c6.zip
[intel] Apply PBS/PBA errata workaround only to ICH8 PCI device IDs
ICH8 devices have an errata which requires us to reconfigure the packet buffer size (PBS) register, and correspondingly adjust the packet buffer allocation (PBA) register. The "Intel I/O Controller Hub ICH8/9/10 and 82566/82567/82562V Software Developer's Manual" notes for the PBS register that: 10.4.20 Packet Buffer Size - PBS (01008h; R/W) Note: The default setting of this register is 20 KB and is incorrect. This register must be programmed to 16 KB. Initial value: 0014h 0018h (ICH9/ICH10) It is unclear from this comment precisely which devices require the workaround to be applied. We currently attempt to err on the side of caution: if we detect an initial value of either 0x14 or 0x18 then the workaround will be applied. If the workaround is applied unnecessarily, then the effect should be just that we use less than the full amount of the available packet buffer memory. Unfortunately this approach does not play nicely with other device drivers. For example, the Linux e1000e driver will rewrite PBA while assuming that PBS still contains the default value, which can result in inconsistent values between the two registers, and a corresponding inability to transmit or receive packets. Even more unfortunately, the contents of PBS and PBA are not reset by anything less than a power cycle, meaning that this error condition will survive a hardware reset. The Linux driver (written and maintained by Intel) applies the PBS/PBA errata workaround only for devices in the ICH8 family, identified via the PCI device ID. Adopt a similar approach, using the PCI_ROM() driver data field to indicate when the workaround is required. Reported-by: Donald Bindner <dbindner@truman.edu> Debugged-by: Donald Bindner <dbindner@truman.edu> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/intel.h')
-rw-r--r--src/drivers/net/intel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/net/intel.h b/src/drivers/net/intel.h
index e200e2ae..8c4479bb 100644
--- a/src/drivers/net/intel.h
+++ b/src/drivers/net/intel.h
@@ -229,6 +229,8 @@ struct intel_nic {
void *regs;
/** Port number (for multi-port devices) */
unsigned int port;
+ /** Flags */
+ unsigned int flags;
/** EEPROM */
struct nvs_device eeprom;
@@ -245,6 +247,12 @@ struct intel_nic {
struct io_buffer *rx_iobuf[INTEL_NUM_RX_DESC];
};
+/** Driver flags */
+enum intel_flags {
+ /** PBS/PBA errata workaround required */
+ INTEL_PBS_ERRATA = 0x0001,
+};
+
extern int intel_create_ring ( struct intel_nic *intel,
struct intel_ring *ring );
extern void intel_destroy_ring ( struct intel_nic *intel,