Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/of/irq.c : correct a typing error #210

Closed
wants to merge 1 commit into from

Conversation

gmonster
Copy link

@gmonster gmonster commented Oct 8, 2015

There is a typing error "interrrupt"
So, I correct this to "interrupt"

Signed-off-by: Kyuha Hwang [email protected]

There is a typing error "interrrupt"
So, I correct this to "interrupt"

Signed-off-by: Kyuha Hwang <[email protected]>
@0xAX
Copy link
Contributor

0xAX commented Oct 8, 2015

@marctmiller
Copy link

redacted
On Oct 9, 2015 1:50 AM, "Jemo Mgebrishvili" [email protected]
wrote:

hey


Reply to this email directly or view it on GitHub
#210 (comment).

@gmonster
Copy link
Author

gmonster commented Oct 9, 2015

Thanks for your advices. I'm a newbie here.
I'm sorry to commit like this...
I'll try to commit a much better thing next time.

@gmonster gmonster closed this Oct 9, 2015
@marctmiller
Copy link

redacted
On Oct 9, 2015 4:24 AM, "Kyuha Hwang" [email protected] wrote:

Thanks for your advices. I'm a newbie here.
I'm sorry to commit like this...
I'll try to commit a much better thing next time.


Reply to this email directly or view it on GitHub
#210 (comment).

@jeffhuys
Copy link

Wow. Such hostility here. I came to look around here and see this ^.

Cya.

@nkeck720
Copy link

Ikr.
On Oct 18, 2015 2:19 PM, "Jeff Huijsmans" [email protected] wrote:

Wow. Such hostility here. I came to look around here and see this ^.

Cya.


Reply to this email directly or view it on GitHub
#210 (comment).

0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 26, 2016
…eckpatch-fixes

WARNING: do not add new typedefs
torvalds#86: FILE: arch/powerpc/include/asm/elf_util.h:35:
+typedef unsigned long func_desc_t;

WARNING: do not add new typedefs
torvalds#90: FILE: arch/powerpc/include/asm/elf_util.h:39:
+typedef struct ppc64_opd_entry func_desc_t;

WARNING: Block comments use * on subsequent lines
torvalds#94: FILE: arch/powerpc/include/asm/elf_util.h:43:
+/* Like PPC32, we need little trampolines to do > 24-bit jumps (into
+   the kernel itself).  But on PPC64, these need to be used for every

WARNING: Block comments use a trailing */ on a separate line
torvalds#95: FILE: arch/powerpc/include/asm/elf_util.h:44:
+   jump, actually, to reset r2 (TOC+0x8000). */

ERROR: open brace '{' following struct go on the same line
torvalds#97: FILE: arch/powerpc/include/asm/elf_util.h:46:
+struct ppc64_stub_entry
+{

WARNING: Block comments use a trailing */ on a separate line
torvalds#100: FILE: arch/powerpc/include/asm/elf_util.h:49:
+	 * so we don't have to modify the trampoline load instruction. */

WARNING: Block comments use * on subsequent lines
torvalds#110: FILE: arch/powerpc/include/asm/elf_util.h:59:
+/* r2 is the TOC pointer: it actually points 0x8000 into the TOC (this
+   gives the value maximum span in an instruction which uses a signed

WARNING: Block comments use a trailing */ on a separate line
torvalds#111: FILE: arch/powerpc/include/asm/elf_util.h:60:
+   offset) */

WARNING: Block comments use * on subsequent lines
torvalds#132: FILE: arch/powerpc/include/asm/module.h:18:
+/* Both low and high 16 bits are added as SIGNED additions, so if low
+   16 bits has high bit set, high 16 bits must be adjusted.  These

WARNING: Block comments use a trailing */ on a separate line
torvalds#133: FILE: arch/powerpc/include/asm/module.h:19:
+   macros do that (stolen from binutils). */

WARNING: space prohibited between function name and open parenthesis '('
torvalds#136: FILE: arch/powerpc/include/asm/module.h:22:
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)

ERROR: Macros with complex values should be enclosed in parentheses
torvalds#136: FILE: arch/powerpc/include/asm/module.h:22:
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)

WARNING: please, no spaces at the start of a line
torvalds#210: FILE: arch/powerpc/kernel/elf_util_64.c:32:
+ (((1 << (((other) & STO_PPC64_LOCAL_MASK) >> STO_PPC64_LOCAL_BIT)) >> 2) << 2)$

WARNING: Block comments use a trailing */ on a separate line
torvalds#216: FILE: arch/powerpc/kernel/elf_util_64.c:38:
+	 * of function and try to derive r2 from it). */

WARNING: line over 80 characters
torvalds#357: FILE: arch/powerpc/kernel/elf_util_64.c:179:
+				value = stub_for_addr(elf_info, value, obj_name);

WARNING: line over 80 characters
torvalds#363: FILE: arch/powerpc/kernel/elf_util_64.c:185:
+				squash_toc_save_inst(strtab + sym->st_name, value);

ERROR: space required before the open brace '{'
torvalds#369: FILE: arch/powerpc/kernel/elf_util_64.c:191:
+			if (value + 0x2000000 > 0x3ffffff || (value & 3) != 0){

WARNING: line over 80 characters
torvalds#560: FILE: arch/powerpc/kernel/module_64.c:341:
+	sechdrs[me->arch.elf_info.stubs_section].sh_size = get_stubs_size(hdr, sechdrs);

WARNING: line over 80 characters
torvalds#613: FILE: arch/powerpc/kernel/module_64.c:380:
+	struct elf_shdr *stubs_sec = &elf_info->sechdrs[elf_info->stubs_section];

WARNING: line over 80 characters
torvalds#889: FILE: arch/powerpc/kernel/module_64.c:498:
+	num_stubs = sechdrs[me->arch.elf_info.stubs_section].sh_size / sizeof(*entry);

total: 3 errors, 17 warnings, 830 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/powerpc-factor-out-relocation-code-from-module_64c-to-elf_util_64c.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Thiago Jung Bauermann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
koct9i pushed a commit to koct9i/linux that referenced this pull request Aug 27, 2016
…eckpatch-fixes

WARNING: do not add new typedefs
torvalds#86: FILE: arch/powerpc/include/asm/elf_util.h:35:
+typedef unsigned long func_desc_t;

WARNING: do not add new typedefs
torvalds#90: FILE: arch/powerpc/include/asm/elf_util.h:39:
+typedef struct ppc64_opd_entry func_desc_t;

WARNING: Block comments use * on subsequent lines
torvalds#94: FILE: arch/powerpc/include/asm/elf_util.h:43:
+/* Like PPC32, we need little trampolines to do > 24-bit jumps (into
+   the kernel itself).  But on PPC64, these need to be used for every

WARNING: Block comments use a trailing */ on a separate line
torvalds#95: FILE: arch/powerpc/include/asm/elf_util.h:44:
+   jump, actually, to reset r2 (TOC+0x8000). */

ERROR: open brace '{' following struct go on the same line
torvalds#97: FILE: arch/powerpc/include/asm/elf_util.h:46:
+struct ppc64_stub_entry
+{

WARNING: Block comments use a trailing */ on a separate line
torvalds#100: FILE: arch/powerpc/include/asm/elf_util.h:49:
+	 * so we don't have to modify the trampoline load instruction. */

WARNING: Block comments use * on subsequent lines
torvalds#110: FILE: arch/powerpc/include/asm/elf_util.h:59:
+/* r2 is the TOC pointer: it actually points 0x8000 into the TOC (this
+   gives the value maximum span in an instruction which uses a signed

WARNING: Block comments use a trailing */ on a separate line
torvalds#111: FILE: arch/powerpc/include/asm/elf_util.h:60:
+   offset) */

WARNING: Block comments use * on subsequent lines
torvalds#132: FILE: arch/powerpc/include/asm/module.h:18:
+/* Both low and high 16 bits are added as SIGNED additions, so if low
+   16 bits has high bit set, high 16 bits must be adjusted.  These

WARNING: Block comments use a trailing */ on a separate line
torvalds#133: FILE: arch/powerpc/include/asm/module.h:19:
+   macros do that (stolen from binutils). */

WARNING: space prohibited between function name and open parenthesis '('
torvalds#136: FILE: arch/powerpc/include/asm/module.h:22:
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)

ERROR: Macros with complex values should be enclosed in parentheses
torvalds#136: FILE: arch/powerpc/include/asm/module.h:22:
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)

WARNING: please, no spaces at the start of a line
torvalds#210: FILE: arch/powerpc/kernel/elf_util_64.c:32:
+ (((1 << (((other) & STO_PPC64_LOCAL_MASK) >> STO_PPC64_LOCAL_BIT)) >> 2) << 2)$

WARNING: Block comments use a trailing */ on a separate line
torvalds#216: FILE: arch/powerpc/kernel/elf_util_64.c:38:
+	 * of function and try to derive r2 from it). */

WARNING: line over 80 characters
torvalds#357: FILE: arch/powerpc/kernel/elf_util_64.c:179:
+				value = stub_for_addr(elf_info, value, obj_name);

WARNING: line over 80 characters
torvalds#363: FILE: arch/powerpc/kernel/elf_util_64.c:185:
+				squash_toc_save_inst(strtab + sym->st_name, value);

