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

rockchip isp1 driver #33

Closed
wzyy2 opened this issue Aug 31, 2017 · 22 comments
Closed

rockchip isp1 driver #33

wzyy2 opened this issue Aug 31, 2017 · 22 comments

Comments

@wzyy2
Copy link
Contributor

wzyy2 commented Aug 31, 2017

Rockchip ISP1 driver is a new isp driver for rockchip rk3288/rk3399 SoC, we might use it in future for all linux-kernel based OS, including Android, ChromeOS, Linux......
It's writen in standard v4l2, will be compatible with upstream sensor driver.
The development will be last until 2018.04, i hope we could have a working driver, camera hal3, gstreamer plugin at that time.

If you find something is missing in this driver, maybe you could help us add it. ; - p
e.g: MIPI TXRX, you can refer to https://github.com/rockchip-linux/kernel/tree/release-4.4/drivers/media/platform/rk-isp10

At present we have some working drivers for linux, but i recommend to not use them especially you don't have commercial support, since it's also buggy and no one can help you......

Status

I have push the new MIPI CSI driver to isp-early-access branch.
https://github.com/rockchip-linux/kernel/tree/isp-early-access

upstream status:
https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7231

I will maintain this branch until the driver be merged into Rockchip 4.4 kernel/Upstream kernel/ChromeOS kernel.
Report bugs are welcome.

Missing feature in this new driver:

  • No MIPI-TXRX/ DVP support
  • No 3A support

TODO in kernel 4.4:

  • Test isp0/isp1 in rk3399 and add dts node
  • Test dual isp in rk3399

Test in:

  • Tinker Board + imx219/ov5647
  • Firefly + HDMI_IN
@nova-wenbo
Copy link

What is the configuration file for the kernel?

@wzyy2
Copy link
Contributor Author

wzyy2 commented Sep 6, 2017

803f78e

@nova-wenbo
Copy link

thank you

@Ribonn
Copy link

Ribonn commented Oct 10, 2017

Hi:

I have a question about the return value of the function rkisp1_irq_handler() in the file drivers/media/platform/rockchip-isp1/dev.c.

I think it should return IRQ_HANDLED other than IRQ_NONE, that is:
--- a/drivers/media/platform/rockchip-isp1/dev.c
+++ b/drivers/media/platform/rockchip-isp1/dev.c
@@ -554,7 +554,7 @@ static irqreturn_t rkisp1_irq_handler(int irq, void *cntxt)

    /* TODO: update crop & resize */
    clr_all_int(base);
  •   return IRQ_NONE;
    
  •   return IRQ_HANDLED;
    

}

When the function returns IRQ_NONE, the kernel will output these logs:
[ 661.702947] irq 49: nobody cared (try booting with the "irqpoll" option)
[ 661.709667] CPU: 0 PID: 919 Comm: rkcamsrc0:src Not tainted 4.4.83 #1
[ 661.716107] Hardware name: Rockchip (Device Tree)
[ 661.720847] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 661.728607] [] (show_stack) from [] (dump_stack+0x84/0xa0)
[ 661.735845] [] (dump_stack) from [] (__report_bad_irq+0x34/0xcc)
[ 661.743602] [] (__report_bad_irq) from [] (note_interrupt+0x1f4/0x29c)
[ 661.751878] [] (note_interrupt) from [] (handle_irq_event_percpu+0x1d4/0x250)
[ 661.760759] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x48/0x6c)
[ 661.769637] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xb8/0x134)
[ 661.778168] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x28/0x38)
[ 661.786788] [] (generic_handle_irq) from [] (__handle_domain_irq+0x9c/0xc4)
[ 661.795492] [] (__handle_domain_irq) from [] (gic_handle_irq+0x60/0xa4)
[ 661.803849] [] (gic_handle_irq) from [] (__irq_usr+0x54/0x80)
[ 661.811329] Exception stack(0xec781fb0 to 0xec781ff8)
[ 661.816386] 1fa0: 00000008 c06864b8 b5bfe658 00000000
[ 661.824568] 1fc0: 00000000 b5bfe658 c06864b8 00000008 b5bfe7cc b5bfe658 00000008 00000280
[ 661.832747] 1fe0: b664315c b5bfe628 b662d567 b662cae0 800f0010 ffffffff
[ 661.839358] handlers:
[ 661.841645] [] rkisp1_irq_handler
[ 661.845844] Disabling IRQ #49
[ 772.802163] rkisp1: isp icr frame end err: 0x22
[ 1467.402200] rkisp1: isp icr v_statr err: 0x62
root@linaro-alip:~# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
16: 79634 36933 56554 67736 GIC 29 Edge arch_timer
17: 0 0 0 0 GIC 30 Edge arch_timer
20: 0 0 0 0 GIC 98 Level rk_timer
25: 0 0 0 0 GIC 34 Level ff250000.dma-controller
26: 0 0 0 0 GIC 35 Level ff250000.dma-controller
27: 201 0 0 0 GIC 32 Level ffb20000.dma-controller
28: 0 0 0 0 GIC 33 Level ffb20000.dma-controller
29: 0 0 0 0 GIC 64 Level dw-mci
30: 14530 0 0 0 GIC 65 Level dw-mci
31: 14446 0 0 0 GIC 67 Level dw-mci
32: 0 0 0 0 GIC 68 Level ff100000.saradc
34: 3060 0 0 0 GIC 92 Level ff650000.i2c
35: 943 0 0 0 GIC 94 Level ff140000.i2c
36: 0 0 0 0 GIC 96 Level ff160000.i2c
39: 1604 0 0 0 GIC 89 Level serial
41: 0 0 0 0 GIC 69 Level rockchip_thermal
42: 4686 0 0 0 GIC 59 Level eth0
43: 0 0 0 0 GIC 60 Level eth0
44: 12571514 0 0 0 GIC 57 Level ff540000.usb, dwc2_hsotg:usb1
45: 0 0 0 0 GIC 55 Level ff580000.usb, ff580000.usb, dwc2_hsotg:usb2
46: 0 0 0 0 GIC 93 Level ff660000.i2c
49: 100001 0 0 0 GIC 46 Level rkisp1
50: 0 0 0 0 GIC 50 Level ff920000.rga
51: 88825 0 0 0 GIC 47 Level ff930000.vop, ff930000.vop
52: 0 0 0 0 GIC 48 Level ff940000.vop
53: 1544 0 0 0 GIC 135 Level ff980000.hdmi
54: 0 0 0 0 GIC 41 Level ff9a0000.vpu-service
55: 0 0 0 0 GIC 42 Level ff9a0000.vpu-service
57: 0 0 0 0 GIC 44 Level ff9c0000.hevc-service
59: 7561 0 0 0 GIC 38 Level ffa30000.gpu
60: 0 0 0 0 GIC 39 Level ffa30000.gpu
61: 14065 0 0 0 GIC 40 Level ffa30000.gpu

