From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Fri, 06 Jan 2017 06:52:30 -0000 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(-) 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; -- 2.7.4