ERROR: space required before the open brace '{'
torvalds#369: FILE: arch/powerpc/kernel/elf_util_64.c:191:
+			if (value + 0x2000000 > 0x3ffffff || (value & 3) != 0){

WARNING: line over 80 characters
torvalds#560: FILE: arch/powerpc/kernel/module_64.c:341:
+	sechdrs[me->arch.elf_info.stubs_section].sh_size = get_stubs_size(hdr, sechdrs);

WARNING: line over 80 characters
torvalds#613: FILE: arch/powerpc/kernel/module_64.c:380:
+	struct elf_shdr *stubs_sec = &elf_info->sechdrs[elf_info->stubs_section];

WARNING: line over 80 characters
torvalds#889: FILE: arch/powerpc/kernel/module_64.c:498:
+	num_stubs = sechdrs[me->arch.elf_info.stubs_section].sh_size / sizeof(*entry);

total: 3 errors, 17 warnings, 830 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/powerpc-factor-out-relocation-code-from-module_64c-to-elf_util_64c.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Thiago Jung Bauermann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
laijs pushed a commit to laijs/linux that referenced this pull request Feb 13, 2017
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Dec 14, 2017
GIT 00a62de2567954bc732fd71bb311e283e7c406f0

commit ed123b6e474039483ffdb0a621184e3c3b4f9bce
Author: Pravin Shedge <[email protected]>
Date:   Wed Dec 6 22:38:03 2017 +0530

    scsi: qla2xxx: remove duplicate includes
    
    These duplicate includes have been found with scripts/checkincludes.pl
    but they have been removed manually to avoid removing false positives.
    
    Signed-off-by: Pravin Shedge <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit 81881861ae10ef6f20388bf00c4b6cf1115ac6fc
Author: Bart Van Assche <[email protected]>
Date:   Thu Dec 7 16:02:46 2017 -0800

    scsi: qla2xxx: Suppress gcc 7 fall-through warnings
    
    Avoid that building with gcc 7 and W=1 triggers warnings similar to the
    following:
    
    drivers/scsi/qla2xxx/qla_isr.c:1189:27: warning: this statement may fall through [-Wimplicit-fallthrough=]
    
    Signed-off-by: Bart Van Assche <[email protected]>
    Cc: Himanshu Madhani <[email protected]>
    Cc: Quinn Tran <[email protected]>
    Cc: Hannes Reinecke <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit f280c77dc9bb850bc49a126ef5a088e7340a61b6
Author: Nicolas Iooss <[email protected]>
Date:   Sun Dec 10 20:23:11 2017 +0100

    scsi: fnic: add a space after %p in printf format
    
    fnic_fcpio_icmnd_cmpl_handler() displays the value of sc with:
    
        FNIC_SCSI_DBG(KERN_INFO...
            "... sc = 0x%p"
            "scsi_status ..."
            ...
    
    As the literal strings get merged, the function uses %ps instead of the
    intended raw %p format. Fix this by inserting a space.
    
    Signed-off-by: Nicolas Iooss <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit e8fd31c5543240d866492769e0e3b6a54b1df7b7
Author: Randy Dunlap <[email protected]>
Date:   Sun Dec 10 10:11:44 2017 -0800

    scsi: documentation: add scsi_common.c to SCSI driver-api
    
    Add exported functions from scsi_common.c to the SCSI driver API
    documentation.
    
    Signed-off-by: Randy Dunlap <[email protected]>
    Cc: Nicholas Bellinger <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit 749a11221dc37e0ca148d3db4956ee200f0a297b
Author: Randy Dunlap <[email protected]>
Date:   Sun Dec 10 10:11:33 2017 -0800

    scsi: core: doc. fixes to scsi_common.c
    
    Clean up some comment typos and fix some errors in documentation.
    
    Signed-off-by: Randy Dunlap <[email protected]>
    Cc: Nicholas Bellinger <[email protected]>
    Cc: Sagi Grimberg <[email protected]>
    Cc: Bart Van Assche <[email protected]>
    Reviewed-by: Bart Van Assche <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit 3c62ecda0e24f4ae84181184457d4e37f5250c7f
Author: Colin Ian King <[email protected]>
Date:   Sat Dec 9 00:34:14 2017 +0000

    scsi: arcmsr: remove redundant check for secs < 0
    
    The check for secs being less than zero is redundant for two reasons.
    Firstly, secs is unsigned so the check is always going to be false.
    Secondly, if secs was signed the proceeding calculation of secs is never
    going to be negative.  Hence we can remove this redundant check and day
    and secs re-adjustment.
    
    Detected by static analysis with smatch:
    arcmsr_set_iop_datetime() warn: unsigned 'secs' is never less than zero.
    
    Signed-off-by: Colin Ian King <[email protected]>
    Acked-by: Ching Huang <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit 8c5a50e8e7ad812a62f7ccf28d9a5e74fddf3000
Author: Arnd Bergmann <[email protected]>
Date:   Mon Dec 4 15:47:00 2017 +0100

    scsi: bfa: convert to strlcpy/strlcat
    
    The bfa driver has a number of real issues with string termination
    that gcc-8 now points out:
    
    drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_iocmd_port_get_attr':
    drivers/scsi/bfa/bfad_bsg.c:320:9: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_psymb_init':
    drivers/scsi/bfa/bfa_fcs.c:775:9: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c:781:9: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c:788:9: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c:801:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c:808:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_nsymb_init':
    drivers/scsi/bfa/bfa_fcs.c:837:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c:844:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c:852:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_psymb_init':
    drivers/scsi/bfa/bfa_fcs.c:778:2: error: 'strncat' output may be truncated copying 10 bytes from a string of length 63 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs.c:784:2: error: 'strncat' output may be truncated copying 30 bytes from a string of length 63 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs.c:803:3: error: 'strncat' output may be truncated copying 44 bytes from a string of length 63 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs.c:811:3: error: 'strncat' output may be truncated copying 16 bytes from a string of length 63 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_nsymb_init':
    drivers/scsi/bfa/bfa_fcs.c:840:2: error: 'strncat' output may be truncated copying 10 bytes from a string of length 63 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs.c:847:2: error: 'strncat' output may be truncated copying 30 bytes from a string of length 63 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_fdmi_get_hbaattr':
    drivers/scsi/bfa/bfa_fcs_lport.c:2657:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs_lport.c:2659:11: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_ms_gmal_response':
    drivers/scsi/bfa/bfa_fcs_lport.c:3232:5: error: 'strncpy' output may be truncated copying 16 bytes from a string of length 247 [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_ns_send_rspn_id':
    drivers/scsi/bfa/bfa_fcs_lport.c:4670:3: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs_lport.c:4682:3: error: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_ns_util_send_rspn_id':
    drivers/scsi/bfa/bfa_fcs_lport.c:5206:3: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs_lport.c:5215:3: error: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_fdmi_get_portattr':
    drivers/scsi/bfa/bfa_fcs_lport.c:2751:2: error: 'strncpy' specified bound 128 equals destination size [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcbuild.c: In function 'fc_rspnid_build':
    drivers/scsi/bfa/bfa_fcbuild.c:1254:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    drivers/scsi/bfa/bfa_fcbuild.c:1253:25: note: length computed here
    drivers/scsi/bfa/bfa_fcbuild.c: In function 'fc_rsnn_nn_build':
    drivers/scsi/bfa/bfa_fcbuild.c:1275:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    
    In most cases, this can be addressed by correctly calling strlcpy and
    strlcat instead of strncpy/strncat, with the size of the destination
    buffer as the last argument.
    
    For consistency, I'm changing the other callers of strncpy() in this
    driver the same way.
    
    Signed-off-by: Arnd Bergmann <[email protected]>
    Reviewed-by: Johannes Thumshirn <[email protected]>
    Acked-by: Sudarsana Kalluru <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>

commit c058ecf6e455fac7346d46197a02398ead90851f
Author: Steve Wise <[email protected]>
Date:   Mon Nov 27 13:16:32 2017 -0800

    iw_cxgb4: only insert drain cqes if wq is flushed
    
    Only insert our special drain CQEs to support ib_drain_sq/rq() after
    the wq is flushed. Otherwise, existing but not yet polled CQEs can be
    returned out of order to the user application.  This can happen when the
    QP has exited RTS but not yet flushed the QP, which can happen during
    a normal close (vs abortive close).
    
    In addition never count the drain CQEs when determining how many CQEs
    need to be synthesized during the flush operation.  This latter issue
    should never happen if the QP is properly flushed before inserting the
    drain CQE, but I wanted to avoid corrupting the CQ state.  So we handle
    it and log a warning once.
    
    Fixes: 4fe7c2962e11 ("iw_cxgb4: refactor sq/rq drain logic")
    Signed-off-by: Steve Wise <[email protected]>
    Cc: [email protected]
    Signed-off-by: Jason Gunthorpe <[email protected]>

commit 241f67c8cccc94d79166173197bd6117cfa94ae9
Author: Darren Hart (VMware) <[email protected]>
Date:   Mon Nov 20 14:39:34 2017 -0800

    Documentation/process: Add CONFIG default value to submit-checklist
    
    Add default value review to the submit checklist, referring to the
    preference for "default n" from the previous patch added to
    Documentation/kbuild/kconfig-language.txt.
    
    Cc: "Yann E. MORIN" <[email protected]>
    Cc: Masahiro Yamada <[email protected]>
    Cc: Michal Marek <[email protected]>
    Cc: Jonathan Corbet <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Signed-off-by: Darren Hart (VMware) <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit b7d4ec395673bf8b21de064f181cc94096e0a0c7
Author: Darren Hart (VMware) <[email protected]>
Date:   Mon Nov 20 14:39:33 2017 -0800

    Documentation/kbuild: Add guidance for the use of default
    
    Document the preference [1] for new CONFIG options to "default n" (or
    not use default at all) in order to minimizes changes to the config,
    especially to avoid "make oldconfig" growing unnecessarily from release
    to release.
    
    Document the exceptions where it is acceptable to use "default y/m" for
    new CONFIG options.
    
    1. https://lkml.org/lkml/2017/11/18/257
    
    Cc: "Yann E. MORIN" <[email protected]>
    Cc: Masahiro Yamada <[email protected]>
    Cc: Michal Marek <[email protected]>
    Cc: Jonathan Corbet <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Signed-off-by: Darren Hart (VMware) <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit d063623b6ae7c326d21a2713dd38cab15d794c1c
Author: Randy Dunlap <[email protected]>
Date:   Wed Nov 29 12:32:42 2017 -0800

    Documentation: add UUID/GUID to kernel-api
    
    Update kernel-doc notation in lib/uuid.c and then add UUID/GUID
    function interfaces to kernel-api.
    
    Signed-off-by: Randy Dunlap <[email protected]>
    [jc: tweaked the uuid_is_valid() kerneldoc]
    Signed-off-by: Jonathan Corbet <[email protected]>

commit 3abaa5ccd92231fd445b2599f13aca32aa003478
Author: Randy Dunlap <[email protected]>
Date:   Wed Nov 29 12:32:38 2017 -0800

    Documentation: add Sorting section to kernel-api
    
    Add sort() and list_sort() to the kernel API documentation in a
    new "Sorting" section.
    
    Signed-off-by: Randy Dunlap <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit d22881dc13b62baf32e69e16fd4f8bdbe2aa3e4e
Author: Scott Wood <[email protected]>
Date:   Sun Dec 10 01:48:46 2017 -0600

    Documentation: Better document the hardlockup_panic sysctl
    
    Commit ac1f591249d95372f ("kernel/watchdog.c: add sysctl knob
    hardlockup_panic") added the hardlockup_panic sysctl, but did not add it
    to Documentation/sysctl/kernel.txt.  Add this, and reference it from the
    corresponding entry in Documentation/admin-guide/kernel-parameters.txt.
    
    Signed-off-by: Scott Wood <[email protected]>
    Acked-by: Christoph von Recklinghausen <[email protected]>
    Acked-by: Don Zickus <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit aa73f28e1d5b01eadeedc0926dac5c4ed3defc60
Author: Fabio Estevam <[email protected]>
Date:   Fri Dec 8 11:53:37 2017 -0200

    doc: usb: chipidea: Fix typo in 'enumerate'
    
    Fix the spelling of 'enumerate' in this document.
    
    Signed-off-by: Fabio Estevam <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit 40af6390837539f1e43a0223ebc99ed65e2eda82
Author: Jonathan Corbet <[email protected]>
Date:   Mon Dec 11 14:46:10 2017 -0700

    docs: Add an intro note to the maintainers handbook
    
    ...just enough to say what the purpose is and to solicit more
    contributions.
    
    Signed-off-by: Jonathan Corbet <[email protected]>

commit 648b12226ab4c4716e8c06618a58cad6c894956f
Author: Ben Whitten <[email protected]>
Date:   Sun Dec 10 21:17:55 2017 +0000

    leds: trigger: Introduce a NETDEV trigger
    
    This commit introduces a NETDEV trigger for named device
    activity. Available triggers are link, rx, and tx.
    
    Signed-off-by: Ben Whitten <[email protected]>
    Signed-off-by: Jacek Anaszewski <[email protected]>

commit 9727a0144bd99f4a189a2ededd52c53299079d8a
Author: Tobin C. Harding <[email protected]>
Date:   Mon Dec 4 10:27:29 2017 +1100

    doc: add maintainer book
    
    There is currently very little documentation in the kernel on maintainer
    level tasks. In particular there are no documents on creating pull
    requests to submit to Linus.
    
    Quoting Greg Kroah-Hartman on LKML:
    
        Anyway, this actually came up at the kernel summit / maintainer
        meeting a few weeks ago, in that "how do I make a
        good pull request to Linus" is something we need to document.
    
        Here's what I do, and it seems to work well, so maybe we should turn
        it into the start of the documentation for how to do it.
    
    (quote references: kernel summit, Europe 2017)
    
    Create a new kernel documentation book 'how to be a maintainer'
    (suggested by Jonathan Corbet). Add chapters on 'configuring git' and
    'creating a pull request'.
    
    Most of the content was written by Linus Torvalds and Greg Kroah-Hartman
    in discussion on LKML. This is stated at the start of one of the
    chapters and the original email thread is referenced in
    'pull-requests.rst'.
    
    Signed-off-by: Tobin C. Harding <[email protected]>
    Reviewed-by: Greg Kroah-Hartman <[email protected]>
    Reviewed-by: Mauro Carvalho Chehab <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit b6e859f6cdd1686c021dcb3e18591d0b28ce8867
Author: Elena Reshetova <[email protected]>
Date:   Tue Dec 5 12:46:35 2017 +0200

    docs: refcount_t documentation
    
    Some functions from refcount_t API provide different
    memory ordering guarantees that their atomic counterparts.
    This adds a document outlining these differences (
    Documentation/core-api/refcount-vs-atomic.rst) as well as
    some other minor improvements.
    
    Signed-off-by: Elena Reshetova <[email protected]>
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit 3ece7805105ef5967fd88547ac958c6d59329e9c
Author: Stefan Tatschner <[email protected]>
Date:   Fri Dec 8 01:12:09 2017 +0100

    Documentation/driver-api/usb: Replace dead link
    
    This link is dead:
    
        $ curl -vI http://usb.cs.tum.edu/usbdoc
        * Could not resolve host: usb.cs.tum.edu
        * Closing connection 0
        curl: (6) Could not resolve host: usb.cs.tum.edu
    
    I found the document somewhere else. Let's replace it.
    
    Signed-off-by: Stefan Tatschner <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit 45005b27c191826dd88622c1e35a9448d861af3b
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Fri Dec 8 09:05:12 2017 -0500

    kernel-doc: parse DECLARE_KFIFO and DECLARE_KFIFO_PTR()
    
    On media, we now have an struct declared with:
    
    struct lirc_fh {
            struct list_head list;
            struct rc_dev *rc;
            int                             carrier_low;
            bool                            send_timeout_reports;
            DECLARE_KFIFO_PTR(rawir, unsigned int);
            DECLARE_KFIFO_PTR(scancodes, struct lirc_scancode);
            wait_queue_head_t               wait_poll;
            u8                              send_mode;
            u8                              rec_mode;
    };
    
    gpiolib.c has a similar declaration with DECLARE_KFIFO().
    
    Currently, those produce the following error:
    
            ./include/media/rc-core.h:96: warning: No description found for parameter 'int'
            ./include/media/rc-core.h:96: warning: No description found for parameter 'lirc_scancode'
            ./include/media/rc-core.h:96: warning: Excess struct member 'rawir' description in 'lirc_fh'
            ./include/media/rc-core.h:96: warning: Excess struct member 'scancodes' description in 'lirc_fh'
            ../drivers/gpio/gpiolib.c:601: warning: No description found for parameter '16'
            ../drivers/gpio/gpiolib.c:601: warning: Excess struct member 'events' description in 'lineevent_state'
    
    So, teach kernel-doc how to parse DECLARE_KFIFO() and DECLARE_KFIFO_PTR().
    
    While here, relax at the past DECLARE_foo() macros, accepting a random
    number of spaces after comma.
    
    The addition of DECLARE_KFIFO() was
    Suggested-by: Randy Dunlap <[email protected]>
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Tested-by: Randy Dunlap <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit c1de03a4cee1e71b3ad7680b9faef87fb09b91d4
Author: Marco Donato Torsello <[email protected]>
Date:   Fri Dec 8 19:10:54 2017 +0100

    Documentation: kernel-hacking: corrected a typo
    
    Corrected a typo.
    
    Signed-off-by: Marco Donato Torsello <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit 51e028e44e64ff3c78750e1ab79be67b68dd8aef
Author: Jonathan Neuschäfer <[email protected]>
Date:   Sat Dec 9 17:21:04 2017 +0100

    Documentation: mono: Update links and s/CVS/Git/
    
    The URLs in mono.rst redirect to pages on www.mono-project.com, so let's
    update them. I took the liberty to update the compilation instructions
    to the Linux-specific version, because readers of the kernel
    documentation will most likely use Linux.
    
    Signed-off-by: Jonathan Neuschäfer <[email protected]>
    Signed-off-by: Jonathan Corbet <[email protected]>

commit d47eeb213c8b444fb3a4f7dbce09feb19580e5e6
Author: Miquel Raynal <[email protected]>
Date:   Thu Nov 9 14:16:45 2017 +0100

    mtd: nand: add ->exec_op() implementation
    
    Introduce a new interface to instruct NAND controllers to send specific
    NAND operations. The new interface takes the form of a single method
    called ->exec_op(). This method is designed to replace ->cmd_ctrl(),
    ->cmdfunc() and ->read/write_byte/word/buf() hooks.
    
    ->exec_op() is passed a set of instructions describing the operation
    to execute. Each instruction has a type (ADDR, CMD, DATA, WAITRDY)
    and delay. The delay is here to help simple controllers wait enough
    time between each instruction, advanced controllers with integrated
    timings control can ignore these delays.
    
    Controllers that natively support complex operations (operations
    formed of several instructions) can use the NAND op parser
    infrastructure. This infrastructure allows controller drivers to
    describe the sequence of instructions they support (called
    nand_op_pattern) and a hook for each of these supported sequences. The
    core then tries to find the best match for a given NAND operation, and
    calls the associated hook.
    
    Various other helpers are also added to ease NAND controller drivers
    writing.
    
    This new interface should ease support of vendor specific operations
    in that NAND manufacturer drivers now have a way to check if the
    controller they are connected to supports a specific operation, and
    complain or refuse to probe the NAND chip when that's not the case.
    
    Suggested-by: Boris Brezillon <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Boris Brezillon <[email protected]>

commit 200809716aed1cac586fcac4c0551a688439be1f
Author: Xin Long <[email protected]>
Date:   Sun Dec 10 16:56:00 2017 +0800

    fou: fix some member types in guehdr
    
    guehdr struct is used to build or parse gue packets, which
    are always in big endian. It's better to define all guehdr
    members as __beXX types.
    
    Also, in validate_gue_flags it's not good to use a __be32
    variable for both Standard flags(__be16) and Private flags
    (__be32), and pass it to other funcions.
    
    This patch could fix a bunch of sparse warnings from fou.
    
    Fixes: 5024c33ac354 ("gue: Add infrastructure for flags and options")
    Signed-off-by: Xin Long <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 2342b8d95bcae5946e1b9b8d58645f37500ef2e7
Author: Xin Long <[email protected]>
Date:   Sun Dec 10 15:40:51 2017 +0800

    sctp: make sure stream nums can match optlen in sctp_setsockopt_reset_streams
    
    Now in sctp_setsockopt_reset_streams, it only does the check
    optlen < sizeof(*params) for optlen. But it's not enough, as
    params->srs_number_streams should also match optlen.
    
    If the streams in params->srs_stream_list are less than stream
    nums in params->srs_number_streams, later when dereferencing
    the stream list, it could cause a slab-out-of-bounds crash, as
    reported by syzbot.
    
    This patch is to fix it by also checking the stream numbers in
    sctp_setsockopt_reset_streams to make sure at least it's not
    greater than the streams in the list.
    
    Fixes: 7f9d68ac944e ("sctp: implement sender-side procedures for SSN Reset Request Parameter")
    Reported-by: Dmitry Vyukov <[email protected]>
    Signed-off-by: Xin Long <[email protected]>
    Acked-by: Marcelo Ricardo Leitner <[email protected]>
    Acked-by: Neil Horman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 8f659a03a0ba9289b9aeb9b4470e6fb263d6f483
Author: Mohamed Ghannam <[email protected]>
Date:   Sun Dec 10 03:50:58 2017 +0000

    net: ipv4: fix for a race condition in raw_sendmsg
    
    inet->hdrincl is racy, and could lead to uninitialized stack pointer
    usage, so its value should be read only once.
    
    Fixes: c008ba5bdc9f ("ipv4: Avoid reading user iov twice after raw_probe_proto_opt")
    Signed-off-by: Mohamed Ghannam <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit c360f2b58ee4dbf02c0a08697881aa6bba732bcb
Author: Zhu Yanjun <[email protected]>
Date:   Sat Dec 9 22:07:26 2017 -0500

    forcedeth: remove unnecessary structure member
    
    Since both tx_ring and first_tx are the head of tx ring, it not
    necessary to use two structure members to statically indicate
    the head of tx ring. So first_tx is removed.
    
    CC: Srinivas Eeda <[email protected]>
    CC: Joe Jin <[email protected]>
    CC: Junxiao Bi <[email protected]>
    Signed-off-by: Zhu Yanjun <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit da5a4570e001e60fcf1d94cca054f8c4f0df12be
Author: Jaganath Kanakkassery <[email protected]>
Date:   Mon Dec 11 20:26:47 2017 +0530

    Bluetooth: Remove redundant disable_advertising()
    
    There is already __hci_req_disable_advertising() function for disabling,
    so use it.
    
    Signed-off-by: Jaganath Kanakkassery <[email protected]>
    Signed-off-by: Marcel Holtmann <[email protected]>

commit 465def2ad492b84eb2234a8892724df8e1edd580
Author: Łukasz Stelmach <[email protected]>
Date:   Mon Dec 11 09:54:15 2017 +0100

    ARM: dts: exynos: Add DT nodes for PRNG in Exynos5 SoCs
    
    Add nodes for Pseudo Random Number Generator in dts files describing
    Exynos5 chips.
    
    Signed-off-by: Łukasz Stelmach <[email protected]>
    Signed-off-by: Krzysztof Kozlowski <[email protected]>

commit 72c27a68a2a3f650f0dc7891ee98f02283fc11af
Author: Andrey Konovalov <[email protected]>
Date:   Thu Nov 2 09:52:27 2017 -0400

    media: pvrusb2: properly check endpoint types
    
    As syzkaller detected, pvrusb2 driver submits bulk urb withount checking
    the the endpoint type is actually blunk. Add a check.
    
    usb 1-1: BOGUS urb xfer, pipe 3 != type 1
    ------------[ cut here ]------------
    WARNING: CPU: 1 PID: 2713 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0
    Modules linked in:
    CPU: 1 PID: 2713 Comm: pvrusb2-context Not tainted
    4.14.0-rc1-42251-gebb2c2437d80 #210
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
    task: ffff88006b7a18c0 task.stack: ffff880069978000
    RIP: 0010:usb_submit_urb+0xf8a/0x11d0 drivers/usb/core/urb.c:448
    RSP: 0018:ffff88006997f990 EFLAGS: 00010286
    RAX: 0000000000000029 RBX: ffff880063661900 RCX: 0000000000000000
    RDX: 0000000000000029 RSI: ffffffff86876d60 RDI: ffffed000d32ff24
    RBP: ffff88006997fa90 R08: 1ffff1000d32fdca R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1000d32ff39
    R13: 0000000000000001 R14: 0000000000000003 R15: ffff880068bbed68
    FS:  0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000001032000 CR3: 000000006a0ff000 CR4: 00000000000006f0
    Call Trace:
     pvr2_send_request_ex+0xa57/0x1d80 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3645
     pvr2_hdw_check_firmware drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1812
     pvr2_hdw_setup_low drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2107
     pvr2_hdw_setup drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2250
     pvr2_hdw_initialize+0x548/0x3c10 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2327
     pvr2_context_check drivers/media/usb/pvrusb2/pvrusb2-context.c:118
     pvr2_context_thread_func+0x361/0x8c0 drivers/media/usb/pvrusb2/pvrusb2-context.c:167
     kthread+0x3a1/0x470 kernel/kthread.c:231
     ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
    Code: 48 8b 85 30 ff ff ff 48 8d b8 98 00 00 00 e8 ee 82 89 fe 45 89
    e8 44 89 f1 4c 89 fa 48 89 c6 48 c7 c7 40 c0 ea 86 e8 30 1b dc fc <0f>
    ff e9 9b f7 ff ff e8 aa 95 25 fd e9 80 f7 ff ff e8 50 74 f3
    ---[ end trace 6919030503719da6 ]---
    
    Signed-off-by: Andrey Konovalov <[email protected]>
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 09db1a462a03a1177a768406451405e4e0dcaf9a
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:40 2017 -0400

    media: led-class-flash: better handle NULL flash struct
    
    The logic at V4L2 led core assumes that the flash struct
    can be null. However, it doesn't check for null while
    trying to set, causing some smatch  to warn:
    
            drivers/media/v4l2-core/v4l2-flash-led-class.c:210 v4l2_flash_s_ctrl() error: we previously assumed 'fled_cdev' could be null (see line 200)
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Acked-by: Sakari Ailus <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit a9cb97c3e628902e37583d8a40bb28cf76522cf1
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:39 2017 -0400

    media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code
    
    As smatch warned:
            drivers/media/dvb-core/dvb_frontend.c:2468 dvb_frontend_handle_ioctl() error: uninitialized symbol 'err'.
    
    The ioctl handler actually got a regression here: before changeset
    d73dcf0cdb95 ("media: dvb_frontend: cleanup ioctl handling logic"),
    the code used to return -EOPNOTSUPP if an ioctl handler was not
    implemented on a driver. After the change, it may return a random
    value.
    
    Fixes: d73dcf0cdb95 ("media: dvb_frontend: cleanup ioctl handling logic")
    
    Cc: [email protected]
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Tested-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 7621b8c4c06bd6414c438f9e50781af1cd88d063
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:43 2017 -0400

    media: xc5000: better handle I2C error messages
    
    As warned by smatch, there are several places where the I2C
    transfer may fail, leading into inconsistent behavior:
    
            drivers/media/tuners/xc5000.c:689 xc_debug_dump() error: uninitialized symbol 'regval'.
            drivers/media/tuners/xc5000.c:841 xc5000_is_firmware_loaded() error: uninitialized symbol 'id'.
            drivers/media/tuners/xc5000.c:939 xc5000_set_tv_freq() error: uninitialized symbol 'pll_lock_status'.
            drivers/media/tuners/xc5000.c:1195 xc_load_fw_and_init_tuner() error: uninitialized symbol 'pll_lock_status'.
    
    Handle the return codes from the I2C transfer, in order to
    address those issues.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit ad7b57d58d16666f607914bf9ff6950e1c5532a4
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:54 2017 -0400

    media: mxl111sf: improve error handling logic
    
    As reported by smatch:
            drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c:485 mxl111sf_demod_read_signal_strength() error: uninitialized symbol 'modulation'.
    
    The mxl111sf_demod_read_signal_strength() just ignores if something
    gets wrong while reading snr or modulation.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit f161544d9d7d8e617c13fe30504317c417ed49e9
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:53 2017 -0400

    media: drxd_hard: better handle I2C errors
    
    As warned by smatch:
            drivers/media/dvb-frontends/drxd_hard.c:989 HI_Command() error: uninitialized symbol 'waitCmd'.
            drivers/media/dvb-frontends/drxd_hard.c:1306 SC_WaitForReady() error: uninitialized symbol 'curCmd'.
            drivers/media/dvb-frontends/drxd_hard.c:1322 SC_SendCommand() error: uninitialized symbol 'errCode'.
            drivers/media/dvb-frontends/drxd_hard.c:1339 SC_ProcStartCommand() error: uninitialized symbol 'scExec'.
    
    The error handling on several places are somewhat flawed, as
    they don't check if Read16() returns an error.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 07ade2d0f680864ba0c93553d008900dd3e1a421
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:59 2017 -0400

    media: cxd2841er: ensure that status will always be available
    
    The loop with read status use a dynamic timeout value, calculated
    from symbol rate. It should run the loop at least one time for
    the status to be handled after the loop.
    
    While this should, in practice, happen every time, it doesn't
    hurt to change the logic to make it explicit.
    
    This solves a smatch warning:
            drivers/media/dvb-frontends/cxd2841er.c:3350 cxd2841er_set_frontend_s() error: uninitialized symbol 'status'.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 04f849c00cf6228092d37876896fbd541a0f3393
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:46 2017 -0400

    media: cx25821-alsa: fix usage of a pointer printk
    
    As warned by smatch:
            drivers/media/pci/cx25821/cx25821-alsa.c:155 cx25821_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer
    
    Use the standard %p to print a pointer.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 021c01d3dc8291105338b455b994a48b807f26c3
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:55 2017 -0400

    media: dvbsky: shut up a bogus warning
    
    Smatch gives two bogus warnings on this driver:
            drivers/media/usb/dvb-usb-v2/dvbsky.c:336 dvbsky_s960_attach() error: uninitialized symbol 'i2c_adapter'.
            drivers/media/usb/dvb-usb-v2/dvbsky.c:459 dvbsky_s960c_attach() error: uninitialized symbol 'i2c_adapter'.
    
    Shut them up.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 74a6799ca9823690046091361ce062d3ccfeac8d
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:58 2017 -0400

    media: m88rs2000: handle the case where tuner doesn't have get_frequency
    
    If the tuner doesn't have get_frequency() callback, the current
    code will place a random value as the frequency offset. That
    doesn't seem right! The better is to just assume that, on such
    case, the tuner was able to set the exact frequency that was
    requested.
    
    Fixes a smatch warning:
            drivers/media/dvb-frontends/m88rs2000.c:639 m88rs2000_set_frontend() error: uninitialized symbol 'tuner_freq'.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit e639c869558cc1172cacf7477819c7e9db60e3a4
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:52 2017 -0400

    media: pt1: fix logic when pt1_nr_tables is zero or negative
    
    pt1_nr_tables is a modprobe parameter. The way the logic
    handles it, it can't be negative. However, user can
    set it to zero.
    
    If set to zero, however, it will cause troubles at
    pt1_init_tables(), as reported by smatch:
            drivers/media/pci/pt1/pt1.c:468 pt1_init_tables() error: uninitialized symbol 'first_pfn'.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 29236349aa7dfc5556424261240be9050187b49d
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:56 2017 -0400

    media: ov9650: fix bogus warnings
    
    The smatch logic gets confused with the syntax used to check if the
    ov9650x_read() reads succedded:
            drivers/media/i2c/ov9650.c:895 __g_volatile_ctrl() error: uninitialized symbol 'reg2'.
            drivers/media/i2c/ov9650.c:895 __g_volatile_ctrl() error: uninitialized symbol 'reg1'.
    
    There's nothing wrong with the original logic, except that
    it is a little more harder to review.
    
    So, let's stick with the syntax that won't cause read
    issues.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Reviewed-by: Nicholas Mc Guire <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit f303810cf189144a613a7efa991816655e6467ea
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:06:03 2017 -0400

    media: mb86a16: avoid division by zero
    
    As warned by smatch:
            drivers/media/dvb-frontends/mb86a16.c:1690 mb86a16_read_ber() error: uninitialized symbol 'timer'.
            drivers/media/dvb-frontends/mb86a16.c:1706 mb86a16_read_ber() error: uninitialized symbol 'timer'.
    
    There is a potential risk of doing a division by zero if
    timer is not handled well. Enforce it by setting a bit mask
    for the values used to select the timer.
    
    It should be noticed that I don't have mb86a16 datasheet. So,
    the bitmask was guessed based on the existing checks for
    the field. At worse case scenario, it will just show a
    badly calculated bit error rate, but it won't crash.
    
    While here, optimize the logic to prevent uneeded tests.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 15e3145a709978db777bd60d07552da06ae0e407
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:06:02 2017 -0400

    media: mb86a16: be more resilient if I2C fails on sync
    
    If the I2C read fails while check for sync, there's no point
    on doing adjusting the tuner due to a random value that might
    be at VIRM var. So, set VIRM to zero, as that makes the caller
    for check_sync() to return an error.
    
    Fix those smatch warnings:
            drivers/media/dvb-frontends/mb86a16.c:1460 mb86a16_set_fe() error: uninitialized symbol 'VIRM'.
            drivers/media/dvb-frontends/mb86a16.c:1461 mb86a16_set_fe() error: uninitialized symbol 'VIRM'.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 452c6446948e32018014ddadf93c525bf1f907ac
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:06:00 2017 -0400

    media: drxj: better handle errors
    
    as reported by smatch:
            drivers/media/dvb-frontends/drx39xyj/drxj.c:2157 drxj_dap_atomic_read_write_block() error: uninitialized symbol 'word'.
    
    The driver doesn't check if a read error occurred. Add such
    check.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 00b4bac78f6f607c5882bfdc03008b7acf802349
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:57 2017 -0400

    media: imx274: don't randomly return if range_count is zero
    
    As smatch reported:
            drivers/media/i2c/imx274.c:659 imx274_regmap_util_write_table_8() error: uninitialized symbol 'err'.
    
    There is a bug at imx274_regmap_util_write_table_8() with causes
    it to randomly return a random error if range_count is zero.
    
    Worse than that, the logic there starts with range_count
    equal to zero, and periodically resets it to zero again.
    
    As it is a way more likely that err assumes a non-zero value,
    I suspect that the chance of this code to run is very small,
    so, it would be worth to review the entire function.
    
    Anyway, clearly it shouldn't be returning error if range_count
    is zero. So, let's fix it.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit ab0625f021f83ecb19c969188ba2af3d154c054e
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:06:01 2017 -0400

    media: stv090x: Only print tuner lock if get_status is available
    
    The current code doesn't report tuner lock properly if the
    tuner get_status callback is not available, as reported by
    smatch:
            drivers/media/dvb-frontends/stv090x.c:2220 stv090x_get_coldlock() error: uninitialized symbol 'reg'.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 8a08ef08fb132b3184e99fa8c1a007bcfadd9942
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:47 2017 -0400

    media: xc4000: don't ignore error if hwmodel fails
    
    If, for some reason, reading the hwmodel register on
    xc4000 fails, it will cause the following logig to
    use a random value, as reported by smatch:
    
            drivers/media/tuners/xc4000.c:1047 check_firmware() error: uninitialized symbol 'hwmodel'.
            drivers/media/tuners/xc4000.c:1060 check_firmware() error: uninitialized symbol 'hwmodel'.
            drivers/media/tuners/xc4000.c:1064 check_firmware() error: uninitialized symbol 'hwmodel'.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 02d7324337c0223f3775d539380e32f603646a52
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:44 2017 -0400

    media: radio-si476x: fix behavior when seek->range* are defined
    
    The logic at si476x_radio_s_hw_freq_seek() checks if the
    frequency range that will be used to handle hardware seek
    has the minimal frequency under rangelow. That works fine
    if userspace zeros both fields. However, if userspace
    fills either seek->rangelow or seek-rangehigh, it won't
    read the corresponding range from the device, causing the
    values to be unitialized, as warned by smatch:
    
            drivers/media/radio/radio-si476x.c:789 si476x_radio_s_hw_freq_seek() error: uninitialized symbol 'rangelow'.
            drivers/media/radio/radio-si476x.c:789 si476x_radio_s_hw_freq_seek() error: uninitialized symbol 'rangehigh'.
    
    Fix it by initializing those vars from the values present at
    the struct v4l2_hw_freq_seek.
    
    While here, simplify the logic which reads such values from
    the hardware limits.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit bc3cad2b9261de7a5fa7632d30271e6d8418cb8f
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:48 2017 -0400

    media: qt1010: fix bogus warnings
    
    The logic at qt1010_init_meas1() and qt1010_init_meas2()
    are too complex for static analizers to identify that
    some vars are always be initialized.
    
    That causes smatch to produce the following warnings:
            drivers/media/tuners/qt1010.c:248 qt1010_init_meas1() error: uninitialized symbol 'val2'.
            drivers/media/tuners/qt1010.c:282 qt1010_init_meas2() error: uninitialized symbol 'val'.
    
    So, add annotations to prevent those bogus warnings.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 01a26ff99ca4cec8dcb246683b4b44f5728f75c0
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 17:05:41 2017 -0400

    media: tda8290: initialize agc gain
    
    The tuning logic at tda8290 relies on agc_stat and
    adc_sat to be initialized. However, as warned by smatch:
    
            drivers/media/tuners/tda8290.c:261 tda8290_set_params() error: uninitialized symbol 'agc_stat'.
            drivers/media/tuners/tda8290.c:261 tda8290_set_params() error: uninitialized symbol 'adc_sat'.
            drivers/media/tuners/tda8290.c:262 tda8290_set_params() error: uninitialized symbol 'adc_sat'.
    
    That could cause an erratic behavior if PLL is not locked,
    as the code will only work if
            !(pll_stat & 0x80) && (adc_sat < 20)
    
    So, initialize it to zero, in order to let the code below
    to be called, with should give more chances to adjust the
    tuner gain, in order to get a PLL lock.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 79c5453d3e3e7de9e5ce5c88af29b34688dd0469
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Wed Nov 1 08:54:58 2017 -0400

    media: atmel-isc: avoid returning a random value at isc_parse_dt()
    
    As warned by smatch:
    drivers/media/platform/atmel/atmel-isc.c:2097 isc_parse_dt() error: uninitialized symbol 'ret'.
    
    The problem here is that of_graph_get_next_endpoint() can
    potentially return NULL on its first pass, with would make
    it return a random value, as ret is not initialized.
    
    While here, use while(1) instead of for(; ;), as while is
    the preferred syntax for such kind of loops.
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 910b0797fa9e8af09c44a3fa36cb310ba7a7218d
Author: Matthias Schwarzott <[email protected]>
Date:   Mon Oct 30 06:07:29 2017 -0400

    media: em28xx: Fix use-after-free when disconnecting
    
    Fix bug by moving the i2c_unregister_device calls after deregistration
    of dvb frontend.
    
    The new style i2c drivers already destroys the frontend object at
    i2c_unregister_device time.
    When the dvb frontend is unregistered afterwards it leads to this oops:
    
      [ 6058.866459] BUG: unable to handle kernel NULL pointer dereference at 00000000000001f8
      [ 6058.866578] IP: dvb_frontend_stop+0x30/0xd0 [dvb_core]
      [ 6058.866644] PGD 0
      [ 6058.866646] P4D 0
    
      [ 6058.866726] Oops: 0000 [#1] SMP
      [ 6058.866768] Modules linked in: rc_pinnacle_pctv_hd(O) em28xx_rc(O) si2157(O) si2168(O) em28xx_dvb(O) em28xx(O) si2165(O) a8293(O) tda10071(O) tea5767(O) tuner(O) cx23885(O) tda18271(O) videobuf2_dvb(O) videobuf2_dma_sg(O) m88ds3103(O) tveeprom(O) cx2341x(O) v4l2_common(O) dvb_core(O) rc_core(O) videobuf2_memops(O) videobuf2_v4l2(O) videobuf2_core(O) videodev(O) media(O) bluetooth ecdh_generic ums_realtek uas rtl8192cu rtl_usb rtl8192c_common rtlwifi usb_storage snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic i2c_mux snd_hda_intel snd_hda_codec snd_hwdep x86_pkg_temp_thermal snd_hda_core kvm_intel kvm irqbypass [last unloaded: videobuf2_memops]
      [ 6058.867497] CPU: 2 PID: 7349 Comm: kworker/2:0 Tainted: G        W  O    4.13.9-gentoo #1
      [ 6058.867595] Hardware name: MEDION E2050 2391/H81H3-EM2, BIOS H81EM2W08.308 08/25/2014
      [ 6058.867692] Workqueue: usb_hub_wq hub_event
      [ 6058.867746] task: ffff88011a15e040 task.stack: ffffc90003074000
      [ 6058.867825] RIP: 0010:dvb_frontend_stop+0x30/0xd0 [dvb_core]
      [ 6058.867896] RSP: 0018:ffffc90003077b58 EFLAGS: 00010293
      [ 6058.867964] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000010040001f
      [ 6058.868056] RDX: ffff88011a15e040 RSI: ffffea000464e400 RDI: ffff88001cbe3028
      [ 6058.868150] RBP: ffffc90003077b68 R08: ffff880119390380 R09: 000000010040001f
      [ 6058.868241] R10: ffffc90003077b18 R11: 000000000001e200 R12: ffff88001cbe3028
      [ 6058.868330] R13: ffff88001cbe68d0 R14: ffff8800cf734000 R15: ffff8800cf734098
      [ 6058.868419] FS:  0000000000000000(0000) GS:ffff88011fb00000(0000) knlGS:0000000000000000
      [ 6058.868511] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 6058.868578] CR2: 00000000000001f8 CR3: 00000001113c5000 CR4: 00000000001406e0
      [ 6058.868662] Call Trace:
      [ 6058.868705]  dvb_unregister_frontend+0x2a/0x80 [dvb_core]
      [ 6058.868774]  em28xx_dvb_fini+0x132/0x220 [em28xx_dvb]
      [ 6058.868840]  em28xx_close_extension+0x34/0x90 [em28xx]
      [ 6058.868902]  em28xx_usb_disconnect+0x4e/0x70 [em28xx]
      [ 6058.868968]  usb_unbind_interface+0x6d/0x260
      [ 6058.869025]  device_release_driver_internal+0x150/0x210
      [ 6058.869094]  device_release_driver+0xd/0x10
      [ 6058.869150]  bus_remove_device+0xe4/0x160
      [ 6058.869204]  device_del+0x1ce/0x2f0
      [ 6058.869253]  usb_disable_device+0x99/0x270
      [ 6058.869306]  usb_disconnect+0x8d/0x260
      [ 6058.869359]  hub_event+0x93d/0x1520
      [ 6058.869408]  ? dequeue_task_fair+0xae5/0xd20
      [ 6058.869467]  process_one_work+0x1d9/0x3e0
      [ 6058.869522]  worker_thread+0x43/0x3e0
      [ 6058.869576]  kthread+0x104/0x140
      [ 6058.869602]  ? trace_event_raw_event_workqueue_work+0x80/0x80
      [ 6058.869640]  ? kthread_create_on_node+0x40/0x40
      [ 6058.869673]  ret_from_fork+0x22/0x30
      [ 6058.869698] Code: 54 49 89 fc 53 48 8b 9f 18 03 00 00 0f 1f 44 00 00 41 83 bc 24 04 05 00 00 02 74 0c 41 c7 84 24 04 05 00 00 01 00 00 00 0f ae f0 <48> 8b bb f8 01 00 00 48 85 ff 74 5c e8 df 40 f0 e0 48 8b 93 f8
      [ 6058.869850] RIP: dvb_frontend_stop+0x30/0xd0 [dvb_core] RSP: ffffc90003077b58
      [ 6058.869894] CR2: 00000000000001f8
      [ 6058.875880] ---[ end trace 717eecf7193b3fc6 ]---
    
    Signed-off-by: Matthias Schwarzott <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 9ea57316a5da7d3c203e7a82d1a9a4055515b212
Author: Krzysztof Hałasa <[email protected]>
Date:   Tue Oct 17 02:12:25 2017 -0400

    media: i.MX6: Fix MIPI CSI-2 LP-11 check
    
    Bitmask for the MIPI CSI-2 data PHY status doesn't seem to be correct.
    Fix it.
    
    Signed-off-by: Krzysztof Ha?asa <[email protected]>
    Reviewed-by: Philipp Zabel <[email protected]>
    Reviewed-by: Steve Longerbeam <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 7b303d2cae8ae546d00fb6f673849fd27370bb3a
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Mon Dec 11 12:18:46 2017 -0500

    media: ddbridge: shut up a new warning
    
    drivers/media/pci/ddbridge/ddbridge-ci.c:321:5: warning: no previous prototype for 'ddb_ci_attach' [-Wmissing-prototypes]
     int ddb_ci_attach(struct ddb_port *port, u32 bitrate)
         ^~~~~~~~~~~~~
    
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 40f80610e8f68133e2283ef3cda3f26639d32f86
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:57 2017 -0400

    media: ddbridge: update driver version number
    
    Update the driver version number/string to 0.9.32-integrated.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 9cc6544718b738bd7dd2c3c885814304bab2d253
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:56 2017 -0400

    media: stv0910: read and update mod_cod in read_status()
    
    Add missing state->modcod update from upstream driver which needs to be
    done when manage_matype_info() sets is_vcm on certain S2 transponders.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 1c71450151c488bffe3de31af317113a036aa7ad
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:55 2017 -0400

    media: ddbridge/max: prefix lnb_init_fmode() and fe_attach_mxl5xx()
    
    Add a ddb_ prefix to the two functions to better avoid conflicts in the
    global namespace, ie. when building everything into the kernel image.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 2d8c98b8200d04cef573642036c213e1841fe551
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:54 2017 -0400

    media: ddbridge/max: rename ddbridge-maxs8.[c|h] to ddbridge-max.[c|h]
    
    Rename the MaxS4/8 support files following upstream. References to these
    files and descriptions have been updated aswell.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 04bdf863606fbedb41a94d006cd19e9f2ae69c3b
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:53 2017 -0400

    media: ddbridge/ci: change debug printing to debug severity
    
    slot_ts_enable_xo2() logged debug output to info instead of debug, so
    fix this up.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 70d3ae1bea1037e27686ff704f5c8b3941e66c47
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:52 2017 -0400

    media: ddbridge: split off CI (common interface) from ddbridge-core
    
    Move all CI device support related code from ddbridge-core to ddbridge-ci,
    following the previously split off MaxS4/8 support.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 757d78d35aeab1e53a9025128a14d8b63b1a2ba3
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:51 2017 -0400

    media: ddbridge: fixup checkpatch-strict issues
    
    Fixes several alignment, braces, space-before-cast, camelcase et al issues
    reported by checkpatch --strict, plus a few more checkpatch didn't report.
    
    Three checks are left after this though:
    - one CamelCase in ddbridge-core, related to defines/vars/enums referenced
      from the stv090x demod driver
    - one macro argument reuse in ddbridge-core aswell
    - one unbalanced braces around else in ddbridge-main, which is due to
      #ifdefs related to CONFIG_PCI_MSI, which preferrably should be kept
      as-is for readability.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 1d8343aa35b11dba89dc8f6855157200c51f606c
Author: Daniel Scheller <[email protected]>
Date:   Sun Oct 15 16:51:50 2017 -0400

    media: ddbridge: remove unneeded *fe vars from attach functions
    
    These are only used in C/T demod attach functions, don't add any real
    benefit (ie. line length savings) and in case of cxd28xx_attach aren't
    even used consequently. Remove them.
    
    Signed-off-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 2919d12de52106279b92a75e9a6788b5c668a159
Author: Mauro Carvalho Chehab <[email protected]>
Date:   Sun Oct 15 14:54:52 2017 -0400

    media:  mxl5xx: fix tuning logic
    
    The tuning logic is broken with regards to status report:
    it relies on a previously-cached value that may not be valid
    if re-tuned.
    
    Change the logic to always read the status.
    
    Acked-by: Daniel Scheller <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 19326ef0874e8fdcf4d6d6fe97e85b2dac69a954
Author: Akinobu Mita <[email protected]>
Date:   Thu Oct 12 12:03:34 2017 -0400

    media: dt-bindings: media: xilinx: fix typo in example
    
    Fix typo s/:/;/
    
    Cc: Rob Herring <[email protected]>
    Cc: Hyun Kwon <[email protected]>
    Signed-off-by: Akinobu Mita <[email protected]>
    Acked-by: Rob Herring <[email protected]>
    Reviewed-by: Laurent Pinchart <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 4f1bdf0a75a4d16149c470800d8c4bf3da13e92d
Author: Maciej S. Szmigiero <[email protected]>
Date:   Tue Oct 10 17:35:37 2017 -0400

    media: cx25840: fix a possible divide by zero in set_fmt callback
    
    If set_fmt callback is called with format->width or format->height set to
    zero and HACTIVE_CNT or VACTIVE_CNT bits (respectively) in chip are zero
    we will divide by zero later in this callback when we try to calculate
    HSC or VSC values.
    
    Fix this by explicitly rejecting these values.
    
    Signed-off-by: Maciej S. Szmigiero <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 7ff061303382ed4151ff6932a9f356f6aac0bc4a
Author: Maciej S. Szmigiero <[email protected]>
Date:   Tue Oct 10 17:34:58 2017 -0400

    media: cx25840: describe standard for 0b1100 value in AFD_FMT_STAT bits
    
    A 0b1100 value in 4 LSBs of "General Status 1" register (AFD_FMT_STAT) has
    known meaning for CX2584x-series chips - it means that a SECAM signal is
    currently detected by the chip.
    
    Use this opportunity to also fix wrong binary values that were present
    as comments attached to some entries in an array where
    chip register -> V4L2 standard mappings are stored.
    
    Signed-off-by: Maciej S. Szmigiero <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 37ea9830139b321497640b6d8fe93bb2fe00d1f6
Author: Russell King <[email protected]>
Date:   Fri Sep 29 17:41:59 2017 -0400

    media: imx-csi: fix burst size
    
    Setting a burst size of "8" doesn't work for IMX219 with 8-bit bayer,
    but a burst size of "16" does.  Fix this.
    
    Signed-off-by: Russell King <[email protected]>
    Acked-by: Philipp Zabel <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit 7d4b6f5590b47b8bc040d63863088d67a9fb17f4
Author: Russell King <[email protected]>
Date:   Fri Sep 29 17:38:39 2017 -0400

    media: staging/imx: fix complete handler
    
    The complete handler walks all entities, expecting to find an imx
    subdevice for each and every entity.
    
    However, camera drivers such as smiapp can themselves contain multiple
    entities, for which there will not be an imx subdevice.  This causes
    imx_media_find_subdev_by_sd() to fail, making the imx capture system
    unusable with such cameras.
    
    Work around this by killing the error entirely, thereby allowing
    the imx capture to be used with such cameras.
    
    Signed-off-by: Russell King <[email protected]>
    Acked-by: Steve Longerbeam <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>

commit a38867305203ef5a27f0c9ff1e943a0c2fabdbce
Author: Adam Ford <[email protected]>
Date:   Thu Nov 30 18:23:01 2017 -0600

    ARM: dts: Move move WiFi bindings to logicpd-torpedo-37xx-devkit
    
    The newly added OMAP35xx Torpedo does not have a WiFi option, so
    this patch moves the WL1283 binding and pin muxing to the
    logicpd-torpedo-37xx-devkit since it's only applicable on that SOM
    
    Signed-off-by: Adam Ford <[email protected]>
    Signed-off-by: Tony Lindgren <[email protected]>

commit 1e5540b61ec8c885a9a1cb0b317dc37caedd8bc9
Author: Adam Ford <[email protected]>
Date:   Thu Nov 30 05:46:51 2017 -0600

    ARM: dts: Add minimal support for LogicPD OMAP35xx Torpedo devkit
    
    With the common baseboard info moved into its own file and the
    common torpedo already in its own file, we can very easily
    create a new devkit specific for the OMAP35xx.
    
    Signed-off-by: Adam Ford <[email protected]>
    Signed-off-by: Tony Lindgren <[email protected]>

commit 739f85bba5ab75e053a7da5f06d4944722782a21
Author: Adam Ford <[email protected]>
Date:   Thu Nov 30 05:46:50 2017 -0600

    ARM: dts: Move most of logicpd-torpedo-37xx-devkit to logicpd-torpedo-baseboard
    
    The Development kits consist of a SOM connected to a baseboard.  Moving most
    of the devkit files to baseboard allow us to re-use much of the contents in
    preparation for using it on the OMAP35xx varation of the same kit.
    
    Signed-off-by: Adam Ford <[email protected]>
    Signed-off-by: Tony Lindgren <[email protected]>

commit f8a2e3ff7103ed98016ba2dbea0c475edef2879f
Author: Adam Ford <[email protected]>
Date:   Mon Nov 20 09:10:59 2017 -0600

    ARM: dts: Add minimal support for LogicPD OMAP35xx SOM-LV devkit
    
    With the common baseboard info moved into its own file and the common SOM-LV
    already in its own file, we can very easily create a new devkit specific
    for the OMAP35xx.
    
    Signed-off-by: Adam Ford <[email protected]>
    Signed-off-by: Tony Lindgren <[email protected]>

commit 5cb8b0fa55a9cb60587ad0c7801bc83418248883
Author: Adam Ford <[email protected]>
Date:   Mon Nov 20 09:10:58 2017 -0600

    ARM: dts: Move most of logicpd-som-lv-37xx-devkit.dts to logicpd-som-lv-baseboard.dtsi
    
    The Development kits consist of a SOM connected to a baseboard.  Moving most
    of the devkit files to baseboard allow us to re-use much of the contents in
    preparation for using it on the OMAP35xx varation of the same kit.
    
    Signed-off-by: Adam Ford <[email protected]>
    [[email protected]: updated to apply on recent gpmc range fixes]
    Signed-off-by: Tony Lindgren <[email protected]>

commit b92326a04071ed5a02bc31c2359da2cdadde743c
Author: Chris Wilson <[email protected]>
Date:   Sat Dec 9 12:47:10 2017 +0000

    drm/i915: Only report a wakeup if the waiter was truly asleep
    
    If we attempt to wake up a waiter, who is currently checking the seqno
    it will be in the TASK_INTERRUPTIBLE state and ttwu will report success.
    However, it is actually awake and functioning -- so delay reporting the
    actual wake up until it sleeps. This fixes some spurious claims of
    missed_breadcrumbs when running under heavy load; i.e. sufficient load to
    preempt away the newly woken waiter before they complete their checks.
    However, it does so at the cost of a rare false negative; where the
    waiter changes between the check and ttwu -- the only way to fix that
    would be to extend the reporting from ttwu where the check could be done
    atomically.
    
    v2: Defend against !CONFIG_SMP
    v3: Don't filter out calls to wake_up_process
    v4: Drop risky microoptimisation to skip wakeups
    
    Testcase: igt/drv_missed_irq # sanity check we do detect missed_breadcrumb()
    Testcase: igt/gem_concurrent_blit # for generating false positives
    References: https://bugs.freedesktop.org/show_bug.cgi?id=100007
    Signed-off-by: Chris Wilson <[email protected]>
    Cc: Tvrtko Ursulin <[email protected]>
    Cc: Joonas Lahtinen <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Reviewed-by: Tvrtko Ursulin <[email protected]>

commit 1239738fa303446bb3a766d8149eacbbfb0984b6
Author: Peter Ujfalusi <[email protected]>
Date:   Wed Nov 8 14:53:23 2017 +0200

    ARM: dts: dra7: Add missing hdmi audio DMA channel information
    
    The audio DMA request for hdmi is crossbar 76 and we use sDMA
    to handle the data transfer.
    
    Signed-off-by: Peter Ujfalusi <[email protected]>
    Signed-off-by: Tony Lindgren <[email protected]>

commit 92a54f4a47a348de03ed946b38b8c2b33ec8548a
Author: Carl Heymann <[email protected]>
Date:   Fri Dec 8 19:37:04 2017 -0800

    nfp: debug dump - decrease endian conversions
    
    Convert the requested dump level parameter to big-endian at the start of
    nfp_net_dump_calculate_size() and nfp_net_dump_populate_buffer(), then
    compare and assign it directly where needed in the traversal and prolog
    code. This decreases the total number of conversions used.
    
    Signed-off-by: Carl Heymann <[email protected]>
    Reviewed-by: Jakub Kicinski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 197171e5badbed907b535aeb82dbf9cdeb014afd
Author: John Hurley <[email protected]>
Date:   Fri Dec 8 19:37:03 2017 -0800

    nfp: flower: remove unused defines
    
    Delete match field defines that are not supported at this time.
    
    Signed-off-by: John Hurley <[email protected]>
    Reviewed-by: Dirk van der Merwe <[email protected]>
    Reviewed-by: Jakub Kicinski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit a427673e1f9454a68bce3afadcde0c7acede4575
Author: John Hurley <[email protected]>
Date:   Fri Dec 8 19:37:02 2017 -0800

    nfp: flower: remove dead code paths
    
    Port matching is selected by default on every rule so remove check for it
    and delete 'else' side of the statement. Remove nfp_flower_meta_one as now
    it will not feature in the code. Rename nfp_flower_meta_two given that one
    has been removed.
    
    'Additional metadata' if statement can never be true so remove it as well.
    
    Signed-off-by: John Hurley <[email protected]>
    Reviewed…
damentz referenced this pull request in zen-kernel/zen-kernel Feb 24, 2018
commit 72c27a6 upstream.

As syzkaller detected, pvrusb2 driver submits bulk urb withount checking
the the endpoint type is actually blunk. Add a check.

usb 1-1: BOGUS urb xfer, pipe 3 != type 1
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2713 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0
Modules linked in:
CPU: 1 PID: 2713 Comm: pvrusb2-context Not tainted
4.14.0-rc1-42251-gebb2c2437d80 #210
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff88006b7a18c0 task.stack: ffff880069978000
RIP: 0010:usb_submit_urb+0xf8a/0x11d0 drivers/usb/core/urb.c:448
RSP: 0018:ffff88006997f990 EFLAGS: 00010286
RAX: 0000000000000029 RBX: ffff880063661900 RCX: 0000000000000000
RDX: 0000000000000029 RSI: ffffffff86876d60 RDI: ffffed000d32ff24
RBP: ffff88006997fa90 R08: 1ffff1000d32fdca R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1000d32ff39
R13: 0000000000000001 R14: 0000000000000003 R15: ffff880068bbed68
FS:  0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001032000 CR3: 000000006a0ff000 CR4: 00000000000006f0
Call Trace:
 pvr2_send_request_ex+0xa57/0x1d80 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3645
 pvr2_hdw_check_firmware drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1812
 pvr2_hdw_setup_low drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2107
 pvr2_hdw_setup drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2250
 pvr2_hdw_initialize+0x548/0x3c10 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2327
 pvr2_context_check drivers/media/usb/pvrusb2/pvrusb2-context.c:118
 pvr2_context_thread_func+0x361/0x8c0 drivers/media/usb/pvrusb2/pvrusb2-context.c:167
 kthread+0x3a1/0x470 kernel/kthread.c:231
 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
Code: 48 8b 85 30 ff ff ff 48 8d b8 98 00 00 00 e8 ee 82 89 fe 45 89
e8 44 89 f1 4c 89 fa 48 89 c6 48 c7 c7 40 c0 ea 86 e8 30 1b dc fc <0f>
ff e9 9b f7 ff ff e8 aa 95 25 fd e9 80 f7 ff ff e8 50 74 f3
---[ end trace 6919030503719da6 ]---

Signed-off-by: Andrey Konovalov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
heftig referenced this pull request in zen-kernel/zen-kernel Feb 25, 2018
commit 72c27a6 upstream.

As syzkaller detected, pvrusb2 driver submits bulk urb withount checking
the the endpoint type is actually blunk. Add a check.

usb 1-1: BOGUS urb xfer, pipe 3 != type 1
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2713 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0
Modules linked in:
CPU: 1 PID: 2713 Comm: pvrusb2-context Not tainted
4.14.0-rc1-42251-gebb2c2437d80 #210
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff88006b7a18c0 task.stack: ffff880069978000
RIP: 0010:usb_submit_urb+0xf8a/0x11d0 drivers/usb/core/urb.c:448
RSP: 0018:ffff88006997f990 EFLAGS: 00010286
RAX: 0000000000000029 RBX: ffff880063661900 RCX: 0000000000000000
RDX: 0000000000000029 RSI: ffffffff86876d60 RDI: ffffed000d32ff24
RBP: ffff88006997fa90 R08: 1ffff1000d32fdca R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1000d32ff39
R13: 0000000000000001 R14: 0000000000000003 R15: ffff880068bbed68
FS:  0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001032000 CR3: 000000006a0ff000 CR4: 00000000000006f0
Call Trace:
 pvr2_send_request_ex+0xa57/0x1d80 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3645
 pvr2_hdw_check_firmware drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1812
 pvr2_hdw_setup_low drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2107
 pvr2_hdw_setup drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2250
 pvr2_hdw_initialize+0x548/0x3c10 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2327
 pvr2_context_check drivers/media/usb/pvrusb2/pvrusb2-context.c:118
 pvr2_context_thread_func+0x361/0x8c0 drivers/media/usb/pvrusb2/pvrusb2-context.c:167
 kthread+0x3a1/0x470 kernel/kthread.c:231
 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
Code: 48 8b 85 30 ff ff ff 48 8d b8 98 00 00 00 e8 ee 82 89 fe 45 89
e8 44 89 f1 4c 89 fa 48 89 c6 48 c7 c7 40 c0 ea 86 e8 30 1b dc fc <0f>
ff e9 9b f7 ff ff e8 aa 95 25 fd e9 80 f7 ff ff e8 50 74 f3
---[ end trace 6919030503719da6 ]---

Signed-off-by: Andrey Konovalov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
frank-w referenced this pull request in frank-w/BPI-Router-Linux Feb 25, 2018
commit 72c27a6 upstream.

As syzkaller detected, pvrusb2 driver submits bulk urb withount checking
the the endpoint type is actually blunk. Add a check.

usb 1-1: BOGUS urb xfer, pipe 3 != type 1
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2713 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0
Modules linked in:
CPU: 1 PID: 2713 Comm: pvrusb2-context Not tainted
4.14.0-rc1-42251-gebb2c2437d80 #210
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff88006b7a18c0 task.stack: ffff880069978000
RIP: 0010:usb_submit_urb+0xf8a/0x11d0 drivers/usb/core/urb.c:448
RSP: 0018:ffff88006997f990 EFLAGS: 00010286
RAX: 0000000000000029 RBX: ffff880063661900 RCX: 0000000000000000
RDX: 0000000000000029 RSI: ffffffff86876d60 RDI: ffffed000d32ff24
RBP: ffff88006997fa90 R08: 1ffff1000d32fdca R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1000d32ff39
R13: 0000000000000001 R14: 0000000000000003 R15: ffff880068bbed68
FS:  0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001032000 CR3: 000000006a0ff000 CR4: 00000000000006f0
Call Trace:
 pvr2_send_request_ex+0xa57/0x1d80 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3645
 pvr2_hdw_check_firmware drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1812
 pvr2_hdw_setup_low drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2107
 pvr2_hdw_setup drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2250
 pvr2_hdw_initialize+0x548/0x3c10 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2327
 pvr2_context_check drivers/media/usb/pvrusb2/pvrusb2-context.c:118
 pvr2_context_thread_func+0x361/0x8c0 drivers/media/usb/pvrusb2/pvrusb2-context.c:167
 kthread+0x3a1/0x470 kernel/kthread.c:231
 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
Code: 48 8b 85 30 ff ff ff 48 8d b8 98 00 00 00 e8 ee 82 89 fe 45 89
e8 44 89 f1 4c 89 fa 48 89 c6 48 c7 c7 40 c0 ea 86 e8 30 1b dc fc <0f>
ff e9 9b f7 ff ff e8 aa 95 25 fd e9 80 f7 ff ff e8 50 74 f3
---[ end trace 6919030503719da6 ]---

Signed-off-by: Andrey Konovalov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
mrchapp pushed a commit to mrchapp/linux that referenced this pull request Apr 9, 2018
Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    torvalds#210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        torvalds#212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     torvalds#214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       torvalds#215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    torvalds#217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    torvalds#219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    torvalds#220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    torvalds#221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
heftig referenced this pull request in zen-kernel/zen-kernel Apr 19, 2018
commit 082f230 upstream.

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    #210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   #211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        #212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   #213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     #214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       #215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  #216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    #217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  #218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    #219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    #220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    #221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
pascalhuerst pushed a commit to nonlinear-labs-dev/linux that referenced this pull request Apr 19, 2018
commit 082f230 upstream.

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    torvalds#210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        torvalds#212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     torvalds#214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       torvalds#215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    torvalds#217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    torvalds#219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    torvalds#220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    torvalds#221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
damentz referenced this pull request in zen-kernel/zen-kernel Apr 20, 2018
commit 082f230 upstream.

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    #210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   #211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        #212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   #213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     #214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       #215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  #216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    #217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  #218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    #219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    #220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    #221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Noltari pushed a commit to Noltari/linux that referenced this pull request Apr 20, 2018
commit 082f230 upstream.

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    torvalds#210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        torvalds#212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     torvalds#214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       torvalds#215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    torvalds#217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    torvalds#219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    torvalds#220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    torvalds#221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Noltari pushed a commit to Noltari/linux that referenced this pull request Jul 3, 2018
commit 082f230 upstream.

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    torvalds#210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        torvalds#212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     torvalds#214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       torvalds#215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    torvalds#217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    torvalds#219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    torvalds#220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    torvalds#221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
fbertux pushed a commit to OSSystems/linux that referenced this pull request Feb 1, 2021
Update 5.10.x+fslc to v5.10.5 and v5.10.6
dasty pushed a commit to StreamUnlimited/linux that referenced this pull request Feb 5, 2021
… [STREAMEIGHT-4396]

commit 082f230 upstream.
commit b0a2a2b upstream (4.9 stable).

Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.

This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6          #11350 [hci0] 84680.231216
        Address: 56:BC:E8:24:11:68 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4                        #11351 [hci0] 84680.246022
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7         #11352 [hci0] 84680.246417
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                        #11353 [hci0] 84680.248854
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11354 [hci0] 84680.249466
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                        #11355 [hci0] 84680.253222
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                          #11356 [hci0] 84680.458387
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
          Identity type: Random (0x01)
          Identity: F2:F1:06:3D:9C:42 (Static)
        RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2             #11357 [hci0] 84680.458737
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                        #11358 [hci0] 84680.469982
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25          #11359 [hci0] 84680.470444
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 53:38:DA:46:8C:45 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                          #11360 [hci0] 84680.474971
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0    #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4                        #11362 [hci0] 84682.551014
      LE Create Connection Cancel (0x08|0x000e) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                          #11363 [hci0] 84682.551074
      LE Connection Complete (0x01)
        Status: Unknown Connection Identifier (0x02)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection interval: 0.00 msec (0x0000)
        Connection latency: 0 (0x0000)
        Supervision timeout: 0 msec (0x0000)
        Master clock accuracy: 0x00

After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7    torvalds#210 [hci0] 667.152459
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#211 [hci0] 667.153613
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2        torvalds#212 [hci0] 667.153704
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                   torvalds#213 [hci0] 667.154584
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18                     torvalds#214 [hci0] 667.182619
      LE Direct Advertising Report (0x0b)
        Num reports: 1
        Event type: Connectable directed - ADV_DIRECT_IND (0x01)
        Address type: Random (0x01)
        Address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Direct address type: Random (0x01)
        Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
        RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2       torvalds#215 [hci0] 667.182704
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#216 [hci0] 667.183599
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6    torvalds#217 [hci0] 667.183645
        Address: 7C:C1:57:A5:B7:A8 (Resolvable)
          Identity type: Random (0x01)
          Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4                  torvalds#218 [hci0] 667.184590
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25    torvalds#219 [hci0] 667.184613
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Own address type: Random (0x01)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                    torvalds#220 [hci0] 667.186558
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                    torvalds#221 [hci0] 667.485824
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 0
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: 50:52:D9:A6:48:A0 (Resolvable)
          Identity type: Public (0x00)
          Identity: 11:22:33:44:55:66 (OUI 11-22-33)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13          {0x0002} [hci0] 667.485996
        LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
        Flags: 0x00000000
        Data length: 0

Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Quentin Schulz <[email protected]>
chombourger pushed a commit to chombourger/linux that referenced this pull request Feb 16, 2021
…from plsdk-3161-3162-3165-3166 to processor-sdk-linux-4.19.y

* commit 'a77845b1fe5a134fd06a29c1a749ccc49bbae9a3':
  net: ti: prueth: In switch mode learn FDB also if only port is different
  net: ti: prueth: relocate switch related code
  net: ti: prueth: switch purge fdb when port stp state is changed
  net: ti: prueth: switch does not have priority timestamp
  net: ti: prueth: switch cancels timer in PRU stop
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 15, 2021
This commit fixes the following checkpatch.pl errors:

    ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
    torvalds#210: FILE: ./include/drv_types.h:210:
    +#define RGTRY_SZ(field)   sizeof(((struct registry_priv*) 0)->field)

    ERROR:POINTER_LOCATION: "foo *		bar" should be "foo *bar"
    torvalds#404: FILE: ./include/drv_types.h:404:
    +	void *		HalData;

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#432: FILE: ./include/drv_types.h:432:
    +	void (*intf_start)(struct adapter * adapter);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#433: FILE: ./include/drv_types.h:433:
    +	void (*intf_stop)(struct adapter * adapter);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#435: FILE: ./include/drv_types.h:435:
    +	struct net_device * pnetdev;

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#440: FILE: ./include/drv_types.h:440:
    +		struct net_device * old_pnetdev;

Signed-off-by: Marco Cesati <[email protected]>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 16, 2021
This commit fixes the following checkpatch.pl errors:

    ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
    torvalds#210: FILE: ./include/drv_types.h:210:
    +#define RGTRY_SZ(field)   sizeof(((struct registry_priv*) 0)->field)

    ERROR:POINTER_LOCATION: "foo *		bar" should be "foo *bar"
    torvalds#404: FILE: ./include/drv_types.h:404:
    +	void *		HalData;

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#432: FILE: ./include/drv_types.h:432:
    +	void (*intf_start)(struct adapter * adapter);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#433: FILE: ./include/drv_types.h:433:
    +	void (*intf_stop)(struct adapter * adapter);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#435: FILE: ./include/drv_types.h:435:
    +	struct net_device * pnetdev;

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#440: FILE: ./include/drv_types.h:440:
    +		struct net_device * old_pnetdev;

Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Marco Cesati <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ojeda added a commit to ojeda/linux that referenced this pull request Apr 22, 2021
rust: doc: Replace a ref tag in doc-guide/kernel-doc.rst
RadxaStephen added a commit to RadxaStephen/linux that referenced this pull request Mar 6, 2024
Changes:
  * Radxa CM3 + RPI CM4 IO: Add gpiod label

Signed-off-by: Stephen Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants