2010-03-02 01:28:10     driver of vnt6656 on BF561 uClinux

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-03-02 01:28:10     driver of vnt6656 on BF561 uClinux

chaotian jing (AFGHANISTAN)

Message: 86695   

 

While ifconfig eth1 up is success executed,I do "iwlist eth1 scanning" to scan the access point,but  miss a fatal

 

mistake. follows

 

root:~> iwlist eth1 scanning

Warning: Driver for device eth1 has been compiled with version 21

of Wireless Extension, while this program supports up to version 17.

Some things may be broken...

 

bad: scheduling from the idle thread!

Hardware Trace:

   0 Target : <0x0000462c> { _dump_stack + 0x0 }

     Source : <0xffa0179e> { _schedule + 0x4c2 }

   1 Target : <0xffa0179e> { _schedule + 0x4c2 }

     Source : <0x0000f3fe> { _printk + 0x16 }

   2 Target : <0x0000f3fa> { _printk + 0x12 }

     Source : <0x0000f2b0> { _vprintk + 0x1b0 }

   3 Target : <0x0000f2a4> { _vprintk + 0x1a4 }

     Source : <0xffa01034> { __common_int_entry + 0xd8 }

   4 Target : <0xffa00fd2> { __common_int_entry + 0x76 }

     Source : <0xffa00e12> { _return_from_int + 0x4e }

   5 Target : <0xffa00e12> { _return_from_int + 0x4e }

     Source : <0xffa00df2> { _return_from_int + 0x2e }

   6 Target : <0xffa00dc4> { _return_from_int + 0x0 }

     Source : <0xffa00fce> { __common_int_entry + 0x72 }

   7 Target : <0xffa00fcc> { __common_int_entry + 0x70 }

     Source : <0xffa004ec> { _asm_do_IRQ + 0x7c }

   8 Target : <0xffa004e4> { _asm_do_IRQ + 0x74 }

     Source : <0x000137f4> { _irq_exit + 0x2c }

   9 Target : <0x000137f4> { _irq_exit + 0x2c }

     Source : <0x000137e4> { _irq_exit + 0x1c }

  10 Target : <0x000137c8> { _irq_exit + 0x0 }

     Source : <0xffa004e0> { _asm_do_IRQ + 0x70 }

  11 Target : <0xffa004e0> { _asm_do_IRQ + 0x70 }

     Source : <0xffa004da> { _asm_do_IRQ + 0x6a }

  12 Target : <0xffa004b6> { _asm_do_IRQ + 0x46 }

     Source : <0x00008644> { _bf561_demux_gpio_irq + 0x84 }

  13 Target : <0x00008638> { _bf561_demux_gpio_irq + 0x78 }

     Source : <0x000084f8> { _bf561_gpio_unmask_irq + 0x20 }

  14 Target : <0x000084ea> { _bf561_gpio_unmask_irq + 0x12 }

     Source : <0x000056aa> { _set_gpio_maska + 0x42 }

  15 Target : <0x00005668> { _set_gpio_maska + 0x0 }

     Source : <0x000084e6> { _bf561_gpio_unmask_irq + 0xe }

Stack from 001cbca0:

        00000000 ffa017a2 001e4d78 001cbcfc 01922454 0000001f ffff7063 01820008

        01820e04 0074dc00 001cbcfc 01904114 00161aaa 001e4d78 00017208 01901dc0

        001cbcfc ffff7068 00000002 00000002 01820000 00765800 0074dc00 004efcb0

        004efcb0 ffff7068 000168c8 001cc1a0 004ef968 00017220 01820000 00000003

        00000002 00000003 00000002 00000002 01921afe 000e3838 01966840 007658c4

        0190413c 01820000 ffa01aa4 00000002 00000082 0000001f 0000000e 000e4386

Call Trace:

[<000e0101>] _usbdev_ioctl+0x93d/0xf44

[<01903cb4>] _CARDbSetMediaChannel+0x4c/0x284 [vntwusb]

[<019087a4>] _vRunCommand+0x1370/0x1924 [vntwusb]

[<01921dc0>] _ChannelValid+0x0/0x20 [vntwusb]

[<000e518c>] _isp1362_irq+0x6dc/0xa70

[<0000b76e>] ___activate_task+0x1a/0x34

[<000ae9a6>] _bfin_serial_dma_tx_chars+0xf6/0x104

[<000aec60>] _bfin_serial_rx_dma_timeout+0x0/0xb8

[<00016678>] _run_timer_softirq+0xac/0x15c

[<01907434>] _vRunCommand+0x0/0x1924 [vntwusb]

[<000134e8>] ___do_softirq+0x60/0xa8

[<0000f956>] _register_console+0x66/0x198

[<00008002>] _read_iloc+0xa/0x14

