diff options
author | Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> | 2007-12-20 09:06:33 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:34 -0500 |
commit | e57d62a14775c9d37195debe837431c75168ef69 (patch) | |
tree | 12ff8ce00a17101ba597f51ba50a2e0a05010721 /drivers/infiniband/hw/ehca | |
parent | b3226184af6c13c9d5d38f13f0ef8e03f718bbf7 (diff) |
IB/ehca: Forward event client-reregister-required to registered clients
This patch allows ehca to forward event client-reregister-required to
registered clients. One such event is generated by a switch eg. after
its reboot.
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_irq.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index 3f617b27b954..4c734ecef11d 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #define NEQE_PORT_NUMBER EHCA_BMASK_IBM( 8, 15) | 62 | #define NEQE_PORT_NUMBER EHCA_BMASK_IBM( 8, 15) |
63 | #define NEQE_PORT_AVAILABILITY EHCA_BMASK_IBM(16, 16) | 63 | #define NEQE_PORT_AVAILABILITY EHCA_BMASK_IBM(16, 16) |
64 | #define NEQE_DISRUPTIVE EHCA_BMASK_IBM(16, 16) | 64 | #define NEQE_DISRUPTIVE EHCA_BMASK_IBM(16, 16) |
65 | #define NEQE_SPECIFIC_EVENT EHCA_BMASK_IBM(16, 23) | ||
65 | 66 | ||
66 | #define ERROR_DATA_LENGTH EHCA_BMASK_IBM(52, 63) | 67 | #define ERROR_DATA_LENGTH EHCA_BMASK_IBM(52, 63) |
67 | #define ERROR_DATA_TYPE EHCA_BMASK_IBM( 0, 7) | 68 | #define ERROR_DATA_TYPE EHCA_BMASK_IBM( 0, 7) |
@@ -354,6 +355,7 @@ static void parse_ec(struct ehca_shca *shca, u64 eqe) | |||
354 | { | 355 | { |
355 | u8 ec = EHCA_BMASK_GET(NEQE_EVENT_CODE, eqe); | 356 | u8 ec = EHCA_BMASK_GET(NEQE_EVENT_CODE, eqe); |
356 | u8 port = EHCA_BMASK_GET(NEQE_PORT_NUMBER, eqe); | 357 | u8 port = EHCA_BMASK_GET(NEQE_PORT_NUMBER, eqe); |
358 | u8 spec_event; | ||
357 | 359 | ||
358 | switch (ec) { | 360 | switch (ec) { |
359 | case 0x30: /* port availability change */ | 361 | case 0x30: /* port availability change */ |
@@ -394,6 +396,16 @@ static void parse_ec(struct ehca_shca *shca, u64 eqe) | |||
394 | case 0x33: /* trace stopped */ | 396 | case 0x33: /* trace stopped */ |
395 | ehca_err(&shca->ib_device, "Traced stopped."); | 397 | ehca_err(&shca->ib_device, "Traced stopped."); |
396 | break; | 398 | break; |
399 | case 0x34: /* util async event */ | ||
400 | spec_event = EHCA_BMASK_GET(NEQE_SPECIFIC_EVENT, eqe); | ||
401 | if (spec_event == 0x80) /* client reregister required */ | ||
402 | dispatch_port_event(shca, port, | ||
403 | IB_EVENT_CLIENT_REREGISTER, | ||
404 | "client reregister req."); | ||
405 | else | ||
406 | ehca_warn(&shca->ib_device, "Unknown util async " | ||
407 | "event %x on port %x", spec_event, port); | ||
408 | break; | ||
397 | default: | 409 | default: |
398 | ehca_err(&shca->ib_device, "Unknown event code: %x on %s.", | 410 | ehca_err(&shca->ib_device, "Unknown event code: %x on %s.", |
399 | ec, shca->ib_device.name); | 411 | ec, shca->ib_device.name); |