aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChien Tung <ctung@neteffect.com>2008-09-26 16:08:10 -0400
committerRoland Dreier <rolandd@cisco.com>2008-09-30 18:35:49 -0400
commit068e80de6af2b920d2644bba3a2c060431834160 (patch)
tree4808d69a2e1bbd988623132d36fc207a170e6364
parent168ac8244df5af1a9ab03bf39e4a9d3161dd9f11 (diff)
RDMA/nes: Stop spurious MAC interrupts
Mask off MAC interrupts on netdev_stop to prevent spurious MAC interrupts on unload/reload of iw_nes. Signed-off-by: Sweta Bhatt <sweta.bhatt@einfochips.com> Signed-off-by: Chien Tung <ctung@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 852546b67f77..639d0fcc00b4 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -272,14 +272,18 @@ static int nes_netdev_stop(struct net_device *netdev)
272 break; 272 break;
273 } 273 }
274 274
275 if (first_nesvnic->netdev_open == 0) 275 if ((first_nesvnic->netdev_open == 1) && (first_nesvnic != nesvnic) &&
276 (PCI_FUNC(first_nesvnic->nesdev->pcidev->devfn) !=
277 PCI_FUNC(nesvnic->nesdev->pcidev->devfn))) {
278 nes_write_indexed(nesdev, NES_IDX_MAC_INT_MASK+
279 (0x200*nesdev->mac_index), 0xffffffff);
280 nes_write_indexed(first_nesvnic->nesdev,
281 NES_IDX_MAC_INT_MASK+
282 (0x200*first_nesvnic->nesdev->mac_index),
283 ~(NES_MAC_INT_LINK_STAT_CHG | NES_MAC_INT_XGMII_EXT |
284 NES_MAC_INT_TX_UNDERFLOW | NES_MAC_INT_TX_ERROR));
285 } else {
276 nes_write_indexed(nesdev, NES_IDX_MAC_INT_MASK+(0x200*nesdev->mac_index), 0xffffffff); 286 nes_write_indexed(nesdev, NES_IDX_MAC_INT_MASK+(0x200*nesdev->mac_index), 0xffffffff);
277 else if ((first_nesvnic != nesvnic) &&
278 (PCI_FUNC(first_nesvnic->nesdev->pcidev->devfn) != PCI_FUNC(nesvnic->nesdev->pcidev->devfn))) {
279 nes_write_indexed(nesdev, NES_IDX_MAC_INT_MASK + (0x200 * nesdev->mac_index), 0xffffffff);
280 nes_write_indexed(first_nesvnic->nesdev, NES_IDX_MAC_INT_MASK + (0x200 * first_nesvnic->nesdev->mac_index),
281 ~(NES_MAC_INT_LINK_STAT_CHG | NES_MAC_INT_XGMII_EXT |
282 NES_MAC_INT_TX_UNDERFLOW | NES_MAC_INT_TX_ERROR));
283 } 287 }
284 288
285 nic_active_mask = ~((u32)(1 << nesvnic->nic_index)); 289 nic_active_mask = ~((u32)(1 << nesvnic->nic_index));