2010-09-29 04:41:55     USB-Serial.c Issue

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

2010-09-29 04:41:55     USB-Serial.c Issue

Usama Shakeel (PAKISTAN)

Message: 93962   

 

Hello,

 

I am trying to communicate with my GSM modem (Huawei E220) through USB. It gets detected with the following message

 

usb 1-2: new full speed USB device using isp1362-hcd and address 2            

usb 1-2: configuration #1 chosen from 1 choice                                

usb-storage: probe of 1-2:1.0 failed with error -5                            

option 1-2:1.0: GSM modem (1-port) converter detected                         

usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0                 

usb-storage: probe of 1-2:1.1 failed with error -5                            

option 1-2:1.1: GSM modem (1-port) converter detected                         

usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1                 

usb-storage: probe of 1-2:1.2 failed with error -1                            

usb 1-2: New USB device found, idVendor=12d1, idProduct=1003                  

usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0             

usb 1-2: Product: HUAWEI Mobile                                               

usb 1-2: Manufacturer: HUAWEI Technologies   

 

When I try to send it AT commands through Microcom it works absolutely fine.

 

But when I try to send AT commands through my own application (which is working fine on Desktop Computer) it kind of crashes with the messages from usb-serial.c shown at the end.

 

This happens when it reaches to fclose(FILE * ) line.

 

I am being unable to find its cause. Can somebody help me come out of this.

 

It something wrong with serial_write and serial_writeroom but what is that I dont know..

 

Regards

 

Usama Bin Shakeel

 

 

 

Message from uClinux after I run my aplic... :

 

------------[ cut here ]------------                                          

WARNING: at drivers/usb/serial/usb-serial.c:325 _serial_write+0x8e/0x90()     

Modules linked in:                                                            

Hardware Trace:                                                               

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

     Source : <0x0000fde0> { _warn_on_slowpath + 0x44 } CALL pcrel            

   1 Target : <0x0000fde0> { _warn_on_slowpath + 0x44 }                       

     Source : <0x0002aab6> { _print_modules + 0x7a } RTS                      

   2 Target : <0x0002aab0> { _print_modules + 0x74 }                          

     Source : <0x000103c6> { _printk + 0x16 } RTS                             

   3 Target : <0x000103c2> { _printk + 0x12 }                                 

     Source : <0x00010c5e> { _vprintk + 0x132 } RTS                           

   4 Target : <0x00010c52> { _vprintk + 0x126 }                               

     Source : <0x00010c44> { _vprintk + 0x118 } IF !CC JUMP                   

   5 Target : <0x00010c3c> { _vprintk + 0x110 }                               

     Source : <0x00010d82> { _vprintk + 0x256 } JUMP.S                        

   6 Target : <0x00010d82> { _vprintk + 0x256 }                               

     Source : <0x0001023a> { _wake_up_klogd + 0x1a } RTS                      

   7 Target : <0x00010220> { _wake_up_klogd + 0x0 }                           

     Source : <0x0001064e> { _release_console_sem + 0x1ae } JUMP.L            

   8 Target : <0x00010646> { _release_console_sem + 0x1a6 }                   

     Source : <0x0001062a> { _release_console_sem + 0x18a } IF !CC JUMP       

   9 Target : <0x0001061e> { _release_console_sem + 0x17e }                   

     Source : <0x000235a2> { _up + 0x3e } RTS                                 

  10 Target : <0x0002359c> { _up + 0x38 }                                     

     Source : <0x0002358e> { _up + 0x2a } IF !CC JUMP                         

  11 Target : <0x00023564> { _up + 0x0 }                                      

     Source : <0x0001061a> { _release_console_sem + 0x17a } CALL pcrel        

  12 Target : <0x00010606> { _release_console_sem + 0x166 }                   

     Source : <0x000104ee> { _release_console_sem + 0x4e } IF !CC JUMP        

  13 Target : <0x000104c2> { _release_console_sem + 0x22 }                    

     Source : <0x000105e8> { _release_console_sem + 0x148 } IF CC JUMP        

  14 Target : <0x000105e0> { _release_console_sem + 0x140 }                   

     Source : <0x0001019a> { __call_console_drivers + 0x7a } RTS              

  15 Target : <0x00010194> { __call_console_drivers + 0x74 }                  

     Source : <0x00010156> { __call_console_drivers + 0x36 } IF !CC JUMP      

