[openfabrics-ewg] [PATCH IB/VNIC] Add the VNIC backport patch file for SLES 10 support

Vladimir Sokolovsky vlad at dev.mellanox.co.il
Mon Jan 8 05:29:39 PST 2007


Applied,

Regards,
Vladimir

Ramachandra K wrote:
> Add the vnic_utsname patch to OFED for SLES 10 support
>
>
> Signed-off-by: Ramachandra K <ramachandra.kuchimanchi at qlogic.com>
> ---
>
>  .../backport/2.6.16_sles10/vnic_utsname.patch      |   50 +++++++++++++++++++++++
>  1 files changed, 50 insertions(+), 0 deletions(-)
>
> diff --git a/kernel_patches/backport/2.6.16_sles10/vnic_utsname.patch 
> b/kernel_patches/backport/2.6.16_sles10/vnic_utsname.patch
> new file mode 100644
> index 0000000..170beca
> --- /dev/null
> +++ b/kernel_patches/backport/2.6.16_sles10/vnic_utsname.patch
> @@ -0,0 +1,50 @@
> +Use the old system_utsname instead of init_utsname() for older kernels.
> +Also explicit inclusion of linux/types.h required to avoid compilation error
> +from linux/parser.h (seen on 2.6.16).
> +
> +Signed-off-by: Ramachandra K <ramachandra.kuchimanchi at qlogic.com>
> +---
> +
> + drivers/infiniband/ulp/vnic/vnic_config.c |    8 ++++----
> + drivers/infiniband/ulp/vnic/vnic_sys.c    |    1 +
> + 2 files changed, 5 insertions(+), 4 deletions(-)
> +
> +diff --git a/drivers/infiniband/ulp/vnic/vnic_config.c b/drivers/infiniband/ulp/vnic/vnic_config.c
> +index d3b02d4..f482e82 100644
> +--- a/drivers/infiniband/ulp/vnic/vnic_config.c
> ++++ b/drivers/infiniband/ulp/vnic/vnic_config.c
> +@@ -105,18 +105,18 @@ static void config_control_defaults(stru
> + 	control_config->ib_config.conn_data.path_id = 0;
> + 	control_config->ib_config.conn_data.vnic_instance = params->instance;
> + 	control_config->ib_config.conn_data.path_num = 0;
> +-	dot = strchr(init_utsname()->nodename, '.');
> ++	dot = strchr(system_utsname.nodename, '.');
> +
> + 	if (dot)
> +-		len = dot - init_utsname()->nodename;
> ++		len = dot - system_utsname.nodename;
> + 	else
> +-		len = strlen(init_utsname()->nodename);
> ++		len = strlen(system_utsname.nodename);
> +
> + 	if (len > VNIC_MAX_NODENAME_LEN)
> + 		len = VNIC_MAX_NODENAME_LEN;
> +
> + 	memcpy(control_config->ib_config.conn_data.nodename,
> +-	       init_utsname()->nodename, len);
> ++	       system_utsname.nodename, len);
> +
> + 	control_config->ib_config.retry_count = RETRY_COUNT;
> + 	control_config->ib_config.rnr_retry_count = RETRY_COUNT;
> +diff --git a/drivers/infiniband/ulp/vnic/vnic_sys.c b/drivers/infiniband/ulp/vnic/vnic_sys.c
> +index 034be7c..0be8517 100644
> +--- a/drivers/infiniband/ulp/vnic/vnic_sys.c
> ++++ b/drivers/infiniband/ulp/vnic/vnic_sys.c
> +@@ -30,6 +30,7 @@
> +  * SOFTWARE.
> +  */
> +
> ++#include <linux/types.h>
> + #include <linux/parser.h>
> + #include <linux/netdevice.h>
> + #include <linux/if.h>
>
>
>
> _______________________________________________
> openfabrics-ewg mailing list
> openfabrics-ewg at openib.org
> http://openib.org/mailman/listinfo/openfabrics-ewg
>   





More information about the ewg mailing list