aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/edac/edac_core.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index 28f2c3f959b5..6ad95c8d6363 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -767,11 +767,19 @@ static inline void pci_write_bits16(struct pci_dev *pdev, int offset,
767 pci_write_config_word(pdev, offset, value); 767 pci_write_config_word(pdev, offset, value);
768} 768}
769 769
770/* write all or some bits in a dword-register*/ 770/*
771 * pci_write_bits32
772 *
773 * edac local routine to do pci_write_config_dword, but adds
774 * a mask parameter. If mask is all ones, ignore the mask.
775 * Otherwise utilize the mask to isolate specified bits
776 *
777 * write all or some bits in a dword-register
778 */
771static inline void pci_write_bits32(struct pci_dev *pdev, int offset, 779static inline void pci_write_bits32(struct pci_dev *pdev, int offset,
772 u32 value, u32 mask) 780 u32 value, u32 mask)
773{ 781{
774 if (mask != 0xffff) { 782 if (mask != 0xffffffff) {
775 u32 buf; 783 u32 buf;
776 784
777 pci_read_config_dword(pdev, offset, &buf); 785 pci_read_config_dword(pdev, offset, &buf);