Stack info:                                                                   

SP: [0x035af6e0] <0x035af6e0> /* kernel dynamic memory */                    

FP: (0x035af7d0)                                                             

Memory from 0x035af6e0 to 035b0000                                           

035af6e0:[0000fde0]<0000fde4> 035af700  0029aba4  00000041  0029aba4  00000145

035af700: 7265735f  5f6c6169  74697277  78302b65  302f6538  00303978  035af71c

035af720: 5f6c6169  74697277  6f725f65  302b6d6f  2f653678  30377830  00000000

035af740: e6019301  e6800017  035af778  035af778 <00009ba2> 036c2980  036c2980

035af760: 00000003  00000000  035af788 <0000e1a8> 00000001  00000000  035af790 >

035af780: 002bf418  b0c06000  035af7ac <0000b4d8> 002bf418  036c2980  00000003

035af7a0: 051ce122  001ce488  0000003f  035af7ec <0002007e> 0368ffb8  036c8508

035af7c0: 00000001  30170201  001ae601  83f8c682 (00000000)<00009df2> 036c84fc

035af7e0:<00124cee> 03502e00  00000001  035af82c <00009e2c> 0361160c  035af884 >

035af800: 03502e00 <000b8e7a> 034d9800  034d9800  00000041  00000010  00000000 >

035af820:<000bb730><000bb7a8><0001cfe8> 0000ff41 <0000dd0e><000bc76c> 03648200

035af840: 00000010  0361160c  035af848  035af848  035af88c  035af8a8  0310ec2f

035af860: 03648260  002cfc30  00000000  c0010200  002c42e0  001ee600  e60563f8

035af880: 224a001c  035af884  035af884  00000001  00000003  0364cc90  0000003f

035af8a0:<00120582> 0361e4d4  035af95c <0011109a> 0364c740  0361e400  002cfc30

035af8c0: 00000001  00000020  035af91c <00120582> 0361e4d4  03648260  002cfc30

035af8e0: c0010200  00000000  03611580  034d9814 <000bf0ac> 0310ec00  034d9800

035af900: 0310ed1c  0000003f  00000000  0361e4d4  00000001  002cfc30  00000000

035af920: 03648388 <001276b4> 0364c940  002cfc30  03502e00  034d9800  03503000

035af940: 00000003  0364cc90  0000003f  00000000 <0011037a> 0364c940  0361e400

035af960: 00000000  0361e4d4  002cfc30  00000000  00000001 <0011dca6><0011e5b6>

035af980: 03648380  0361e400  002c42e0  035ae000  035af9e4 <0011ea46> 0364c940

035af9a0: 00000000  00001000  00000100  035af9f0  00000041  00000000  0361e58c >

035af9c0: 03648380  03648a40  0361e57c  0000000e  00000001  0000001f  0000000e

035af9e0: 002cfc30  035afa98 <0011109a> 0364c740  0361e400  002cfc30  00000000

035afa00: 00000020  00000041  0361e400  0364c740  0361e588  0361e59c  035afa88 >

035afa20: 0361e400  00000022  03630c00  ffffbfff  00000001  00000100  0361e4d4

035afa40: 00000000  0310ec2c <00124ca6> 03502e00  034d9800  0310ed2d  00000001

035afa60: 00000041  000bc741  03648200  035afac0 <00120582> 03610100  03640000

035afa80: 00000000  00000100  035afc5c <00110698> 0361e400  00000022  03630c00

035afaa0: 0000ffff  00000022  03648a40  0361e400  0000003f  00000000 <0002d736>

035afac0: 00000000  00000000  0364c740  0361e400  002cfc30 <0002efd0> 002d7e70

035afae0: 00000022  00000000  0364c740  00000041  00000001 <00008dda> 002cce68

035afb00: 0364c8c0 <000b8e7a> 035afc5c <000146ae> ffa08318  0000001a  00000000

035afb20: 03502e00  00000000  c0410280  ffa08bb4  0361e4d4  00000000  80000280 >

