From patchwork Fri Jan 6 06:52:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 90112 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9321449qgi; Thu, 5 Jan 2017 22:52:31 -0800 (PST) X-Received: by 10.99.22.65 with SMTP id 1mr138961331pgw.70.1483685551340; Thu, 05 Jan 2017 22:52:31 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id u22si53848795plj.70.2017.01.05.22.52.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 22:52:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E9761819DD; Thu, 5 Jan 2017 22:52:30 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com [IPv6:2607:f8b0:400e:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3EEDB818F4 for ; Thu, 5 Jan 2017 22:52:30 -0800 (PST) Received: by mail-pg0-x22e.google.com with SMTP id f188so248938074pgc.3 for ; Thu, 05 Jan 2017 22:52:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AKH0OEkDXzcO3Krdl6pt7fmBLdacexUDIFsHWQsdpNA=; b=PkVuV1kElZuqYBkEUraIP9LY8ugw8i3oEQlQi51SwaDwiYqlz7wklU+NEbajut6xV0 9g8mkACYwiYAh+QxNfjMHL0gTekz5faIPzhVEBJzrQifyD7uOB+3pHcXnxHXUHCY2IaX 3V/NH5r9anEwdC4nnxuNwl+yrlmAO/SiKUno0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AKH0OEkDXzcO3Krdl6pt7fmBLdacexUDIFsHWQsdpNA=; b=WuqrYI0sUxzUDnZOlAAXlW0irhdIBcLGR6iXb7knAKjXNQJOCCvbvVuuFYcF600h6U tvv35dz+BVJ+iVC171t+8xrJYNO9fePmwSYLdYso/SCxysevrIZDDdT7OHpJEhq7gLR7 h8Kjn7OF5rFIgRVW/+WsKjGZiGDqiCbHyF5i0ncb6VSoFnCRJV3qhZ9OMImjo5MRsuRh PhdS0ps/0J2HFuYWZWFiil8smJYPU0PTMKr105zR8hHUFZ//JKjHApgLx/3HYPcPXNGx 2+pg+3siuyhfHcRLkXozOm4ngB5PLPO66c2m8kXC/GuDZQyv4ZiBPye/OEXvQs/bK23Q SXWA== X-Gm-Message-State: AIkVDXJoy/51rTn4+1guLyVA4H5OlH1b+7HRytXujOKoOEwGiBPLKKWdVw1+FbyY/AleGB2F X-Received: by 10.98.33.133 with SMTP id o5mr69444455pfj.32.1483685549829; Thu, 05 Jan 2017 22:52:29 -0800 (PST) Received: from localhost.localdomain ([45.56.159.83]) by smtp.gmail.com with ESMTPSA id p13sm159096976pgf.47.2017.01.05.22.52.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jan 2017 22:52:29 -0800 (PST) From: Haojian Zhuang To: feng.tian@intel.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, edk2-devel@lists.01.org Date: Fri, 6 Jan 2017 14:52:10 +0800 Message-Id: <1483685538-11058-2-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483685538-11058-1-git-send-email-haojian.zhuang@linaro.org> References: <1483685538-11058-1-git-send-email-haojian.zhuang@linaro.org> Subject: [edk2] [PATCH 1/9] Ufs: fix data direction checking X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haojian Zhuang MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" BIT6 is used in read operation, and BIT5 is used in write operation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang --- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c index 3bd6dad..9b77a89 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c @@ -1564,7 +1564,7 @@ UfsExecScsiCmds ( if (TransReq->Trd->Ocs == 0) { if (Packet->DataDirection == EFI_EXT_SCSI_DATA_DIRECTION_READ) { - if ((Response->Flags & BIT5) == BIT5) { + if ((Response->Flags & BIT6) == BIT6) { ResTranCount = Response->ResTranCount; SwapLittleEndianToBigEndian ((UINT8*)&ResTranCount, sizeof (UINT32)); Packet->InTransferLength -= ResTranCount; @@ -2321,7 +2321,7 @@ ProcessAsyncTaskList ( if (TransReq->Trd->Ocs == 0) { if (Packet->DataDirection == EFI_EXT_SCSI_DATA_DIRECTION_READ) { - if ((Response->Flags & BIT5) == BIT5) { + if ((Response->Flags & BIT6) == BIT6) { ResTranCount = Response->ResTranCount; SwapLittleEndianToBigEndian ((UINT8*)&ResTranCount, sizeof (UINT32)); Packet->InTransferLength -= ResTranCount;