@wzyy2
Copy link
Contributor Author

wzyy2 commented Oct 11, 2017

Thanks.
It should return IRQ_HANDLED, I will add this change.

@axendev
Copy link

axendev commented Oct 24, 2017

What changes should I make in DTS for rk3399 ?
I have tried do some changes to my DTS file (rk3399-firefly-linux.dts) according to this commit: a804db4 , but it rises compile-error "mipi_phy_rx0 not defined".

...
&mipi_phy_rx0 {      // There is no definition of lable 'mipi_phy_rx0'
	bus-width = <4>;
	status = "okay";
	port {
		isp_mipi_in: endpoint {
			remote-endpoint = <&camera_out>;
		};
	};
};

For rk3299 mipi_phy_rx0 is defined within 'cif_isp0: cif_isp@ff910000' node in rk3288.dtsi (https://github.com/rockchip-linux/kernel/blob/isp-early-access/arch/arm/boot/dts/rk3288.dtsi#L1126), but 'cif_isp0: cif_isp@ff910000' node in rk3399-linux.dtsi does not contains 'mipi_phy_rx0' (https://github.com/rockchip-linux/kernel/blob/isp-early-access/arch/arm64/boot/dts/rockchip/rk3399-linux.dtsi#L60). Should I modify 'cif_isp0: cif_isp@ff910000' node in rk3399-linux.dtsi like in rk3288.dtsi ?

@wzyy2
Copy link
Contributor Author

wzyy2 commented Oct 24, 2017

@axendev
Copy link

axendev commented Oct 24, 2017

Thank you very much.
Can you tell me how I can test this driver in linux? Should I use 'v4l2-ctl' util for this purpose ?

@wzyy2
Copy link
Contributor Author

wzyy2 commented Oct 24, 2017

@axendev
Copy link

axendev commented Nov 16, 2017

Does rk3399 linux kernel support dual mipi port for ovXXX camera? #47

yes, it should work.
I have the same rk3399-firely board but with two imx219 cameras. I modified rockchip-isp1 sources (according to rk-isp10) in order to add mipi-tx1rx1 support. Now it works for each of the two cameras separately (using mipidphy_rx0+isp0 or mipidphy_tx1rx1+isp1). There are several problems with supporting two cameras simultaneously.
Firstly, both mipi-conectors on firefly`s board use the same i2c bus, unfortunately the imx219 cameras have identical i2c slave-address and have neither Chip-Select pins nor documented ability of changing slave-addr, so I use external i2c bus switchers IC (each has "enable" pin connected to RK3399 GPIO and controlled by imx219 i2c-driver) to provide switching between several cameras. You might need the same for ovXXX cameras.
The current task is to create the correct device-tree nodes for cameras and change the imx219.c i2c-driver to work with them. It is not acceptable to simply create two child-nodes (in 'i2c1' node) for each camera, because both cameras have the same slave address so both camera's nodes will be with identical reg property ("reg" property describes slave address in case of i2c device nodes) which will causes that only one camera will be recognized and probed.
If you need, I can provide my sources after I solve these problems.

@gangm
Copy link

gangm commented Nov 20, 2017

@axendev , thanks for your recommend and guide, do you mean that I should modify the rockchip-isp1 soures to connect ov cameras? And I should also add the the ov camera's i2c code in the i2c node dir? If you have the worked code, can you provide your sources? Thanks very much! (my email: 565489195@qq.com / gmgtiger510@163.com)

@teseo-sw
Copy link

teseo-sw commented Nov 22, 2017

I use a single ov5647 sensor on rk3288. I managed to setup the kernel and the dts to the point I'm able to probe the sensor correctly:

root@ptam8:~# dmesg | grep ov5647
[    3.206161] i2c i2c-3: of_i2c: register /i2c@ff150000/ov5647@36
[    3.206324] i2c i2c-3: client [ov5647] registered with bus id 3-0036
[    3.305985] ov5647 3-0036: probe
[    3.308437] ov5647 3-0036: OmniVision ov5647 camera driver probed

However, when I try to capture frames the sensor seems to lose power and i2c r/w returns -6:

root@ptam8:~# v4l2-ctl --verbose -d /dev/video0 --stream-mmap=2 --stream-to=/tmp/stream.out --stream-count=60 --stream-poll
VIDIOC_QUERYCAP: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QUERYBUF: ok
[  921.474910] rkisp1-isp-subdev: 107: name rkisp1-isp-subdev,on 1
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
[  921.486844] ov5647 3-0036: 107: name ov5647 3-0036,on 1
[  921.507757] ov5647 3-0036: Camera not available, check Power
[  921.514093] rockchip-sy-mipi-dphy: 107: name rockchip-sy-mipi-dphy,on 1
[  921.523356] ------------[ cut here ]------------
[  921.528481] WARNING: CPU: 0 PID: 523 at drivers/media/v4l2-core/videobuf2-core.c:1309 vb2_start_streaming+0xe8/0x164()
[  921.540305] Modules linked in:
[  921.543679] CPU: 0 PID: 523 Comm: v4l2-ctl Not tainted 4.4.93-pTAM8_v00.01 #39
[  921.551655] Hardware name: Rockchip (Device Tree)
[  921.556864] [<c0111038>] (unwind_backtrace) from [<c010c8bc>] (show_stack+0x20/0x24)
[  921.565423] [<c010c8bc>] (show_stack) from [<c041c470>] (dump_stack+0x8c/0xa0)
[  921.573405] [<c041c470>] (dump_stack) from [<c0120054>] (warn_slowpath_common+0x94/0xc4)
[  921.582345] [<c0120054>] (warn_slowpath_common) from [<c0120140>] (warn_slowpath_null+0x2c/0x34)
[  921.592052] [<c0120140>] (warn_slowpath_null) from [<c0687230>] (vb2_start_streaming+0xe8/0x164)
[  921.601753] [<c0687230>] (vb2_start_streaming) from [<c0688f40>] (vb2_core_streamon+0x128/0x170)
[  921.611460] [<c0688f40>] (vb2_core_streamon) from [<c068af4c>] (vb2_streamon+0x40/0x60)
[  921.620304] [<c068af4c>] (vb2_streamon) from [<c068afb8>] (vb2_ioctl_streamon+0x4c/0x50)
[  921.629247] [<c068afb8>] (vb2_ioctl_streamon) from [<c06715b4>] (v4l_streamon+0x2c/0x30)
[  921.638188] [<c06715b4>] (v4l_streamon) from [<c0675988>] (__video_do_ioctl+0x294/0x2f0)
[  921.647126] [<c0675988>] (__video_do_ioctl) from [<c0675250>] (video_usercopy+0x1d4/0x654)
[  921.656257] [<c0675250>] (video_usercopy) from [<c06756f0>] (video_ioctl2+0x20/0x24)
[  921.664811] [<c06756f0>] (video_ioctl2) from [<c066ffcc>] (v4l2_ioctl+0xb0/0xe8)
[  921.672986] [<c066ffcc>] (v4l2_ioctl) from [<c024fad8>] (do_vfs_ioctl+0x4ec/0x708)
[  921.681351] [<c024fad8>] (do_vfs_ioctl) from [<c024fd70>] (SyS_ioctl+0x7c/0x8c)
[  921.689426] [<c024fd70>] (SyS_ioctl) from [<c0107bc0>] (ret_fast_syscall+0x0/0x3c)
[  921.697807] ---[ end trace e7d096a1c9e37644 ]---
VIDIOC_STREAMON: failed: No such device or address

@wzyy2
Copy link
Contributor Author

wzyy2 commented Nov 22, 2017

v4l2-ctl can't be used now since this driver use media controller api.
You have to use rkcamsrc gstreamer plugin to use this driver in linux.

@teseo-sw
Copy link

No luck with rkcamsrc either:

root@ptam8:~# gst-launch-1.0 rkcamsrc device=/dev/video0 io-mode=4 disable-3A=true 
Setting pipeline to PAUSED ...
rkcamsrc: Using ISP self path......
Pipeline is live and does[   39.989457] rkisp1-isp-subdev: 99: name rkisp1-isp-subdev,on 1
 not need PREROLL ...
Setting pipeline to PLAYING ...
New cloc[   40.000838] ov5647 3-0036: 99: name ov5647 3-0036,on 1
k: GstSystemClock
[   40.024121] ov5647 3-0036: Camera not available, check Power
[   40.030481] rockchip-sy-mipi-dphy: 99: name rockchip-sy-mipi-dphy,on 1
[   40.039652] ------------[ cut here ]------------
[   40.044782] WARNING: CPU: 1 PID: 795 at drivers/media/v4l2-core/videobuf2-core.c:1309 vb2_start_streaming+0xbc/0x138()
[   40.056606] Modules linked in:
[   40.059981] CPU: 1 PID: 795 Comm: rkcamsrc0:src Tainted: G        W       4.4.93-pTAM8_v00.01 #55
[   40.069781] Hardware name: Rockchip (Device Tree)
[   40.074998] [<c010fdf8>] (unwind_backtrace) from [<c010b9c4>] (show_stack+0x20/0x24)
[   40.083561] [<c010b9c4>] (show_stack) from [<c040488c>] (dump_stack+0x84/0xa0)
[   40.091546] [<c040488c>] (dump_stack) from [<c011dba8>] (warn_slowpath_common+0x98/0xc4)
[   40.100486] [<c011dba8>] (warn_slowpath_common) from [<c011dc90>] (warn_slowpath_null+0x2c/0x34)
[   40.110194] [<c011dc90>] (warn_slowpath_null) from [<c0827e40>] (vb2_start_streaming+0xbc/0x138)
[   40.119904] [<c0827e40>] (vb2_start_streaming) from [<c0829054>] (vb2_core_streamon+0xe0/0x13c)
[   40.129517] [<c0829054>] (vb2_core_streamon) from [<c082b410>] (vb2_streamon+0x48/0x58)
[   40.138360] [<c082b410>] (vb2_streamon) from [<c082b46c>] (vb2_ioctl_streamon+0x4c/0x50)
[   40.147305] [<c082b46c>] (vb2_ioctl_streamon) from [<c0811c80>] (v4l_streamon+0x2c/0x30)
[   40.156248] [<c0811c80>] (v4l_streamon) from [<c0817490>] (__video_do_ioctl+0x220/0x2ac)
[   40.165187] [<c0817490>] (__video_do_ioctl) from [<c0816f88>] (video_usercopy+0x2f0/0x5b4)
[   40.174318] [<c0816f88>] (video_usercopy) from [<c0817268>] (video_ioctl2+0x1c/0x24)
[   40.182873] [<c0817268>] (video_ioctl2) from [<c08107d4>] (v4l2_ioctl+0x70/0xac)
[   40.191037] [<c08107d4>] (v4l2_ioctl) from [<c0241444>] (do_vfs_ioctl+0x98/0x68c)
[   40.199306] [<c0241444>] (do_vfs_ioctl) from [<c0241a94>] (SyS_ioctl+0x5c/0x80)
[   40.207382] [<c0241a94>] (SyS_ioctl) from [<c01071c0>] (ret_fast_syscall+0x0/0x3c)
[   40.215778] ---[ end trace 8f8b1f5b2904f232 ]---
ERROR: from element /GstPipeline:pipeline0/GstRKCamSrc:rkcamsrc0: Could not read from resource.
Additional debug info:
../../../git/gst/rkv4l2/v4l2/gstv4l2bufferpool.c(1064): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstRKCamSrc:rkcamsrc0:
poll error 1: No such device or address (6)
Execution ended after 0:00:00.233954583
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

dts: https://gist.github.com/teseo-sw/ff8641adf0733078b8053448b9303ccb

@wzyy2
Copy link
Contributor Author

wzyy2 commented Nov 27, 2017

check /usr/local/bin/test_camera.sh

@wzyy2
Copy link
Contributor Author

wzyy2 commented Nov 30, 2017

I add a new wiki page for rockchip-isp1.
http://opensource.rock-chips.com/wiki_Rockchip-isp1

@idreamerhx
Copy link

idreamerhx commented Dec 1, 2017

@axendev @wzyy2 thanks for your commit and feedback. I'm working on firefly rk3399 I'm not sure about how to config (or merge) rk3399.dtsi and rk3399-firefly-linux.dts based on chromeos commits. Would you please give me some hint, help or a working copy.

I have 2 ov13850, 1 imx214 and 1 ov5647.

@Triuman
Copy link

Triuman commented Jan 1, 2018

Will we be able to use IMX219 on TinkerBoard with all features including 3A by 2018.04?

@eddiecailinux
Copy link

No promise. Business should go business way. Here is community

@wzyy2
Copy link
Contributor Author

wzyy2 commented Jan 11, 2018

The driver is merged to release-4.4, so close this issues and delete isp-early-access branch.

3A support on Linux is still in develop.I have add a experimental version to rkcamsrc plugin, but it don't work very well.

@wzyy2 wzyy2 closed this as completed Jan 11, 2018
Kwiboo referenced this issue in Kwiboo/linux-rockchip Feb 26, 2018
do_task_stat() calls get_wchan(), which further does unwind_frame().
unwind_frame() restores frame->pc to original value in case function
graph tracer has modified a return address (LR) in a stack frame to hook
a function return. However, if function graph tracer has hit a filtered
function, then we can't unwind it as ftrace_push_return_trace() has
biased the index(frame->graph) with a 'huge negative'
offset(-FTRACE_NOTRACE_DEPTH).

Moreover, arm64 stack walker defines index(frame->graph) as unsigned
int, which can not compare a -ve number.

Similar problem we can have with calling of walk_stackframe() from
save_stack_trace_tsk() or dump_backtrace().

This patch fixes unwind_frame() to test the index for -ve value and
restore index accordingly before we can restore frame->pc.

Reproducer:

cd /sys/kernel/debug/tracing/
echo schedule > set_graph_notrace
echo 1 > options/display-graph
echo wakeup > current_tracer
ps -ef | grep -i agent

Above commands result in:
Unable to handle kernel paging request at virtual address ffff801bd3d1e000
pgd = ffff8003cbe97c00
[ffff801bd3d1e000] *pgd=0000000000000000, *pud=0000000000000000
Internal error: Oops: 96000006 [#1] SMP
[...]
CPU: 5 PID: 11696 Comm: ps Not tainted 4.11.0+ #33
[...]
task: ffff8003c21ba000 task.stack: ffff8003cc6c0000
PC is at unwind_frame+0x12c/0x180
LR is at get_wchan+0xd4/0x134
pc : [<ffff00000808892c>] lr : [<ffff0000080860b8>] pstate: 60000145
sp : ffff8003cc6c3ab0
x29: ffff8003cc6c3ab0 x28: 0000000000000001
x27: 0000000000000026 x26: 0000000000000026
x25: 00000000000012d8 x24: 0000000000000000
x23: ffff8003c1c04000 x22: ffff000008c83000
x21: ffff8003c1c00000 x20: 000000000000000f
x19: ffff8003c1bc0000 x18: 0000fffffc593690
x17: 0000000000000000 x16: 0000000000000001
x15: 0000b855670e2b60 x14: 0003e97f22cf1d0f
x13: 0000000000000001 x12: 0000000000000000
x11: 00000000e8f4883e x10: 0000000154f47ec8
x9 : 0000000070f367c0 x8 : 0000000000000000
x7 : 00008003f7290000 x6 : 0000000000000018
x5 : 0000000000000000 x4 : ffff8003c1c03cb0
x3 : ffff8003c1c03ca0 x2 : 00000017ffe80000
x1 : ffff8003cc6c3af8 x0 : ffff8003d3e9e000

Process ps (pid: 11696, stack limit = 0xffff8003cc6c0000)
Stack: (0xffff8003cc6c3ab0 to 0xffff8003cc6c4000)
[...]
[<ffff00000808892c>] unwind_frame+0x12c/0x180
[<ffff000008305008>] do_task_stat+0x864/0x870
[<ffff000008305c44>] proc_tgid_stat+0x3c/0x48
[<ffff0000082fde0c>] proc_single_show+0x5c/0xb8
[<ffff0000082b27e0>] seq_read+0x160/0x414
[<ffff000008289e6c>] __vfs_read+0x58/0x164
[<ffff00000828b164>] vfs_read+0x88/0x144
[<ffff00000828c2e8>] SyS_read+0x60/0xc0
[<ffff0000080834a0>] __sys_trace_return+0x0/0x4

Fixes: 20380bb (arm64: ftrace: fix a stack tracer's output under function graph tracer)
Signed-off-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
[catalin.marinas@arm.com: replace WARN_ON with WARN_ON_ONCE]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
rkchrome pushed a commit that referenced this issue Jul 22, 2019
[ Upstream commit a314777 ]

BUG: unable to handle kernel paging request at ffffffffa016a270
PGD 3270067 P4D 3270067 PUD 3271063 PMD 230bbd067 PTE 0
Oops: 0000 [#1
CPU: 0 PID: 6134 Comm: modprobe Not tainted 5.1.0+ #33
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
RIP: 0010:atomic_notifier_chain_register+0x24/0x60
Code: 1f 80 00 00 00 00 55 48 89 e5 41 54 49 89 f4 53 48 89 fb e8 ae b4 38 01 48 8b 53 38 48 8d 4b 38 48 85 d2 74 20 45 8b 44 24 10 <44> 3b 42 10 7e 08 eb 13 44 39 42 10 7c 0d 48 8d 4a 08 48 8b 52 08
RSP: 0018:ffffc90000e2bc60 EFLAGS: 00010086
RAX: 0000000000000292 RBX: ffffffff83467240 RCX: ffffffff83467278
RDX: ffffffffa016a260 RSI: ffffffff83752140 RDI: ffffffff83467240
RBP: ffffc90000e2bc70 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 00000000014fa61f R12: ffffffffa01c8260
R13: ffff888231091e00 R14: 0000000000000000 R15: ffffc90000e2be78
FS:  00007fbd8d7cd540(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffa016a270 CR3: 000000022c7e3000 CR4: 00000000000006f0
Call Trace:
 register_inet6addr_notifier+0x13/0x20
 cxgb4_init_module+0x6c/0x1000 [cxgb4
 ? 0xffffffffa01d7000
 do_one_initcall+0x6c/0x3cc
 ? do_init_module+0x22/0x1f1
 ? rcu_read_lock_sched_held+0x97/0xb0
 ? kmem_cache_alloc_trace+0x325/0x3b0
 do_init_module+0x5b/0x1f1
 load_module+0x1db1/0x2690
 ? m_show+0x1d0/0x1d0
 __do_sys_finit_module+0xc5/0xd0
 __x64_sys_finit_module+0x15/0x20
 do_syscall_64+0x6b/0x1d0
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

If pci_register_driver fails, register inet6addr_notifier is
pointless. This patch fix the error path in cxgb4_init_module.

Fixes: b5a02f5 ("cxgb4 : Update ipv6 address handling api")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
0lvin pushed a commit to free-z4u/roc-rk3328-cc-official that referenced this issue Aug 4, 2019
The commit 304419d ("mmc: core: Allocate per-request data using the
block layer core") refactored mechanism of queue handling caused
mmc_init_request() can be called just after mmc_cleanup_queue() caused null
pointer dereference.

Another commit bbdc74d ("mmc: block: Prevent new req entering queue
after its cleanup") tried to fix the problem. However it actually miss one
corner case.

We could still reproduce the issue mentioned with these steps:
(1) insert a SD card and mount it
(2) hotplug it, so it will leave md->usage still be counted
(3) reboot the system which will sync data and umount the card

[Unable to handle kernel NULL pointer dereference at virtual address
00000000
[user pgtable: 4k pages, 48-bit VAs, pgd = ffff80007bab3000
[[0000000000000000] *pgd=000000007a828003, *pud=0000000078dce003,
*pmd=000000007aab6003, *pte=0000000000000000
[Internal error: Oops: 96000007 [FireflyTeam#1] PREEMPT SMP
[Modules linked in:
[CPU: 3 PID: 3507 Comm: umount Tainted: G        W
4.13.0-rc1-next-20170720-00012-g9d9bf45 rockchip-linux#33
[Hardware name: Firefly-RK3399 Board (DT)
[task: ffff80007a1de200 task.stack: ffff80007a01c000
[PC is at mmc_init_request+0x14/0xc4
[LR is at alloc_request_size+0x4c/0x74
[pc : [<ffff0000087d7150>] lr : [<ffff000008378fe0>] pstate: 600001c5
[sp : ffff80007a01f8f0

....

[[<ffff0000087d7150>] mmc_init_request+0x14/0xc4
[[<ffff000008378fe0>] alloc_request_size+0x4c/0x74
[[<ffff00000817ac28>] mempool_create_node+0xb8/0x17c
[[<ffff00000837aadc>] blk_init_rl+0x9c/0x120
[[<ffff000008396580>] blkg_alloc+0x110/0x234
[[<ffff000008396ac8>] blkg_create+0x424/0x468
[[<ffff00000839877c>] blkg_lookup_create+0xd8/0x14c
[[<ffff0000083796bc>] generic_make_request_checks+0x368/0x3b0
[[<ffff00000837b050>] generic_make_request+0x1c/0x240

So mmc_blk_put wouldn't calling blk_cleanup_queue which actually the
QUEUE_FLAG_DYING and QUEUE_FLAG_BYPASS should stay. Block core expect
blk_queue_bypass_{start, end} internally to bypass/drain the queue before
actually dying the queue, so it didn't expose API to set the queue bypass.
I think we should set QUEUE_FLAG_BYPASS whenever queue is removed, although
the md->usage is still counted, as no dispatch queue could be found then.

Fixes: 304419d ("mmc: core: Allocate per-request data using the block layer core")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
0lvin pushed a commit to free-z4u/roc-rk3328-cc-official that referenced this issue Aug 19, 2019
In the (unlikely) event fixup_permanent_addr() returns a failure,
addrconf_permanent_addr() calls ipv6_del_addr() without the
mandatory call to in6_ifa_hold(), leading to a refcount error,
spotted by syzkaller :

WARNING: CPU: 1 PID: 3142 at lib/refcount.c:227 refcount_dec+0x4c/0x50
lib/refcount.c:227
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 3142 Comm: ip Not tainted 4.14.0-rc4-next-20171009+ rockchip-linux#33
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:52
 panic+0x1e4/0x41c kernel/panic.c:181
 __warn+0x1c4/0x1e0 kernel/panic.c:544
 report_bug+0x211/0x2d0 lib/bug.c:183
 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:178
 do_trap_no_signal arch/x86/kernel/traps.c:212 [inline]
 do_trap+0x260/0x390 arch/x86/kernel/traps.c:261
 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:298
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:311
 invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:905
RIP: 0010:refcount_dec+0x4c/0x50 lib/refcount.c:227
RSP: 0018:ffff8801ca49e680 EFLAGS: 00010286
RAX: 000000000000002c RBX: ffff8801d07cfcdc RCX: 0000000000000000
RDX: 000000000000002c RSI: 1ffff10039493c90 RDI: ffffed0039493cc4
RBP: ffff8801ca49e688 R08: ffff8801ca49dd70 R09: 0000000000000000
R10: ffff8801ca49df58 R11: 0000000000000000 R12: 1ffff10039493cd9
R13: ffff8801ca49e6e8 R14: ffff8801ca49e7e8 R15: ffff8801d07cfcdc
 __in6_ifa_put include/net/addrconf.h:369 [inline]
 ipv6_del_addr+0x42b/0xb60 net/ipv6/addrconf.c:1208
 addrconf_permanent_addr net/ipv6/addrconf.c:3327 [inline]
 addrconf_notify+0x1c66/0x2190 net/ipv6/addrconf.c:3393
 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93
 __raw_notifier_call_chain kernel/notifier.c:394 [inline]
 raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401
 call_netdevice_notifiers_info+0x32/0x60 net/core/dev.c:1697
 call_netdevice_notifiers net/core/dev.c:1715 [inline]
 __dev_notify_flags+0x15d/0x430 net/core/dev.c:6843
 dev_change_flags+0xf5/0x140 net/core/dev.c:6879
 do_setlink+0xa1b/0x38e0 net/core/rtnetlink.c:2113
 rtnl_newlink+0xf0d/0x1a40 net/core/rtnetlink.c:2661
 rtnetlink_rcv_msg+0x733/0x1090 net/core/rtnetlink.c:4301
 netlink_rcv_skb+0x216/0x440 net/netlink/af_netlink.c:2408
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4313
 netlink_unicast_kernel net/netlink/af_netlink.c:1273 [inline]
 netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1299
 netlink_sendmsg+0xa4a/0xe70 net/netlink/af_netlink.c:1862
 sock_sendmsg_nosec net/socket.c:633 [inline]
 sock_sendmsg+0xca/0x110 net/socket.c:643
 ___sys_sendmsg+0x75b/0x8a0 net/socket.c:2049
 __sys_sendmsg+0xe5/0x210 net/socket.c:2083
 SYSC_sendmsg net/socket.c:2094 [inline]
 SyS_sendmsg+0x2d/0x50 net/socket.c:2090
 entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x7fa9174d3320
RSP: 002b:00007ffe302ae9e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ffe302b2ae0 RCX: 00007fa9174d3320
RDX: 0000000000000000 RSI: 00007ffe302aea20 RDI: 0000000000000016
RBP: 0000000000000082 R08: 0000000000000000 R09: 000000000000000f
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe302b32a0
R13: 0000000000000000 R14: 00007ffe302b2ab8 R15: 00007ffe302b32b8

Fixes: f1705ec ("net: ipv6: Make address flushing on ifdown optional")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: David Ahern <dsahern@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
0lvin pushed a commit to free-z4u/roc-rk3328-cc-official that referenced this issue Sep 29, 2019
[ Upstream commit a314777 ]

BUG: unable to handle kernel paging request at ffffffffa016a270
PGD 3270067 P4D 3270067 PUD 3271063 PMD 230bbd067 PTE 0
Oops: 0000 [FireflyTeam#1
CPU: 0 PID: 6134 Comm: modprobe Not tainted 5.1.0+ rockchip-linux#33
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
RIP: 0010:atomic_notifier_chain_register+0x24/0x60
Code: 1f 80 00 00 00 00 55 48 89 e5 41 54 49 89 f4 53 48 89 fb e8 ae b4 38 01 48 8b 53 38 48 8d 4b 38 48 85 d2 74 20 45 8b 44 24 10 <44> 3b 42 10 7e 08 eb 13 44 39 42 10 7c 0d 48 8d 4a 08 48 8b 52 08
RSP: 0018:ffffc90000e2bc60 EFLAGS: 00010086
RAX: 0000000000000292 RBX: ffffffff83467240 RCX: ffffffff83467278
RDX: ffffffffa016a260 RSI: ffffffff83752140 RDI: ffffffff83467240
RBP: ffffc90000e2bc70 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 00000000014fa61f R12: ffffffffa01c8260
R13: ffff888231091e00 R14: 0000000000000000 R15: ffffc90000e2be78
FS:  00007fbd8d7cd540(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffa016a270 CR3: 000000022c7e3000 CR4: 00000000000006f0
Call Trace:
 register_inet6addr_notifier+0x13/0x20
 cxgb4_init_module+0x6c/0x1000 [cxgb4
 ? 0xffffffffa01d7000
 do_one_initcall+0x6c/0x3cc
 ? do_init_module+0x22/0x1f1
 ? rcu_read_lock_sched_held+0x97/0xb0
 ? kmem_cache_alloc_trace+0x325/0x3b0
 do_init_module+0x5b/0x1f1
 load_module+0x1db1/0x2690
 ? m_show+0x1d0/0x1d0
 __do_sys_finit_module+0xc5/0xd0
 __x64_sys_finit_module+0x15/0x20
 do_syscall_64+0x6b/0x1d0
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

If pci_register_driver fails, register inet6addr_notifier is
pointless. This patch fix the error path in cxgb4_init_module.

Fixes: b5a02f5 ("cxgb4 : Update ipv6 address handling api")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
0lvin pushed a commit to free-z4u/roc-rk3328-cc-official that referenced this issue Oct 5, 2019
…ol-handlers'

Vladimir Zapolskiy says:

====================
ravb/sh_eth: fix sleep in atomic by reusing shared ethtool handlers

For ages trivial changes to RAVB and SuperH ethernet links by means of
standard 'ethtool' trigger a 'sleeping function called from invalid
context' bug, to visualize it on r8a7795 ULCB:

  % ethtool -r eth0
  BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747
  in_atomic(): 1, irqs_disabled(): 128, pid: 554, name: ethtool
  INFO: lockdep is turned off.
  irq event stamp: 0
  hardirqs last  enabled at (0): [<0000000000000000>]           (null)
  hardirqs last disabled at (0): [<ffff0000080e1d3c>] copy_process.isra.7.part.8+0x2cc/0x1918
  softirqs last  enabled at (0): [<ffff0000080e1d3c>] copy_process.isra.7.part.8+0x2cc/0x1918
  softirqs last disabled at (0): [<0000000000000000>]           (null)
  CPU: 5 PID: 554 Comm: ethtool Not tainted 4.17.0-rc4-arm64-renesas+ rockchip-linux#33
  Hardware name: Renesas H3ULCB board based on r8a7795 ES2.0+ (DT)
  Call trace:
   dump_backtrace+0x0/0x198
   show_stack+0x24/0x30
   dump_stack+0xb8/0xf4
   ___might_sleep+0x1c8/0x1f8
   __might_sleep+0x58/0x90
   __mutex_lock+0x50/0x890
   mutex_lock_nested+0x3c/0x50
   phy_start_aneg_priv+0x38/0x180
   phy_start_aneg+0x24/0x30
   ravb_nway_reset+0x3c/0x68
   dev_ethtool+0x3dc/0x2338
   dev_ioctl+0x19c/0x490
   sock_do_ioctl+0xe0/0x238
   sock_ioctl+0x254/0x460
   do_vfs_ioctl+0xb0/0x918
   ksys_ioctl+0x50/0x80
   sys_ioctl+0x34/0x48
   __sys_trace_return+0x0/0x4

The root cause is that an attempt to modify ECMR and GECMR registers
only when RX/TX function is disabled was too overcomplicated in its
original implementation, also processing of an optional Link Change
interrupt added even more complexity, as a result the implementation
was error prone.

The new locking scheme is confirmed to be correct by dumping driver
specific and generic PHY framework function calls with aid of ftrace
while running more or less advanced tests.

Please note that sh_eth patches from the series were built-tested only.

On purpose I do not add Fixes tags, the reused PHY handlers were added
way later than the fixed problems were firstly found in the drivers.

Changes from v1 to v2:
* the original patches are split to bugfixes and enhancements only,
  both v1 and v2 series are absolutely equal in total, thus I omit
  description of changes in individual patches,
* the latter implies that there should be no strict need for retesting,
  but because formally two series are different, I have to drop the tags
  given by Geert and Andrew, please send your tags again.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
@kannant
Copy link

kannant commented Jan 9, 2020

I have a issue I am trying to interface mt9v032 using dvp port of rk3399 Firefly board, i am using Android 7.1 can any one help me with drivers,

@SanjayS-ECE
Copy link

Hello @axendev , I am also trying to interface dual mipi camera (with same slave addr) with Rk3399 soc,But facing some issue in driver.I mean will I have to write two different drivers for two cameras to probe or a single driver will suffice the requirement.

Thanks

Joern-P pushed a commit to Joern-P/kernel that referenced this issue Sep 6, 2020
Change-Id: I9f2c1b0d8d56a8d3da1774f51a4701212ac6ffff

added IPGRE module to enable: (rockchip-linux#18)

ip tunnel add grx mode gre

Change-Id: I26bda9ece68f9f6be1277da0779076694d5d845c

ayufan: rockchip_linux_defconfig compile ZRAM as module

Change-Id: I2ee48973cb370130cc5d75008a07d5777c69208a

ayufan: rockchip_defconfig: disable CONFIG_SCHED_WALT as it makes system unstable

Change-Id: Id2a150311fcaad9f11127320558dc3caafb250e4

config: add more USB wifi chipsets (rockchip-linux#19)

* Add some more USB wifi chipsets to default config.

* Fix typo in default config.

Added openvswitch kernel module compilation (rockchip-linux#22)

ayufan: defconfig: add RK805 pinctrl

Change-Id: I9144206544db4e86e73a4d553fb8db3aa194c619

ayufan: enable additional realtek devices

Change-Id: Ie3598c47154b648540f161ad4aedd597bc33f83f

config: Add support for modules/features requested by issues rockchip-linux#24 (AUTOFS4), rockchip-linux#54 (DRBD), rockchip-linux#64 (Multiple Routing Tables), rockchip-linux#87 (RTL8188EU), rockchip-linux#107 (iSCSI), rockchip-linux#148 (1-W GPIO) (rockchip-linux#24)

ayufan: rtl8812au: add Edimax 600 USB adapter

Add requested kernel modules/features for issue rockchip-linux#153 and LIRC, PPS GPIO support, remove wifi staging drivers. (rockchip-linux#25)

Fix compile error (rockchip-linux#26)

Multiple definition error due to midgard and bifrost both selected

ayufan: defconfig: add a bunch of kernel modules

Change-Id: I77f5c4809c35b6c74a3bb668487eba93a0a15169

ayufan: rockchip_wlan: revert changes

Change-Id: I6aa0bbc24e2fdfb6da350ed167d59c4eea836c2a

ayufan: defconfig: enable CONFIG_MEMTEST

Change-Id: I82c3d1b2d35fb10172f891571ef600a692ac4e61

ayufan: defconfig: remove unusued kernel configs

Change-Id: I2a4a2e5785dd5796bb7404718898127718b86425

ayufan: defconfig: enable initrd in bzip2/lzma/lzo/lz4

Change-Id: I88ea1f8127d8fdadf90dd4428a51a1582adc2687

ayufan: defconfig: enable PWM FAN

Change-Id: I87a364e95d937c354e06eb41fead43d8d5cb0b4a

external: defconfig: Add support for f2fs and crc32 (rockchip-linux#32)

Add support for f2fs and it's dependency crc32 to rock64.

This patch may or may not need to be included as well due to this bug https://bugs.debian.org/819725    A official patch was added by Debian https://salsa.debian.org/kernel-team/linux/blob/master/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch

external: defconfig: enable kernel modules for RBD and IPVS (rockchip-linux#33)

external: defconfig: Make crc, crc32, f2fs to be compiled into kernel. (rockchip-linux#35)

This changes crc, crc32, and f2fs to be compiled into the kernel instead of as module. This also fixes the issue of crc32-arm64 not being compiled due to a incorrect driver name.  CONFIG_CRYPTO_CRC32_ARM64 became CONFIG_CRYPTO_CRC32_ARM64_CE in newer kernel sources. That's why I had to change that here.

ayufan: defconfig: use CONFIG_HZ=250

Change-Id: I8009db93ee7c5af5e7804a004ab03d0ba97d20e2

CONFIG_SQUASHFS_XZ=y (rockchip-linux#41)

cyberp: defconfig: squashfs xz for snap support

defconfig: enable binfmt-misc (rockchip-linux#36)

ayufan: defconfig: organize with savedefconfig

ayufan: defconfig: support tehuti 10gbps adapter

ayufan: defconfig: enable usb gadget via configfs

ayufan: dts: compile-in audio codecs

Change-Id: I7c70870395a10a0eafff006aabc17faf1d33355e
rkchrome pushed a commit that referenced this issue Oct 10, 2020
[ Upstream commit 96298f6 ]

According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5,
the incoming L2CAP_ConfigReq should be handled during
OPEN state.

The section below shows the btmon trace when running
L2CAP/COS/CFD/BV-12-C before and after this change.

=== Before ===
...
> ACL Data RX: Handle 256 flags 0x02 dlen 12                #22
      L2CAP: Connection Request (0x02) ident 2 len 4
        PSM: 1 (0x0001)
        Source CID: 65
< ACL Data TX: Handle 256 flags 0x00 dlen 16                #23
      L2CAP: Connection Response (0x03) ident 2 len 8
        Destination CID: 64
        Source CID: 65
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 256 flags 0x00 dlen 12                #24
      L2CAP: Configure Request (0x04) ident 2 len 4
        Destination CID: 65
        Flags: 0x0000
> HCI Event: Number of Completed Packets (0x13) plen 5      #25
        Num handles: 1
        Handle: 256
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5      #26
        Num handles: 1
        Handle: 256
        Count: 1
> ACL Data RX: Handle 256 flags 0x02 dlen 16                #27
      L2CAP: Configure Request (0x04) ident 3 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Unknown (0x10) [hint]
        01 00                                            ..
< ACL Data TX: Handle 256 flags 0x00 dlen 18                #28
      L2CAP: Configure Response (0x05) ident 3 len 10
        Source CID: 65
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
> HCI Event: Number of Completed Packets (0x13) plen 5      #29
        Num handles: 1
        Handle: 256
        Count: 1
> ACL Data RX: Handle 256 flags 0x02 dlen 14                #30
      L2CAP: Configure Response (0x05) ident 2 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> ACL Data RX: Handle 256 flags 0x02 dlen 20                #31
      L2CAP: Configure Request (0x04) ident 3 len 12
        Destination CID: 64
        Flags: 0x0000
        Option: Unknown (0x10) [hint]
        01 00 91 02 11 11                                ......
< ACL Data TX: Handle 256 flags 0x00 dlen 14                #32
      L2CAP: Command Reject (0x01) ident 3 len 6
        Reason: Invalid CID in request (0x0002)
        Destination CID: 64
        Source CID: 65
> HCI Event: Number of Completed Packets (0x13) plen 5      #33
        Num handles: 1
        Handle: 256
        Count: 1
...
=== After ===
...
> ACL Data RX: Handle 256 flags 0x02 dlen 12               #22
      L2CAP: Connection Request (0x02) ident 2 len 4
        PSM: 1 (0x0001)
        Source CID: 65
< ACL Data TX: Handle 256 flags 0x00 dlen 16               #23
      L2CAP: Connection Response (0x03) ident 2 len 8
        Destination CID: 64
        Source CID: 65
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 256 flags 0x00 dlen 12               #24
      L2CAP: Configure Request (0x04) ident 2 len 4
        Destination CID: 65
        Flags: 0x0000
> HCI Event: Number of Completed Packets (0x13) plen 5     #25
        Num handles: 1
        Handle: 256
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5     #26
        Num handles: 1
        Handle: 256
        Count: 1
> ACL Data RX: Handle 256 flags 0x02 dlen 16               #27
      L2CAP: Configure Request (0x04) ident 3 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Unknown (0x10) [hint]
        01 00                                            ..
< ACL Data TX: Handle 256 flags 0x00 dlen 18               #28
      L2CAP: Configure Response (0x05) ident 3 len 10
        Source CID: 65
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
> HCI Event: Number of Completed Packets (0x13) plen 5     #29
        Num handles: 1
        Handle: 256
        Count: 1
> ACL Data RX: Handle 256 flags 0x02 dlen 14               #30
      L2CAP: Configure Response (0x05) ident 2 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> ACL Data RX: Handle 256 flags 0x02 dlen 20               #31
      L2CAP: Configure Request (0x04) ident 3 len 12
        Destination CID: 64
        Flags: 0x0000
        Option: Unknown (0x10) [hint]
        01 00 91 02 11 11                                .....
< ACL Data TX: Handle 256 flags 0x00 dlen 18               #32
      L2CAP: Configure Response (0x05) ident 3 len 10
        Source CID: 65
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
< ACL Data TX: Handle 256 flags 0x00 dlen 12               #33
      L2CAP: Configure Request (0x04) ident 3 len 4
        Destination CID: 65
        Flags: 0x0000
> HCI Event: Number of Completed Packets (0x13) plen 5     #34
        Num handles: 1
        Handle: 256
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5     #35
        Num handles: 1
        Handle: 256
        Count: 1
...

Signed-off-by: Howard Chung <howardchung@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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

No branches or pull requests