Message ID | 20160825084912.4830-1-zangleigang@hisilicon.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
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
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,
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(-)