RM500U-CNV-PCIE模式 驱动出现错误,附上Log

查看中断计数为0

root@ImmortalWrt:/# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
  3:       4031       3356       3218       3023     GICv3  30 Level     arch_timer
 10:          0          0          0          0     GICv3 142 Level     wdt_bark
 12:        137          0          0          0     GICv3 155 Level     ttyS0
 13:          0          0          0          0     GICv3 168 Level     i2c-mt65xx
 15:          0          0          0          0     GICv3 148 Level     10320000.crypto
 16:          0          0          0          0     GICv3 149 Level     10320000.crypto
 17:          0          0          0          0     GICv3 150 Level     10320000.crypto
 18:          0          0          0          0     GICv3 151 Level     10320000.crypto
 30:          1          0          0          0   mt-eint  10 Edge      (null)
 31:          0          0          0          0   mt-eint  11 Edge      pwm-fan
122:         99          0          0          0     GICv3 229 Level     15100000.ethernet
123:        251          0          0          0     GICv3 230 Level     15100000.ethernet
124:          0          0          0          0     GICv3 231 Level     15100000.ethernet
129:       3276          0          0          0     GICv3 175 Level     11230000.mmc
130:          0          0          0          0     GICv3 205 Level     xhci-hcd:usb1
132:          0          0          0          0      INTx   0 Edge    -INTx      sprd-pcie-ep-device
IPI0:      3536       5134       5344       5163       Rescheduling interrupts
IPI1:       458        596         91        505       Function call interrupts
IPI2:         0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
IPI4:         0          0          0          0       Timer broadcast interrupts
IPI5:         0          0          0          0       IRQ work interrupts
IPI6:         0          0          0          0       CPU wake-up interrupts
Err:          0

lspci命令查看
0001:01:00.0 Wireless controller: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
        Flags: bus master, fast devsel, latency 0, IRQ 132
        Memory at 20000000 (32-bit, prefetchable) [size=4M]
        Memory at 20c00000 (32-bit, non-prefetchable) [size=64K]
        Memory at 20400000 (32-bit, prefetchable) [size=4M]
        Memory at 20c10000 (32-bit, non-prefetchable) [size=64K]
        Memory at 20800000 (32-bit, non-prefetchable) [size=4M]
        Memory at 20c20000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/32 Maskable+ 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [b0] MSI-X: Enable- Count=65 Masked-
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Latency Tolerance Reporting
        Capabilities: [150] L1 PM Substates
        Capabilities: [160] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
        Capabilities: [260] Physical Resizable BAR
        Kernel driver in use: sprd-pcie-ep-device

AT串口打不开

root@ImmortalWrt:/# microcom -s 115200 /dev/stty_nr31
[  357.184416] spipe 1-6 not ready to open!
microcom: can't open '/dev/stty_nr31': No such device

粉色是wake,黄色是preset,一格时间是5秒
时序这样是对的吗?
SDS822X_HD_PNG_8

MT79xxLog.txt (33.0 KB)
移远模组Log.txt (38.6 KB)

1 个赞

上面中断问题和AT端口打不开已经解决
现在是遇到新问题了在sprd_pcie.k驱动中系统停止了加载