035afb40: 00000001 <0011e5b6> 0012050c  02003004  00002000  00000000  035b0000

035afb60: 0012050c <00120582> 0000000c  02003004  035e41a5  0011cc5e  035e415e

035afb80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

035afba0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

035afbc0: 00000000  00000000  00000000  00000000  0310c054  00000008  035e8cf4

035afbe0: 0361e4d4  03648a40  03630c00  002d5474  0361e4d4  0361e4d4  00000000

035afc00: 00000010  03648a40  0000000f  00000002  0000ffff  0000ffff  0000ffff

035afc20: 00000006  002cfc30  00000003  0364cc68  0000003f  00000000  0061e4d4

035afc40: 035afcf4  00000002  03630c34  0000ffff  00000000  00000000  00000001

035afc60:<0011109a> 0364c0c0  0361e400  03630c00  00000000  00000001  00000010

035afc80: 0361e400  0364c0c0  00000000  00000001  00000100  000003ff <0011ded8>

035afca0: 0361e58c <0011eed8> 03648260  0361e554  0361e57c  0000000f  035afcf0 >

035afcc0: 034d9814  002cfc30  03502e00  0000003f  03504000  00000000  0361e4d4

035afce0: 0000003f  00000000  00000000  00000000  03648388  03648388 <00127640>

035afd00: 002cfc30  03502e00  034d9800  03504000  80000280 <00112368> 0364c0c0

035afd20: 03630c00  00000000  035afd40  00001388  00000000 <00110370><0011037a>

035afd40: 00000000  035afd44  035afd44 <00111b0c><00112552> 03507d80  00000000

035afd60: 00000000  00000022 <0011db16> 000003ff <0011ea46> 0364c740  00000000 >

035afd80: 036488c0  03502e00  03502e00  00000000  034d9800  00000000  00000001

035afda0: 0361e554  0361e57c  00000021  00000000  00000000  00000000  00000000

035afdc0:<00127dc4> 036488c0  03648860  036488f8  034d9800  0361e51c  0361e4d4

035afde0:<0012506c> 03502e00  034d9800  003b0d20  03502e3c  003b0d20 <0011fa7e>>

035afe00: 0000000a  034d9898 <000ba7b2> 034d9800  00000000  00000008  0354c114 >

035afe20: 03630014  03630000  0361b000  00000000  0354d2e0  035e78c4  0000000b

035afe40: 00000000  036330e0  00000000  00000000  035ae000 <000be92c> 0000ffff

035afe60: 0000000b  0361b000  00000000 <000ba4fc> 0354a1f8  036f40a0 <000baa2e>

035afe80: 003b0d20  0354d2e0  00000008  0354c114  00000002  00000001  00000008

035afea0: 00000002 <00041188> 00000002  0000000b  0000000b  00000000  00000000

035afec0:<0003ed5a> 003b0d20  00000006  035e25f8  00000000  003aeb00  035e78c4

035afee0: 00000000 <0003ede2> 003aeb00  003b0d20  ffffe000  00000000  00000000

035aff00: ffa08880  0003ed80  00000000  035e8cdd  0000000b  00000001  00000000

035aff20: 00000002  035e284e  00008000  00002000  00000000  035b0000  035e284e

035aff40:<035e06fc> ffa08ef8  02001024  035e41a5  035e1d7b  035e415e  035e1d68

035aff60: fffffffc  00000000  00000000  00000000  00000000  00000000  00000000

035aff80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

035affa0: 00000000  00000000  00000000  0310c054  035e6108  035e8cf4  035e8d00

035affc0: 035e25e8  035e25f8  035e6114  035e8d7d  00000006  00000000  00000000

035affe0: 00000001  00000000  00000000  00000000  00000003  00000003  00000006

