You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

MIPS架构32位Linux系统ftdi_sio内核模块交叉编译后插入USB设备崩溃问题求助

Fixing Kernel Panic When Using ftdi_sio Module on 32-bit MIPS SMP Broadcom Modem

Let's break down what's going on here and walk through the steps to resolve the system crash when inserting an FTDI USB cable after loading the cross-compiled ftdi_sio module.

Target Device Environment

First, let's recap your device specs for clarity:

uname -a Output

Linux localhost 2.6.30 #1 SMP PREEMPT Mon Jun 8 16:14:23 CEST 2015 mips GNU/Linux

cat /proc/cpuinfo Output

system type : 963168_IADR
voice type : SI32261
processor : 0
cpu model : Broadcom4350 V8.0
BogoMIPS : 398.33
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
ASEs implemented :
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available
unaligned exceptions : 3
processor : 1
cpu model : Broadcom4350 V8.0
BogoMIPS : 402.43
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
ASEs implemented :
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available

Current Setup & Issue

You attempted to cross-compile the ftdi_sio module for Linux 2.6.30, but found no MIPS architecture in arch/mips that supported SMP, MIPS32_R1, and big-endian mode simultaneously. So you modified arch/mips/Kconfig to add select SYS_SUPPORTS_SMP to the MIPS_MALTA architecture. Using the OpenWrt OpenWrt-Toolchain-brcm63xx-for-mips-gcc-4.3.3+cs_uClibc-0.9.30.1 toolchain, you successfully compiled and loaded the module—but inserting an FTDI USB cable caused a system crash, with this dmesg output:

[ 561.429000] Process khubd (pid: 69, threadinfo=8793c000, task=8790add0, tls=00000000)
[ 561.429000] Stack : 00000001 c448fdd4 c4494780 866a0980 87b7c000 00000001 c448fdd4 c44901c0
[ 561.429000] 00000000 80348ac8 000003e0 80117a68 802e97f0 866e6b80 8793fbb8 87820e00
[ 561.429000] 8111b93c 800db590 853a0bf8 80340000 85a947a8 800a5a84 802a52e8 80076f0c
[ 561.429000] 866e57d8 866ba63c 87820e00 800db590 853a0bf8 853a0bf8 00000001 800a5b4c
[ 561.429000] 0000a1ff 800dbe84 866e57ac 85a947a0 8793fc50 866ba63c 8793fc50 800dbc68
[ 561.429000] 00000000 866ba63c 866e57d8 853a0bf8 00000001 85a947a8 802e97f0 00000000
[ 561.429000] 87b7c068 800dd010 87b7c000 85a94780 85a94780 c0cd47e8 c0cd474c 85a947a0
[ 561.429000] 87b7c000 85a947a8 802e97f0 00000000 87b7c068 80181168 85a94780 80154664
[ 561.429000] 00000000 00000000 ffffffed 85a947a0 c0cd4780 85a947a0 87b7c000 801547d8
[ 561.429000] 802e1a70 8793fce8 866e6700 00000000 00000000 8793fcc8 80154944 80153be8
[ 561.429000] 870583c0 866b0000 802e2650 85a947a8 878dd650 86fd44b8 878de000 802e9820
[ 561.429000] 85a947a0 85a947d4 802ab200 80154a48 802e1a70 802ac7ec 00000000 00000000
[ 561.429000] 802e9820 85a947a0 00000000 801539ac 00000000 802ab200 87b7c000 85a947a8
[ 561.429000] 802e97f0 85a94780 85a947a0 801523f4 00000001 00000000 00000002 00000000
[ 561.429000] 00000001 00000028 85a947a0 85a94780 85a94780 00000000 866e6a08 802ab200
[ 561.429000] 87b7c000 866e6a00 00000001 00000001 85836e04 801803d8 00000002 87b7c070
[ 561.429000] 00000002 87b7c004 00000001 00000000 00000000 00000000 00001388 87b7c070
[ 561.429000] 85836e00 87a82c04 87b7c068 00000001 87a82c00 87b7c004 00000001 87b7c000
[ 561.429000] 802e9e54 87b7c068 00000002 87b7c070 802e9674 00000000 87a66868 80187370
[ 561.429000] 00000002 80154664 fffffffe 866e6700 8793fe10 87828438 ffffffed 87b7c068
[ 561.429000] 802e9e54 801547d8 802e1a70 8793fe50 866e6700 00000000 00000000 8793fe30
[ 561.429000] 80154944 80153be8 866bb2e0 866b0000 802e2650 87b7c070 878dd650 87828438
[ 561.429000] 878de000 802e9820 87b7c068 87b7c09c 87a5fd80 80154a48 802e1a70 802ac7ec
[ 561.429000] 00000000 00000000 802e9820 87b7c068 00000000 801539ac 00000000 87a5fd80
[ 561.429000] 00000002 87b7c070 802e9674 8793fea0 87b7c068 801523f4 87a66800 00000000
[ 561.429000] 000000bd 00000081 3138393a 31323900 00000000 87b7c000 87b7c068 00000000
[ 561.429000] 87b7c000 87a5fd80 00000002 00000000 87a66800 00000001 87a66800 80179aec
[ 561.429000] 0000000a 87b7c000 85348380 87a5fd80 00000000 87b7c000 85348380 8017b05c
[ 561.429000] 87a5fd80 8002b9b4 00000001 8793ff28 0000000a 00000001 00000000 00000000
[ 561.429000] 000003e8 803280d0 80327884 01010001 00000101 00000000 8790add0 8004fa04
[ 561.429000] 8793ff38 8793ff38 87a66800 87a5fd80 00000000 87a66c00 87a5fe1c 87a5fea0
[ 561.429000] 00000002 87a5fd88 87a6689c 87a5fdc8 87a5fdc4 87a5fdc0 87a5fea0 00000000
[ 561.429000] 00000001 87a669e0 00000000 8017a5d0 00000000 00000000 00000000 00000000
[ 561.429000] 00000000 00000000 00000000 8004f610 00000000 00000000 00000000 00000000
[ 561.429000] 8793c000 00000000 00000000 80014d34 10008d03 00000000 00000000 00000000
[ 561.429000] 00000000 00000000 45551450 75455555 054d0555 1d555544 54115154 555dd155
[ 561.429000] 15195545 05547516

