Re: [PATCH] target: uasp: gadget: pass SGs for gadget driver

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

 



* Felipe Balbi | 2011-12-14 22:18:17 [+0200]:

>This is the patch i applied on top of Sebastian's UASP
>Gadget.

Thanks. I throw this into my tree.

>--- a/drivers/target/uasp/gadget.c
>+++ b/drivers/target/uasp/gadget.c
>@@ -407,10 +413,12 @@ static void guas_data_write_cmpl(struct usb_ep *ep, struct usb_request *req)
> 		goto cleanup;
> 	}
> 
>-	sg_copy_from_buffer(se_cmd->t_data_sg,
>-			se_cmd->t_data_nents,
>-			cmd->data_buf,
>-			se_cmd->data_length);
>+	if (req->num_sgs == 0) {

I think, I change it to

|	if (gadget->sg_tablesize == 0) {

Don't you think?

>+		sg_copy_from_buffer(se_cmd->t_data_sg,
>+				se_cmd->t_data_nents,
>+				cmd->data_buf,
>+				se_cmd->data_length);
>+	}
> 
> 	complete(&cmd->write_complete);
> 	return;

Sebastian
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux