* [PATCH] UFS: Date Segment only need for WRITE DESCRIPTOR
@ 2016-08-25 8:49 Zang Leigang
2016-08-25 9:10 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: Zang Leigang @ 2016-08-25 8:49 UTC (permalink / raw)
To: vinholikatti, jejb, martin.petersen, linux-scsi, linux-kernel
Some device may cause a compatibility issue while receiving a Query UPIU
with Data Segment which does not expected.
Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>
---
drivers/scsi/ufs/ufshcd.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index f08d41a..7292333 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1266,9 +1266,12 @@ static void ufshcd_prepare_utp_query_req_upiu(struct ufs_hba *hba,
ucd_req_ptr->header.dword_1 = UPIU_HEADER_DWORD(
0, query->request.query_func, 0, 0);
- /* Data segment length */
- ucd_req_ptr->header.dword_2 = UPIU_HEADER_DWORD(
- 0, 0, len >> 8, (u8)len);
+ /* Data segment length only need for WRITE_DESC */
+ if (query->request.upiu_req.opcode == UPIU_QUERY_OPCODE_WRITE)
+ ucd_req_ptr->header.dword_2 =
+ UPIU_HEADER_DWORD(0, 0, (len >> 8), (u8)len);
+ else
+ ucd_req_ptr->header.dword_2 = 0;
/* Copy the Query Request buffer as is */
memcpy(&ucd_req_ptr->qr, &query->request.upiu_req,
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] UFS: Date Segment only need for WRITE DESCRIPTOR
2016-08-25 8:49 [PATCH] UFS: Date Segment only need for WRITE DESCRIPTOR Zang Leigang
@ 2016-08-25 9:10 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2016-08-25 9:10 UTC (permalink / raw)
To: Zang Leigang
Cc: kbuild-all, vinholikatti, jejb, martin.petersen, linux-scsi,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
Hi Zang,
[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.8-rc3 next-20160824]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Zang-Leigang/UFS-Date-Segment-only-need-for-WRITE-DESCRIPTOR/20160825-165332
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_prepare_utp_query_req_upiu':
>> drivers/scsi/ufs/ufshcd.c:1270:40: error: 'UPIU_QUERY_OPCODE_WRITE' undeclared (first use in this function)
if (query->request.upiu_req.opcode == UPIU_QUERY_OPCODE_WRITE)
^
drivers/scsi/ufs/ufshcd.c:1270:40: note: each undeclared identifier is reported only once for each function it appears in
vim +/UPIU_QUERY_OPCODE_WRITE +1270 drivers/scsi/ufs/ufshcd.c
1264 UPIU_TRANSACTION_QUERY_REQ, upiu_flags,
1265 lrbp->lun, lrbp->task_tag);
1266 ucd_req_ptr->header.dword_1 = UPIU_HEADER_DWORD(
1267 0, query->request.query_func, 0, 0);
1268
1269 /* Data segment length only need for WRITE_DESC */
> 1270 if (query->request.upiu_req.opcode == UPIU_QUERY_OPCODE_WRITE)
1271 ucd_req_ptr->header.dword_2 =
1272 UPIU_HEADER_DWORD(0, 0, (len >> 8), (u8)len);
1273 else
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 47038 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-25 9:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25 8:49 [PATCH] UFS: Date Segment only need for WRITE DESCRIPTOR Zang Leigang
2016-08-25 9:10 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).