[ofa-general] [PATCH 0/10] IB/ipath -- patches in for-roland for 2.6.26

Roland Dreier rdreier at cisco.com
Fri Mar 21 19:47:00 PDT 2008


By the way... I got tired of seeing the warning, so I added the patch
below to my tree.  Please let me know if this is not the right fix and
I will drop it...

IB/ipath: Fix PCI config write size used to clear linkctrl error bits

In slave_or_pri_blk(), pci_write_config_byte() is used to write a
16-bit quantity to clear linkctrl CRC error bits.  This is clearly a
bug and also causes the warning

    drivers/infiniband/hw/ipath/ipath_iba6110.c: In function 'slave_or_pri_blk':
    drivers/infiniband/hw/ipath/ipath_iba6110.c:849: warning: overflow in implicit constant conversion

Fix this by using pci_write_config_word() instead.

Signed-off-by: Roland Dreier <rolandd at cisco.com>
---
 drivers/infiniband/hw/ipath/ipath_iba6110.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c
index 19e3955..d241f1c 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c
@@ -845,7 +845,7 @@ static void slave_or_pri_blk(struct ipath_devdata *dd, struct pci_dev *pdev,
 			/*
 			 * now write them back to clear the error.
 			 */
-			pci_write_config_byte(pdev, link_off,
+			pci_write_config_word(pdev, link_off,
 					      linkctrl & (0xf << 8));
 		}
 	}
-- 
1.5.4.3




More information about the general mailing list