From: Roland Dreier Date: Fri, 12 Oct 2007 22:16:16 +0000 (-0700) Subject: MSI: Use correct data offset for 32-bit MSI in read_msi_msg() X-Git-Tag: v2.6.23.6~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4fe19f099c5541621f449034f10b6a9e3f7bbdb;p=thirdparty%2Fkernel%2Fstable.git MSI: Use correct data offset for 32-bit MSI in read_msi_msg() patch cbf5d9e6b9bcf03291cbb51db144b3e2773a8a2d in mainline. While reading the MSI code trying to find a reason why MSI wouldn't work for devices that have a 32-bit MSI address capability, I noticed that read_msi_msg() seems to read the message data from the wrong offset in this case. Signed-off-by: Roland Dreier Acked-by: Eric W. Biederman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index be1df85e5e2d5..87e01615053dc 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -132,7 +132,7 @@ void read_msi_msg(unsigned int irq, struct msi_msg *msg) pci_read_config_word(dev, msi_data_reg(pos, 1), &data); } else { msg->address_hi = 0; - pci_read_config_word(dev, msi_data_reg(pos, 1), &data); + pci_read_config_word(dev, msi_data_reg(pos, 0), &data); } msg->data = data; break;