[ext4:dev 11/28] mballoc.c:undefined reference to `atomic64_read_386'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head: fcdf3c34b7abdcbb49690c94c7fa6ce224dc9749
commit: 67d25186046145748d5fe4c5019d832215e01c1e [11/28] ext4: drop s_mb_bal_lock and convert protected fields to atomic
config: um-randconfig-r022-20210412 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id...
git remote add ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
git fetch --no-tags ext4 dev
git checkout 67d25186046145748d5fe4c5019d832215e01c1e
# save the attached .config to linux build tree
make W=1 ARCH=um
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 >>):
/usr/bin/ld: kernel/fork.o: in function `mm_init':
fork.c:(.text+0x1294): undefined reference to `atomic64_set_386'
/usr/bin/ld: kernel/sched/fair.o: in function `update_curr':
fair.c:(.text+0xb8a): undefined reference to `atomic64_add_386'
/usr/bin/ld: kernel/futex.o: in function `get_futex_key':
futex.c:(.text+0x2900): undefined reference to `atomic64_read_386'
/usr/bin/ld: futex.c:(.text+0x2a04): undefined reference to `atomic64_add_return_386'
/usr/bin/ld: futex.c:(.text+0x2a5d): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: mm/debug.o: in function `dump_mm':
debug.c:(.text+0x542): undefined reference to `atomic64_read_386'
/usr/bin/ld: mm/z3fold.o: in function `z3fold_zpool_total_size':
z3fold.c:(.text+0x3c): undefined reference to `atomic64_read_386'
/usr/bin/ld: mm/z3fold.o: in function `z3fold_zpool_create':
z3fold.c:(.text+0x36b): undefined reference to `atomic64_set_386'
/usr/bin/ld: mm/z3fold.o: in function `z3fold_page_putback':
z3fold.c:(.text+0xd15): undefined reference to `atomic64_dec_386'
/usr/bin/ld: mm/z3fold.o: in function `z3fold_reclaim_page.constprop.0':
z3fold.c:(.text+0x108b): undefined reference to `atomic64_dec_386'
/usr/bin/ld: z3fold.c:(.text+0x1150): undefined reference to `atomic64_dec_386'
/usr/bin/ld: z3fold.c:(.text+0x157c): undefined reference to `atomic64_dec_386'
/usr/bin/ld: mm/z3fold.o: in function `z3fold_alloc':
z3fold.c:(.text+0x1dd2): undefined reference to `atomic64_inc_386'
/usr/bin/ld: z3fold.c:(.text+0x2270): undefined reference to `atomic64_dec_386'
/usr/bin/ld: mm/z3fold.o: in function `do_compact_page':
z3fold.c:(.text+0x250f): undefined reference to `atomic64_dec_386'
/usr/bin/ld: z3fold.c:(.text+0x2f7a): undefined reference to `atomic64_dec_386'
/usr/bin/ld: mm/z3fold.o: in function `z3fold_free':
z3fold.c:(.text+0x3416): undefined reference to `atomic64_dec_386'
/usr/bin/ld: z3fold.c:(.text+0x3574): undefined reference to `atomic64_dec_386'
/usr/bin/ld: fs/inode.o: in function `inode_init_always':
inode.c:(.text+0x5ae): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/inode.o: in function `generic_update_time':
inode.c:(.text+0x34d2): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x3513): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/inode.o: in function `file_update_time':
inode.c:(.text+0x43e1): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/namespace.o: in function `alloc_mnt_ns':
namespace.c:(.text+0x1700): undefined reference to `atomic64_add_return_386'
/usr/bin/ld: fs/io_uring.o: in function `io_sqe_buffers_unregister.part.0':
io_uring.c:(.text+0x2bfb): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/io_uring.o: in function `io_sqe_buffers_register':
io_uring.c:(.text+0x6e4c): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/ext4/mballoc.o: in function `ext4_mb_generate_buddy':
mballoc.c:(.text+0x2839): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/ext4/mballoc.o: in function `ext4_mb_mark_diskspace_used':
mballoc.c:(.text+0x8b81): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/ext4/mballoc.o: in function `ext4_mb_release':
>> mballoc.c:(.text+0xb4fb): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/ext4/mballoc.o: in function `ext4_mb_mark_bb':
mballoc.c:(.text+0xc0b8): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/ext4/mballoc.o: in function `ext4_free_blocks':
mballoc.c:(.text+0xe620): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/ext4/mballoc.o: in function `ext4_group_add_blocks':
mballoc.c:(.text+0xf651): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/ext4/super.o: in function `ext4_statfs':
super.c:(.text+0x6511): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/ext4/super.o: in function `ext4_alloc_inode':
super.c:(.text+0x6bfc): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/ext4/super.o: in function `ext4_fill_super':
super.c:(.text+0x16883): undefined reference to `atomic64_set_386'
/usr/bin/ld: super.c:(.text+0x16f89): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/ext4/sysfs.o: in function `ext4_attr_store':
sysfs.c:(.text+0x127): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/ext4/sysfs.o: in function `ext4_attr_show':
sysfs.c:(.text+0x4d0): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/fat/inode.o: in function `fat_fill_inode':
inode.c:(.text+0x1d0d): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x1d44): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/fat/inode.o: in function `fat_build_inode':
inode.c:(.text+0x221d): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/fat/inode.o: in function `fat_fill_super':
inode.c:(.text+0x29ec): undefined reference to `atomic64_set_386'
/usr/bin/ld: inode.c:(.text+0x2a28): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x2a82): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/fat/namei_msdos.o: in function `do_msdos_rename':
namei_msdos.c:(.text+0xf0e): undefined reference to `atomic64_read_386'
/usr/bin/ld: namei_msdos.c:(.text+0xf68): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: namei_msdos.c:(.text+0x10d7): undefined reference to `atomic64_read_386'
/usr/bin/ld: namei_msdos.c:(.text+0x1121): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: namei_msdos.c:(.text+0x1496): undefined reference to `atomic64_read_386'
/usr/bin/ld: namei_msdos.c:(.text+0x14e0): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/ufs/super.o: in function `ufs_alloc_inode':
super.c:(.text+0x415): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/affs/super.o: in function `affs_alloc_inode':
super.c:(.text+0x4d5): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/nilfs2/super.o: in function `nilfs_attach_checkpoint':
super.c:(.text+0x15fd): undefined reference to `atomic64_set_386'
/usr/bin/ld: super.c:(.text+0x160e): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/nilfs2/super.o: in function `nilfs_statfs.cold':
super.c:(.text.unlikely+0x11d): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/nilfs2/sysfs.o: in function `nilfs_snapshot_blocks_count_show':
sysfs.c:(.text+0x35a): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/nilfs2/sysfs.o: in function `nilfs_snapshot_inodes_count_show':
sysfs.c:(.text+0x392): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/super.o: in function `trace_event_raw_event_btrfs_dump_space_info':
super.c:(.text+0x9e76): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/disk-io.o: in function `btrfs_init_fs_info':
disk-io.c:(.text+0x531e): undefined reference to `atomic64_set_386'
/usr/bin/ld: disk-io.c:(.text+0x534c): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/btrfs/inode.o: in function `fill_inode_item':
inode.c:(.text+0x806): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_read_locked_inode':
inode.c:(.text+0x1a44): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/btrfs/inode.o: in function `__btrfs_unlink_inode':
inode.c:(.text+0x8b82): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x8bb6): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x8c0b): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x8c3f): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_update_time':
inode.c:(.text+0x9188): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x91d1): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `__btrfs_prealloc_file_range':
inode.c:(.text+0x95c7): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x9608): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_unlink_subvol':
inode.c:(.text+0xdbf7): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0xdc2d): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_add_link':
inode.c:(.text+0x1327c): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x132b3): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_rename_exchange':
inode.c:(.text+0x13b1f): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x13b61): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x13bc6): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x13bff): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x13c58): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x13c94): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x13ced): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x13d2f): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_link':
inode.c:(.text+0x14f4e): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x14f82): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_rename':
inode.c:(.text+0x157a4): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x157fe): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x15869): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x158c3): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x1592e): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x15988): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x16074): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x160ce): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/inode.o: in function `btrfs_setattr':
inode.c:(.text+0x19514): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x1954a): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: inode.c:(.text+0x19640): undefined reference to `atomic64_read_386'
/usr/bin/ld: inode.c:(.text+0x19676): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/file.o: in function `btrfs_write_check.isra.0':
file.c:(.text+0x2f6e): undefined reference to `atomic64_read_386'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v5 10/11] KVM: VMX: Enable SGX virtualization for SGX1, SGX2 and LC
by kernel test robot
Hi Kai,
I love your patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[also build test ERROR on next-20210409]
[cannot apply to vhost/linux-next v5.12-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kai-Huang/KVM-SGX-virtualization...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/66e235131b59a03ed48f6f6343de43ba9...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kai-Huang/KVM-SGX-virtualization-support-KVM-part/20210412-122425
git checkout 66e235131b59a03ed48f6f6343de43ba9786e32d
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
In file included from arch/x86/kvm/cpuid.c:22:
arch/x86/kvm/cpuid.h: In function '__feature_translate':
arch/x86/kvm/cpuid.h:128:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
128 | if (x86_feature == X86_FEATURE_SGX1)
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
arch/x86/kvm/cpuid.h:128:21: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kvm/cpuid.h:130:26: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
130 | else if (x86_feature == X86_FEATURE_SGX2)
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
In file included from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:58,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/cpuid.c:12:
arch/x86/kvm/cpuid.c: In function 'kvm_set_cpu_caps':
>> arch/x86/kvm/cpuid.c:57:32: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/include/asm/cpufeature.h:121:24: note: in definition of macro 'cpu_has'
121 | (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
| ^~~
arch/x86/kvm/cpuid.c:57:19: note: in expansion of macro 'boot_cpu_has'
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/kvm/cpuid.c:500:3: note: in expansion of macro 'SF'
500 | SF(SGX1) | SF(SGX2)
| ^~
>> arch/x86/kvm/cpuid.c:57:32: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/include/asm/cpufeature.h:121:24: note: in definition of macro 'cpu_has'
121 | (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
| ^~~
arch/x86/kvm/cpuid.c:57:19: note: in expansion of macro 'boot_cpu_has'
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/kvm/cpuid.c:500:14: note: in expansion of macro 'SF'
500 | SF(SGX1) | SF(SGX2)
| ^~
arch/x86/kvm/cpuid.c: In function '__do_cpuid_func':
>> arch/x86/kvm/cpuid.c:838:17: error: 'SGX_MISC_EXINFO' undeclared (first use in this function)
838 | entry->ebx &= SGX_MISC_EXINFO;
| ^~~~~~~~~~~~~~~
>> arch/x86/kvm/cpuid.c:851:17: error: 'SGX_ATTR_DEBUG' undeclared (first use in this function)
851 | entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
| ^~~~~~~~~~~~~~
>> arch/x86/kvm/cpuid.c:851:34: error: 'SGX_ATTR_MODE64BIT' undeclared (first use in this function)
851 | entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
| ^~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/cpuid.c:852:31: error: 'SGX_ATTR_EINITTOKENKEY' undeclared (first use in this function)
852 | /* PROVISIONKEY | */ SGX_ATTR_EINITTOKENKEY |
| ^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/cpuid.c:853:10: error: 'SGX_ATTR_KSS' undeclared (first use in this function)
853 | SGX_ATTR_KSS;
| ^~~~~~~~~~~~
--
In file included from arch/x86/kvm/vmx/vmx.c:51:
arch/x86/kvm/cpuid.h: In function '__feature_translate':
arch/x86/kvm/cpuid.h:128:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
128 | if (x86_feature == X86_FEATURE_SGX1)
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
arch/x86/kvm/cpuid.h:128:21: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kvm/cpuid.h:130:26: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
130 | else if (x86_feature == X86_FEATURE_SGX2)
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
arch/x86/kvm/vmx/vmx.c: In function 'vmx_set_cpu_caps':
>> arch/x86/kvm/vmx/vmx.c:7375:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
7375 | kvm_cpu_cap_clear(X86_FEATURE_SGX1);
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
>> arch/x86/kvm/vmx/vmx.c:7376:21: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
7376 | kvm_cpu_cap_clear(X86_FEATURE_SGX2);
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
vim +57 arch/x86/kvm/cpuid.c
4344ee981e2199 Paolo Bonzini 2013-10-02 55
87382003e35559 Sean Christopherson 2019-12-17 56 #define F feature_bit
cb4de96e0cca64 Sean Christopherson 2021-04-12 @57 #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
5c404cabd1b5c1 Paolo Bonzini 2014-12-03 58
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[bvanassche:scsi-for-next 31/36] drivers/scsi/53c700.c:984:6: error: member reference base type '__u8' (aka 'unsigned char') is not a structure or union
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: 82fed99944bad457ee009b37605e043e617280fd
commit: ead328d8360e918f3c8b83454fb19fec6f2f122b [31/36] Use struct scsi_status more widely
config: x86_64-randconfig-a002-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/bvanassche/linux/commit/ead328d8360e918f3c8b83454fb19f...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout ead328d8360e918f3c8b83454fb19fec6f2f122b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/53c700.c:984:6: error: member reference base type '__u8' (aka 'unsigned char') is not a structure or union
if(status_byte(hostdata->status[0]) == CHECK_CONDITION ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/scsi/scsi.h:136:38: note: expanded from macro 'status_byte'
#define status_byte(result) ((result).b.status >> 1)
~~~~~~~~^~
drivers/scsi/53c700.c:985:6: error: member reference base type '__u8' (aka 'unsigned char') is not a structure or union
status_byte(hostdata->status[0]) == COMMAND_TERMINATED) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/scsi/scsi.h:136:38: note: expanded from macro 'status_byte'
#define status_byte(result) ((result).b.status >> 1)
~~~~~~~~^~
2 errors generated.
vim +984 drivers/scsi/53c700.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 961
^1da177e4c3f415 Linus Torvalds 2005-04-16 962 STATIC __u32
^1da177e4c3f415 Linus Torvalds 2005-04-16 963 process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
^1da177e4c3f415 Linus Torvalds 2005-04-16 964 struct Scsi_Host *host,
^1da177e4c3f415 Linus Torvalds 2005-04-16 965 struct NCR_700_Host_Parameters *hostdata)
^1da177e4c3f415 Linus Torvalds 2005-04-16 966 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 967 __u32 resume_offset = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 968 __u8 pun = 0xff, lun=0xff;
^1da177e4c3f415 Linus Torvalds 2005-04-16 969
^1da177e4c3f415 Linus Torvalds 2005-04-16 970 if(SCp != NULL) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 971 pun = SCp->device->id;
^1da177e4c3f415 Linus Torvalds 2005-04-16 972 lun = SCp->device->lun;
^1da177e4c3f415 Linus Torvalds 2005-04-16 973 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 974
^1da177e4c3f415 Linus Torvalds 2005-04-16 975 if(dsps == A_GOOD_STATUS_AFTER_STATUS) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 976 DEBUG((" COMMAND COMPLETE, status=%02x\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 977 hostdata->status[0]));
^1da177e4c3f415 Linus Torvalds 2005-04-16 978 /* OK, if TCQ still under negotiation, we now know it works */
^1da177e4c3f415 Linus Torvalds 2005-04-16 979 if (NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION)
^1da177e4c3f415 Linus Torvalds 2005-04-16 980 NCR_700_set_tag_neg_state(SCp->device,
^1da177e4c3f415 Linus Torvalds 2005-04-16 981 NCR_700_FINISHED_TAG_NEGOTIATION);
^1da177e4c3f415 Linus Torvalds 2005-04-16 982
ac5669bf79d976f ganjisheng 2021-03-16 983 /* check for contingent allegiance conditions */
^1da177e4c3f415 Linus Torvalds 2005-04-16 @984 if(status_byte(hostdata->status[0]) == CHECK_CONDITION ||
^1da177e4c3f415 Linus Torvalds 2005-04-16 985 status_byte(hostdata->status[0]) == COMMAND_TERMINATED) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 986 struct NCR_700_command_slot *slot =
^1da177e4c3f415 Linus Torvalds 2005-04-16 987 (struct NCR_700_command_slot *)SCp->host_scribble;
0f13fc09db68de9 James Bottomley 2006-06-29 988 if(slot->flags == NCR_700_FLAG_AUTOSENSE) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 989 /* OOPS: bad device, returning another
^1da177e4c3f415 Linus Torvalds 2005-04-16 990 * contingent allegiance condition */
017560fca496f72 Jeff Garzik 2005-10-24 991 scmd_printk(KERN_ERR, SCp,
017560fca496f72 Jeff Garzik 2005-10-24 992 "broken device is looping in contingent allegiance: ignoring\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 993 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 994 } else {
0f13fc09db68de9 James Bottomley 2006-06-29 995 char *cmnd =
0f13fc09db68de9 James Bottomley 2006-06-29 996 NCR_700_get_sense_cmnd(SCp->device);
^1da177e4c3f415 Linus Torvalds 2005-04-16 997 #ifdef NCR_DEBUG
^1da177e4c3f415 Linus Torvalds 2005-04-16 998 scsi_print_command(SCp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 999 printk(" cmd %p has status %d, requesting sense\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1000 SCp, hostdata->status[0]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1001 #endif
^1da177e4c3f415 Linus Torvalds 2005-04-16 1002 /* we can destroy the command here
^1da177e4c3f415 Linus Torvalds 2005-04-16 1003 * because the contingent allegiance
^1da177e4c3f415 Linus Torvalds 2005-04-16 1004 * condition will cause a retry which
^1da177e4c3f415 Linus Torvalds 2005-04-16 1005 * will re-copy the command from the
^1da177e4c3f415 Linus Torvalds 2005-04-16 1006 * saved data_cmnd. We also unmap any
^1da177e4c3f415 Linus Torvalds 2005-04-16 1007 * data associated with the command
^1da177e4c3f415 Linus Torvalds 2005-04-16 1008 * here */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1009 NCR_700_unmap(hostdata, SCp, slot);
67d59dfdeb21df2 James Bottomley 2006-06-13 1010 dma_unmap_single(hostdata->dev, slot->pCmd,
64a87b244b92976 Boaz Harrosh 2008-04-30 1011 MAX_COMMAND_SIZE,
67d59dfdeb21df2 James Bottomley 2006-06-13 1012 DMA_TO_DEVICE);
67d59dfdeb21df2 James Bottomley 2006-06-13 1013
0f13fc09db68de9 James Bottomley 2006-06-29 1014 cmnd[0] = REQUEST_SENSE;
9cb78c16f5dadef Hannes Reinecke 2014-06-25 1015 cmnd[1] = (lun & 0x7) << 5;
0f13fc09db68de9 James Bottomley 2006-06-29 1016 cmnd[2] = 0;
0f13fc09db68de9 James Bottomley 2006-06-29 1017 cmnd[3] = 0;
b80ca4f7ee36c26 FUJITA Tomonori 2008-01-13 1018 cmnd[4] = SCSI_SENSE_BUFFERSIZE;
0f13fc09db68de9 James Bottomley 2006-06-29 1019 cmnd[5] = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1020 /* Here's a quiet hack: the
^1da177e4c3f415 Linus Torvalds 2005-04-16 1021 * REQUEST_SENSE command is six bytes,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1022 * so store a flag indicating that
^1da177e4c3f415 Linus Torvalds 2005-04-16 1023 * this was an internal sense request
^1da177e4c3f415 Linus Torvalds 2005-04-16 1024 * and the original status at the end
^1da177e4c3f415 Linus Torvalds 2005-04-16 1025 * of the command */
0f13fc09db68de9 James Bottomley 2006-06-29 1026 cmnd[6] = NCR_700_INTERNAL_SENSE_MAGIC;
0f13fc09db68de9 James Bottomley 2006-06-29 1027 cmnd[7] = hostdata->status[0];
c603d04ef6826a2 James Bottomley 2006-12-01 1028 cmnd[8] = SCp->cmd_len;
c603d04ef6826a2 James Bottomley 2006-12-01 1029 SCp->cmd_len = 6; /* command length for
c603d04ef6826a2 James Bottomley 2006-12-01 1030 * REQUEST_SENSE */
0f13fc09db68de9 James Bottomley 2006-06-29 1031 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE);
b80ca4f7ee36c26 FUJITA Tomonori 2008-01-13 1032 slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE);
b80ca4f7ee36c26 FUJITA Tomonori 2008-01-13 1033 slot->SG[0].ins = bS_to_host(SCRIPT_MOVE_DATA_IN | SCSI_SENSE_BUFFERSIZE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1034 slot->SG[0].pAddr = bS_to_host(slot->dma_handle);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1035 slot->SG[1].ins = bS_to_host(SCRIPT_RETURN);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1036 slot->SG[1].pAddr = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1037 slot->resume_offset = hostdata->pScript;
91af2dd255ac928 Christoph Hellwig 2020-08-18 1038 dma_sync_to_dev(hostdata, slot->SG, sizeof(slot->SG[0])*2);
91af2dd255ac928 Christoph Hellwig 2020-08-18 1039 dma_sync_from_dev(hostdata, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1040
^1da177e4c3f415 Linus Torvalds 2005-04-16 1041 /* queue the command for reissue */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1042 slot->state = NCR_700_SLOT_QUEUED;
67d59dfdeb21df2 James Bottomley 2006-06-13 1043 slot->flags = NCR_700_FLAG_AUTOSENSE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1044 hostdata->state = NCR_700_HOST_FREE;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1045 hostdata->cmd = NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1046 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1047 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1048 // Currently rely on the mid layer evaluation
^1da177e4c3f415 Linus Torvalds 2005-04-16 1049 // of the tag queuing capability
^1da177e4c3f415 Linus Torvalds 2005-04-16 1050 //
^1da177e4c3f415 Linus Torvalds 2005-04-16 1051 //if(status_byte(hostdata->status[0]) == GOOD &&
^1da177e4c3f415 Linus Torvalds 2005-04-16 1052 // SCp->cmnd[0] == INQUIRY && SCp->use_sg == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1053 // /* Piggy back the tag queueing support
^1da177e4c3f415 Linus Torvalds 2005-04-16 1054 // * on this command */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1055 // dma_sync_single_for_cpu(hostdata->dev,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1056 // slot->dma_handle,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1057 // SCp->request_bufflen,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1058 // DMA_FROM_DEVICE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1059 // if(((char *)SCp->request_buffer)[7] & 0x02) {
017560fca496f72 Jeff Garzik 2005-10-24 1060 // scmd_printk(KERN_INFO, SCp,
017560fca496f72 Jeff Garzik 2005-10-24 1061 // "Enabling Tag Command Queuing\n");
017560fca496f72 Jeff Garzik 2005-10-24 1062 // hostdata->tag_negotiated |= (1<<scmd_id(SCp));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1063 // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1064 // } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1065 // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING);
017560fca496f72 Jeff Garzik 2005-10-24 1066 // hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1067 // }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1068 //}
^1da177e4c3f415 Linus Torvalds 2005-04-16 1069 NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1070 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1071 } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1072 __u8 i = (dsps & 0xf00) >> 8;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1073
017560fca496f72 Jeff Garzik 2005-10-24 1074 scmd_printk(KERN_ERR, SCp, "UNEXPECTED PHASE %s (%s)\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1075 NCR_700_phase[i],
^1da177e4c3f415 Linus Torvalds 2005-04-16 1076 sbcl_to_string(NCR_700_readb(host, SBCL_REG)));
017560fca496f72 Jeff Garzik 2005-10-24 1077 scmd_printk(KERN_ERR, SCp, " len = %d, cmd =",
017560fca496f72 Jeff Garzik 2005-10-24 1078 SCp->cmd_len);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1079 scsi_print_command(SCp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1080
^1da177e4c3f415 Linus Torvalds 2005-04-16 1081 NCR_700_internal_bus_reset(host);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1082 } else if((dsps & 0xfffff000) == A_FATAL) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1083 int i = (dsps & 0xfff);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1084
^1da177e4c3f415 Linus Torvalds 2005-04-16 1085 printk(KERN_ERR "scsi%d: (%d:%d) FATAL ERROR: %s\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1086 host->host_no, pun, lun, NCR_700_fatal_messages[i]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1087 if(dsps == A_FATAL_ILLEGAL_MSG_LENGTH) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1088 printk(KERN_ERR " msg begins %02x %02x\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1089 hostdata->msgin[0], hostdata->msgin[1]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1090 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1091 NCR_700_internal_bus_reset(host);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1092 } else if((dsps & 0xfffff0f0) == A_DISCONNECT) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1093 #ifdef NCR_700_DEBUG
^1da177e4c3f415 Linus Torvalds 2005-04-16 1094 __u8 i = (dsps & 0xf00) >> 8;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1095
^1da177e4c3f415 Linus Torvalds 2005-04-16 1096 printk("scsi%d: (%d:%d), DISCONNECTED (%d) %s\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1097 host->host_no, pun, lun,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1098 i, NCR_700_phase[i]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1099 #endif
^1da177e4c3f415 Linus Torvalds 2005-04-16 1100 save_for_reselection(hostdata, SCp, dsp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1101
^1da177e4c3f415 Linus Torvalds 2005-04-16 1102 } else if(dsps == A_RESELECTION_IDENTIFIED) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1103 __u8 lun;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1104 struct NCR_700_command_slot *slot;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1105 __u8 reselection_id = hostdata->reselection_id;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1106 struct scsi_device *SDp;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1107
^1da177e4c3f415 Linus Torvalds 2005-04-16 1108 lun = hostdata->msgin[0] & 0x1f;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1109
^1da177e4c3f415 Linus Torvalds 2005-04-16 1110 hostdata->reselection_id = 0xff;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1111 DEBUG(("scsi%d: (%d:%d) RESELECTED!\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1112 host->host_no, reselection_id, lun));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1113 /* clear the reselection indicator */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1114 SDp = __scsi_device_lookup(host, 0, reselection_id, lun);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1115 if(unlikely(SDp == NULL)) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1116 printk(KERN_ERR "scsi%d: (%d:%d) HAS NO device\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1117 host->host_no, reselection_id, lun);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1118 BUG();
^1da177e4c3f415 Linus Torvalds 2005-04-16 1119 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1120 if(hostdata->msgin[1] == A_SIMPLE_TAG_MSG) {
64d513ac31bd02a Christoph Hellwig 2015-10-08 1121 struct scsi_cmnd *SCp;
64d513ac31bd02a Christoph Hellwig 2015-10-08 1122
64d513ac31bd02a Christoph Hellwig 2015-10-08 1123 SCp = scsi_host_find_tag(SDp->host, hostdata->msgin[2]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1124 if(unlikely(SCp == NULL)) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1125 printk(KERN_ERR "scsi%d: (%d:%d) no saved request for tag %d\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1126 host->host_no, reselection_id, lun, hostdata->msgin[2]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1127 BUG();
^1da177e4c3f415 Linus Torvalds 2005-04-16 1128 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1129
^1da177e4c3f415 Linus Torvalds 2005-04-16 1130 slot = (struct NCR_700_command_slot *)SCp->host_scribble;
017560fca496f72 Jeff Garzik 2005-10-24 1131 DDEBUG(KERN_DEBUG, SDp,
017560fca496f72 Jeff Garzik 2005-10-24 1132 "reselection is tag %d, slot %p(%d)\n",
017560fca496f72 Jeff Garzik 2005-10-24 1133 hostdata->msgin[2], slot, slot->tag);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1134 } else {
68350a886e7df02 Christoph Hellwig 2016-07-11 1135 struct NCR_700_Device_Parameters *p = SDp->hostdata;
68350a886e7df02 Christoph Hellwig 2016-07-11 1136 struct scsi_cmnd *SCp = p->current_cmnd;
64d513ac31bd02a Christoph Hellwig 2015-10-08 1137
^1da177e4c3f415 Linus Torvalds 2005-04-16 1138 if(unlikely(SCp == NULL)) {
017560fca496f72 Jeff Garzik 2005-10-24 1139 sdev_printk(KERN_ERR, SDp,
017560fca496f72 Jeff Garzik 2005-10-24 1140 "no saved request for untagged cmd\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 1141 BUG();
^1da177e4c3f415 Linus Torvalds 2005-04-16 1142 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1143 slot = (struct NCR_700_command_slot *)SCp->host_scribble;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1144 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1145
^1da177e4c3f415 Linus Torvalds 2005-04-16 1146 if(slot == NULL) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1147 printk(KERN_ERR "scsi%d: (%d:%d) RESELECTED but no saved command (MSG = %02x %02x %02x)!!\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1148 host->host_no, reselection_id, lun,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1149 hostdata->msgin[0], hostdata->msgin[1],
^1da177e4c3f415 Linus Torvalds 2005-04-16 1150 hostdata->msgin[2]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1151 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1152 if(hostdata->state != NCR_700_HOST_BUSY)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1153 printk(KERN_ERR "scsi%d: FATAL, host not busy during valid reselection!\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1154 host->host_no);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1155 resume_offset = slot->resume_offset;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1156 hostdata->cmd = slot->cmnd;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1157
^1da177e4c3f415 Linus Torvalds 2005-04-16 1158 /* re-patch for this command */
91af2dd255ac928 Christoph Hellwig 2020-08-18 1159 script_patch_32_abs(hostdata, hostdata->script,
d3fa72e4556ec1f Ralf Baechle 2006-12-06 1160 CommandAddress, slot->pCmd);
91af2dd255ac928 Christoph Hellwig 2020-08-18 1161 script_patch_16(hostdata, hostdata->script,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1162 CommandCount, slot->cmnd->cmd_len);
91af2dd255ac928 Christoph Hellwig 2020-08-18 1163 script_patch_32_abs(hostdata, hostdata->script,
d3fa72e4556ec1f Ralf Baechle 2006-12-06 1164 SGScriptStartAddress,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1165 to32bit(&slot->pSG[0].ins));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1166
^1da177e4c3f415 Linus Torvalds 2005-04-16 1167 /* Note: setting SXFER only works if we're
^1da177e4c3f415 Linus Torvalds 2005-04-16 1168 * still in the MESSAGE phase, so it is vital
^1da177e4c3f415 Linus Torvalds 2005-04-16 1169 * that ACK is still asserted when we process
^1da177e4c3f415 Linus Torvalds 2005-04-16 1170 * the reselection message. The resume offset
^1da177e4c3f415 Linus Torvalds 2005-04-16 1171 * should therefore always clear ACK */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1172 NCR_700_writeb(NCR_700_get_SXFER(hostdata->cmd->device),
^1da177e4c3f415 Linus Torvalds 2005-04-16 1173 host, SXFER_REG);
91af2dd255ac928 Christoph Hellwig 2020-08-18 1174 dma_sync_from_dev(hostdata, hostdata->msgin,
91af2dd255ac928 Christoph Hellwig 2020-08-18 1175 MSG_ARRAY_SIZE);
91af2dd255ac928 Christoph Hellwig 2020-08-18 1176 dma_sync_to_dev(hostdata, hostdata->msgout,
91af2dd255ac928 Christoph Hellwig 2020-08-18 1177 MSG_ARRAY_SIZE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1178 /* I'm just being paranoid here, the command should
^1da177e4c3f415 Linus Torvalds 2005-04-16 1179 * already have been flushed from the cache */
91af2dd255ac928 Christoph Hellwig 2020-08-18 1180 dma_sync_to_dev(hostdata, slot->cmnd->cmnd,
91af2dd255ac928 Christoph Hellwig 2020-08-18 1181 slot->cmnd->cmd_len);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1182
^1da177e4c3f415 Linus Torvalds 2005-04-16 1183
^1da177e4c3f415 Linus Torvalds 2005-04-16 1184
^1da177e4c3f415 Linus Torvalds 2005-04-16 1185 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1186 } else if(dsps == A_RESELECTED_DURING_SELECTION) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1187
^1da177e4c3f415 Linus Torvalds 2005-04-16 1188 /* This section is full of debugging code because I've
^1da177e4c3f415 Linus Torvalds 2005-04-16 1189 * never managed to reach it. I think what happens is
^1da177e4c3f415 Linus Torvalds 2005-04-16 1190 * that, because the 700 runs with selection
^1da177e4c3f415 Linus Torvalds 2005-04-16 1191 * interrupts enabled the whole time that we take a
^1da177e4c3f415 Linus Torvalds 2005-04-16 1192 * selection interrupt before we manage to get to the
^1da177e4c3f415 Linus Torvalds 2005-04-16 1193 * reselected script interrupt */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1194
^1da177e4c3f415 Linus Torvalds 2005-04-16 1195 __u8 reselection_id = NCR_700_readb(host, SFBR_REG);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1196 struct NCR_700_command_slot *slot;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1197
^1da177e4c3f415 Linus Torvalds 2005-04-16 1198 /* Take out our own ID */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1199 reselection_id &= ~(1<<host->this_id);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1200
^1da177e4c3f415 Linus Torvalds 2005-04-16 1201 /* I've never seen this happen, so keep this as a printk rather
^1da177e4c3f415 Linus Torvalds 2005-04-16 1202 * than a debug */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1203 printk(KERN_INFO "scsi%d: (%d:%d) RESELECTION DURING SELECTION, dsp=%08x[%04x] state=%d, count=%d\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1204 host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->command_slot_count);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1205
^1da177e4c3f415 Linus Torvalds 2005-04-16 1206 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1207 /* FIXME: DEBUGGING CODE */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1208 __u32 SG = (__u32)bS_to_cpu(hostdata->script[A_SGScriptStartAddress_used[0]]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1209 int i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1210
^1da177e4c3f415 Linus Torvalds 2005-04-16 1211 for(i=0; i< NCR_700_COMMAND_SLOTS_PER_HOST; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1212 if(SG >= to32bit(&hostdata->slots[i].pSG[0])
^1da177e4c3f415 Linus Torvalds 2005-04-16 1213 && SG <= to32bit(&hostdata->slots[i].pSG[NCR_700_SG_SEGMENTS]))
^1da177e4c3f415 Linus Torvalds 2005-04-16 1214 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1215 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1216 printk(KERN_INFO "IDENTIFIED SG segment as being %08x in slot %p, cmd %p, slot->resume_offset=%08x\n", SG, &hostdata->slots[i], hostdata->slots[i].cmnd, hostdata->slots[i].resume_offset);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1217 SCp = hostdata->slots[i].cmnd;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1218 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1219
^1da177e4c3f415 Linus Torvalds 2005-04-16 1220 if(SCp != NULL) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1221 slot = (struct NCR_700_command_slot *)SCp->host_scribble;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1222 /* change slot from busy to queued to redo command */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1223 slot->state = NCR_700_SLOT_QUEUED;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1224 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1225 hostdata->cmd = NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1226
^1da177e4c3f415 Linus Torvalds 2005-04-16 1227 if(reselection_id == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1228 if(hostdata->reselection_id == 0xff) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1229 printk(KERN_ERR "scsi%d: Invalid reselection during selection!!\n", host->host_no);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1230 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1231 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1232 printk(KERN_ERR "scsi%d: script reselected and we took a selection interrupt\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1233 host->host_no);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1234 reselection_id = hostdata->reselection_id;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1235 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1236 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1237
^1da177e4c3f415 Linus Torvalds 2005-04-16 1238 /* convert to real ID */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1239 reselection_id = bitmap_to_number(reselection_id);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1240 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1241 hostdata->reselection_id = reselection_id;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1242 /* just in case we have a stale simple tag message, clear it */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1243 hostdata->msgin[1] = 0;
91af2dd255ac928 Christoph Hellwig 2020-08-18 1244 dma_sync_to_dev(hostdata, hostdata->msgin, MSG_ARRAY_SIZE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1245 if(hostdata->tag_negotiated & (1<<reselection_id)) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1246 resume_offset = hostdata->pScript + Ent_GetReselectionWithTag;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1247 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1248 resume_offset = hostdata->pScript + Ent_GetReselectionData;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1249 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1250 } else if(dsps == A_COMPLETED_SELECTION_AS_TARGET) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1251 /* we've just disconnected from the bus, do nothing since
^1da177e4c3f415 Linus Torvalds 2005-04-16 1252 * a return here will re-run the queued command slot
^1da177e4c3f415 Linus Torvalds 2005-04-16 1253 * that may have been interrupted by the initial selection */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1254 DEBUG((" SELECTION COMPLETED\n"));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1255 } else if((dsps & 0xfffff0f0) == A_MSG_IN) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1256 resume_offset = process_message(host, hostdata, SCp,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1257 dsp, dsps);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1258 } else if((dsps & 0xfffff000) == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1259 __u8 i = (dsps & 0xf0) >> 4, j = (dsps & 0xf00) >> 8;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1260 printk(KERN_ERR "scsi%d: (%d:%d), unhandled script condition %s %s at %04x\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1261 host->host_no, pun, lun, NCR_700_condition[i],
^1da177e4c3f415 Linus Torvalds 2005-04-16 1262 NCR_700_phase[j], dsp - hostdata->pScript);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1263 if(SCp != NULL) {
3258a4d5690880a FUJITA Tomonori 2007-05-14 1264 struct scatterlist *sg;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1265
3258a4d5690880a FUJITA Tomonori 2007-05-14 1266 scsi_print_command(SCp);
3258a4d5690880a FUJITA Tomonori 2007-05-14 1267 scsi_for_each_sg(SCp, sg, scsi_sg_count(SCp) + 1, i) {
3258a4d5690880a FUJITA Tomonori 2007-05-14 1268 printk(KERN_INFO " SG[%d].length = %d, move_insn=%08x, addr %08x\n", i, sg->length, ((struct NCR_700_command_slot *)SCp->host_scribble)->SG[i].ins, ((struct NCR_700_command_slot *)SCp->host_scribble)->SG[i].pAddr);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1269 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1270 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1271 NCR_700_internal_bus_reset(host);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1272 } else if((dsps & 0xfffff000) == A_DEBUG_INTERRUPT) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1273 printk(KERN_NOTICE "scsi%d (%d:%d) DEBUG INTERRUPT %d AT %08x[%04x], continuing\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1274 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1275 resume_offset = dsp;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1276 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1277 printk(KERN_ERR "scsi%d: (%d:%d), unidentified script interrupt 0x%x at %04x\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 1278 host->host_no, pun, lun, dsps, dsp - hostdata->pScript);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1279 NCR_700_internal_bus_reset(host);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1280 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1281 return resume_offset;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1282 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1283
:::::: The code at line 984 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v1 2/2] Bluetooth: Support the vendor specific debug events
by kernel test robot
Hi Joseph,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on v5.12-rc7 next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Joseph-Hwang/Bluetooth-btusb-sup...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: alpha-randconfig-s031-20210412 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/0day-ci/linux/commit/d3bd96f611be6b3248ca68c2bc628c29e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Joseph-Hwang/Bluetooth-btusb-support-link-statistics-telemetry-events/20210412-152954
git checkout d3bd96f611be6b3248ca68c2bc628c29e5419b92
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
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/bluetooth/btusb.c: In function 'btusb_setup_intel_newgen':
>> drivers/bluetooth/btusb.c:2963:2: error: implicit declaration of function 'btintel_read_debug_features' [-Werror=implicit-function-declaration]
2963 | btintel_read_debug_features(hdev, &features);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/bluetooth/btusb.c:2966:2: error: implicit declaration of function 'btintel_set_debug_features' [-Werror=implicit-function-declaration]
2966 | btintel_set_debug_features(hdev, &features);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/btintel_read_debug_features +2963 drivers/bluetooth/btusb.c
cda0dd7809f89e Marcel Holtmann 2015-01-26 2903
0a3c1d45eca09c Kiran K 2020-11-19 2904 static int btusb_setup_intel_newgen(struct hci_dev *hdev)
0a3c1d45eca09c Kiran K 2020-11-19 2905 {
0a3c1d45eca09c Kiran K 2020-11-19 2906 struct btusb_data *data = hci_get_drvdata(hdev);
0a3c1d45eca09c Kiran K 2020-11-19 2907 u32 boot_param;
0a3c1d45eca09c Kiran K 2020-11-19 2908 char ddcname[64];
0a3c1d45eca09c Kiran K 2020-11-19 2909 int err;
0a3c1d45eca09c Kiran K 2020-11-19 2910 struct intel_debug_features features;
0a3c1d45eca09c Kiran K 2020-11-19 2911 struct intel_version_tlv version;
0a3c1d45eca09c Kiran K 2020-11-19 2912
0a3c1d45eca09c Kiran K 2020-11-19 2913 bt_dev_dbg(hdev, "");
0a3c1d45eca09c Kiran K 2020-11-19 2914
0a3c1d45eca09c Kiran K 2020-11-19 2915 /* Set the default boot parameter to 0x0 and it is updated to
0a3c1d45eca09c Kiran K 2020-11-19 2916 * SKU specific boot parameter after reading Intel_Write_Boot_Params
0a3c1d45eca09c Kiran K 2020-11-19 2917 * command while downloading the firmware.
0a3c1d45eca09c Kiran K 2020-11-19 2918 */
0a3c1d45eca09c Kiran K 2020-11-19 2919 boot_param = 0x00000000;
0a3c1d45eca09c Kiran K 2020-11-19 2920
0a3c1d45eca09c Kiran K 2020-11-19 2921 /* Read the Intel version information to determine if the device
0a3c1d45eca09c Kiran K 2020-11-19 2922 * is in bootloader mode or if it already has operational firmware
0a3c1d45eca09c Kiran K 2020-11-19 2923 * loaded.
0a3c1d45eca09c Kiran K 2020-11-19 2924 */
0a3c1d45eca09c Kiran K 2020-11-19 2925 err = btintel_read_version_tlv(hdev, &version);
0a3c1d45eca09c Kiran K 2020-11-19 2926 if (err) {
0a3c1d45eca09c Kiran K 2020-11-19 2927 bt_dev_err(hdev, "Intel Read version failed (%d)", err);
0a3c1d45eca09c Kiran K 2020-11-19 2928 btintel_reset_to_bootloader(hdev);
0a3c1d45eca09c Kiran K 2020-11-19 2929 return err;
0a3c1d45eca09c Kiran K 2020-11-19 2930 }
0a3c1d45eca09c Kiran K 2020-11-19 2931
0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 2932 err = btintel_version_info_tlv(hdev, &version);
0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 2933 if (err)
0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23 2934 return err;
0a3c1d45eca09c Kiran K 2020-11-19 2935
3f43a37838d5b5 Kiran K 2020-11-19 2936 err = btusb_intel_download_firmware_newgen(hdev, &version, &boot_param);
3f43a37838d5b5 Kiran K 2020-11-19 2937 if (err)
3f43a37838d5b5 Kiran K 2020-11-19 2938 return err;
3f43a37838d5b5 Kiran K 2020-11-19 2939
0a3c1d45eca09c Kiran K 2020-11-19 2940 /* check if controller is already having an operational firmware */
0a3c1d45eca09c Kiran K 2020-11-19 2941 if (version.img_type == 0x03)
0a3c1d45eca09c Kiran K 2020-11-19 2942 goto finish;
0a3c1d45eca09c Kiran K 2020-11-19 2943
604b3cf87fd217 Luiz Augusto von Dentz 2021-03-23 2944 err = btusb_intel_boot(hdev, boot_param);
604b3cf87fd217 Luiz Augusto von Dentz 2021-03-23 2945 if (err)
0a3c1d45eca09c Kiran K 2020-11-19 2946 return err;
0a3c1d45eca09c Kiran K 2020-11-19 2947
0a3c1d45eca09c Kiran K 2020-11-19 2948 clear_bit(BTUSB_BOOTLOADER, &data->flags);
0a3c1d45eca09c Kiran K 2020-11-19 2949
9a93b8b8eee4ac Kiran K 2020-11-19 2950 btusb_setup_intel_newgen_get_fw_name(&version, ddcname, sizeof(ddcname),
9a93b8b8eee4ac Kiran K 2020-11-19 2951 "ddc");
0a3c1d45eca09c Kiran K 2020-11-19 2952 /* Once the device is running in operational mode, it needs to
0a3c1d45eca09c Kiran K 2020-11-19 2953 * apply the device configuration (DDC) parameters.
0a3c1d45eca09c Kiran K 2020-11-19 2954 *
0a3c1d45eca09c Kiran K 2020-11-19 2955 * The device can work without DDC parameters, so even if it
0a3c1d45eca09c Kiran K 2020-11-19 2956 * fails to load the file, no need to fail the setup.
0a3c1d45eca09c Kiran K 2020-11-19 2957 */
0a3c1d45eca09c Kiran K 2020-11-19 2958 btintel_load_ddc_config(hdev, ddcname);
0a3c1d45eca09c Kiran K 2020-11-19 2959
0a3c1d45eca09c Kiran K 2020-11-19 2960 /* Read the Intel supported features and if new exception formats
0a3c1d45eca09c Kiran K 2020-11-19 2961 * supported, need to load the additional DDC config to enable.
0a3c1d45eca09c Kiran K 2020-11-19 2962 */
0a3c1d45eca09c Kiran K 2020-11-19 @2963 btintel_read_debug_features(hdev, &features);
0a3c1d45eca09c Kiran K 2020-11-19 2964
0a3c1d45eca09c Kiran K 2020-11-19 2965 /* Set DDC mask for available debug features */
0a3c1d45eca09c Kiran K 2020-11-19 @2966 btintel_set_debug_features(hdev, &features);
0a3c1d45eca09c Kiran K 2020-11-19 2967
0a3c1d45eca09c Kiran K 2020-11-19 2968 /* Read the Intel version information after loading the FW */
0a3c1d45eca09c Kiran K 2020-11-19 2969 err = btintel_read_version_tlv(hdev, &version);
0a3c1d45eca09c Kiran K 2020-11-19 2970 if (err)
0a3c1d45eca09c Kiran K 2020-11-19 2971 return err;
0a3c1d45eca09c Kiran K 2020-11-19 2972
0a3c1d45eca09c Kiran K 2020-11-19 2973 btintel_version_info_tlv(hdev, &version);
0a3c1d45eca09c Kiran K 2020-11-19 2974
0a3c1d45eca09c Kiran K 2020-11-19 2975 finish:
0a3c1d45eca09c Kiran K 2020-11-19 2976 /* Set the event mask for Intel specific vendor events. This enables
0a3c1d45eca09c Kiran K 2020-11-19 2977 * a few extra events that are useful during general operation. It
0a3c1d45eca09c Kiran K 2020-11-19 2978 * does not enable any debugging related events.
0a3c1d45eca09c Kiran K 2020-11-19 2979 *
0a3c1d45eca09c Kiran K 2020-11-19 2980 * The device will function correctly without these events enabled
0a3c1d45eca09c Kiran K 2020-11-19 2981 * and thus no need to fail the setup.
0a3c1d45eca09c Kiran K 2020-11-19 2982 */
0a3c1d45eca09c Kiran K 2020-11-19 2983 btintel_set_event_mask(hdev, false);
0a3c1d45eca09c Kiran K 2020-11-19 2984
0a3c1d45eca09c Kiran K 2020-11-19 2985 return 0;
0a3c1d45eca09c Kiran K 2020-11-19 2986 }
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 2987 static int btusb_shutdown_intel(struct hci_dev *hdev)
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 2988 {
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 2989 struct sk_buff *skb;
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 2990 long ret;
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 2991
1313bccf00f6df Amit K Bag 2018-08-03 2992 /* In the shutdown sequence where Bluetooth is turned off followed
1313bccf00f6df Amit K Bag 2018-08-03 2993 * by WiFi being turned off, turning WiFi back on causes issue with
1313bccf00f6df Amit K Bag 2018-08-03 2994 * the RF calibration.
1313bccf00f6df Amit K Bag 2018-08-03 2995 *
1313bccf00f6df Amit K Bag 2018-08-03 2996 * To ensure that any RF activity has been stopped, issue HCI Reset
1313bccf00f6df Amit K Bag 2018-08-03 2997 * command to clear all ongoing activity including advertising,
1313bccf00f6df Amit K Bag 2018-08-03 2998 * scanning etc.
1313bccf00f6df Amit K Bag 2018-08-03 2999 */
1313bccf00f6df Amit K Bag 2018-08-03 3000 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
1313bccf00f6df Amit K Bag 2018-08-03 3001 if (IS_ERR(skb)) {
1313bccf00f6df Amit K Bag 2018-08-03 3002 ret = PTR_ERR(skb);
1313bccf00f6df Amit K Bag 2018-08-03 3003 bt_dev_err(hdev, "HCI reset during shutdown failed");
1313bccf00f6df Amit K Bag 2018-08-03 3004 return ret;
1313bccf00f6df Amit K Bag 2018-08-03 3005 }
1313bccf00f6df Amit K Bag 2018-08-03 3006 kfree_skb(skb);
1313bccf00f6df Amit K Bag 2018-08-03 3007
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3008 /* Some platforms have an issue with BT LED when the interface is
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3009 * down or BT radio is turned off, which takes 5 seconds to BT LED
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3010 * goes off. This command turns off the BT LED immediately.
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3011 */
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3012 skb = __hci_cmd_sync(hdev, 0xfc3f, 0, NULL, HCI_INIT_TIMEOUT);
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3013 if (IS_ERR(skb)) {
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3014 ret = PTR_ERR(skb);
85418feff6faa9 Marcel Holtmann 2018-08-03 3015 bt_dev_err(hdev, "turning off Intel device LED failed");
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3016 return ret;
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3017 }
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3018 kfree_skb(skb);
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3019
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3020 return 0;
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3021 }
bfbd45e9acd2ef Tedd Ho-Jeong An 2015-02-13 3022
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.c:15: warning: "RST" redefined
by kernel test robot
Hi Xia,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d434405aaab7d0ebc516b68a8fc4100922d7f5ef
commit: 030a7b5c168d996e590cdd09fffd8ebaa8a5d571 media: platform: Rename jpeg dec file name
date: 8 months ago
config: mips-randconfig-s032-20210412 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 030a7b5c168d996e590cdd09fffd8ebaa8a5d571
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.c:15: warning: "RST" redefined
15 | #define RST 0xd0
|
In file included from arch/mips/include/asm/mach-rc32434/irq.h:8,
from arch/mips/include/asm/irq.h:18,
from include/linux/irq.h:23,
from include/asm-generic/hardirq.h:13,
from arch/mips/include/asm/hardirq.h:16,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h:11,
from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_hw.h:13,
from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.h:11,
from drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.c:11:
arch/mips/include/asm/mach-rc32434/rb.h:15: note: this is the location of the previous definition
15 | #define RST (1 << 15)
|
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PHY_SAMSUNG_UFS
Depends on OF && (ARCH_EXYNOS || COMPILE_TEST
Selected by
- SCSI_UFS_EXYNOS && SCSI_LOWLEVEL && SCSI && SCSI_UFSHCD_PLATFORM && (ARCH_EXYNOS || COMPILE_TEST
vim +/RST +15 drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_parse.c
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 12
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 13 #define TEM 0x01
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 14 #define SOF0 0xc0
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 @15 #define RST 0xd0
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 16 #define SOI 0xd8
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 17 #define EOI 0xd9
b2f0d2724ba477 drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c Rick Chang 2016-12-14 18
:::::: The code at line 15 was first introduced by commit
:::::: b2f0d2724ba477d326e9d654d4db1c93e98f8b93 [media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver
:::::: TO: Rick Chang <rick.chang(a)mediatek.com>
:::::: CC: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH V2] mm/page_alloc: Ensure that HUGETLB_PAGE_ORDER is less than MAX_ORDER
by kernel test robot
Hi Anshuman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hnaz-linux-mm/master]
url: https://github.com/0day-ci/linux/commits/Anshuman-Khandual/mm-page_alloc-...
base: https://github.com/hnaz/linux-mm master
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://github.com/0day-ci/linux/commit/2dcbbc0896348946a9551948765b9b242...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anshuman-Khandual/mm-page_alloc-Ensure-that-HUGETLB_PAGE_ORDER-is-less-than-MAX_ORDER/20210412-114918
git checkout 2dcbbc0896348946a9551948765b9b242cf37da6
# 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 >>):
In file included from <command-line>:
mm/page_alloc.c: In function 'set_pageblock_order':
>> include/linux/compiler_types.h:319:38: error: call to '__compiletime_assert_442' declared with attribute error: BUILD_BUG_ON failed: HUGETLB_PAGE_ORDER >= MAX_ORDER
319 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:300:4: note: in definition of macro '__compiletime_assert'
300 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:319:2: note: in expansion of macro '_compiletime_assert'
319 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
mm/page_alloc.c:6660:3: note: in expansion of macro 'BUILD_BUG_ON'
6660 | BUILD_BUG_ON(HUGETLB_PAGE_ORDER >= MAX_ORDER);
| ^~~~~~~~~~~~
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 +/__compiletime_assert_442 +319 include/linux/compiler_types.h
cb2b5d59ec351b Andrew Morton 2020-08-01 305
cb2b5d59ec351b Andrew Morton 2020-08-01 306 #define _compiletime_assert(condition, msg, prefix, suffix) \
cb2b5d59ec351b Andrew Morton 2020-08-01 307 __compiletime_assert(condition, msg, prefix, suffix)
cb2b5d59ec351b Andrew Morton 2020-08-01 308
cb2b5d59ec351b Andrew Morton 2020-08-01 309 /**
cb2b5d59ec351b Andrew Morton 2020-08-01 310 * compiletime_assert - break build and emit msg if condition is false
cb2b5d59ec351b Andrew Morton 2020-08-01 311 * @condition: a compile-time constant condition to check
cb2b5d59ec351b Andrew Morton 2020-08-01 312 * @msg: a message to emit if condition is false
cb2b5d59ec351b Andrew Morton 2020-08-01 313 *
cb2b5d59ec351b Andrew Morton 2020-08-01 314 * In tradition of POSIX assert, this macro will break the build if the
cb2b5d59ec351b Andrew Morton 2020-08-01 315 * supplied condition is *false*, emitting the supplied error message if the
cb2b5d59ec351b Andrew Morton 2020-08-01 316 * compiler has support to do so.
cb2b5d59ec351b Andrew Morton 2020-08-01 317 */
cb2b5d59ec351b Andrew Morton 2020-08-01 318 #define compiletime_assert(condition, msg) \
cb2b5d59ec351b Andrew Morton 2020-08-01 @319 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
cb2b5d59ec351b Andrew Morton 2020-08-01 320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:480:5: warning: no previous prototype for 'LZ4_decompress_safe_withPrefix64k'
by kernel test robot
Hi Arnd,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d434405aaab7d0ebc516b68a8fc4100922d7f5ef
commit: 45fe7befe0db5e61cd3c846315f0ac48541e8445 coresight: remove broken __exit annotations
date: 4 months ago
config: arm-randconfig-r001-20210412 (attached as .config)
compiler: arm-linux-gnueabi-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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 45fe7befe0db5e61cd3c846315f0ac48541e8445
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:10,
from arch/arm/boot/compressed/decompress.c:56:
>> arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:480:5: warning: no previous prototype for 'LZ4_decompress_safe_withPrefix64k' [-Wmissing-prototypes]
480 | int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:502:5: warning: no previous prototype for 'LZ4_decompress_safe_forceExtDict' [-Wmissing-prototypes]
502 | int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/boot/compressed/decompress.c:59:5: warning: no previous prototype for 'do_decompress' [-Wmissing-prototypes]
59 | int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
| ^~~~~~~~~~~~~
vim +/LZ4_decompress_safe_withPrefix64k +480 arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c
2209fda323e2fd Gao Xiang 2018-10-30 479
2209fda323e2fd Gao Xiang 2018-10-30 @480 int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
2209fda323e2fd Gao Xiang 2018-10-30 481 int compressedSize, int maxOutputSize)
2209fda323e2fd Gao Xiang 2018-10-30 482 {
2209fda323e2fd Gao Xiang 2018-10-30 483 return LZ4_decompress_generic(source, dest,
2209fda323e2fd Gao Xiang 2018-10-30 484 compressedSize, maxOutputSize,
2209fda323e2fd Gao Xiang 2018-10-30 485 endOnInputSize, decode_full_block,
2209fda323e2fd Gao Xiang 2018-10-30 486 withPrefix64k,
2209fda323e2fd Gao Xiang 2018-10-30 487 (BYTE *)dest - 64 * KB, NULL, 0);
2209fda323e2fd Gao Xiang 2018-10-30 488 }
2209fda323e2fd Gao Xiang 2018-10-30 489
2209fda323e2fd Gao Xiang 2018-10-30 490 static int LZ4_decompress_safe_withSmallPrefix(const char *source, char *dest,
2209fda323e2fd Gao Xiang 2018-10-30 491 int compressedSize,
2209fda323e2fd Gao Xiang 2018-10-30 492 int maxOutputSize,
2209fda323e2fd Gao Xiang 2018-10-30 493 size_t prefixSize)
2209fda323e2fd Gao Xiang 2018-10-30 494 {
2209fda323e2fd Gao Xiang 2018-10-30 495 return LZ4_decompress_generic(source, dest,
2209fda323e2fd Gao Xiang 2018-10-30 496 compressedSize, maxOutputSize,
2209fda323e2fd Gao Xiang 2018-10-30 497 endOnInputSize, decode_full_block,
2209fda323e2fd Gao Xiang 2018-10-30 498 noDict,
2209fda323e2fd Gao Xiang 2018-10-30 499 (BYTE *)dest - prefixSize, NULL, 0);
4e1a33b105ddf2 Sven Schmidt 2017-02-24 500 }
cffb78b0e0b3a3 Kyungsik Lee 2013-07-08 501
2209fda323e2fd Gao Xiang 2018-10-30 @502 int LZ4_decompress_safe_forceExtDict(const char *source, char *dest,
2209fda323e2fd Gao Xiang 2018-10-30 503 int compressedSize, int maxOutputSize,
2209fda323e2fd Gao Xiang 2018-10-30 504 const void *dictStart, size_t dictSize)
2209fda323e2fd Gao Xiang 2018-10-30 505 {
2209fda323e2fd Gao Xiang 2018-10-30 506 return LZ4_decompress_generic(source, dest,
2209fda323e2fd Gao Xiang 2018-10-30 507 compressedSize, maxOutputSize,
2209fda323e2fd Gao Xiang 2018-10-30 508 endOnInputSize, decode_full_block,
2209fda323e2fd Gao Xiang 2018-10-30 509 usingExtDict, (BYTE *)dest,
2209fda323e2fd Gao Xiang 2018-10-30 510 (const BYTE *)dictStart, dictSize);
2209fda323e2fd Gao Xiang 2018-10-30 511 }
2209fda323e2fd Gao Xiang 2018-10-30 512
:::::: The code at line 480 was first introduced by commit
:::::: 2209fda323e2fd2a2d0885595fd5097717f8d2aa lib/lz4: update LZ4 decompressor module
:::::: TO: Gao Xiang <gaoxiang25(a)huawei.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[bvanassche:scsi-for-next 31/36] include/scsi/scsi.h:136:38: error: request for member 'b' in something not a structure or union
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: 82fed99944bad457ee009b37605e043e617280fd
commit: ead328d8360e918f3c8b83454fb19fec6f2f122b [31/36] Use struct scsi_status more widely
config: parisc-randconfig-r035-20210412 (attached as .config)
compiler: hppa-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://github.com/bvanassche/linux/commit/ead328d8360e918f3c8b83454fb19f...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout ead328d8360e918f3c8b83454fb19fec6f2f122b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>):
In file included from drivers/scsi/53c700.c:124:
drivers/scsi/53c700.c: In function 'process_script_interrupt':
>> include/scsi/scsi.h:136:38: error: request for member 'b' in something not a structure or union
136 | #define status_byte(result) ((result).b.status >> 1)
| ^
drivers/scsi/53c700.c:984:6: note: in expansion of macro 'status_byte'
984 | if(status_byte(hostdata->status[0]) == CHECK_CONDITION ||
| ^~~~~~~~~~~
>> include/scsi/scsi.h:136:38: error: request for member 'b' in something not a structure or union
136 | #define status_byte(result) ((result).b.status >> 1)
| ^
drivers/scsi/53c700.c:985:6: note: in expansion of macro 'status_byte'
985 | status_byte(hostdata->status[0]) == COMMAND_TERMINATED) {
| ^~~~~~~~~~~
vim +/b +136 include/scsi/scsi.h
125
126 /*
127 * Use these to separate status msg and our bytes
128 *
129 * These are set by:
130 *
131 * status byte = set from target device
132 * msg_byte = return status from host adapter itself.
133 * host_byte = set by low-level driver to indicate status.
134 * driver_byte = set by mid-level.
135 */
> 136 #define status_byte(result) ((result).b.status >> 1)
137 #define msg_byte(result) ((result).b.msg)
138 #define host_byte(result) ((result).b.host)
139 #define driver_byte(result) ((result).b.driver)
140
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months