tree:
https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git megaraid.v3
head: 9369ca8fe8c5e0b78306ef343c6c1e1eaec77956
commit: 66215c55d4bc633a83910fb6ee5fa1464e6e9c08 [1/4] megaraid_mbox: Add support for
legacy MegaRAID3 cards
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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/commi...
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 megaraid.v3
git checkout 66215c55d4bc633a83910fb6ee5fa1464e6e9c08
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_probe_one':
> drivers/scsi/megaraid/megaraid_mbox.c:447:30: error:
'PCI_CONF_AMISIG' undeclared (first use in this function); did you mean
'PCI_CONF_AMISIG64'?
447 | pci_read_config_word(pdev,
PCI_CONF_AMISIG, &magic);
| ^~~~~~~~~~~~~~~
| PCI_CONF_AMISIG64
drivers/scsi/megaraid/megaraid_mbox.c:447:30: note: each undeclared identifier is
reported only once for each function it appears in
> drivers/scsi/megaraid/megaraid_mbox.c:448:16: error:
'HBA_SIGNATURE_471' undeclared (first use in this function); did you mean
'HBA_SIGNATURE_64_BIT'?
448 | if (magic != HBA_SIGNATURE_471
&& magic != HBA_SIGNATURE)
| ^~~~~~~~~~~~~~~~~
| HBA_SIGNATURE_64_BIT
> drivers/scsi/megaraid/megaraid_mbox.c:448:46: error:
'HBA_SIGNATURE' undeclared (first use in this function)
448 | if
(magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
| ^~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS &&
STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390
&& !MICROBLAZE && !ARM && !ARC && !X86
vim +447 drivers/scsi/megaraid/megaraid_mbox.c
398
399
400 /**
401 * megaraid_probe_one - PCI hotplug entry point
402 * @pdev : handle to this controller's PCI configuration space
403 * @id : pci device id of the class of controllers
404 *
405 * This routine should be called whenever a new adapter is detected by the
406 * PCI hotplug susbsystem.
407 */
408 static int
409 megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
410 {
411 adapter_t *adapter;
412
413
414 // detected a new controller
415 con_log(CL_ANN, (KERN_INFO
416 "megaraid: probe new device %#4.04x:%#4.04x:%#4.04x:%#4.04x: ",
417 pdev->vendor, pdev->device, pdev->subsystem_vendor,
418 pdev->subsystem_device));
419
420 con_log(CL_ANN, ("bus %d:slot %d:func %d\n", pdev->bus->number,
421 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)));
422
423 if (pci_enable_device(pdev)) {
424 con_log(CL_ANN, (KERN_WARNING
425 "megaraid: pci_enable_device failed\n"));
426
427 return -ENODEV;
428 }
429
430 // Enable bus-mastering on this controller
431 pci_set_master(pdev);
432
433 /*
434 * Older MegaRAID3 HBAs share the PCI ID with generic i960
435 * devices.
436 */
437 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
438 u16 magic;
439 /*
440 * Don't fall over the Compaq management cards using the same
441 * PCI identifier
442 */
443 if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
444 pdev->subsystem_device == 0xC000)
445 return -ENODEV;
446 /* Now check the magic signature byte */
447 pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
448 if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
449 return -ENODEV;
450 }
451
452 // Allocate the per driver initialization structure
453 adapter = kzalloc(sizeof(adapter_t), GFP_KERNEL);
454
455 if (adapter == NULL) {
456 con_log(CL_ANN, (KERN_WARNING
457 "megaraid: out of memory, %s %d.\n", __func__, __LINE__));
458
459 goto out_probe_one;
460 }
461
462
463 // set up PCI related soft state and other pre-known parameters
464 adapter->unique_id = pdev->bus->number << 8 | pdev->devfn;
465 adapter->irq = pdev->irq;
466 adapter->pdev = pdev;
467
468 atomic_set(&adapter->being_detached, 0);
469
470 // Setup the default DMA mask. This would be changed later on
471 // depending on hardware capabilities
472 if (dma_set_mask(&adapter->pdev->dev, DMA_BIT_MASK(32))) {
473 con_log(CL_ANN, (KERN_WARNING
474 "megaraid: dma_set_mask failed:%d\n", __LINE__));
475
476 goto out_free_adapter;
477 }
478
479
480 // Initialize the synchronization lock for kernel and LLD
481 spin_lock_init(&adapter->lock);
482
483 // Initialize the command queues: the list of free SCBs and the list
484 // of pending SCBs.
485 INIT_LIST_HEAD(&adapter->kscb_pool);
486 spin_lock_init(SCSI_FREE_LIST_LOCK(adapter));
487
488 INIT_LIST_HEAD(&adapter->pend_list);
489 spin_lock_init(PENDING_LIST_LOCK(adapter));
490
491 INIT_LIST_HEAD(&adapter->completed_list);
492 spin_lock_init(COMPLETED_LIST_LOCK(adapter));
493
494
495 // Start the mailbox based controller
496 if (megaraid_init_mbox(adapter) != 0) {
497 con_log(CL_ANN, (KERN_WARNING
498 "megaraid: mailbox adapter did not initialize\n"));
499
500 goto out_free_adapter;
501 }
502
503 // Register with LSI Common Management Module
504 if (megaraid_cmm_register(adapter) != 0) {
505
506 con_log(CL_ANN, (KERN_WARNING
507 "megaraid: could not register with management module\n"));
508
509 goto out_fini_mbox;
510 }
511
512 // setup adapter handle in PCI soft state
513 pci_set_drvdata(pdev, adapter);
514
515 // attach with scsi mid-layer
516 if (megaraid_io_attach(adapter) != 0) {
517
518 con_log(CL_ANN, (KERN_WARNING "megaraid: io attach failed\n"));
519
520 goto out_cmm_unreg;
521 }
522
523 return 0;
524
525 out_cmm_unreg:
526 megaraid_cmm_unregister(adapter);
527 out_fini_mbox:
528 megaraid_fini_mbox(adapter);
529 out_free_adapter:
530 kfree(adapter);
531 out_probe_one:
532 pci_disable_device(pdev);
533
534 return -ENODEV;
535 }
536
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org