[<00008050>] _irq_panic+0x44/0x138

[<0000ffe0>] _create_prof_cpu_mask+0x40/0x48

[<00040000>] _vfs_readdir+0x44/0x74

[<00214784>] _start_kernel+0x1b8/0x20c

[<00214788>] _start_kernel+0x1bc/0x20c

[<00214338>] _unknown_bootoption+0x0/0x234

[<0021418c>] _real_start+0x50/0x94

 

 

NULL pointer access (probably)

 

No Valid pid - Either things are really messed up, or you are in the kernel

return address: [0x0000b27e]; contents of:

0x0000b250:  c683  5180  c111  8608  c111  9801  c683  1180

0x0000b260:  c40b  0000  4d18  4df9  5248  6008  c407  0208

0x0000b270:  3001  0010  04c4  3221  3200  e800  0000 [9120]

0x0000b280:  67f8  3268  9320  6d45  ac69  ae82  e120  1001

 

RETE:  00000000  RETN: 001cbc88  RETX: 0000b27e  RETS: 0000b378

IPEND: c030  SYSCFG: 0006

SEQSTAT: 00000027    SP: 001cbbac

R0: 001cc1a0    R1: 00000000    R2: 00000001    R3: 003d08dd

R4: d283d600    R5: 003d08dd    R6: 3b9ac9ff    R7: 001cbcfc

P0: 001cc1a0    P1: 001e4064    P2: 004ea4ac    P3: 001cc1a0

P4: 00000000    P5: 001cc1a0    FP: 001cbc88

A0.w: 00000000    A0.x: 00000000    A1.w: 00000000    A1.x: 00000000

LB0: ffa01ad2  LT0: ffa01ad0  LC0: 00000000

LB1: 0009bad4  LT1: 0009baca  LC1: 00000000

B0: 00000000  L0: 00000000  M0: 00000000  I0: 00000001

B1: 00000000  L1: 00000000  M1: 00000000  I1: 00000000

B2: 00000000  L2: 00000000  M2: 00000000  I2: ffff70a6

B3: 00000000  L3: 00000000  M3: 00000000  I3: 00000000

 

USP: 001cc000   ASTAT: 02002022

DCPLB_FAULT_ADDR=00000000

ICPLB_FAULT_ADDR=0000b27e

 

 

Hardware Trace:

   0 Target : <0x000046e8> { _trap_c + 0x0 }

     Source : <0xffa00ab0> { _exception_to_level5 + 0xb4 }

   1 Target : <0xffa009fc> { _exception_to_level5 + 0x0 }

     Source : <0xffa009fa> { _ex_trap_c + 0x4e }

   2 Target : <0xffa009ac> { _ex_trap_c + 0x0 }

     Source : <0xffa00b50> { _trap + 0x28 }

   3 Target : <0xffa00b28> { _trap + 0x0 }

     Source : <0x0000b27a> { _dequeue_task + 0x6 }

   4 Target : <0x0000b274> { _dequeue_task + 0x0 }

     Source : <0x0000b374> { _deactivate_task + 0x1c }

   5 Target : <0x0000b358> { _deactivate_task + 0x0 }

     Source : <0xffa01656> { _schedule + 0x37a }

   6 Target : <0xffa0164c> { _schedule + 0x370 }

     Source : <0xffa016f6> { _schedule + 0x41a }

   7 Target : <0xffa016e8> { _schedule + 0x40c }

     Source : <0xffa0164a> { _schedule + 0x36e }

   8 Target : <0xffa01638> { _schedule + 0x35c }

     Source : <0xffa013c8> { _schedule + 0xec }

   9 Target : <0xffa01344> { _schedule + 0x68 }

     Source : <0xffa01340> { _schedule + 0x64 }

  10 Target : <0xffa0133e> { _schedule + 0x62 }

     Source : <0xffa0133a> { _schedule + 0x5e }

  11 Target : <0xffa01330> { _schedule + 0x54 }

     Source : <0xffa0177c> { _schedule + 0x4a0 }

  12 Target : <0xffa01770> { _schedule + 0x494 }

     Source : <0xffa0132e> { _schedule + 0x52 }

  13 Target : <0xffa0132a> { _schedule + 0x4e }

     Source : <0xffa01326> { _schedule + 0x4a }

  14 Target : <0xffa01324> { _schedule + 0x48 }

     Source : <0xffa01320> { _schedule + 0x44 }

  15 Target : <0xffa01310> { _schedule + 0x34 }

     Source : <0x00003ec6> { _sched_clock + 0x22 }

Stack from 001cbb8c:

        001e40b8 ffa00ab4 001ce768 001ce768 001ce764 0009bd36 004eb250 001cce54

        0000b27e 0000c030 00000027 00000000 001cbc88 0000b27e 0000b27e 0000b378

        001cc1a0 02002022 0009bad4 ffa01ad2 0009baca ffa01ad0 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 ffff70a6 00000000 00000001 001cc000 001cbc88 001cc1a0 00000000