Return addresses in stack:                                                    

    address : <0x0000fde0> { _warn_on_slowpath + 0x44 }                       

    address : <0x0000fde4> { _warn_on_slowpath + 0x48 }                       

    address : <0x00009ba2> { _enqueue_task + 0xe }                            

    address : <0x0000e1a8> { _check_preempt_wakeup + 0x98 }                   

    address : <0x00009c74> { _activate_task + 0x34 }                          

    address : <0x0000b4d8> { _try_to_wake_up + 0x8c }                         

    address : <0x0002007e> { _autoremove_wake_function + 0x12 }               

   frame  1 : <0x00009df2> { ___wake_up_common + 0x3a }                       

    address : <0x00124cee> { _serial_write + 0x8e }                           

    address : <0x00009e2c> { ___wake_up + 0x18 }                              

    address : <0x00124c5e> { _serial_write_room + 0x6e }                      

    address : <0x000b8e7a> { _tty_put_char + 0x26 }                           

    address : <0x000bb730> { _opost + 0x10 }                                  

    address : <0x000bb730> { _opost + 0x10 }                                  

    address : <0x000bb7a8> { _opost + 0x88 }                                  

    address : <0x0001cfe8> { _insert_work + 0x38 }                            

    address : <0x0000dd0e> { _task_tick_fair + 0x3e }                         

    address : <0x000bc76c> { _n_tty_receive_buf + 0x300 }                     

    address : <0x00120582> { _isp1362_urb_enqueue + 0xf2 }                    

    address : <0x0011109a> { _usb_hcd_submit_urb + 0x27a }                    

    address : <0x00120582> { _isp1362_urb_enqueue + 0xf2 }                    

    address : <0x000bf0ac> { _flush_to_ldisc + 0xb4 }                         

    address : <0x001276b4> { _option_indat_callback + 0x108 }                 

    address : <0x0011037a> { _usb_hcd_giveback_urb + 0x42 }                   

    address : <0x0011dca6> { _isp1362_read_buffer + 0x16 }                    

    address : <0x0011e5b6> { _finish_request + 0x36 }                         

    address : <0x0011ea46> { _postproc_ep + 0x156 }                           

    address : <0x0011eed8> { _finish_transfers + 0x144 }                      

    address : <0x0011109a> { _usb_hcd_submit_urb + 0x27a }                    

    address : <0x0011fa7e> { _isp1362_irq + 0x72a }                           

    address : <0x00124ca6> { _serial_write + 0x46 }                           

    address : <0x00120582> { _isp1362_urb_enqueue + 0xf2 }                    

    address : <0x00110698> { _usb_hcd_irq + 0x2c }                            

    address : <0x0002d736> { _handle_IRQ_event + 0x36 }                       

    address : <0x0002efd0> { _handle_level_irq + 0x54 }                       

    address : <0x00008dda> { _bfin_demux_gpio_irq + 0x72 }                    

    address : <0x000b8e7a> { _tty_put_char + 0x26 }                           

    address : <0x000146ae> { _irq_enter + 0xa }                               

    address : <0x000bc786> { _n_tty_receive_buf + 0x31a }                     

    address : <0x0011e5b6> { _finish_request + 0x36 }                         

    address : <0x00120582> { _isp1362_urb_enqueue + 0xf2 }                    

    address : <0x0011109a> { _usb_hcd_submit_urb + 0x27a }                    

    address : <0x0011ded8> { _isp1362_write_ptd + 0x4c }                      

    address : <0x0011eed8> { _finish_transfers + 0x144 }                      

    address : <0x00009e2c> { ___wake_up + 0x18 }                              

    address : <0x00127640> { _option_indat_callback + 0x94 }                  

    address : <0x00112368> { _usb_start_wait_urb + 0x2c }                     

    address : <0x00110370> { _usb_hcd_giveback_urb + 0x38 }                   

    address : <0x0011037a> { _usb_hcd_giveback_urb + 0x42 }                   

    address : <0x00111b0c> { _usb_alloc_urb + 0x1c }                          

    address : <0x00112552> { _usb_control_msg + 0xa2 }                        

    address : <0x0011db16> { _prepare_ptd + 0x26e }                           

    address : <0x0011ea46> { _postproc_ep + 0x156 }                           

    address : <0x00127270> { _option_send_setup + 0x74 }                      

    address : <0x00127dc4> { _option_close + 0x94 }                           

    address : <0x0012506c> { _serial_close + 0xc0 }                           

    address : <0x0011fa7e> { _isp1362_irq + 0x72a }                           

    address : <0x000c31f4> { _uart_write + 0x80 }                             

    address : <0x000ba7b2> { _tty_release_dev + 0x106 }                       

    address : <0x00009e2c> { ___wake_up + 0x18 }                              

    address : <0x000be92c> { _tty_ldisc_deref + 0x68 }                        

    address : <0x000ba4fc> { _tty_write + 0x160 }                             

    address : <0x000baa2e> { _tty_release + 0xa }                             

    address : <0x00041188> { ___fput + 0x90 }                                 

    address : <0x0003ed5a> { _filp_close + 0x36 }                             

    address : <0x0003ede2> { _sys_close + 0x62 }                              

    address : <0x035e06fc> [ send + 0x6bc ]                                   

