Hello. On 04.11.2011 17:40, Sebastian Andrzej Siewior wrote:
This patch adds sg support to dummy_hcd. It seems that uas is not able to work with a hcd which does not support sg only based transfers. Signed-off-by: Sebastian Andrzej Siewior<bigeasy@xxxxxxxxxxxxx> --- drivers/usb/gadget/dummy_hcd.c | 80 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 73 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 670ee24..92c04f6 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c
[...]
@@ -1078,9 +1079,10 @@ static int dummy_urb_enqueue ( unsigned long flags; int rc; - if (!urb->transfer_buffer&& urb->transfer_buffer_length) - return -EINVAL; - + if (!urb->transfer_buffer&& urb->transfer_buffer_length) { + if (!urb->num_sgs)
This seems over-indented. And why not just do all this in a single *if*?
+ return -EINVAL; + } urbp = kmalloc (sizeof *urbp, mem_flags); if (!urbp) return -ENOMEM;
WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html