[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111131802.vaf3iSS5-lkp@intel.com>
Date: Sat, 13 Nov 2021 18:17:11 +0800
From: kernel test robot <lkp@...el.com>
To: Hannes Reinecke <hare@...e.de>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [hare-scsi-devel:scsi-private.v2 19/21]
drivers/scsi/aacraid/linit.c:709:37: error: 'struct scsi_cmnd' has no member
named 'request'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head: 915b986531e666d840f72752c597fb6b4ea69d35
commit: e3dcd2298e3f61c338f266efbdccd03b0083a463 [19/21] aacraid: use scsi_host_busy_iter() to traverse outstanding commands
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=e3dcd2298e3f61c338f266efbdccd03b0083a463
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel scsi-private.v2
git checkout e3dcd2298e3f61c338f266efbdccd03b0083a463
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/scsi/aacraid/linit.c: In function 'fib_count_iter':
drivers/scsi/aacraid/linit.c:640:35: error: dereferencing 'void *' pointer [-Werror]
640 | struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
| ^~
drivers/scsi/aacraid/linit.c:640:35: error: request for member 'dev' in something not a structure or union
drivers/scsi/aacraid/linit.c: In function 'aac_eh_abort':
>> drivers/scsi/aacraid/linit.c:709:37: error: 'struct scsi_cmnd' has no member named 'request'
709 | fib = &aac->fibs[cmd->request->tag];
| ^~
drivers/scsi/aacraid/linit.c:776:45: error: 'struct scsi_cmnd' has no member named 'request'
776 | fib = &aac->fibs[cmd->request->tag];
| ^~
drivers/scsi/aacraid/linit.c:790:45: error: 'struct scsi_cmnd' has no member named 'request'
790 | fib = &aac->fibs[cmd->request->tag];
| ^~
drivers/scsi/aacraid/linit.c: In function 'aac_eh_bus_reset_iter':
drivers/scsi/aacraid/linit.c:1010:41: error: 'struct scsi_cmnd' has no member named 'request'
1010 | struct fib *fib = &aac->fibs[cmd->request->tag];
| ^~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from drivers/scsi/aacraid/linit.c:33:
At top level:
arch/arc/include/asm/perf_event.h:126:27: error: 'arc_pmu_cache_map' defined but not used [-Werror=unused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: error: 'arc_pmu_ev_hw_map' defined but not used [-Werror=unused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
drivers/scsi/aacraid/commsup.c: In function 'aac_fib_alloc':
drivers/scsi/aacraid/commsup.c:248:16: error: implicit declaration of function 'scsi_host_get_reserved_cmd'; did you mean 'scsi_host_get_internal_cmd'? [-Werror=implicit-function-declaration]
248 | scmd = scsi_host_get_reserved_cmd(dev->scsi_host_ptr, direction,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| scsi_host_get_internal_cmd
drivers/scsi/aacraid/commsup.c:248:14: error: assignment to 'struct scsi_cmnd *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
248 | scmd = scsi_host_get_reserved_cmd(dev->scsi_host_ptr, direction,
| ^
drivers/scsi/aacraid/commsup.c: In function 'aac_close_sync_fib_iter':
>> drivers/scsi/aacraid/commsup.c:1473:45: error: 'struct scsi_cmnd' has no member named 'request'
1473 | struct fib *fib = &aac->fibs[command->request->tag];
| ^~
cc1: all warnings being treated as errors
vim +709 drivers/scsi/aacraid/linit.c
636
637 static bool fib_count_iter(struct scsi_cmnd *scmnd, void *data, bool reserved)
638 {
639 struct fib_count_data *fib_count = data;
> 640 struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
641
642 if (!fibptr->scmd) {
643 fib_count->llcnt++;
644 return true;
645 }
646 switch (fibptr->owner) {
647 case AAC_OWNER_FIRMWARE:
648 fib_count->fwcnt++;
649 break;
650 case AAC_OWNER_ERROR_HANDLER:
651 fib_count->ehcnt++;
652 break;
653 case AAC_OWNER_MIDLEVEL:
654 fib_count->mlcnt++;
655 break;
656 default:
657 fib_count->krlcnt++;
658 break;
659 }
660 return true;
661 }
662
663 /* Called during SCSI EH, so we don't need to block requests */
664 static int get_num_of_incomplete_fibs(struct aac_dev *aac)
665 {
666 struct Scsi_Host *shost = aac->scsi_host_ptr;
667 struct device *ctrl_dev;
668 struct fib_count_data fcnt = {
669 .dev = aac,
670 };
671
672 scsi_host_busy_iter(shost, fib_count_iter, &fcnt);
673
674 ctrl_dev = &aac->pdev->dev;
675
676 dev_info(ctrl_dev, "outstanding cmd: midlevel-%d\n", fcnt.mlcnt);
677 dev_info(ctrl_dev, "outstanding cmd: lowlevel-%d\n", fcnt.llcnt);
678 dev_info(ctrl_dev, "outstanding cmd: error handler-%d\n", fcnt.ehcnt);
679 dev_info(ctrl_dev, "outstanding cmd: firmware-%d\n", fcnt.fwcnt);
680 dev_info(ctrl_dev, "outstanding cmd: kernel-%d\n", fcnt.krlcnt);
681
682 return fcnt.mlcnt + fcnt.llcnt + fcnt.ehcnt + fcnt.fwcnt;
683 }
684
685 static int aac_eh_abort(struct scsi_cmnd* cmd)
686 {
687 struct scsi_device * dev = cmd->device;
688 struct Scsi_Host * host = dev->host;
689 struct aac_dev * aac = (struct aac_dev *)host->hostdata;
690 struct fib *fib;
691 int count;
692 u32 bus, cid;
693 int ret = FAILED;
694
695 if (aac_adapter_check_health(aac))
696 return ret;
697
698 bus = aac_logical_to_phys(scmd_channel(cmd));
699 cid = scmd_id(cmd);
700 if (aac->hba_map[bus][cid].devtype == AAC_DEVTYPE_NATIVE_RAW) {
701 struct aac_hba_tm_req *tmf;
702 int status;
703 u64 address;
704
705 pr_err("%s: Host adapter abort request (%d,%d,%d,%d)\n",
706 AAC_DRIVERNAME, host->host_no,
707 sdev_channel(dev), sdev_id(dev), (int)dev->lun);
708
> 709 fib = &aac->fibs[cmd->request->tag];
710 if (*(u8 *)fib->hw_fib_va != 0 &&
711 (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA) &&
712 (fib->callback_data == cmd))
713 ret = SUCCESS;
714 if (ret == FAILED)
715 return ret;
716
717 /* start a HBA_TMF_ABORT_TASK TMF request */
718 fib = aac_fib_alloc(aac, DMA_NONE);
719 if (!fib)
720 return ret;
721
722 tmf = (struct aac_hba_tm_req *)fib->hw_fib_va;
723 memset(tmf, 0, sizeof(*tmf));
724 tmf->tmf = HBA_TMF_ABORT_TASK;
725 tmf->it_nexus = aac->hba_map[bus][cid].rmw_nexus;
726 tmf->lun[1] = cmd->device->lun;
727
728 address = (u64)fib->hw_error_pa;
729 tmf->error_ptr_hi = cpu_to_le32((u32)(address >> 32));
730 tmf->error_ptr_lo = cpu_to_le32((u32)(address & 0xffffffff));
731 tmf->error_length = cpu_to_le32(FW_ERROR_BUFFER_SIZE);
732
733 fib->hbacmd_size = sizeof(*tmf);
734 cmd->SCp.sent_command = 0;
735
736 status = aac_hba_send(HBA_IU_TYPE_SCSI_TM_REQ, fib,
737 (fib_callback) aac_hba_callback,
738 (void *) cmd);
739 if (status != -EINPROGRESS) {
740 aac_fib_complete(fib);
741 aac_fib_free(fib);
742 return ret;
743 }
744 /* Wait up to 15 secs for completion */
745 for (count = 0; count < 15; ++count) {
746 if (cmd->SCp.sent_command) {
747 ret = SUCCESS;
748 break;
749 }
750 msleep(1000);
751 }
752
753 if (ret != SUCCESS)
754 pr_err("%s: Host adapter abort request timed out\n",
755 AAC_DRIVERNAME);
756 } else {
757 pr_err(
758 "%s: Host adapter abort request.\n"
759 "%s: Outstanding commands on (%d,%d,%d,%d):\n",
760 AAC_DRIVERNAME, AAC_DRIVERNAME,
761 host->host_no, sdev_channel(dev), sdev_id(dev),
762 (int)dev->lun);
763 switch (cmd->cmnd[0]) {
764 case SERVICE_ACTION_IN_16:
765 if (!(aac->raw_io_interface) ||
766 !(aac->raw_io_64) ||
767 ((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
768 break;
769 fallthrough;
770 case INQUIRY:
771 case READ_CAPACITY:
772 /*
773 * Mark associated FIB to not complete,
774 * eh handler does this
775 */
776 fib = &aac->fibs[cmd->request->tag];
777 if (fib->hw_fib_va->header.XferState &&
778 (fib->flags & FIB_CONTEXT_FLAG) &&
779 (fib->callback_data == cmd)) {
780 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
781 fib->owner = AAC_OWNER_ERROR_HANDLER;
782 ret = SUCCESS;
783 }
784 break;
785 case TEST_UNIT_READY:
786 /*
787 * Mark associated FIB to not complete,
788 * eh handler does this
789 */
790 fib = &aac->fibs[cmd->request->tag];
791 if ((fib->hw_fib_va->header.XferState &
792 cpu_to_le32(Async | NoResponseExpected)) &&
793 (fib->flags & FIB_CONTEXT_FLAG) &&
794 (fib->callback_data == cmd)) {
795 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
796 fib->owner = AAC_OWNER_ERROR_HANDLER;
797 ret = SUCCESS;
798 }
799 break;
800 }
801 }
802 return ret;
803 }
804
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (69180 bytes)
Powered by blists - more mailing lists