From: Stephen Rothwell Date: Thu, 6 Sep 2012 01:55:35 +0000 (+1000) Subject: Merge remote-tracking branch 'pci/next' X-Git-Tag: next-20120906~84 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=17f36517ac68aea0ddfd70068991d6bde5f63090;p=karo-tx-linux.git Merge remote-tracking branch 'pci/next' Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c drivers/rapidio/devices/tsi721.c --- 17f36517ac68aea0ddfd70068991d6bde5f63090 diff --cc drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 21054987257a,281cf3f7bc20..605c4574d32d --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@@ -9372,29 -9378,28 +9366,25 @@@ static int __devinit bnx2x_prev_mark_pa return rc; } -static bool __devinit bnx2x_can_flr(struct bnx2x *bp) -{ - u32 cap; - struct pci_dev *dev = bp->pdev; - - pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap); - if (!(cap & PCI_EXP_DEVCAP_FLR)) - return false; - - return true; -} - static int __devinit bnx2x_do_flr(struct bnx2x *bp) { - int i, pos; + int i; u16 status; struct pci_dev *dev = bp->pdev; - /* probe the capability first */ - if (bnx2x_can_flr(bp)) - return -ENOTTY; + + if (CHIP_IS_E1x(bp)) { + BNX2X_DEV_INFO("FLR not supported in E1/E1H\n"); + return -EINVAL; + } + + /* only bootcode REQ_BC_VER_4_INITIATE_FLR and onwards support flr */ + if (bp->common.bc_ver < REQ_BC_VER_4_INITIATE_FLR) { + BNX2X_ERR("FLR not supported by BC_VER: 0x%x\n", + bp->common.bc_ver); + return -EINVAL; + } - pos = pci_pcie_cap(dev); - if (!pos) - return -ENOTTY; - /* Wait for Transaction Pending bit clean */ for (i = 0; i < 4; i++) { if (i) diff --cc drivers/rapidio/devices/tsi721.c index 5d44252b7342,fc22b93e0924..d5e1625bbac2 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@@ -2219,9 -2212,8 +2219,7 @@@ static int __devinit tsi721_probe(struc const struct pci_device_id *id) { struct tsi721_device *priv; - int cap; - int i; int err; - u32 regval; priv = kzalloc(sizeof(struct tsi721_device), GFP_KERNEL); if (priv == NULL) {