diff options
author | Jean-François Moine <moinejf@free.fr> | 2011-08-10 07:40:47 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-23 23:23:07 -0300 |
commit | 4274d84ce801b763615152b276e2a341a30c3a82 (patch) | |
tree | b7b227b57bee5d5c5d13efca5299526da2034c3f | |
parent | 27b12023d72207b2d0b38bb9ef4fdb0a3325b682 (diff) | |
download | linux-4274d84ce801b763615152b276e2a341a30c3a82.tar.gz linux-4274d84ce801b763615152b276e2a341a30c3a82.tar.bz2 linux-4274d84ce801b763615152b276e2a341a30c3a82.zip |
[media] gspca - main: Handle the xHCI error on usb_set_interface()
This patch is adapted from a patch from Sarah Sharp (2010/05/03).
The xHCD handler checks the USB bandwidth on usb_set_interface()
instead of on usb_submit_urb().
Now, the same treatment is applied in case of error of both functions.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index ee9544894e8b..e41dfe254803 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -887,6 +887,8 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) gspca_dev->iface, alt); if (ret < 0) { + if (ret == -ENOSPC) + goto retry; /*fixme: ugly*/ pr_err("set alt %d err %d\n", alt, ret); goto out; } @@ -942,6 +944,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) /* the bandwidth is not wide enough * negotiate or try a lower alternate setting */ +retry: PDEBUG(D_ERR|D_STREAM, "alt %d - bandwidth not wide enough - trying again", alt); |