Root Cause Breakdown

The core issue here is that you're using the MIPS_MALTA reference architecture (modified to add SMP support) for a Broadcom brcm63xx-based device. Malta is a generic MIPS development platform, and its default configuration doesn't account for the specific hardware quirks, memory layout, or USB controller implementation of the Broadcom 963168_IADR and 4350 CPU. The panic in khubd (the USB hub daemon process) points to a mismatch between the generic USB stack code and the actual Broadcom USB host controller hardware, especially under SMP.

Step-by-Step Fixes

1. Use the Correct Kernel Source for brcm63xx

Stop using the generic Linux 2.6.30 kernel. Instead, use the OpenWrt brcm63xx 2.6.30 branch source or your modem's official kernel code. These sources include:

  • Pre-configured support for Broadcom 963168_IADR and 4350 SMP
  • Patches for the Broadcom USB host controller
  • Correct memory and interrupt mappings for your device

2. Configure the Kernel for brcm63xx (Not Malta)

When setting up your kernel build, target the brcm63xx platform directly instead of modifying Malta:

export ARCH=mips
export CROSS_COMPILE=mips-openwrt-linux-uclibc-
make menuconfig

In the menuconfig:

  • Select System Type > Broadcom BCM63XX
  • Enable SMP support under System Type
  • Enable USB support > USB Host Controller > Broadcom BCM63XX EHCI support (or the correct controller for your device)
  • Enable USB support > USB Serial Converter support > USB FTDI Single Port Serial Driver (CONFIG_USB_SERIAL_FTDI_SIO)

3. Verify Tool

火山引擎 最新活动