RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Yoshihiro Shimoda
Hi, > From: Felipe Balbi, Sent: Monday, May 21, 2018 7:19 PM > > Hi, > > Yoshihiro Shimoda writes: > > Hi, > > > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 5:05 PM > > > >> seems like it would be better to just move this like before > >>

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > Hi, > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 5:05 PM > >> seems like it would be better to just move this like before >> usb_ep_queue(): >> >> modified drivers/usb/gadget/function/f_printer.c >> @@ -631,19 +631,19

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Yoshihiro Shimoda
Hi, > From: Felipe Balbi, Sent: Monday, May 21, 2018 5:05 PM > seems like it would be better to just move this like before > usb_ep_queue(): > > modified drivers/usb/gadget/function/f_printer.c > @@ -631,19 +631,19 @@ printer_write(struct file *fd, const char __user *buf, > size_t len,

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > Hi, > >> From: Felipe Balbi, Sent: Monday, May 21, 2018 3:57 PM >> >> Hi, >> >> Yoshihiro Shimoda writes: >> > The usb_ep_queue() in printer_write() is possible to call req->complete(). >> >

RE: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Yoshihiro Shimoda
Hi, > From: Felipe Balbi, Sent: Monday, May 21, 2018 3:57 PM > > Hi, > > Yoshihiro Shimoda writes: > > The usb_ep_queue() in printer_write() is possible to call req->complete(). > > In that case, since tx_complete() calls list_add(>list, >tx_reqs), > >

Re: [PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-21 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > The usb_ep_queue() in printer_write() is possible to call req->complete(). > In that case, since tx_complete() calls list_add(>list, >tx_reqs), > printer_write() should not call list_add(>list, >tx_reqs_active) > because the

[PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-18 Thread Yoshihiro Shimoda
The usb_ep_queue() in printer_write() is possible to call req->complete(). In that case, since tx_complete() calls list_add(>list, >tx_reqs), printer_write() should not call list_add(>list, >tx_reqs_active) because the transfer has already finished. So, this patch checks the condition of req->list