[openfabrics-ewg] Backport and fix patches for ipath driver
Bryan O'Sullivan
bos at pathscale.com
Wed Feb 7 14:12:07 PST 2007
Hi, Michael -
Sorry for the delayed response. Email problems on this end.
> ./backport/2.6.18/ipath-50-mad-kmem_cache-2.6.19.patch
> BACKPORT - kmem_cache_t disappeared after 2.6.19
> diff -r a290ff6e9ae7 drivers/infiniband/core/mad.c
> --- a/drivers/infiniband/core/mad.c Wed Jan 31 14:47:02 2007 -0800
> +++ b/drivers/infiniband/core/mad.c Wed Jan 31 14:48:00 2007 -0800
> @@ -46,7 +46,7 @@ MODULE_AUTHOR("Hal Rosenstock");
> MODULE_AUTHOR("Hal Rosenstock");
> MODULE_AUTHOR("Sean Hefty");
>
> -static struct kmem_cache *ib_mad_cache;
> +static kmem_cache_t *ib_mad_cache;
>
> static struct list_head ib_mad_port_list;
> static u32 ib_mad_client_id = 0;
>
> This changes a core file, and does not seem to be related to ipath at all.
Yes, the name is misleading.
> What problem does this solve?
Without this patch, the mad code doesn't compile for me on 2.6.19 or
earlier.
> Another example that looks strange:
>
> BACKPORT - workqueues changed in 2.6.20
>
> diff -r 8b94fcef1edd drivers/infiniband/hw/ipath/ipath_driver.c
> --- a/drivers/infiniband/hw/ipath/ipath_driver.c Thu Feb 01 08:54:29 2007 -0800
> +++ b/drivers/infiniband/hw/ipath/ipath_driver.c Thu Feb 01 08:57:19 2007 -0800
> @@ -241,7 +241,7 @@ static struct ipath_devdata *ipath_alloc
> dd->pcidev = pdev;
> pci_set_drvdata(pdev, dd);
>
> - INIT_DELAYED_WORK(&dd->link_work, check_link_status);
> + INIT_WORK(&dd->link_work, check_link_status);
>
> list_add(&dd->ipath_list, &ipath_dev_list);
>
> INIT_DELAYED_WORK is implemented in kernel_addons, so this should
> not be necessary.
The workqueue backport stuff there isn't done properly, so I worked
around it rather than worry about fixing it. In our 2.6.20 code, we use
both work_struct and delayed_work, but the backport mashes them together
and causes compilation errors by passing the wrong types to some
functions. That's why I #undef cancel_delayed_work; the backport code
expects a delayed_work, but I need to pass a work_struct.
> If not, you should try adding
> things under kernel_addons as first choice so that everyone benefits.
I'll take a look at this.
<b
More information about the ewg
mailing list