ib_srpt: Handle GID change events properly

The mlx4_core driver generates a GID change event after a port has been
changed from IB into Ethernet mode. Avoid that this causes the following
error message to appear in the system log:
    
ib_srpt: ***ERROR***: received unrecognized IB event 18


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-03-20 15:15:54 +00:00
parent f213e944cf
commit aa726929fa
2 changed files with 8 additions and 0 deletions

View File

@@ -341,6 +341,7 @@ static void srpt_event_handler(struct ib_event_handler *handler,
case IB_EVENT_PKEY_CHANGE:
case IB_EVENT_SM_CHANGE:
case IB_EVENT_CLIENT_REREGISTER:
case IB_EVENT_GID_CHANGE:
/* Refresh port data asynchronously. */
port_num = event->element.port_num - 1;
if (port_num < sdev->device->phys_port_cnt) {

View File

@@ -132,6 +132,13 @@ enum {
RDMA_COMPL_TIMEOUT_S = 80,
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) && \
!(defined(CONFIG_SUSE_KERNEL) && \
LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 76))
/* See also patch "IB/core: Add GID change event" (commit 761d90ed4). */
enum { IB_EVENT_GID_CHANGE = 18 };
#endif
enum srpt_opcode {
SRPT_RECV,
SRPT_SEND,