From: Roland Dreier Date: Thu, 17 Apr 2008 04:09:25 +0000 (-0700) Subject: IB/ipath: Fix PCI config write size used to clear linkctrl error bits X-Git-Tag: v2.6.26-rc1~1156^2~57 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=782203884eea5f610444bcf4ed1b4af0010911eb;p=linux-2.6-omap-h63xx.git 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. Acked-by: Ralph Campbell Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c index 19e3955304c..d241f1c7c93 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)); } }