[    9.860189] sprd_pci_ep_dev_init Quectel_Linux&Android_SPRD_PCIE_Driver_V1.1.8
[    9.867763] sipc: name=sprd,sipc
[    9.870995] sipc: type=1
[    9.873517] sipc: dst =1
[    9.876041] sipc: ep_dev=0
[    9.878735] sipc: smem_type = 0
[    9.882558] sipc: smem_base=0xb8800000, dst_smem_base=0xb8800000, smem_size=0x300000
[    9.890290] sipc: high_offset=0x0n
[    9.890293] smsg_ipc_create: sprd,sipc
[    9.897525] smem_init: pool addr = 0xb8800000, size = 0x300000 added.
[    9.903964] smsg_ipc_smem_init: ring_base = 0xb8800000, ring_size = 0x1000
[    9.911282] spipe_probe!
[    9.913807] spipe: after parse device tree, name=spipe_nr, dst=1, channel=4, ringnr=15,  rxbuf_size=0x1000, txbuf_size=0x1000
[    9.925104] sbuf_host_init: channel 1-4, offset = 0x0!
[    9.930342] smsg_ch_open: channel 1-4 send open msg!
[    9.930826] spipe_probe!
[    9.935320] pcie res: request resource, state=0.
[    9.937840] spipe: after parse device tree, name=sdiag_nr, dst=1, channel=21, ringnr=1,  rxbuf_size=0x8000, txbuf_size=0x40000
[    9.953832] sbuf_host_init: channel 1-21, offset = 0x0!
[    9.959144] smsg_ch_open: channel 1-21 send open msg!
[    9.959258] spipe_probe!
[    9.966724] spipe: after parse device tree, name=stty_nr, dst=1, channel=6, ringnr=32,  rxbuf_size=0x800, txbuf_size=0x800
[    9.977753] sbuf_host_init: channel 1-6, offset = 0x0!
[    9.983038] smsg_ch_open: channel 1-6 send open msg!
[    9.983980] spipe_probe!
[    9.990530] spipe: after parse device tree, name=snv_nr, dst=1, channel=40, ringnr=1,  rxbuf_size=0x1000, txbuf_size=0x40400
[   10.001751] sbuf_host_init: channel 1-40, offset = 0x0!
[   10.007059] smsg_ch_open: channel 1-40 send open msg!
[   10.007385] spool: name=slog_nr, dst=1, channel=5, pre_cfg=0
[   10.017754] spool: tx_num=0, tx_size=0, rx_num=32, rx_size=65536
[   10.023865] smsg_ch_open: channel 1-5 send open msg!
[   10.024082] sprd-pcie-ep-device 0001:01:00.0: assign IRQ: got 133
[   10.034926] sprd-pcie-ep-device 0001:01:00.0: ep: probe
[   10.040152] pci 0001:00:00.0: enabling device (0000 -> 0002)
[   10.045804] pci 0001:00:00.0: enabling bus mastering
[   10.050761] sprd-pcie-ep-device 0001:01:00.0: enabling device (0000 -> 0002)
[   10.057812] sprd-pcie-ep-device 0001:01:00.0: enabling bus mastering
[   10.064159] sprd-pcie-ep-device 0001:01:00.0: ep: BAR[0] [mem 0x20000000-0x23ffffff pref]
[   10.072323] sprd-pcie-ep-device 0001:01:00.0: ep: BAR[1] [mem 0x26100000-0x2610ffff]
[   10.080052] sprd-pcie-ep-device 0001:01:00.0: ep: BAR[2] [mem 0x24000000-0x25ffffff pref]
[   10.088216] sprd-pcie-ep-device 0001:01:00.0: ep: BAR[3] [mem 0x26110000-0x2611ffff]
[   10.095945] sprd-pcie-ep-device 0001:01:00.0: ep: BAR[4] [mem 0x26000000-0x260fffff]
[   10.103674] sprd-pcie-ep-device 0001:01:00.0: ep: BAR[5] [mem 0x26120000-0x2612ffff]
[   10.111423] sprd-pcie-ep-device 0001:01:00.0: ep: atu_view_port val = 0xffffffff
[   10.118808] sprd-pcie-ep-device 0001:01:00.0: ep: failed to get MSI, err=-22, irq=133
[   10.126624] sprd_ep_map_memory: get bar = 2
[   10.131047] comfifo0 tx_fifo addr-0xffffffc010ee5000
[   10.136037] comfifo0 rx_fifo addr-0xffffffc011002000
[   10.141024] comfifo1 tx_fifo addr-0xffffffc01101d000
[   10.146009] comfifo1 rx_fifo addr-0xffffffc01103d000
[   10.150995] virt_sipa virt_sipa: fifo_id = 0 rx_fifo depth = 0x1000
[   10.162801] smem_get_area: addr = 0xb8800000, size = 0x300000.
[   10.162859] virt_sipa virt_sipa: sender create start
[   10.168646] sprd-pcie-ep-device 0001:01:00.0: pass_smem, base=0xb8800000,size=0x300000
[   10.173775] sipa_sender_ck_unfree: need wait remote_ready!
[   10.173814] virt_sipa virt_sipa: /*wake_up_process-1*/
[   10.173817] virt_sipa virt_sipa: /*wake_up_process-2*/
[   10.173820] virt_sipa virt_sipa: /*wake_up_process-3*/
[   10.174998] debugfs: File 'gro_enable' in directory 'seth' already present!
[   10.175286] debugfs: File 'gro_enable' in directory 'seth' already present!
[   10.175554] debugfs: File 'gro_enable' in directory 'seth' already present!
[   10.181519] pcie res: ep_notify, probed cnt=1.
[   10.187380] usbcore: registered new interface driver cdc_wdm
[   10.192179] sipa_sender_ck_unfree: need wait remote_ready!
[   10.284104] usbcore: registered new interface driver usbserial_generic
[   10.290717] usbserial: USB Serial support registered for generic
[   10.325543] xt_time: kernel timezone is -0000
[   10.337701] PPP generic driver version 2.4.2
[   10.343257] PPP MPPE Compression module registered
[   10.349162] NET: Registered protocol family 24
[   10.355731] usbcore: registered new interface driver option
[   10.361339] usbserial: USB Serial support registered for GSM modem (1-port)
[   10.369855] usbcore: registered new interface driver qcserial
[   10.370972] smsg_ch_open: channel 1-120 send open msg!
[   10.375635] usbserial: USB Serial support registered for Qualcomm USB modem
[   10.387866] kmodloader: done loading kernel modules from /etc/modules.d/*
[   10.856365] smsg_ch_open: channel 1-40 receive open msg!
[   10.856367] smsg_ch_open: channel 1-5 receive open msg!
[   10.861679] smsg_ch_open: channel 1-6 receive open msg!
[   10.861680] smsg_ch_open: channel 1-40 success
[   10.861681] smsg_ch_open: channel 1-6 success
[   10.861684] sbuf_thread: channel 1-40 state = 0, recv cmd msg, flag = 1!
[   10.861686] sbuf_thread: channel 1-6 state = 0, recv cmd msg, flag = 1!
[   10.861688] smsg_ch_open: channel 1-21 receive open msg!
[   10.861690] smsg_ch_open: channel 1-21 success
[   10.861692] sbuf_thread: channel 1-21 state = 0, recv cmd msg, flag = 1!
[   10.861700] smsg_ch_open: channel 1-120 receive open msg!
[   10.861702] smsg_ch_open: channel 1-120 success
[   10.861710] smsg_ch_open: channel 1-4 receive open msg!
[   10.861711] smsg_ch_open: channel 1-4 success
[   10.861713] sbuf_thread: channel 1-4 state = 0, recv cmd msg, flag = 1!
[   10.936676] smsg_ch_open: channel 1-5 success
[   10.941028] sblock_thread: channel 1-5, SMSG_CMD_SBLOCK_INIT, dst address = 0xb88cc000!
[   11.457326] sprd_ep_ipa_map: get bar = 1
[   11.461284] sprd-pcie-ep-device 0001:01:00.0: ep: ipa map type=1, addr=0x2e000000, size=0x2000
[   11.469963] sprd_ep_ipa_map: get bar = 3
[   11.473914] sprd-pcie-ep-device 0001:01:00.0: ep: ipa map type=2, addr=0x2f000000, size=0x400
[   11.482470] virt_sipa virt_sipa: remote ipa ready reg_mapped = 0x26100000
[   11.489272] sipa_receiver_open_cmn_fifo-1
[   11.493296] ipa_common_fifo_hal_open-1,id=0,cgf_base=000000000b4e78d3,
[   11.499820] ipa_common_fifo_hal_open-2
[   11.503576] ipa_common_fifo_hal_open-3
[   11.507355] ipa_common_fifo_hal_open-4
[   11.511103] sipa_receiver_open_cmn_fifo-2
[   11.515121] sipa_receiver_open_cmn_fifo-3
[   11.519160] virt_sipa virt_sipa: /*sipa_receiver_open_cmn_fifo*/
[   11.525181] ipa_common_fifo_hal_open-1,id=1,cgf_base=000000000b4e78d3,
[   11.531708] ipa_common_fifo_hal_open-2
[   11.535460] ipa_common_fifo_hal_open-3
[   11.539236] ipa_common_fifo_hal_open-4
[   11.543004] virt_sipa virt_sipa: /*sipa_sender_open_cmn_fifo*/
[   11.548838] virt_sipa virt_sipa: /*sipa_nic_check_flow_ctrl*/