---[ end trace c96a9c2d03e108ed ]---                                          

index[3] 0                                                                    

                                                                              

Recieved:OK                                                                   

                                                                              

Read :-x-                                                                     

Length : 3                                                                   

-ndex[0] 79                                                                   

index[1] 75                                                                   

index[2] 10                                                                   

index[3] 0                                                                    

---------[ cut here ]------------                                             

WARNING: at drivers/usb/serial/usb-serial.c:338 _serial_write_room+0x6e/0x70()

Modules linked in:                                                            

Hardware Trace:                                                               

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

     Source : <0x0000fde0> { _warn_on_slowpath + 0x44 } CALL pcrel            

   1 Target : <0x0000fde0> { _warn_on_slowpath + 0x44 }                       

     Source : <0x0002aab6> { _print_modules + 0x7a } RTS                      

   2 Target : <0x0002aab0> { _print_modules + 0x74 }                          

     Source : <0x000103c6> { _printk + 0x16 } RTS                             

   3 Target : <0x000103c2> { _printk + 0x12 }                                 

     Source : <0x00010c5e> { _vprintk + 0x132 } RTS                           

   4 Target : <0x00010c52> { _vprintk + 0x126 }                               

     Source : <0x00010c44> { _vprintk + 0x118 } IF !CC JUMP                   

   5 Target : <0x00010c3c> { _vprintk + 0x110 }                               

     Source : <0x00010d82> { _vprintk + 0x256 } JUMP.S                        

   6 Target : <0x00010d82> { _vprintk + 0x256 }                               

     Source : <0x0001023a> { _wake_up_klogd + 0x1a } RTS                      

   7 Target : <0x0001023a> { _wake_up_klogd + 0x1a }                          

     Source : <0x0001022c> { _wake_up_klogd + 0xc } IF !CC JUMP               

   8 Target : <0x00010220> { _wake_up_klogd + 0x0 }                           

     Source : <0x0001064e> { _release_console_sem + 0x1ae } JUMP.L            

   9 Target : <0x00010646> { _release_console_sem + 0x1a6 }                   

     Source : <0x0001062a> { _release_console_sem + 0x18a } IF !CC JUMP       

  10 Target : <0x0001061e> { _release_console_sem + 0x17e }                   

     Source : <0x000235a2> { _up + 0x3e } RTS                                 

  11 Target : <0x0002359c> { _up + 0x38 }                                     

     Source : <0x0002358e> { _up + 0x2a } IF !CC JUMP                         

  12 Target : <0x00023564> { _up + 0x0 }                                      

     Source : <0x0001061a> { _release_console_sem + 0x17a } CALL pcrel        

  13 Target : <0x00010606> { _release_console_sem + 0x166 }                   

     Source : <0x000104ee> { _release_console_sem + 0x4e } IF !CC JUMP        

  14 Target : <0x000104c2> { _release_console_sem + 0x22 }                    

     Source : <0x000105e8> { _release_console_sem + 0x148 } IF CC JUMP        

  15 Target : <0x000105e0> { _release_console_sem + 0x140 }                   

     Source : <0x0001019a> { __call_console_drivers + 0x7a } RTS              

Stack info:                                                                   

SP: [0x034e59a0] <0x034e59a0> /* kernel dynamic memory */     

QuoteReplyEditDelete

 

 

2010-09-29 05:51:31     Re: USB-Serial.c Issue

Usama Shakeel (PAKISTAN)

Message: 93967   

 

