Greetings Pete,

On Tue, 2008-02-12 at 16:38 -0500, Pete Wyckoff wrote:
> Properly initialize the SG list in the user_db_table in mthca memfree.
> Without this, and when compiling with CONFIG_DEBUG_SG, a BUG will occur
> during create_cq.  The call to sg_set_page() in mthca_map_user_db()
> will find that the scatterlist magic was not initialized.
> 
> Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>
> ---
>  drivers/infiniband/hw/mthca/mthca_memfree.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c 
> b/drivers/infiniband/hw/mthca/mthca_memfree.c
> index 1f4d27d..252db08 100644
> --- a/drivers/infiniband/hw/mthca/mthca_memfree.c
> +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c
> @@ -542,6 +542,7 @@ struct mthca_user_db_table *mthca_init_user_db_tab(struct 
> mthca_dev *dev)
>       for (i = 0; i < npages; ++i) {
>               db_tab->page[i].refcount = 0;
>               db_tab->page[i].uvirt    = 0;
> +             sg_init_table(&db_tab->page[i].mem, 1);
>       }
>  
>       return db_tab;

Should these scatterlist initializations include the new sg_mark_end()
usage by default as well..?

--nab

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to