* [openeuler:openEuler-1.0-LTS 1521/21575] drivers/scsi/libsas/sas_expander.c:2079: undefined reference to `ata_dev_same_device'
@ 2024-01-29 4:42 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-29 4:42 UTC (permalink / raw)
To: kernel, Xie XiuQi; +Cc: oe-kbuild-all
[-- Attachment #1: Type: text/plain, Size: 8802 bytes --]
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: e0207e2784d0f836e732608faf1a6966546a8eb3
commit: d856ec500c97835c591ffacc005f514509f1a931 [1521/21575] scsi: libsas: check if the same sata device when flutter
:::::: branch date: 13 hours ago
:::::: commit date: 4 years, 1 month ago
config: x86_64-randconfig-r113-20240125 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (attached as reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401261034.TNcmiPjc-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: warning: arch/x86/lib/csum-copy_64.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
ld: warning: arch/x86/lib/csum-copy_64.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions
ld: drivers/scsi/libsas/sas_expander.o: in function `sas_rediscover_dev':
>> drivers/scsi/libsas/sas_expander.c:2079: undefined reference to `ata_dev_same_device'
vim +2079 drivers/scsi/libsas/sas_expander.c
354cf82980e244 Dan Williams 2012-01-12 2011
19252de6818ced Tom Peng 2009-07-17 2012 static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
2908d778ab3e24 James Bottomley 2006-08-29 2013 {
2908d778ab3e24 James Bottomley 2006-08-29 2014 struct expander_device *ex = &dev->ex_dev;
2908d778ab3e24 James Bottomley 2006-08-29 2015 struct ex_phy *phy = &ex->ex_phy[phy_id];
d12b2bcfd3801c Jason Yan 2018-12-28 2016 struct asd_sas_port *port = dev->port;
d12b2bcfd3801c Jason Yan 2018-12-28 2017 struct asd_sas_phy *sas_phy;
aa9f8328fc5146 James Bottomley 2013-05-07 2018 enum sas_device_type type = SAS_PHY_UNUSED;
354cf82980e244 Dan Williams 2012-01-12 2019 u8 sas_addr[8];
2908d778ab3e24 James Bottomley 2006-08-29 2020 int res;
2908d778ab3e24 James Bottomley 2006-08-29 2021
b2311a287553af Jeff Skirvin 2012-06-21 2022 memset(sas_addr, 0, 8);
354cf82980e244 Dan Williams 2012-01-12 2023 res = sas_get_phy_attached_dev(dev, phy_id, sas_addr, &type);
2908d778ab3e24 James Bottomley 2006-08-29 2024 switch (res) {
2908d778ab3e24 James Bottomley 2006-08-29 2025 case SMP_RESP_NO_PHY:
2908d778ab3e24 James Bottomley 2006-08-29 2026 phy->phy_state = PHY_NOT_PRESENT;
19252de6818ced Tom Peng 2009-07-17 2027 sas_unregister_devs_sas_addr(dev, phy_id, last);
354cf82980e244 Dan Williams 2012-01-12 2028 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2029 case SMP_RESP_PHY_VACANT:
2908d778ab3e24 James Bottomley 2006-08-29 2030 phy->phy_state = PHY_VACANT;
19252de6818ced Tom Peng 2009-07-17 2031 sas_unregister_devs_sas_addr(dev, phy_id, last);
354cf82980e244 Dan Williams 2012-01-12 2032 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2033 case SMP_RESP_FUNC_ACC:
2908d778ab3e24 James Bottomley 2006-08-29 2034 break;
b2311a287553af Jeff Skirvin 2012-06-21 2035 case -ECOMM:
b2311a287553af Jeff Skirvin 2012-06-21 2036 break;
b2311a287553af Jeff Skirvin 2012-06-21 2037 default:
b2311a287553af Jeff Skirvin 2012-06-21 2038 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2039 }
2908d778ab3e24 James Bottomley 2006-08-29 2040
b2311a287553af Jeff Skirvin 2012-06-21 2041 if ((SAS_ADDR(sas_addr) == 0) || (res == -ECOMM)) {
2908d778ab3e24 James Bottomley 2006-08-29 2042 phy->phy_state = PHY_EMPTY;
19252de6818ced Tom Peng 2009-07-17 2043 sas_unregister_devs_sas_addr(dev, phy_id, last);
354cf82980e244 Dan Williams 2012-01-12 2044 return res;
354cf82980e244 Dan Williams 2012-01-12 2045 } else if (SAS_ADDR(sas_addr) == SAS_ADDR(phy->attached_sas_addr) &&
354cf82980e244 Dan Williams 2012-01-12 2046 dev_type_flutter(type, phy->attached_dev_type)) {
354cf82980e244 Dan Williams 2012-01-12 2047 struct domain_device *ata_dev = sas_ex_to_ata(dev, phy_id);
354cf82980e244 Dan Williams 2012-01-12 2048 char *action = "";
354cf82980e244 Dan Williams 2012-01-12 2049
a01e70e570a72b James Bottomley 2006-09-06 2050 sas_ex_phy_discover(dev, phy_id);
354cf82980e244 Dan Williams 2012-01-12 2051
aa9f8328fc5146 James Bottomley 2013-05-07 2052 if (ata_dev && phy->attached_dev_type == SAS_SATA_PENDING)
354cf82980e244 Dan Williams 2012-01-12 2053 action = ", needs recovery";
354cf82980e244 Dan Williams 2012-01-12 2054 SAS_DPRINTK("ex %016llx phy 0x%x broadcast flutter%s\n",
354cf82980e244 Dan Williams 2012-01-12 2055 SAS_ADDR(dev->sas_addr), phy_id, action);
d856ec500c9783 Jason Yan 2018-12-28 2056
d856ec500c9783 Jason Yan 2018-12-28 2057 /* the phy attached address will be updated by sas_ex_phy_discover()
d856ec500c9783 Jason Yan 2018-12-28 2058 * and sometimes become abnormal
d856ec500c9783 Jason Yan 2018-12-28 2059 */
d856ec500c9783 Jason Yan 2018-12-28 2060 if (SAS_ADDR(phy->attached_sas_addr) != SAS_ADDR(sas_addr) ||
d856ec500c9783 Jason Yan 2018-12-28 2061 SAS_ADDR(phy->attached_sas_addr) == 0) {
d856ec500c9783 Jason Yan 2018-12-28 2062 /* if attached_sas_addr become abnormal, we must set the
d856ec500c9783 Jason Yan 2018-12-28 2063 * original address back so that the device can be unregistered
d856ec500c9783 Jason Yan 2018-12-28 2064 */
d856ec500c9783 Jason Yan 2018-12-28 2065 memcpy(phy->attached_sas_addr, sas_addr, SAS_ADDR_SIZE);
d856ec500c9783 Jason Yan 2018-12-28 2066 SAS_DPRINTK("phy address(%016llx) abnormal, origin:%016llx\n",
d856ec500c9783 Jason Yan 2018-12-28 2067 SAS_ADDR(phy->attached_sas_addr),
d856ec500c9783 Jason Yan 2018-12-28 2068 SAS_ADDR(sas_addr));
d856ec500c9783 Jason Yan 2018-12-28 2069 goto unregister;
d856ec500c9783 Jason Yan 2018-12-28 2070 }
d856ec500c9783 Jason Yan 2018-12-28 2071
d856ec500c9783 Jason Yan 2018-12-28 2072
d856ec500c9783 Jason Yan 2018-12-28 2073 if (ata_dev) {
d856ec500c9783 Jason Yan 2018-12-28 2074 struct ata_device *adev = sas_to_ata_dev(ata_dev);
d856ec500c9783 Jason Yan 2018-12-28 2075 unsigned int class = ata_dev->sata_dev.class;
d856ec500c9783 Jason Yan 2018-12-28 2076 u16 *id = ata_dev->sata_dev.id;
d856ec500c9783 Jason Yan 2018-12-28 2077
d856ec500c9783 Jason Yan 2018-12-28 2078 /* to see if the disk is replaced with another one */
d856ec500c9783 Jason Yan 2018-12-28 @2079 if (!ata_dev_same_device(adev, class, id))
d856ec500c9783 Jason Yan 2018-12-28 2080 goto unregister;
d856ec500c9783 Jason Yan 2018-12-28 2081 }
d856ec500c9783 Jason Yan 2018-12-28 2082
2908d778ab3e24 James Bottomley 2006-08-29 2083 return res;
2908d778ab3e24 James Bottomley 2006-08-29 2084 }
2908d778ab3e24 James Bottomley 2006-08-29 2085
d856ec500c9783 Jason Yan 2018-12-28 2086 unregister:
24b7c4b6e22de5 Jason Yan 2018-12-28 2087 /* we always have to delete the old device when we went here */
c666aae6919114 Dan Williams 2012-01-19 2088 SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
c666aae6919114 Dan Williams 2012-01-19 2089 SAS_ADDR(dev->sas_addr), phy_id,
c666aae6919114 Dan Williams 2012-01-19 2090 SAS_ADDR(phy->attached_sas_addr));
c666aae6919114 Dan Williams 2012-01-19 2091 sas_unregister_devs_sas_addr(dev, phy_id, last);
c666aae6919114 Dan Williams 2012-01-19 2092
d12b2bcfd3801c Jason Yan 2018-12-28 2093 /* force the next revalidation find this phy and bring it up */
d12b2bcfd3801c Jason Yan 2018-12-28 2094 phy->phy_change_count = -1;
d12b2bcfd3801c Jason Yan 2018-12-28 2095 ex->ex_change_count = -1;
d12b2bcfd3801c Jason Yan 2018-12-28 2096 sas_phy = container_of(port->phy_list.next, struct asd_sas_phy,
d12b2bcfd3801c Jason Yan 2018-12-28 2097 port_phy_el);
d12b2bcfd3801c Jason Yan 2018-12-28 2098 port->ha->notify_port_event(sas_phy, PORTE_BROADCAST_RCVD);
d12b2bcfd3801c Jason Yan 2018-12-28 2099
d12b2bcfd3801c Jason Yan 2018-12-28 2100 return 0;
354cf82980e244 Dan Williams 2012-01-12 2101 }
354cf82980e244 Dan Williams 2012-01-12 2102
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27744 bytes --]
[-- Attachment #3: reproduce --]
[-- Type: text/plain, Size: 675 bytes --]
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-52-g1cf3d98c-dirty
git remote add openeuler https://gitee.com/openeuler/kernel.git
git fetch --no-tags openeuler openEuler-1.0-LTS
git checkout d856ec500c97835c591ffacc005f514509f1a931
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__ -fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=x86_64 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__ -fmax-errors=unlimited -fmax-warnings=unlimited' O=build_dir ARCH=x86_64 SHELL=/bin/bash
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-29 4:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 4:42 [openeuler:openEuler-1.0-LTS 1521/21575] drivers/scsi/libsas/sas_expander.c:2079: undefined reference to `ata_dev_same_device' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.