Displaying 5 results from an estimated 5 matches for "err_detach".
2019 Sep 17
0
[RFC PATCH] drm/virtio: Export resource handles via DMA-buf API
...ch;
> struct sg_table *sgt;
> int ret = 0;
>
> attach = dma_buf_attach(dma_buf, foo->dev);
> if (IS_ERR(attach))
> return PTR_ERR(attach);
>
> sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
> if (IS_ERR(sgt)) {
> ret = PTR_ERR(sgt);
> goto err_detach;
> }
>
> if (sgt->nents != 1) {
> ret = -EINVAL;
> goto err_unmap;
> }
>
> *id = sg_dma_address(sgt->sgl);
I agree with Gerd, this looks pretty horrible to me.
The usual way we've done these kind of special dma-bufs is:
- They all get allocated at the...
2019 Oct 08
0
[RFC PATCH] drm/virtio: Export resource handles via DMA-buf API
...> if (IS_ERR(attach))
> > > return PTR_ERR(attach);
> > >
> > > sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
> > > if (IS_ERR(sgt)) {
> > > ret = PTR_ERR(sgt);
> > > goto err_detach;
> > > }
> > >
> > > if (sgt->nents != 1) {
> > > ret = -EINVAL;
> > > goto err_unmap;
> > > }
> > >
> > > *id = sg_dma_address(sgt->sgl);
> >
> > I agree wi...
2019 Oct 08
0
[RFC PATCH] drm/virtio: Export resource handles via DMA-buf API
...return PTR_ERR(attach);
> > > > >
> > > > > sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
> > > > > if (IS_ERR(sgt)) {
> > > > > ret = PTR_ERR(sgt);
> > > > > goto err_detach;
> > > > > }
> > > > >
> > > > > if (sgt->nents != 1) {
> > > > > ret = -EINVAL;
> > > > > goto err_unmap;
> > > > > }
> > > > >
> > > &...
2019 Oct 16
0
[RFC PATCH] drm/virtio: Export resource handles via DMA-buf API
...gt; > > >
> > > > > > > sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
> > > > > > > if (IS_ERR(sgt)) {
> > > > > > > ret = PTR_ERR(sgt);
> > > > > > > goto err_detach;
> > > > > > > }
> > > > > > >
> > > > > > > if (sgt->nents != 1) {
> > > > > > > ret = -EINVAL;
> > > > > > > goto err_unmap;
> > > > >...
2020 Nov 01
12
[PATCH mlx5-next v1 00/11] Convert mlx5 to use auxiliary bus
From: Leon Romanovsky <leonro at nvidia.com>
Changelog:
v1:
* Renamed _mlx5_rescan_driver to be mlx5_rescan_driver_locked like in
other parts of the mlx5 driver.
* Renamed MLX5_INTERFACE_PROTOCOL_VDPA to tbe MLX5_INTERFACE_PROTOCOL_VNET as
a preparation to coming series from Eli C.
* Some small naming renames in mlx5_vdpa.
* Refactored adev index code to make Parav's SF series