Guyz I need help...

 

 

 

I am able to receive and send SMS through the same board and Modem through Microcom.

 

I am able to receive and send SMS through the same application and Modem on Desktop Computer.

 

 

 

I dont know the problem, but I guess microcom is not using usb-serial.c or what.. Please tell what is going wrong I am writting a part of code just to give you people an idea. The code is communicating i.e. it gets the response but when I go to close the File descriptor it crashes uclinux...

 

Waiting for reply..

 

Code:

 

int send_mess ();

int main()

{

    printf("Start :\n ");

    send_mess();

    printf("End :\n");

 

        return 0;

  

}

 

 

int send_mess ()

{

    int nbytes = 100;

           char data_r[100];

 

    FILE * serialDev;

    char deviceName[15] = "/dev/ttyUSB0";

 

    serialDev = fopen(deviceName, "wb+");

    if (serialDev <= 0 )

    {

        printf("ERROR : Device Not Attached \n");

        exit(1);

    }

    int datawrite=0;

    char dataread;

 

    datawrite = fprintf(serialDev,"AT\r\n");

    fflush(serialDev);

    if(datawrite<0)

    {

        printf("Error : %s \n",strerror(errno));

            printf("\n No of bytes write :%d\n",datawrite);

    }

 

    do {

        dataread =  fgets(data_r, nbytes,serialDev);

    } while ( strcmp(data_r, "OK\n") != 0 );

    printf("END AT\n");

 

    fclose(serialDev);

        return 0;

 

}

QuoteReplyEditDelete

 

 

2010-09-29 09:52:41     Re: USB-Serial.c Issue

Mike Frysinger (UNITED STATES)

Message: 93979   

 

like ive already told you, that is not a crash.  it is a *warning* just like the message says.

 

if you want to find out the source, *you need to read the code* that the warning already points you to.

 

you've never stated what kernel version you're using or how it is configured, so you're the only one with source that matches the kernel you're running and the kernel that is issuing a warning.

QuoteReplyEditDelete

 

 

2010-09-29 12:08:23     Re: USB-Serial.c Issue

Usama Shakeel (PAKISTAN)

Message: 93981   

 

Mike I am using 2009 Distro. It has 2.6.28.10 and it is not just warning message it is crashing uclinux.

 

After the following message it does reboot

 

SP: [0x034e59a0] <0x034e59a0> /* kernel dynamic memory */   

 

and I have to load uclinux again.

 

I was seeing on kernel OOPS and there were similar problems reported there but I dont know they were exactly same or not..

 

While seeing source code, I was not able to figure out in which function it crashes. for that I used printf but it is not allowed in drivers therefore dbg is to be used. I currenlty dont know how to use that either..

 

Kindly help on this..

 

 

 

Regards

 

Usama Bin Shakeel

QuoteReplyEditDelete

 

 

2010-09-30 02:14:20     Re: USB-Serial.c Issue

Usama Shakeel (PAKISTAN)

Message: 94003   

 

Mike I used printk to display the function name it visits and this was the flow. and after displaying a warning it stucks at the last line and reboots the system.

 

 

 

 

 

root> ./send                                                                

Enter The Number : 03004455340"                                               

Mob_NUM : 03004455340"                                                        

Made Mess : AT+CMGS="03004455340""                                            

Distance = 235 *ranch = 237                                                   

                                                                              

****************** I am Here to Open Usb *********************                

******************* port->port.count == 1 *********************               

******************* port->port.count == 1 *********************               

Going out of Open                                                             

                                                                              

After Device Open:******************* I am Here to write_room Usb **************

5469788                                                                       

String Sent: AT                                                               

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

^C******************* I am Here to write_room Usb *********************       

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to Close Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

------------[ cut here ]------------                                          

WARNING: at drivers/usb/serial/usb-serial.c:344 _serial_write_room+0x7a/0x7c()

Modules linked in:                                                            

