From patchwork Mon May 2 04:46:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikunj A Dadhania X-Patchwork-Id: 617360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qyt7T4cLlz9t5c for ; Mon, 2 May 2016 15:25:57 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qyt7T3V8GzDqcH for ; Mon, 2 May 2016 15:25:57 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qysHf3hWFzDqCG for ; Mon, 2 May 2016 14:47:58 +1000 (AEST) Received: from localhost by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 2 May 2016 14:47:56 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 2 May 2016 14:47:55 +1000 X-IBM-Helo: d23dlp01.au.ibm.com X-IBM-MailFrom: nikunj@linux.vnet.ibm.com X-IBM-RcptTo: slof@lists.ozlabs.org Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 4E6972CE8046 for ; Mon, 2 May 2016 14:47:54 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u424lkSi65863704 for ; Mon, 2 May 2016 14:47:54 +1000 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u424lLRW015190 for ; Mon, 2 May 2016 14:47:21 +1000 Received: from abhimanyu.in.ibm.com (abhimanyu.in.ibm.com [9.124.35.92]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u424lKka014710; Mon, 2 May 2016 14:47:21 +1000 From: Nikunj A Dadhania To: slof@lists.ozlabs.org Date: Mon, 2 May 2016 10:16:43 +0530 Message-Id: <1462164404-15355-1-git-send-email-nikunj@linux.vnet.ibm.com> X-Mailer: git-send-email 2.5.5 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16050204-0029-0000-0000-000045816887 Subject: [SLOF] [PATCH] xhci: add memory barrier after filling the trb X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" A memory barrier was missing after updating the trb details. Signed-off-by: Nikunj A Dadhania --- lib/libusb/usb-xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c index 858cd12..070c2ef 100644 --- a/lib/libusb/usb-xhci.c +++ b/lib/libusb/usb-xhci.c @@ -973,6 +973,7 @@ static void fill_trb_buff(struct xhci_command_trb *cmd, uint32_t field1, cycle_state = (val & 0x1) ? 0 : 1; val = cycle_state | (field4 & ~0x1); cmd->field[3] = cpu_to_le32(val); + mb(); dprintf("CMD %016lx val %08x cycle_state %d field1 %08x, field2 %08x, field3 %08x field4 %08x\n", cmd, val, cycle_state,