Re: [PATCH 1/2] mpt3sas: Update MPI headers to support Aero controllers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Suganath,

I love your patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.19 next-20181019]
[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/Suganath-Prabu/mpt3sas-Update-MPI-headers-to-support-Aero-controllers/20181025-181347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-x014-201842 (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/Suganath-Prabu/mpt3sas-Update-MPI-headers-to-support-Aero-controllers/20181025-181347 HEAD 0d477ec5db33da0ceaa200504780c2962def87db builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers/scsi/mpt3sas/mpt3sas_base.c: In function '_base_display_fwpkg_version':
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3761:2: error: unknown type name 'Mpi2FWImageHeader_t'; did you mean 'Mpi2ConfigPageHeader_t'?
     Mpi2FWImageHeader_t *FWImgHdr;
     ^~~~~~~~~~~~~~~~~~~
     Mpi2ConfigPageHeader_t
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3777:23: error: 'Mpi2FWImageHeader_t' undeclared (first use in this function); did you mean 'Mpi2ConfigPageHeader_t'?
     data_length = sizeof(Mpi2FWImageHeader_t);
                          ^~~~~~~~~~~~~~~~~~~
                          Mpi2ConfigPageHeader_t
   drivers/scsi/mpt3sas/mpt3sas_base.c:3777:23: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3821:38: error: expected expression before ')' token
        FWImgHdr = (Mpi2FWImageHeader_t *)fwpkg_data;
                                         ^
   In file included from include/linux/export.h:45:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:7,
                    from drivers/scsi/mpt3sas/mpt3sas_base.c:46:
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:17: error: request for member 'PackageVersion' in something not a structure or union
        if (FWImgHdr->PackageVersion.Word) {
                    ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:5: note: in expansion of macro 'if'
        if (FWImgHdr->PackageVersion.Word) {
        ^~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:17: error: request for member 'PackageVersion' in something not a structure or union
        if (FWImgHdr->PackageVersion.Word) {
                    ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:5: note: in expansion of macro 'if'
        if (FWImgHdr->PackageVersion.Word) {
        ^~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:17: error: request for member 'PackageVersion' in something not a structure or union
        if (FWImgHdr->PackageVersion.Word) {
                    ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:5: note: in expansion of macro 'if'
        if (FWImgHdr->PackageVersion.Word) {
        ^~
   In file included from include/linux/kernel.h:14:0,
                    from drivers/scsi/mpt3sas/mpt3sas_base.c:46:
   drivers/scsi/mpt3sas/mpt3sas_base.c:3824:16: error: request for member 'PackageVersion' in something not a structure or union
           FWImgHdr->PackageVersion.Struct.Major,
                   ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3823:6: note: in expansion of macro 'ioc_info'
         ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
         ^~~~~~~~
   drivers/scsi/mpt3sas/mpt3sas_base.c:3825:16: error: request for member 'PackageVersion' in something not a structure or union
           FWImgHdr->PackageVersion.Struct.Minor,
                   ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3823:6: note: in expansion of macro 'ioc_info'
         ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
         ^~~~~~~~
   drivers/scsi/mpt3sas/mpt3sas_base.c:3826:16: error: request for member 'PackageVersion' in something not a structure or union
           FWImgHdr->PackageVersion.Struct.Unit,
                   ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3823:6: note: in expansion of macro 'ioc_info'
         ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
         ^~~~~~~~
   drivers/scsi/mpt3sas/mpt3sas_base.c:3827:16: error: request for member 'PackageVersion' in something not a structure or union
           FWImgHdr->PackageVersion.Struct.Dev);
                   ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3823:6: note: in expansion of macro 'ioc_info'
         ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
         ^~~~~~~~

vim +3761 drivers/scsi/mpt3sas/mpt3sas_base.c

fb84dfc4 Sreekanth Reddy   2015-06-30  3750  
fb84dfc4 Sreekanth Reddy   2015-06-30  3751  /**
3d29ed85 Chaitra P B       2018-04-24  3752   * _base_display_fwpkg_version - sends FWUpload request to pull FWPkg
3d29ed85 Chaitra P B       2018-04-24  3753   *				version from FW Image Header.
3d29ed85 Chaitra P B       2018-04-24  3754   * @ioc: per adapter object
3d29ed85 Chaitra P B       2018-04-24  3755   *
4beb4867 Bart Van Assche   2018-06-15  3756   * Return: 0 for success, non-zero for failure.
3d29ed85 Chaitra P B       2018-04-24  3757   */
3d29ed85 Chaitra P B       2018-04-24  3758  	static int
3d29ed85 Chaitra P B       2018-04-24  3759  _base_display_fwpkg_version(struct MPT3SAS_ADAPTER *ioc)
3d29ed85 Chaitra P B       2018-04-24  3760  {
3d29ed85 Chaitra P B       2018-04-24 @3761  	Mpi2FWImageHeader_t *FWImgHdr;
3d29ed85 Chaitra P B       2018-04-24  3762  	Mpi25FWUploadRequest_t *mpi_request;
3d29ed85 Chaitra P B       2018-04-24  3763  	Mpi2FWUploadReply_t mpi_reply;
3d29ed85 Chaitra P B       2018-04-24  3764  	int r = 0;
3d29ed85 Chaitra P B       2018-04-24  3765  	void *fwpkg_data = NULL;
3d29ed85 Chaitra P B       2018-04-24  3766  	dma_addr_t fwpkg_data_dma;
3d29ed85 Chaitra P B       2018-04-24  3767  	u16 smid, ioc_status;
3d29ed85 Chaitra P B       2018-04-24  3768  	size_t data_length;
3d29ed85 Chaitra P B       2018-04-24  3769  
919d8a3f Joe Perches       2018-09-17  3770  	dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__));
3d29ed85 Chaitra P B       2018-04-24  3771  
3d29ed85 Chaitra P B       2018-04-24  3772  	if (ioc->base_cmds.status & MPT3_CMD_PENDING) {
919d8a3f Joe Perches       2018-09-17  3773  		ioc_err(ioc, "%s: internal command already in use\n", __func__);
3d29ed85 Chaitra P B       2018-04-24  3774  		return -EAGAIN;
3d29ed85 Chaitra P B       2018-04-24  3775  	}
3d29ed85 Chaitra P B       2018-04-24  3776  
3d29ed85 Chaitra P B       2018-04-24 @3777  	data_length = sizeof(Mpi2FWImageHeader_t);
1c2048bd Christoph Hellwig 2018-10-11  3778  	fwpkg_data = dma_alloc_coherent(&ioc->pdev->dev, data_length,
1c2048bd Christoph Hellwig 2018-10-11  3779  			&fwpkg_data_dma, GFP_KERNEL);
3d29ed85 Chaitra P B       2018-04-24  3780  	if (!fwpkg_data) {
919d8a3f Joe Perches       2018-09-17  3781  		ioc_err(ioc, "failure at %s:%d/%s()!\n",
919d8a3f Joe Perches       2018-09-17  3782  			__FILE__, __LINE__, __func__);
3d29ed85 Chaitra P B       2018-04-24  3783  		return -ENOMEM;
3d29ed85 Chaitra P B       2018-04-24  3784  	}
3d29ed85 Chaitra P B       2018-04-24  3785  
3d29ed85 Chaitra P B       2018-04-24  3786  	smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx);
3d29ed85 Chaitra P B       2018-04-24  3787  	if (!smid) {
919d8a3f Joe Perches       2018-09-17  3788  		ioc_err(ioc, "%s: failed obtaining a smid\n", __func__);
3d29ed85 Chaitra P B       2018-04-24  3789  		r = -EAGAIN;
3d29ed85 Chaitra P B       2018-04-24  3790  		goto out;
3d29ed85 Chaitra P B       2018-04-24  3791  	}
3d29ed85 Chaitra P B       2018-04-24  3792  
3d29ed85 Chaitra P B       2018-04-24  3793  	ioc->base_cmds.status = MPT3_CMD_PENDING;
3d29ed85 Chaitra P B       2018-04-24  3794  	mpi_request = mpt3sas_base_get_msg_frame(ioc, smid);
3d29ed85 Chaitra P B       2018-04-24  3795  	ioc->base_cmds.smid = smid;
3d29ed85 Chaitra P B       2018-04-24  3796  	memset(mpi_request, 0, sizeof(Mpi25FWUploadRequest_t));
3d29ed85 Chaitra P B       2018-04-24  3797  	mpi_request->Function = MPI2_FUNCTION_FW_UPLOAD;
3d29ed85 Chaitra P B       2018-04-24  3798  	mpi_request->ImageType = MPI2_FW_UPLOAD_ITYPE_FW_FLASH;
3d29ed85 Chaitra P B       2018-04-24  3799  	mpi_request->ImageSize = cpu_to_le32(data_length);
3d29ed85 Chaitra P B       2018-04-24  3800  	ioc->build_sg(ioc, &mpi_request->SGL, 0, 0, fwpkg_data_dma,
3d29ed85 Chaitra P B       2018-04-24  3801  			data_length);
3d29ed85 Chaitra P B       2018-04-24  3802  	init_completion(&ioc->base_cmds.done);
3d29ed85 Chaitra P B       2018-04-24  3803  	mpt3sas_base_put_smid_default(ioc, smid);
3d29ed85 Chaitra P B       2018-04-24  3804  	/* Wait for 15 seconds */
3d29ed85 Chaitra P B       2018-04-24  3805  	wait_for_completion_timeout(&ioc->base_cmds.done,
3d29ed85 Chaitra P B       2018-04-24  3806  			FW_IMG_HDR_READ_TIMEOUT*HZ);
919d8a3f Joe Perches       2018-09-17  3807  	ioc_info(ioc, "%s: complete\n", __func__);
3d29ed85 Chaitra P B       2018-04-24  3808  	if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) {
919d8a3f Joe Perches       2018-09-17  3809  		ioc_err(ioc, "%s: timeout\n", __func__);
3d29ed85 Chaitra P B       2018-04-24  3810  		_debug_dump_mf(mpi_request,
3d29ed85 Chaitra P B       2018-04-24  3811  				sizeof(Mpi25FWUploadRequest_t)/4);
3d29ed85 Chaitra P B       2018-04-24  3812  		r = -ETIME;
3d29ed85 Chaitra P B       2018-04-24  3813  	} else {
3d29ed85 Chaitra P B       2018-04-24  3814  		memset(&mpi_reply, 0, sizeof(Mpi2FWUploadReply_t));
3d29ed85 Chaitra P B       2018-04-24  3815  		if (ioc->base_cmds.status & MPT3_CMD_REPLY_VALID) {
3d29ed85 Chaitra P B       2018-04-24  3816  			memcpy(&mpi_reply, ioc->base_cmds.reply,
3d29ed85 Chaitra P B       2018-04-24  3817  					sizeof(Mpi2FWUploadReply_t));
3d29ed85 Chaitra P B       2018-04-24  3818  			ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
3d29ed85 Chaitra P B       2018-04-24  3819  						MPI2_IOCSTATUS_MASK;
3d29ed85 Chaitra P B       2018-04-24  3820  			if (ioc_status == MPI2_IOCSTATUS_SUCCESS) {
3d29ed85 Chaitra P B       2018-04-24 @3821  				FWImgHdr = (Mpi2FWImageHeader_t *)fwpkg_data;
3d29ed85 Chaitra P B       2018-04-24 @3822  				if (FWImgHdr->PackageVersion.Word) {
919d8a3f Joe Perches       2018-09-17 @3823  					ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
3d29ed85 Chaitra P B       2018-04-24  3824  						 FWImgHdr->PackageVersion.Struct.Major,
3d29ed85 Chaitra P B       2018-04-24  3825  						 FWImgHdr->PackageVersion.Struct.Minor,
3d29ed85 Chaitra P B       2018-04-24  3826  						 FWImgHdr->PackageVersion.Struct.Unit,
3d29ed85 Chaitra P B       2018-04-24  3827  						 FWImgHdr->PackageVersion.Struct.Dev);
3d29ed85 Chaitra P B       2018-04-24  3828  				}
3d29ed85 Chaitra P B       2018-04-24  3829  			} else {
3d29ed85 Chaitra P B       2018-04-24  3830  				_debug_dump_mf(&mpi_reply,
3d29ed85 Chaitra P B       2018-04-24  3831  						sizeof(Mpi2FWUploadReply_t)/4);
3d29ed85 Chaitra P B       2018-04-24  3832  			}
3d29ed85 Chaitra P B       2018-04-24  3833  		}
3d29ed85 Chaitra P B       2018-04-24  3834  	}
3d29ed85 Chaitra P B       2018-04-24  3835  	ioc->base_cmds.status = MPT3_CMD_NOT_USED;
3d29ed85 Chaitra P B       2018-04-24  3836  out:
3d29ed85 Chaitra P B       2018-04-24  3837  	if (fwpkg_data)
1c2048bd Christoph Hellwig 2018-10-11  3838  		dma_free_coherent(&ioc->pdev->dev, data_length, fwpkg_data,
3d29ed85 Chaitra P B       2018-04-24  3839  				fwpkg_data_dma);
3d29ed85 Chaitra P B       2018-04-24  3840  	return r;
3d29ed85 Chaitra P B       2018-04-24  3841  }
3d29ed85 Chaitra P B       2018-04-24  3842  

:::::: The code at line 3761 was first introduced by commit
:::::: 3d29ed85fc9ca673fbae0f97178ef64c1314f7e2 scsi: mpt3sas: Report Firmware Package Version from HBA Driver.

:::::: TO: Chaitra P B <chaitra.basappa@xxxxxxxxxxxx>
:::::: 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux