Skip to content

pci: fix/cleanup pcix get and set mmrbc functions

Dean Nelson netdev 1 version Applied

Status from this message: Applied this series, thanks Dean.

Get series with b4
b4 am 20100310032632.6331.15414.send-patch@aqua

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3pci: fix return value from pcix_get_max_mmrbc()drivers/pci/pci.c+1 -11 reply
2/3pci: fix access of PCI_X_CMD by pcix get and set mmrbc functionsdrivers/pci/pci.c+6 -50 replies
3/3pci: cleanup error return for pcix get and set mmrbc functionsdrivers/pci/pci.c+16 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] pci: fix/cleanup pcix get and set mmrbc functions

A customer running RHEL4.8 encountered

"e1000: eth0: e1000_clean_tx_irq: Detected Tx Unit Hang"

type errors, which were determined to be the result of a bad return value from e1000_pcix_get_mmrbc() causing the call to e1000_pcix_set_mmrbc() to be skipped in the following snippet of code from e1000_init_hw().

	switch (hw->mac_type) {
	case e1000_82545_rev_3:
	case e1000_82546_rev_3:
		break;
	default:
		/* Workaround for PCI-X problem when BIOS sets MMRBC incorrectly. */
		if (hw->bus_type == e1000_bus_type_pcix
		    && e1000_pcix_get_mmrbc(hw) > 2048)
			e1000_pcix_set_mmrbc(hw, 2048);
		break;
	}

e1000_pcix_get_mmrbc() is basically a wrapper for a call to pcix_get_mmrbc(). e1000_pcix_set_mmrbc() is the same for pcix_set_mmrbc().

The following three patches are a response to the problems that were found to exist with pcix_get_max_mmrbc(), pcix_get_mmrbc() and pcix_set_mmrbc().

Versions of these patches applicable to RHEL4 were verified by the customer to solve their problem.