diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2008-02-13 10:18:33 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-23 23:54:59 -0500 |
commit | 21eee2dd1b5702f15924f18f923b2a281f0e72e8 (patch) | |
tree | 451ef826604048c9b3fd0d2362bbc9659170da6a /drivers/net/ehea/ehea.h | |
parent | 8d3c202be23c5a915f7053ebd4e96f44700c6a62 (diff) |
ehea: add kdump support
This patch adds kdump support to the ehea driver. As the firmware doesn't free
resource handles automatically, the driver has to run an as simple as possible
free resource function in case of a crash shutdown. The function iterates over
two arrays freeing all resource handles which are stored there. The arrays are
kept up-to-date during normal runtime. The crash handler fn is triggered by the
recently introduced PPC crash shutdown reg/unreg functions.
Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea/ehea.h')
-rw-r--r-- | drivers/net/ehea/ehea.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 88fb53eba715..7c4ead35cfa2 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0083" | 43 | #define DRV_VERSION "EHEA_0087" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
@@ -386,6 +386,13 @@ struct ehea_port_res { | |||
386 | 386 | ||
387 | 387 | ||
388 | #define EHEA_MAX_PORTS 16 | 388 | #define EHEA_MAX_PORTS 16 |
389 | |||
390 | #define EHEA_NUM_PORTRES_FW_HANDLES 6 /* QP handle, SendCQ handle, | ||
391 | RecvCQ handle, EQ handle, | ||
392 | SendMR handle, RecvMR handle */ | ||
393 | #define EHEA_NUM_PORT_FW_HANDLES 1 /* EQ handle */ | ||
394 | #define EHEA_NUM_ADAPTER_FW_HANDLES 2 /* MR handle, NEQ handle */ | ||
395 | |||
389 | struct ehea_adapter { | 396 | struct ehea_adapter { |
390 | u64 handle; | 397 | u64 handle; |
391 | struct of_device *ofdev; | 398 | struct of_device *ofdev; |
@@ -405,6 +412,31 @@ struct ehea_mc_list { | |||
405 | u64 macaddr; | 412 | u64 macaddr; |
406 | }; | 413 | }; |
407 | 414 | ||
415 | /* kdump support */ | ||
416 | struct ehea_fw_handle_entry { | ||
417 | u64 adh; /* Adapter Handle */ | ||
418 | u64 fwh; /* Firmware Handle */ | ||
419 | }; | ||
420 | |||
421 | struct ehea_fw_handle_array { | ||
422 | struct ehea_fw_handle_entry *arr; | ||
423 | int num_entries; | ||
424 | struct semaphore lock; | ||
425 | }; | ||
426 | |||
427 | struct ehea_bcmc_reg_entry { | ||
428 | u64 adh; /* Adapter Handle */ | ||
429 | u32 port_id; /* Logical Port Id */ | ||
430 | u8 reg_type; /* Registration Type */ | ||
431 | u64 macaddr; | ||
432 | }; | ||
433 | |||
434 | struct ehea_bcmc_reg_array { | ||
435 | struct ehea_bcmc_reg_entry *arr; | ||
436 | int num_entries; | ||
437 | struct semaphore lock; | ||
438 | }; | ||
439 | |||
408 | #define EHEA_PORT_UP 1 | 440 | #define EHEA_PORT_UP 1 |
409 | #define EHEA_PORT_DOWN 0 | 441 | #define EHEA_PORT_DOWN 0 |
410 | #define EHEA_PHY_LINK_UP 1 | 442 | #define EHEA_PHY_LINK_UP 1 |