[ofa-general] mthca issues -need help

Michael S. Tsirkin mst at dev.mellanox.co.il
Sat Apr 14 12:50:29 PDT 2007


> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [ofa-general] mthca issues -need help
> 
> Err, new better patch for real:
> 
> diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
> index fdb576d..3aaf41b 100644
> --- a/drivers/infiniband/hw/mthca/mthca_mr.c
> +++ b/drivers/infiniband/hw/mthca/mthca_mr.c
> @@ -355,7 +355,8 @@ int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt,
>  	int size = mthca_write_mtt_size(dev);
>  	int chunk;
>  
> -	if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy)
> +	if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy ||
> +	    (!mthca_is_memfree(dev) && (dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)))
>  		return __mthca_write_mtt(dev, mtt, start_index, buffer_list, list_len);
>  
>  	while (list_len > 0) {

Testing dev->mthca_flags & MTHCA_FLAG_FMR would be cleaner I think. No?

-- 
MST



More information about the general mailing list