netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: clsoto@linux.vnet.ibm.com
To: clsoto@linux.vnet.ibm.com, roland@kernel.org,
	sean.hefty@intel.com, hal.rosenstock@gmail.com,
	linux-rdma@vger.kernel.org, netdev@vger.kernel.org
Cc: brking@linux.vnet.ibm.com
Subject: [Patch 1/3] IB/mlx4: send a IB_EVENT_DEVICE_FATAL to users during PCI error injection
Date: Thu, 27 Mar 2014 09:28:14 -0500	[thread overview]
Message-ID: <20140327142939.072593482@linux.vnet.ibm.com> (raw)
In-Reply-To: 20140327142813.535289178@linux.vnet.ibm.com

[-- Attachment #1: mlx4_send_device_fatal_event.patch --]
[-- Type: text/plain, Size: 922 bytes --]

If the cards hits a pci error, then notify users that the device is
not in good shape. Send IB_EVENT_DEVICE_FATAL to IB users. 

Signed-off-by: Carol Soto <clsoto@linux.vnet.ibm.com>

---
 drivers/net/ethernet/mellanox/mlx4/main.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: b/drivers/net/ethernet/mellanox/mlx4/main.c
===================================================================
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2673,6 +2673,12 @@ MODULE_DEVICE_TABLE(pci, mlx4_pci_table)
 static pci_ers_result_t mlx4_pci_err_detected(struct pci_dev *pdev,
 					      pci_channel_state_t state)
 {
+	struct mlx4_dev *dev = pci_get_drvdata(pdev);
+	int i;
+
+	for (i = 1; i <= dev->caps.num_ports; ++i)
+		mlx4_dispatch_event(dev, MLX4_DEV_EVENT_CATASTROPHIC_ERROR, i);
+
 	mlx4_remove_one(pdev);
 
 	return state == pci_channel_io_perm_failure ?

-- 

  reply	other threads:[~2014-03-27 14:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 14:28 [Patch 0/3] Hangs with IPoIB when doing PCI error injection clsoto
2014-03-27 14:28 ` clsoto [this message]
2014-03-27 14:28 ` [Patch 2/3] IB: hang in mcast_remove_one during " clsoto
2014-03-27 14:28 ` [Patch 3/3] IB/ib_cm: hang in cm_destroy_id " clsoto
     [not found]   ` <20140327142939.460692817-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-04-23 18:15     ` Hefty, Sean
     [not found]       ` <1828884A29C6694DAF28B7E6B8A82373992F353B-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-04-23 18:58         ` Carol Soto
     [not found]           ` <53580D42.1060201-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-04-23 21:34             ` Hefty, Sean
     [not found] ` <20140327142813.535289178-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-03-28 20:47   ` [Patch 0/3] Hangs with IPoIB when doing " David Miller
2014-03-28 20:47     ` Roland Dreier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140327142939.072593482@linux.vnet.ibm.com \
    --to=clsoto@linux.vnet.ibm.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roland@kernel.org \
    --cc=sean.hefty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).