Hardware Trace:                                                               

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

     Source : <0x0000fde0> { _warn_on_slowpath + 0x44 } CALL pcrel            

   1 Target : <0x0000fde0> { _warn_on_slowpath + 0x44 }                       

     Source : <0x0002aab6> { _print_modules + 0x7a } RTS                      

   2 Target : <0x0002aab0> { _print_modules + 0x74 }                          

     Source : <0x000103c6> { _printk + 0x16 } RTS                             

   3 Target : <0x000103c2> { _printk + 0x12 }                                 

     Source : <0x00010c5e> { _vprintk + 0x132 } RTS                           

   4 Target : <0x00010c52> { _vprintk + 0x126 }                               

     Source : <0x00010c44> { _vprintk + 0x118 } IF !CC JUMP                   

   5 Target : <0x00010c3c> { _vprintk + 0x110 }                               

     Source : <0x00010d82> { _vprintk + 0x256 } JUMP.S                        

   6 Target : <0x00010d82> { _vprintk + 0x256 }                               

     Source : <0x0001023a> { _wake_up_klogd + 0x1a } RTS                      

   7 Target : <0x0001023a> { _wake_up_klogd + 0x1a }                          

     Source : <0x0001022c> { _wake_up_klogd + 0xc } IF !CC JUMP               

   8 Target : <0x00010220> { _wake_up_klogd + 0x0 }                           

     Source : <0x0001064e> { _release_console_sem + 0x1ae } JUMP.L            

   9 Target : <0x00010646> { _release_console_sem + 0x1a6 }                   

     Source : <0x0001062a> { _release_console_sem + 0x18a } IF !CC JUMP       

  10 Target : <0x0001061e> { _release_console_sem + 0x17e }                   

     Source : <0x000235a2> { _up + 0x3e } RTS                                 

  11 Target : <0x0002359c> { _up + 0x38 }                                     

     Source : <0x0002358e> { _up + 0x2a } IF !CC JUMP                         

  12 Target : <0x00023564> { _up + 0x0 }                                      

     Source : <0x0001061a> { _release_console_sem + 0x17a } CALL pcrel        

  13 Target : <0x00010606> { _release_console_sem + 0x166 }                   

     Source : <0x000104ee> { _release_console_sem + 0x4e } IF !CC JUMP        

  14 Target : <0x000104c2> { _release_console_sem + 0x22 }                    

     Source : <0x000105e8> { _release_console_sem + 0x148 } IF CC JUMP        

  15 Target : <0x000105e0> { _release_console_sem + 0x140 }                   

     Source : <0x0001019a> { __call_console_drivers + 0x7a } RTS              

Stack info:                                                                   

SP: [0x0047f618] <0x0047f618> /* kernel dynamic memory */  

QuoteReplyEditDelete

 

 

2010-09-30 05:30:02     Re: USB-Serial.c Issue

Usama Shakeel (PAKISTAN)

Message: 94065   

 

With similar commands sent to Modem through microcom shows following behaviour with printk on..

 

 

 

root:/> microcom /dev/ttyUSB0                                                 

******************* I am Here to Open Usb *********************               

******************* port->port.count == 1 *********************               

******************* port->port.count == 1 *********************               

Going out of Open                                                             

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

A******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

T******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

                                                                              

OK                                                                            

******************* I am Here to write_room Usb *********************         

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

A******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

T******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

+******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

C******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

M******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

G******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

F******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

=******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

1******************* I am Here to write_room Usb *********************        

******************* I am Here to write_room Usb *********************         

******************* I am Here to write Usb *********************              

******************* I am Here to write_room Usb *********************         

                                                                              

OK                                                                            

******************* I am Here to write_room Usb ********************* 

QuoteReplyEditDelete

 

 

2010-09-30 10:48:45     Re: USB-Serial.c Issue

Mike Frysinger (UNITED STATES)

Message: 94073   

 

your logs show expected behavior.  stdio (fopen/fclose) do buffering by default.  you didnt disable buffering which means everything gets flushed when you fclose.

QuoteReplyEditDelete

 

 

2010-10-07 06:37:55     Re: USB-Serial.c Issue

Usama Shakeel (PAKISTAN)

Message: 94312   

 

Thanx Mike that was again helpful..

 

I have resolved this issue now.. One more Question is that how can I start my application at start of uClinux automatically..?

 

 

 

Waiting for you reply..

 

 

 

Regards

 

Usama Bin Shakeel

Attachments

    Outcomes