Call Trace:

[<0000b378>] _deactivate_task+0x20/0x2c

[<00017208>] _msleep+0x0/0x34

[<01922454>] _INTnsProcessData+0x264/0x338 [vntwusb]

[<01904114>] _MACvRegBitsOn+0x0/0x30 [vntwusb]

[<00161aaa>] _schedule_timeout+0x52/0xac

[<00017208>] _msleep+0x0/0x34

[<01901dc0>] _vntwusb_found1+0x80/0x358 [vntwusb]

[<000168c8>] _process_timeout+0x0/0x4

[<00017220>] _msleep+0x18/0x34

[<01921afe>] _PIPEnsControlOut+0xc2/0xf8 [vntwusb]

[<000e3838>] _finish_request+0x30/0x98

[<0190413c>] _MACvRegBitsOn+0x28/0x30 [vntwusb]

[<000e4386>] _submit_req+0x1e/0x2ec

[<000e0101>] _usbdev_ioctl+0x93d/0xf44

[<01903cb4>] _CARDbSetMediaChannel+0x4c/0x284 [vntwusb]

[<019087a4>] _vRunCommand+0x1370/0x1924 [vntwusb]

[<01921dc0>] _ChannelValid+0x0/0x20 [vntwusb]

[<000e518c>] _isp1362_irq+0x6dc/0xa70

[<0000b76e>] ___activate_task+0x1a/0x34

[<000ae9a6>] _bfin_serial_dma_tx_chars+0xf6/0x104

[<000aec60>] _bfin_serial_rx_dma_timeout+0x0/0xb8

[<00016678>] _run_timer_softirq+0xac/0x15c

[<01907434>] _vRunCommand+0x0/0x1924 [vntwusb]

[<000134e8>] ___do_softirq+0x60/0xa8

[<0000f956>] _register_console+0x66/0x198

[<00008002>] _read_iloc+0xa/0x14

[<00008050>] _irq_panic+0x44/0x138

[<0000ffe0>] _create_prof_cpu_mask+0x40/0x48

[<00040000>] _vfs_readdir+0x44/0x74

[<00214784>] _start_kernel+0x1b8/0x20c

[<00214788>] _start_kernel+0x1bc/0x20c

[<00214338>] _unknown_bootoption+0x0/0x234

[<0021418c>] _real_start+0x50/0x94

 

Kernel panic - not syncing: Kernel exception

----------------------------------------------------------------------------------------------

 

who can give some clue about it? and what cause the mistake? what can I do to resolve this problem?

 

Thanks for your advice!

QuoteReplyEditDelete

 

 

2010-03-02 05:36:42     Re: driver of vnt6656 on BF561 uClinux

Robin Getz (UNITED STATES)

Message: 86713   

 

Chaotian:

 

It is most likely a problem in the vnt6656 driver.

 

Since the driver doesn't seem to be mainlined (that I found) - the best place for help with be Via. (or where you got the driver from).

 

-Robin

QuoteReplyEditDelete

 

 

2010-03-02 22:26:12     Re: driver of vnt6656 on BF561 uClinux

chaotian jing (AFGHANISTAN)

Message: 86735   

 

Thanks Robin.I know the problem is on the 6656 driver.the driver is runing well on arm-linux. May be Via can help,but it will take so much time.

 

I just want to know why the problem "bad: scheduling from the idle thread!" appered.

 

and how to resolve it .

 

other problem which is often miss is

 

Data access misaligned address violation

- Attempted misaligned data memory or data cache access.

------------------

 

so many problems I am almost mad!

QuoteReplyEditDelete

 

 

2010-03-03 06:15:17     Re: driver of vnt6656 on BF561 uClinux

Robin Getz (UNITED STATES)

Message: 86757   

 

Chaotian:

 

If you fix the scheduling drom the idle thread  issue - it is likely that the other problems will disappear.

 

On the ARM system where it is working - what kernel version? The same as on Blackfin?

 

-Robin

QuoteReplyEditDelete

 

 

2010-03-03 20:57:22     Re: driver of vnt6656 on BF561 uClinux

chaotian jing (AFGHANISTAN)

Message: 86772   

 

Robin:

 

The kernel version is 2.6.22

 

I find a problem which may cause it. See the code

 

 

 

375 VOID

376 vCommandTimerWait(

377     IN HANDLE    hDeviceContext,

378     IN UINT MSecond

379     )

