Hi Himanshu, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180320] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Remove-unneeded-message-and-minor-cleanup-for-FC-NVMe/20180320-215409 config: x86_64-lkp (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 Note: the linux-review/Himanshu-Madhani/qla2xxx-Remove-unneeded-message-and-minor-cleanup-for-FC-NVMe/20180320-215409 HEAD 50dbc1dc7fc60496f8e073be2dd0fc1a0347e95d builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq': >> drivers/scsi/qla2xxx/qla_nvme.c:478:6: error: 'rsp' undeclared (first use in this function); did you mean 'sp'? rsp->ring_ptr->signature != RESPONSE_PROCESSED) ^~~ sp drivers/scsi/qla2xxx/qla_nvme.c:478:6: note: each undeclared identifier is reported only once for each function it appears in vim +478 drivers/scsi/qla2xxx/qla_nvme.c e84067d7 Duane Grigsby 2017-06-21 300 e84067d7 Duane Grigsby 2017-06-21 301 static int qla2x00_start_nvme_mq(srb_t *sp) e84067d7 Duane Grigsby 2017-06-21 302 { e84067d7 Duane Grigsby 2017-06-21 303 unsigned long flags; e84067d7 Duane Grigsby 2017-06-21 304 uint32_t *clr_ptr; e84067d7 Duane Grigsby 2017-06-21 305 uint32_t index; e84067d7 Duane Grigsby 2017-06-21 306 uint32_t handle; e84067d7 Duane Grigsby 2017-06-21 307 struct cmd_nvme *cmd_pkt; e84067d7 Duane Grigsby 2017-06-21 308 uint16_t cnt, i; e84067d7 Duane Grigsby 2017-06-21 309 uint16_t req_cnt; e84067d7 Duane Grigsby 2017-06-21 310 uint16_t tot_dsds; e84067d7 Duane Grigsby 2017-06-21 311 uint16_t avail_dsds; e84067d7 Duane Grigsby 2017-06-21 312 uint32_t *cur_dsd; e84067d7 Duane Grigsby 2017-06-21 313 struct req_que *req = NULL; e84067d7 Duane Grigsby 2017-06-21 314 struct scsi_qla_host *vha = sp->fcport->vha; e84067d7 Duane Grigsby 2017-06-21 315 struct qla_hw_data *ha = vha->hw; e84067d7 Duane Grigsby 2017-06-21 316 struct qla_qpair *qpair = sp->qpair; e84067d7 Duane Grigsby 2017-06-21 317 struct srb_iocb *nvme = &sp->u.iocb_cmd; e84067d7 Duane Grigsby 2017-06-21 318 struct scatterlist *sgl, *sg; e84067d7 Duane Grigsby 2017-06-21 319 struct nvmefc_fcp_req *fd = nvme->u.nvme.desc; e84067d7 Duane Grigsby 2017-06-21 320 uint32_t rval = QLA_SUCCESS; e84067d7 Duane Grigsby 2017-06-21 321 ee6b1136 Himanshu Madhani 2018-03-19 322 /* Setup qpair pointers */ ee6b1136 Himanshu Madhani 2018-03-19 323 req = qpair->req; e84067d7 Duane Grigsby 2017-06-21 324 tot_dsds = fd->sg_cnt; e84067d7 Duane Grigsby 2017-06-21 325 e84067d7 Duane Grigsby 2017-06-21 326 /* Acquire qpair specific lock */ e84067d7 Duane Grigsby 2017-06-21 327 spin_lock_irqsave(&qpair->qp_lock, flags); e84067d7 Duane Grigsby 2017-06-21 328 e84067d7 Duane Grigsby 2017-06-21 329 /* Check for room in outstanding command list. */ e84067d7 Duane Grigsby 2017-06-21 330 handle = req->current_outstanding_cmd; e84067d7 Duane Grigsby 2017-06-21 331 for (index = 1; index < req->num_outstanding_cmds; index++) { e84067d7 Duane Grigsby 2017-06-21 332 handle++; e84067d7 Duane Grigsby 2017-06-21 333 if (handle == req->num_outstanding_cmds) e84067d7 Duane Grigsby 2017-06-21 334 handle = 1; e84067d7 Duane Grigsby 2017-06-21 335 if (!req->outstanding_cmds[handle]) e84067d7 Duane Grigsby 2017-06-21 336 break; e84067d7 Duane Grigsby 2017-06-21 337 } e84067d7 Duane Grigsby 2017-06-21 338 e84067d7 Duane Grigsby 2017-06-21 339 if (index == req->num_outstanding_cmds) { e84067d7 Duane Grigsby 2017-06-21 340 rval = -1; e84067d7 Duane Grigsby 2017-06-21 341 goto queuing_error; e84067d7 Duane Grigsby 2017-06-21 342 } e84067d7 Duane Grigsby 2017-06-21 343 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); e84067d7 Duane Grigsby 2017-06-21 344 if (req->cnt < (req_cnt + 2)) { e84067d7 Duane Grigsby 2017-06-21 345 cnt = IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr : e84067d7 Duane Grigsby 2017-06-21 346 RD_REG_DWORD_RELAXED(req->req_q_out); e84067d7 Duane Grigsby 2017-06-21 347 e84067d7 Duane Grigsby 2017-06-21 348 if (req->ring_index < cnt) e84067d7 Duane Grigsby 2017-06-21 349 req->cnt = cnt - req->ring_index; e84067d7 Duane Grigsby 2017-06-21 350 else e84067d7 Duane Grigsby 2017-06-21 351 req->cnt = req->length - (req->ring_index - cnt); e84067d7 Duane Grigsby 2017-06-21 352 e84067d7 Duane Grigsby 2017-06-21 353 if (req->cnt < (req_cnt + 2)){ e84067d7 Duane Grigsby 2017-06-21 354 rval = -1; e84067d7 Duane Grigsby 2017-06-21 355 goto queuing_error; e84067d7 Duane Grigsby 2017-06-21 356 } e84067d7 Duane Grigsby 2017-06-21 357 } e84067d7 Duane Grigsby 2017-06-21 358 e84067d7 Duane Grigsby 2017-06-21 359 if (unlikely(!fd->sqid)) { e84067d7 Duane Grigsby 2017-06-21 360 struct nvme_fc_cmd_iu *cmd = fd->cmdaddr; e84067d7 Duane Grigsby 2017-06-21 361 if (cmd->sqe.common.opcode == nvme_admin_async_event) { e84067d7 Duane Grigsby 2017-06-21 362 nvme->u.nvme.aen_op = 1; ee6b1136 Himanshu Madhani 2018-03-19 363 atomic_inc(&ha->nvme_active_aen_cnt); e84067d7 Duane Grigsby 2017-06-21 364 } e84067d7 Duane Grigsby 2017-06-21 365 } e84067d7 Duane Grigsby 2017-06-21 366 e84067d7 Duane Grigsby 2017-06-21 367 /* Build command packet. */ e84067d7 Duane Grigsby 2017-06-21 368 req->current_outstanding_cmd = handle; e84067d7 Duane Grigsby 2017-06-21 369 req->outstanding_cmds[handle] = sp; e84067d7 Duane Grigsby 2017-06-21 370 sp->handle = handle; e84067d7 Duane Grigsby 2017-06-21 371 req->cnt -= req_cnt; e84067d7 Duane Grigsby 2017-06-21 372 e84067d7 Duane Grigsby 2017-06-21 373 cmd_pkt = (struct cmd_nvme *)req->ring_ptr; e84067d7 Duane Grigsby 2017-06-21 374 cmd_pkt->handle = MAKE_HANDLE(req->id, handle); e84067d7 Duane Grigsby 2017-06-21 375 e84067d7 Duane Grigsby 2017-06-21 376 /* Zero out remaining portion of packet. */ e84067d7 Duane Grigsby 2017-06-21 377 clr_ptr = (uint32_t *)cmd_pkt + 2; e84067d7 Duane Grigsby 2017-06-21 378 memset(clr_ptr, 0, REQUEST_ENTRY_SIZE - 8); e84067d7 Duane Grigsby 2017-06-21 379 e84067d7 Duane Grigsby 2017-06-21 380 cmd_pkt->entry_status = 0; e84067d7 Duane Grigsby 2017-06-21 381 e84067d7 Duane Grigsby 2017-06-21 382 /* Update entry type to indicate Command NVME IOCB */ e84067d7 Duane Grigsby 2017-06-21 383 cmd_pkt->entry_type = COMMAND_NVME; e84067d7 Duane Grigsby 2017-06-21 384 e84067d7 Duane Grigsby 2017-06-21 385 /* No data transfer how do we check buffer len == 0?? */ e84067d7 Duane Grigsby 2017-06-21 386 if (fd->io_dir == NVMEFC_FCP_READ) { e84067d7 Duane Grigsby 2017-06-21 387 cmd_pkt->control_flags = e84067d7 Duane Grigsby 2017-06-21 388 cpu_to_le16(CF_READ_DATA | CF_NVME_ENABLE); e84067d7 Duane Grigsby 2017-06-21 389 vha->qla_stats.input_bytes += fd->payload_length; e84067d7 Duane Grigsby 2017-06-21 390 vha->qla_stats.input_requests++; e84067d7 Duane Grigsby 2017-06-21 391 } else if (fd->io_dir == NVMEFC_FCP_WRITE) { e84067d7 Duane Grigsby 2017-06-21 392 cmd_pkt->control_flags = e84067d7 Duane Grigsby 2017-06-21 393 cpu_to_le16(CF_WRITE_DATA | CF_NVME_ENABLE); e84067d7 Duane Grigsby 2017-06-21 394 vha->qla_stats.output_bytes += fd->payload_length; e84067d7 Duane Grigsby 2017-06-21 395 vha->qla_stats.output_requests++; e84067d7 Duane Grigsby 2017-06-21 396 } else if (fd->io_dir == 0) { e84067d7 Duane Grigsby 2017-06-21 397 cmd_pkt->control_flags = cpu_to_le16(CF_NVME_ENABLE); e84067d7 Duane Grigsby 2017-06-21 398 } e84067d7 Duane Grigsby 2017-06-21 399 e84067d7 Duane Grigsby 2017-06-21 400 /* Set NPORT-ID */ e84067d7 Duane Grigsby 2017-06-21 401 cmd_pkt->nport_handle = cpu_to_le16(sp->fcport->loop_id); e84067d7 Duane Grigsby 2017-06-21 402 cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; e84067d7 Duane Grigsby 2017-06-21 403 cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; e84067d7 Duane Grigsby 2017-06-21 404 cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; e84067d7 Duane Grigsby 2017-06-21 405 cmd_pkt->vp_index = sp->fcport->vha->vp_idx; e84067d7 Duane Grigsby 2017-06-21 406 e84067d7 Duane Grigsby 2017-06-21 407 /* NVME RSP IU */ e84067d7 Duane Grigsby 2017-06-21 408 cmd_pkt->nvme_rsp_dsd_len = cpu_to_le16(fd->rsplen); e84067d7 Duane Grigsby 2017-06-21 409 cmd_pkt->nvme_rsp_dseg_address[0] = cpu_to_le32(LSD(fd->rspdma)); e84067d7 Duane Grigsby 2017-06-21 410 cmd_pkt->nvme_rsp_dseg_address[1] = cpu_to_le32(MSD(fd->rspdma)); e84067d7 Duane Grigsby 2017-06-21 411 e84067d7 Duane Grigsby 2017-06-21 412 /* NVME CNMD IU */ e84067d7 Duane Grigsby 2017-06-21 413 cmd_pkt->nvme_cmnd_dseg_len = cpu_to_le16(fd->cmdlen); e84067d7 Duane Grigsby 2017-06-21 414 cmd_pkt->nvme_cmnd_dseg_address[0] = cpu_to_le32(LSD(fd->cmddma)); e84067d7 Duane Grigsby 2017-06-21 415 cmd_pkt->nvme_cmnd_dseg_address[1] = cpu_to_le32(MSD(fd->cmddma)); e84067d7 Duane Grigsby 2017-06-21 416 e84067d7 Duane Grigsby 2017-06-21 417 cmd_pkt->dseg_count = cpu_to_le16(tot_dsds); e84067d7 Duane Grigsby 2017-06-21 418 cmd_pkt->byte_count = cpu_to_le32(fd->payload_length); e84067d7 Duane Grigsby 2017-06-21 419 e84067d7 Duane Grigsby 2017-06-21 420 /* One DSD is available in the Command Type NVME IOCB */ e84067d7 Duane Grigsby 2017-06-21 421 avail_dsds = 1; e84067d7 Duane Grigsby 2017-06-21 422 cur_dsd = (uint32_t *)&cmd_pkt->nvme_data_dseg_address[0]; e84067d7 Duane Grigsby 2017-06-21 423 sgl = fd->first_sgl; e84067d7 Duane Grigsby 2017-06-21 424 e84067d7 Duane Grigsby 2017-06-21 425 /* Load data segments */ e84067d7 Duane Grigsby 2017-06-21 426 for_each_sg(sgl, sg, tot_dsds, i) { e84067d7 Duane Grigsby 2017-06-21 427 dma_addr_t sle_dma; e84067d7 Duane Grigsby 2017-06-21 428 cont_a64_entry_t *cont_pkt; e84067d7 Duane Grigsby 2017-06-21 429 e84067d7 Duane Grigsby 2017-06-21 430 /* Allocate additional continuation packets? */ e84067d7 Duane Grigsby 2017-06-21 431 if (avail_dsds == 0) { e84067d7 Duane Grigsby 2017-06-21 432 /* e84067d7 Duane Grigsby 2017-06-21 433 * Five DSDs are available in the Continuation e84067d7 Duane Grigsby 2017-06-21 434 * Type 1 IOCB. e84067d7 Duane Grigsby 2017-06-21 435 */ e84067d7 Duane Grigsby 2017-06-21 436 e84067d7 Duane Grigsby 2017-06-21 437 /* Adjust ring index */ e84067d7 Duane Grigsby 2017-06-21 438 req->ring_index++; e84067d7 Duane Grigsby 2017-06-21 439 if (req->ring_index == req->length) { e84067d7 Duane Grigsby 2017-06-21 440 req->ring_index = 0; e84067d7 Duane Grigsby 2017-06-21 441 req->ring_ptr = req->ring; e84067d7 Duane Grigsby 2017-06-21 442 } else { e84067d7 Duane Grigsby 2017-06-21 443 req->ring_ptr++; e84067d7 Duane Grigsby 2017-06-21 444 } e84067d7 Duane Grigsby 2017-06-21 445 cont_pkt = (cont_a64_entry_t *)req->ring_ptr; c345c6ca Himanshu Madhani 2017-06-30 446 *((uint32_t *)(&cont_pkt->entry_type)) = c345c6ca Himanshu Madhani 2017-06-30 447 cpu_to_le32(CONTINUE_A64_TYPE); e84067d7 Duane Grigsby 2017-06-21 448 e84067d7 Duane Grigsby 2017-06-21 449 cur_dsd = (uint32_t *)cont_pkt->dseg_0_address; e84067d7 Duane Grigsby 2017-06-21 450 avail_dsds = 5; e84067d7 Duane Grigsby 2017-06-21 451 } e84067d7 Duane Grigsby 2017-06-21 452 e84067d7 Duane Grigsby 2017-06-21 453 sle_dma = sg_dma_address(sg); e84067d7 Duane Grigsby 2017-06-21 454 *cur_dsd++ = cpu_to_le32(LSD(sle_dma)); e84067d7 Duane Grigsby 2017-06-21 455 *cur_dsd++ = cpu_to_le32(MSD(sle_dma)); e84067d7 Duane Grigsby 2017-06-21 456 *cur_dsd++ = cpu_to_le32(sg_dma_len(sg)); e84067d7 Duane Grigsby 2017-06-21 457 avail_dsds--; e84067d7 Duane Grigsby 2017-06-21 458 } e84067d7 Duane Grigsby 2017-06-21 459 e84067d7 Duane Grigsby 2017-06-21 460 /* Set total entry count. */ e84067d7 Duane Grigsby 2017-06-21 461 cmd_pkt->entry_count = (uint8_t)req_cnt; e84067d7 Duane Grigsby 2017-06-21 462 wmb(); e84067d7 Duane Grigsby 2017-06-21 463 e84067d7 Duane Grigsby 2017-06-21 464 /* Adjust ring index. */ e84067d7 Duane Grigsby 2017-06-21 465 req->ring_index++; e84067d7 Duane Grigsby 2017-06-21 466 if (req->ring_index == req->length) { e84067d7 Duane Grigsby 2017-06-21 467 req->ring_index = 0; e84067d7 Duane Grigsby 2017-06-21 468 req->ring_ptr = req->ring; e84067d7 Duane Grigsby 2017-06-21 469 } else { e84067d7 Duane Grigsby 2017-06-21 470 req->ring_ptr++; e84067d7 Duane Grigsby 2017-06-21 471 } e84067d7 Duane Grigsby 2017-06-21 472 e84067d7 Duane Grigsby 2017-06-21 473 /* Set chip new ring index. */ e84067d7 Duane Grigsby 2017-06-21 474 WRT_REG_DWORD(req->req_q_in, req->ring_index); e84067d7 Duane Grigsby 2017-06-21 475 deeae7a6 Duane Grigsby 2017-07-21 476 /* Manage unprocessed RIO/ZIO commands in response queue. */ deeae7a6 Duane Grigsby 2017-07-21 477 if (vha->flags.process_response_queue && deeae7a6 Duane Grigsby 2017-07-21 @478 rsp->ring_ptr->signature != RESPONSE_PROCESSED) deeae7a6 Duane Grigsby 2017-07-21 479 qla24xx_process_response_queue(vha, rsp); deeae7a6 Duane Grigsby 2017-07-21 480 e84067d7 Duane Grigsby 2017-06-21 481 queuing_error: e84067d7 Duane Grigsby 2017-06-21 482 spin_unlock_irqrestore(&qpair->qp_lock, flags); e84067d7 Duane Grigsby 2017-06-21 483 return rval; e84067d7 Duane Grigsby 2017-06-21 484 } e84067d7 Duane Grigsby 2017-06-21 485 :::::: The code at line 478 was first introduced by commit :::::: deeae7a69f755c53a68a907f336c5cee54932025 scsi: qla2xxx: Added change to enable ZIO for FC-NVMe devices :::::: TO: Duane Grigsby <duane.grigsby@xxxxxxxxxx> :::::: CC: Martin K. Petersen <martin.petersen@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip