From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: [PATCH][linux 2.6.18] pvusb: mark request as consumed after finished using it Date: Fri, 26 Sep 2014 11:10:00 +0200 Message-ID: <1411722600-13380-1-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com, jbeulich@suse.com Cc: Juergen Gross List-Id: xen-devel@lists.xenproject.org A request from the pvusb frontend should be marked as consumed by the backend only after the backend isn't accessing the request data in the communication ring any more. Signed-off-by: Juergen Gross diff -r 2b001f768b76 drivers/xen/usbback/usbback.c --- a/drivers/xen/usbback/usbback.c Tue Jul 08 11:53:53 2014 +0200 +++ b/drivers/xen/usbback/usbback.c Fri Sep 26 11:01:57 2014 +0200 @@ -1003,10 +1003,10 @@ static int usbbk_start_submit_urb(usbif_ } req = RING_GET_REQUEST(urb_ring, rc); - urb_ring->req_cons = ++rc; dispatch_request_to_pending_reqs(usbif, req, pending_req); + urb_ring->req_cons = ++rc; cond_resched(); }