浏览代码

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 <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Roland Dreier 17 年之前
父节点
当前提交
782203884e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/infiniband/hw/ipath/ipath_iba6110.c

+ 1 - 1
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.
 			 * 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));
 					      linkctrl & (0xf << 8));
 		}
 		}
 	}
 	}