Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162531
b: refs/heads/master
c: 48c8276
h: refs/heads/master
i:
  162529: 9a5132e
  162527: 6614c86
v: v3
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 8f55a7e commit 8c43820
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77943d31b7dfdbd1ad58d49bd16ae6e7601bcd6c
refs/heads/master: 48c8276d7ac534d62c594c9a493130ff9137675d
16 changes: 11 additions & 5 deletions trunk/drivers/staging/rspiusb/rspiusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
int i = 0;
int k = 0;
int err = 0;
int ret;
struct page **maplist_p;
int numPagesRequired;

Expand Down Expand Up @@ -687,9 +688,16 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
} else {
pdx->sgl[frameInfo][0].length = count;
}
pdx->sgEntries[frameInfo] =
usb_buffer_map_sg(pdx->udev, epAddr, pdx->sgl[frameInfo],
pdx->maplist_numPagesMapped[frameInfo]);
ret = usb_buffer_map_sg(pdx->udev, epAddr, pdx->sgl[frameInfo],
pdx->maplist_numPagesMapped[frameInfo]);
if (ret < 0) {
vfree(maplist_p);
dbg("usb_buffer_map_sg() failed");
return -EINVAL;
}

pdx->sgEntries[frameInfo] = ret;

dbg("number of sgEntries = %d", pdx->sgEntries[frameInfo]);
pdx->userBufMapped = 1;
vfree(maplist_p);
Expand All @@ -716,8 +724,6 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
pdx->PixelUrb[frameInfo][i]->transfer_flags =
URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT;
}
if (i == 0)
return -EINVAL;
/* only interrupt when last URB completes */
pdx->PixelUrb[frameInfo][--i]->transfer_flags &= ~URB_NO_INTERRUPT;
pdx->pendedPixelUrbs[frameInfo] =
Expand Down

0 comments on commit 8c43820

Please sign in to comment.