Log只打印到这里停止

static int conn_thread(void *data)
{
	struct smsg mrecv;
	int ret, timeout = 500;
	struct sipa_core *ipa = data;

	/* since the channel open may hang, we call it in the thread context */
	usleep_range(100000, 200000);
	ret = smsg_ch_open(SIPC_ID_MINIAP, SMSG_CH_COMM_SIPA, -1);
	if (ret != 0) {
		dev_err(ipa->dev, "sipa_delegator failed to open dst %d channel %d\n",
			SIPC_ID_MINIAP, SMSG_CH_COMM_SIPA);
		/* assign NULL to thread poniter as failed to open channel */
		return ret;
	}

	while (sipa_dele_start_req_work() && timeout--)
		usleep_range(5000, 10000);

	/* start listen the smsg events */
	while (!kthread_should_stop()) {
		/* monitor seblock recv smsg */
		smsg_set(&mrecv, SMSG_CH_COMM_SIPA, 0, 0, 0);
		ret = smsg_recv(SIPC_ID_MINIAP, &mrecv, -1);
		if (ret == -EIO || ret == -ENODEV) {
			/* channel state is FREE */
			usleep_range(5000, 10000);
			continue;
		}

		dev_dbg(ipa->dev, "sipa type=%d, flag=0x%x, value=0x%08x\n",
			mrecv.type, mrecv.flag, mrecv.value);

		switch (mrecv.type) {
		case SMSG_TYPE_OPEN:
			/* just ack open */
			smsg_open_ack(SIPC_ID_AP, SMSG_CH_COMM_SIPA);
			break;
		case SMSG_TYPE_CLOSE:
			/* handle channel close */
			smsg_close_ack(SIPC_ID_AP, SMSG_CH_COMM_SIPA);
			break;
		case SMSG_TYPE_CMD:
			/* handle commads */
			break;
		case SMSG_TYPE_DONE:
			sipa_init_cmn_fifo_reg_addr(ipa);
		    sipa_init_tft_cmn_fifo_reg_addr(ipa);
			dev_info(ipa->dev, "remote ipa ready reg_mapped = 0x%llx\n", (long long unsigned int)ipa->reg_mapped);
			sipa_receiver_open_cmn_fifo(ipa->receiver);
			dev_info(ipa->dev, "/*sipa_receiver_open_cmn_fifo*/");
			sipa_sender_open_cmn_fifo(ipa->sender);
			dev_info(ipa->dev, "/*sipa_sender_open_cmn_fifo*/");
			sipa_nic_check_flow_ctrl();
			dev_info(ipa->dev, "/*sipa_nic_check_flow_ctrl*/");
			ipa->remote_ready = true;
			/* handle cmd done */
			break;
		case SMSG_TYPE_EVENT:
			/* handle events */
			break;
		default:
			ret = 1;
			break;
		};

		if (ret) {
			dev_info(ipa->dev, "unknown msg in conn_thrd: %d, %d, %d\n",
				 mrecv.type, mrecv.flag, mrecv.value);
			ret = 0;
		}
	}

	return ret;
}

在这段while循环中条件不满足卡死了,导致后续程序停止了加载。
附上完整Log
MT79xx0608.txt (31.1 KB)
RM500UCNV.txt (37.3 KB)

请问如何解决AT端口打不开的问题