[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bluetooth-dev] Alignement fix + kernel mode 2.4
david LIBAULT wrote:
> I did a cvs update on my modified version and tried to build a kernel mode
> version of the stack. Compilation goes fine, with usual warnings (not coming
> from my modifications... probably work in progress).
> By the way, in the /drivers/char/bluetooth/Makefile, the ld should be changed
> to $(LD), so it gives us a change to "cross-link", and the -include directive
> shouldn't always point to /usr/include/... but again to a variable that would
> point to the cross-compiler include files.
> On the ARM, I can insmod the module, but when I start btd, the following
> happens :
> / # btd -m -u /dev/ttyS1 -s 57600
> Bluetooth ControBT (ldisc) bt_tty_open
> BT SYS: Setting BT driver to use serial tty
> lBT (driver) bt_open on line 7
> BT SYS: Registering tty on line 7
> BT SYS: Now 1 open fd:s for ttyBTC
> BT (driver) bt_ioctl: forwarding ioctl 0x540b to serial driver
Just a guess at this point... did you compile against the right ioctl.h for the
kernel you are running on the ARM?
> Internal error: branch through zero: 0
> CPU: 0
> pc : [<00000004>] lr : [<400b1180>]
> sp : bffffdd4 ip : c1635000 fp : c05c3f5c
> r10: c178c480 r9 : c167c0e0 r8 : c178c480
> r7 : c04b6000 r6 : 00000000 r5 : 00000002 r4 : 0000540b
> r3 : 00000002 r2 : 0000540b r1 : c178c480 r0 : c1635000
> Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
> Control: 017D Table: C05BC015 DAC: 00000015
> Process btd (pid: 43, stackpage=c05c3000)
> and btd stops. Remark : it is impossible to rmmod the module as it says it is
> busy. If I restart btd, then it says : BT SYS: Now 2 open fd:s for ttyBTC...
> Is this ioctl forwarded to the actual serial port (ie /dev/ttyS1) or one of
> the ttyBTx ?
Yes, but... since your program counter is so close to zero I wonder if, for some
reason, the driver->ioctl is NULL? Without looking I'll bet bluetooth.c doesn't
check this (because it shouldn't be NULL).
> Should I have a look at the serial driver of my board ? what is
> that ioctl supposed to do ?
You might check that you're compiling against the correct kernel headers (most
cross-compilers internally hardcode a path to a set of specific kernel headers,
so if they don't match your kernel version it's possible that, perhaps, the
tty_driver struct changed and the location of the ioctl field changed... this
would explain the symptom, anyway...).
If you're certain that you are you might add a debug statement to verify that
driver->ioctl is not NULL before we call it in bluetooth.c.
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to email@example.com