ehca firmware interface based on Anton Blanchard's new hvcall interface
PATCH 1/1 ehca firmware interface based on Anton Blanchard's new hvcall interface
Hello Roland!
Below is the patch of ehca according to Anton's new hvcall interface, which has been committed in Paul's git tree:git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git
Besides the changes above this patch contains some coding style updates. I created this patch against your git tree, branch for-2.6.19.
Thanks!
Hoang-Nam Nguyen
---
ehca_main.c | 9 hcp_if.c | 845 ++++++++++++++++++++---------------------------------------- hcp_if.h | 2 hipz_hw.h | 2 ipz_pt_fn.h | 7 5 files changed, 300 insertions(+), 565 deletions(-)
drivers/infiniband/hw/ehca/ehca_main.c +5 -4
@@ -5,6 +5,7 @@* * Authors: Heiko J Schick <[email protected]> * Hoang-Nam Nguyen <[email protected]> +* Joachim Fenkes <[email protected]> * * Copyright (c) 2005 IBM Corporation *
@@ -48,7 +49,7 @@ #include "hcp_if.h"MODULE_LICENSE ("Dual BSD/GPL" );MODULE_AUTHOR ("Christoph Raisch <[email protected]>" );MODULE_DESCRIPTION ("IBM eServer HCA InfiniBand Device Driver" ); -MODULE_VERSION ("SVNEHCA_0015" ); +MODULE_VERSION ("SVNEHCA_0016" );int ehca_open_aqp1 =0 ;int ehca_debug_level =0 ;
@@ -268,7 +269,7 @@ int ehca_register_device(struct ehca_shc (1ull <<IB_USER_VERBS_CMD_ATTACH_MCAST ) | (1ull <<IB_USER_VERBS_CMD_DETACH_MCAST ); - shca->ib_device.node_type =RDMA_NODE_IB_CA ; + shca->ib_device.node_type =IB_NODE_CA ; shca->ib_device.phys_port_cnt = shca->num_ports; shca->ib_device.dma_device = &shca->ibmebus_dev->ofdev.dev; shca->ib_device.query_device = ehca_query_device;
@@ -446,7 +447,7 @@ static ssize_t ehca_show_##name(structkfree (rblock); \return 0 ; \ } \ - \ + \ data = rblock->name; \kfree (rblock); \ \
@@ -749,7 +750,7 @@ int __init ehca_module_init(void)int ret;printk (KERN_INFO "eHCA Infiniband Device Driver " -"(Rel.: SVNEHCA_0015)\n" ); +"(Rel.: SVNEHCA_0016)\n" );idr_init (&ehca_qp_idr);idr_init (&ehca_cq_idr);spin_lock_init (&ehca_qp_idr_lock);
drivers/infiniband/hw/ehca/hcp_if.c +291 -554
1,131 lines not on this page · raw message
drivers/infiniband/hw/ehca/hcp_if.h +1 -1
@@ -107,7 +107,7 @@ u64 hipz_h_register_rpage_eq(const strucconst u64 logical_address_of_page, const u64 count); -u32 hipz_h_query_int_state (const struct ipz_adapter_handle +u64 hipz_h_query_int_state (const struct ipz_adapter_handle hcp_adapter_handle,u32 ist);
drivers/infiniband/hw/ehca/hipz_hw.h +0 -2
@@ -184,8 +184,6 @@ struct hipz_mrmwmm { }; -#define MRX_HCR_LPARID_VALID EHCA_BMASK_IBM(0,0) -#define MRMWMM_OFFSET (x) offsetof(struct hipz_mrmwmm,x)struct hipz_qpedmm {
drivers/infiniband/hw/ehca/ipz_pt_fn.h +3 -4
@@ -226,10 +226,9 @@ static inline void *ipz_eqit_eq_get_inc_ {void *ret =ipz_qeit_get (queue);u32 qe = *(u8 *) ret; -if ((qe >>7 ) == (queue->toggle_state &1 )) -ipz_qeit_eq_get_inc (queue);/* this is a good one */ -else - ret =NULL ; +if ((qe >>7 ) != (queue->toggle_state &1 )) +return NULL ; +ipz_qeit_eq_get_inc (queue);/* this is a good one */ return ret; }
drivers/infiniband/hw/ehca/ehca_main.c +5 -4
@@ -5,6 +5,7 @@* * Authors: Heiko J Schick <[email protected]> * Hoang-Nam Nguyen <[email protected]> +* Joachim Fenkes <[email protected]> * * Copyright (c) 2005 IBM Corporation *
@@ -48,7 +49,7 @@ #include "hcp_if.h"MODULE_LICENSE ("Dual BSD/GPL" );MODULE_AUTHOR ("Christoph Raisch <[email protected]>" );MODULE_DESCRIPTION ("IBM eServer HCA InfiniBand Device Driver" ); -MODULE_VERSION ("SVNEHCA_0015" ); +MODULE_VERSION ("SVNEHCA_0016" );int ehca_open_aqp1 =0 ;int ehca_debug_level =0 ;
@@ -268,7 +269,7 @@ int ehca_register_device(struct ehca_shc (1ull <<IB_USER_VERBS_CMD_ATTACH_MCAST ) | (1ull <<IB_USER_VERBS_CMD_DETACH_MCAST ); - shca->ib_device.node_type =RDMA_NODE_IB_CA ; + shca->ib_device.node_type =IB_NODE_CA ; shca->ib_device.phys_port_cnt = shca->num_ports; shca->ib_device.dma_device = &shca->ibmebus_dev->ofdev.dev; shca->ib_device.query_device = ehca_query_device;
@@ -446,7 +447,7 @@ static ssize_t ehca_show_##name(structkfree (rblock); \return 0 ; \ } \ - \ + \ data = rblock->name; \kfree (rblock); \ \
@@ -749,7 +750,7 @@ int __init ehca_module_init(void)int ret;printk (KERN_INFO "eHCA Infiniband Device Driver " -"(Rel.: SVNEHCA_0015)\n" ); +"(Rel.: SVNEHCA_0016)\n" );idr_init (&ehca_qp_idr);idr_init (&ehca_cq_idr);spin_lock_init (&ehca_qp_idr_lock);
drivers/infiniband/hw/ehca/hcp_if.c +291 -554
1,131 lines not on this page · raw message
drivers/infiniband/hw/ehca/hcp_if.h +1 -1
@@ -107,7 +107,7 @@ u64 hipz_h_register_rpage_eq(const strucconst u64 logical_address_of_page, const u64 count); -u32 hipz_h_query_int_state (const struct ipz_adapter_handle +u64 hipz_h_query_int_state (const struct ipz_adapter_handle hcp_adapter_handle,u32 ist);
drivers/infiniband/hw/ehca/hipz_hw.h +0 -2
@@ -184,8 +184,6 @@ struct hipz_mrmwmm { }; -#define MRX_HCR_LPARID_VALID EHCA_BMASK_IBM(0,0) -#define MRMWMM_OFFSET (x) offsetof(struct hipz_mrmwmm,x)struct hipz_qpedmm {
drivers/infiniband/hw/ehca/ipz_pt_fn.h +3 -4
@@ -226,10 +226,9 @@ static inline void *ipz_eqit_eq_get_inc_ {void *ret =ipz_qeit_get (queue);u32 qe = *(u8 *) ret; -if ((qe >>7 ) == (queue->toggle_state &1 )) -ipz_qeit_eq_get_inc (queue);/* this is a good one */ -else - ret =NULL ; +if ((qe >>7 ) != (queue->toggle_state &1 )) +return NULL ; +ipz_qeit_eq_get_inc (queue);/* this is a good one */ return ret; }
Quoted 2 lines
-
shca->ib_device.node_type=RDMA_NODE_IB_CA;
+shca->ib_device.node_type=IB_NODE_CA;
Did you test this at all? I can't see how this would build against my for-2.6.19 tree...
Please resend a patch that you know is working.
- R.