Skip to content

Commit

Permalink
[MIPS] pnx8550: Fix write_config_byte() PCI config space accessor
Browse files Browse the repository at this point in the history
There's a serious typo in the function:
  arch/mips/pci/ops-pnx8550.c:write_config_byte()

The parameter passed to the function config_access() is PCI_CMD_CONFIG_READ
instead of PCI_CMD_CONFIG_WRITE. This renders any attempts to write
a single byte to the PCI configuration registers useless.

This problem does not exist for write_config_word() nor write_config_dword().

This problem has been there since kernel v2.6.17 and is still there
as of kernel v2.6.19.1.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Davy Chan authored and Ralf Baechle committed Jan 8, 2007
1 parent f75f369 commit d98f923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/pci/ops-pnx8550.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ write_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 val)
break;
}

err = config_access(PCI_CMD_CONFIG_READ, bus, devfn, where, ~(1 << (where & 3)), &data);
err = config_access(PCI_CMD_CONFIG_WRITE, bus, devfn, where, ~(1 << (where & 3)), &data);

return err;
}
Expand Down

0 comments on commit d98f923

Please sign in to comment.