380 {

381     PSDevice        pDevice = (PSDevice)hDeviceContext;

382

383     init_timer(&pDevice->sTimerCommand);

384     pDevice->sTimerCommand.data = (ULONG)pDevice;

385     pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;

386     // RUN_AT :1 msec ~= (HZ/1024)

387     pDevice->sTimerCommand.expires = (UINT)RUN_AT((MSecond * HZ) >> 10);

388     add_timer(&pDevice->sTimerCommand);

389     return;

390 }

----------------------

 

It is called in other function as   vCommandTimerWait((HANDLE)pDevice, 0);

 

the time is set to zero,so the callback function vRunCommand will run immediately。

 

If this function is not running, the mistake " bad: scheduling from the idle thread!" will not appear.

 

But I do this

 

386 VOID

387 vCommandTimerWait(

388     IN HANDLE    hDeviceContext,

389     IN UINT MSecond

390     )

391 {

392     PSDevice        pDevice = (PSDevice)hDeviceContext;

393

394

395

396     init_timer(&pDevice->sTimerCommand);

397     pDevice->sTimerCommand.data = (ULONG)pDevice;

398     vRunCommand(pDevice);

399     //pDevice->sTimerCommand.function = (TimerFunction)vRunCommand_s;//jing change 03.02

400     // RUN_AT :1 msec ~= (HZ/1024)

401 #if 0

402     pDevice->sTimerCommand.expires = (UINT)RUN_AT((MSecond * HZ) >> 10);

403     add_timer(&pDevice->sTimerCommand);

404     printk("PSDevice=%p, %p-->%p\n", pDevice, pDevice->sTimerCommand.function, vRunCommand);

405     msleep(2000);

406 #endif

407     return;

408 }

-----------------------

 

" bad: scheduling from the idle thread!" is not appear,too.

 

but when scanning,cannot find any ap.

 

root:~> iwlist eth1 scanning

deni SIOCSIWSCAN

--><--- s_bCommandComplete,1370

--><--- s_bCommandComplete,1385

--><--- s_bCommandComplete,1490, pDevice=00260000

eth1 has been compiled with version 21

of Wireless Extension, while this program supports up to version 17.

Some things may be broken...

 

++++pMg-&>eScanType = 1

wireless_send_event--->SIOCGIWSCAN(scan done)

--><--- s_bCommandComplete,1370

--><--- s_bCommandComplete,1492

@@@@@@ bScheduleCommand,1548

eth1      No scan results

 

 

 

Is the problem lies in the  init_timer and add_timer ?

QuoteReplyEditDelete

 

 

2010-03-04 10:45:12     Re: driver of vnt6656 on BF561 uClinux

Robin Getz (UNITED STATES)

Message: 86806   

 

Chaotain:

 

2.6.22 is the ARM version and the Blackfin version is... ?

 

-Robin

QuoteReplyEditDelete

 

 

2010-03-04 20:48:57     Re: driver of vnt6656 on BF561 uClinux

chaotian jing (AFGHANISTAN)

Message: 86816   

 

2.6.22 too.

QuoteReplyEditDelete

 

 

2010-03-05 04:01:04     Re: driver of vnt6656 on BF561 uClinux

Yi Li (CHINA)

Message: 86851   

 

chaotian,

 

Since I has no access to your HW and your driver, I cannot look deep into it.

 

I can only give some suggestions:

 

"bad: scheduling from the idle thread!" happens when for some reason, idle task is to be removed from the run queue of idle schedule class (e.g, someone tries to make idle thread sleep ! ). This is not reasonable.

 

One possible case for this error is that, a softirq handler (e.g tasklet, timer softriq) calls msleep() -> schedule(), and schedule() thinks current task is the "idle thread". I saw possible calling path in the trace you posted, but I am not sure.

 

So you will have to look into your driver to debug.

 

-Yi

QuoteReplyEditDelete

 

 

2010-03-05 09:09:12     Re: driver of vnt6656 on BF561 uClinux

Robin Getz (UNITED STATES)

Message: 86866   

 

Chaotian:

 

Where did you get a version of 2.6.22 for Blackfin? 2009R1.1 is based on 2.6.28.10; Are you using an old (unsupported) release? If so -- upgrade.

 

-Robin

QuoteReplyEditDelete

 

 

2010-03-08 02:27:59     Re: driver of vnt6656 on BF561 uClinux

hua zhu (CHINA)

Message: 86930   

 

hi, Robin,

 

it's a 2008R1.5 release for BF561, it's stable for our app,

 

and here  only ISP1362 involved, do you think it's necessary to upgrade? any update in USB host part in 2009R1?

 

pls advise.

QuoteReplyEditDelete

 

 

2010-03-08 10:37:14     Re: driver of vnt6656 on BF561 uClinux

Robin Getz (UNITED STATES)

Message: 86954   

 

Hua:

 

If it was stable - you wouldn't be here asking questions - right?

 

Upgrade.

 

-Robin

Attachments

    Outcomes