Re: [PATCH for-next 1/6] RDMA/bnxt_re: Use the common mmap helper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 10, 2023 at 04:11:50AM -0700, Selvin Xavier wrote:
> -		rc = ib_copy_to_udata(udata, &resp, sizeof(resp));
> +		pd->pd_db_mmap = bnxt_re_mmap_entry_insert(ucntx, (u64)ucntx->dpi.umdbr,
> +							   BNXT_RE_MMAP_UC_DB, &resp.dbr);
> +
> +		if (!pd->pd_db_mmap) {
> +			ibdev_err(&rdev->ibdev,
> +				  "Failed to insert mmap entry\n");

No prints from drivers on failure paths. dbg at worst.

> +	switch (bnxt_entry->mmap_flag) {
> +	case BNXT_RE_MMAP_UC_DB:
> +		pfn = bnxt_entry->mem_offset >> PAGE_SHIFT;
> +		ret = rdma_user_mmap_io(ib_uctx, vma, pfn, PAGE_SIZE,
> +					pgprot_noncached(vma->vm_page_prot),
> +				rdma_entry);
> +		if (ret)
> +			ibdev_err(&rdev->ibdev, "Failed to map shared page");
> +		break;
> +	case BNXT_RE_MMAP_SH_PAGE:
>  		pfn = virt_to_phys(uctx->shpg) >> PAGE_SHIFT;
>  		if (remap_pfn_range(vma, vma->vm_start,
>  				    pfn, PAGE_SIZE, vma->vm_page_prot)) {
>  			ibdev_err(&rdev->ibdev, "Failed to map shared page");
> -			return -EAGAIN;
> +			ret =  -EAGAIN;
>  		}
> +		break;

What is this? You can't enable disassociate support until all the mmap's
in the driver have been fixed.

Jason




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux