Re: some questions about PM enable with usb driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 03, 2016 at 11:16:11PM +0800, yoma sophian wrote:
> hi all:
> When I porting my platform ehci driver on kernel v4.1,
> I get back trace like below without plug in any device and just insert
> usb-common.ko, usbcore.ko and ehci-hcd.ko.
> (and detail is show in the attachment)
> 
> It seems caused by the PM related thread that is wakened up, even
> there is no device plug in and step in null pointer.
> Is there any callback function or flag in ehci-platform.c that we
> should check that will trigger the related PM work thread?
> 
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                                                          
> bus: 'platform': add driver Platform-ehci                                                                            
> bus: 'platform': driver_probe_device: matched device fc1f0000.ehci with driver Platform-ehci                         
> bus: 'platform': really_probe: probing driver Platform-ehci with device fc1f0000.ehci                                
> [USB] 2015-04-16v00002 pdev : fc1f0000.ehci                                                                         
> Platform-ehci fc1f0000.ehci: Platform EHCI                                                                            
> Platform-ehci fc1f0000.ehci: new USB bus registered, assigned bus number 1                                           
> Platform-ehci fc1f0000.ehci: irq 10, io mem 0xfc1f0000 mapped f023e000                                               
> Platform-ehci fc1f0000.ehci: USB 2.0 started, EHCI 1.00, overcurrent ignored                                         
> device: 'ep_00': device_add                                                                                         
....

> PM: Adding info for No Bus:ep_00                                                                                    
> driver: 'Platform-ehci': driver_bound: bound to device 'fc1f0000.ehci'                                               
> bus: 'platform': really_probe: bound device fc1f0000.ehci to driver Platform-ehci                                    

Why the probe for fc1f0000.ehci is called twice? Do you write the same
controller address for both controller at dts?

Peter
> bus: 'usb': add driver usb-storage                                                                                  
> usbcore: registered new interface driver usb-storage                                                                
> Unable to handle kernel NULL pointer dereference at virtual address 00000000                                        
> pgd = c0004000                                                                                                      
> [00000000] *pgd=00000000                                                                                            
> ================================================================================                                    
>  SMP Send Stop Other CPU!                                                                                           
> ================================================================================                                    
> CPU1: stopping                                                                                                      
> Process swapper/1 (pid: 0, stack limit = 0xee934210)                                                                
> CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           O    4.1.10+ #4                                                  
> Hardware name: Platform-Cortex A9                                                                                    
> task: ee905a00 ti: ee934000 task.ti: ee934000                                                                       
> PC is at arch_cpu_idle+0x40/0x4c                                                                                    
> LR is at arch_cpu_idle+0x3c/0x4c                                                                                    
> pc : [<c00107f8>]    lr : [<c00107f4>]    psr: 60000113                                                             
> sp : ee935fb0  ip : ee935fb0  fp : ee935fbc                                                                         
> r10: c06ea5a0  r9 : c06ea5a0  r8 : c04b7e2c                                                                         
> r7 : ee935fc0  r6 : c06ce344  r5 : 00000015  r4 : ee934000                                                          
> r3 : c06eace8  r2 : 00000000  r1 : 00000000  r0 : 00000000                                                          
> Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel                                                 
> Control: 10c5387d  Table: 3df2404a  DAC: 00000015                                                                   
> CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           O    4.1.10+ #4                                                  
> Hardware name: Platform-Cortex A9                                                                                    
> Backtrace:                                                                                                          
> [<c0013954>] (dump_backtrace) from [<c0013bb8>] (show_stack+0x20/0x24)                                              
>  r6:00000000 r5:00000001 r4:00000000 r3:00200040                                                                    
> [<c0013b98>] (show_stack) from [<c04aea1c>] (dump_stack+0x7c/0xc8)                                                  
> [<c04ae9a0>] (dump_stack) from [<c00161d4>] (handle_IPI+0x190/0x2dc)                                                
>  r4:ee934210 r3:ee934000                                                                                            
> [<c0016044>] (handle_IPI) from [<c000948c>] (gic_handle_irq+0x64/0x6c)                                              
>  r10:c06ea5a0 r9:c06ea5a0 r8:c04b7e2c r7:ee935f9c r6:c06eb2bc r5:ee935f68                                           
>  r4:f0002100                                                                                                        
> [<c0009428>] (gic_handle_irq) from [<c00146c4>] (__irq_svc+0x44/0x7c)                                               
> Exception stack(0xee935f68 to 0xee935fb0)                                                                           
> 5f60:                   00000000 00000000 00000000 c06eace8 ee934000 00000015                                       
> 5f80: c06ce344 ee935fc0 c04b7e2c c06ea5a0 c06ea5a0 ee935fbc ee935fb0 ee935fb0                                       
> 5fa0: c00107f4 c00107f8 60000113 ffffffff                                                                           
>  r6:ffffffff r5:60000113 r4:c00107f8 r3:c00107f4                                                                    
> [<c00107b8>] (arch_cpu_idle) from [<c005cc44>] (cpu_startup_entry+0x25c/0x2bc)                                      
> [<c005c9e8>] (cpu_startup_entry) from [<c0015d10>] (secondary_start_kernel+0x150/0x174)                             
>  r7:c074403c                                                                                                        
> [<c0015bc0>] (secondary_start_kernel) from [<1000952c>] (0x1000952c)                                                
>  r4:3e91806a r3:c0009514                                                                                            
> Internal error: Oops: 17 [#1] PREEMPT SMP ARM                                                                       
> Modules linked in: usb_storage(O) ehci_hcd(O) usbcore(O) usb_common(O)                                              
> CPU: 0 PID: 25 Comm: kworker/0:1 Tainted: G           O    4.1.10+ #4                                               
> Hardware name: Platform-Cortex A9                                                                                    
> Workqueue: pm pm_runtime_work                                                                                       
> task: eeb10c00 ti: ee0e0000 task.ti: ee0e0000                                                                       
> PC is at ehci_handle_start_intr_unlinks+0x48/0x8c [ehci_hcd]                                                        
> LR is at ehci_bus_suspend+0x388/0x464 [ehci_hcd]                                                                    
> pc : [<bf04ec34>]    lr : [<bf04ffb0>]    psr: 60000193                                                             
> sp : ee0e1ca8  ip : ee0e1cc8  fp : ee0e1cc4                                                                         
> r10: ffffffff  r9 : 00000001  r8 : 00500000                                                                         
> r7 : 00000000  r6 : 00000001  r5 : ede81584  r4 : ede81480                                                          
> r3 : 00000000  r2 : 00000000  r1 : ffffffe0  r0 : ede81480                                                          
> Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel                                                
> Control: 10c5387d  Table: 3df4404a  DAC: 00000015                                                                   
> Process kworker/0:1 (pid: 25, stack limit = 0xee0e0210)                                                             
> Stack: (0xee0e1ca8 to 0xee0e2000)                                                                                   
> 1ca0:                   ede81550 ede81300 ede81480 ede8152c ee0e1d14 ee0e1cc8                                       
> 1cc0: bf04ffb0 bf04ebf8 ee0e1d04 ee0e1cd8 bf00fd0c c005c340 edd8e680 ede81608                                       
> 1ce0: 00000000 f023e030 00000002 ede81300 ede82f80 00000007 bf024928 00000001                                       
> 1d00: edd8e940 00000400 ee0e1d4c ee0e1d18 bf00f2c8 bf04fc34 ee0e1d5c ee0e1d28                                       
> 1d20: bf008d00 bf008a74 ee0e1d54 ede82f80 ffffffff 00000007 00000001 00000402                                       
> 1d40: ee0e1d5c ee0e1d50 bf01ba0c bf00f204 ee0e1d8c ee0e1d60 bf013730 bf01b9f4                                       
> 1d60: 00000001 00000000 ede82fe8 ede82f80 60000113 00000000 00000008 00000003                                       
> 1d80: ee0e1dac ee0e1d90 bf0145fc bf013634 00000000 ede83058 ede82fe8 bf0145c4                                       
> 1da0: ee0e1dcc ee0e1db0 c02c3e98 bf0145d0 00000004 ede82fe8 00000008 00000000                                       
> 1dc0: ee0e1de4 ee0e1dd0 c02c3f38 c02c3e60 ede82fe8 00000008 ee0e1e34 ee0e1de8                                       
> 1de0: c02c4560 c02c3ecc 00000002 ee0e1e00 00000000 c04b4c48 60000113 ede83058                                       
> 1e00: 00000008 00000002 eedd7400 ede82fe8 ede83058 00000008 60000113 eedd7400                                       
> 1e20: 00000000 00000000 ee0e1e54 ee0e1e38 c02c559c c02c42e0 ede82fe8 ede82fe8                                       
> 1e40: bf014660 00000002 ee0e1e6c ee0e1e58 bf014694 c02c5568 00000000 ede83058                                       
> 1e60: ee0e1e8c ee0e1e70 c02c3e98 bf01466c bf01d80c ede82fe8 00000000 eedd3240                                       
> 1e80: ee0e1eb4 ee0e1e90 c02c4974 c02c3e60 00000000 ede830b4 ede83058 eedd3240                                       
> 1ea0: c06e6100 eedd7400 ee0e1ecc ee0e1eb8 c02c56d4 c02c4838 ee0aa500 ede830b4                                       
> 1ec0: ee0e1f0c ee0e1ed0 c003be98 c02c5670 eedd3240 eedd3240 eedd3240 c06e6100                                       
> 1ee0: eedd3260 ee0aa500 eedd3240 eedd3240 c06e6100 eedd3260 ee0aa518 00000000                                       
> 1f00: ee0e1f44 ee0e1f10 c003c95c c003bc54 ee0aa500 c003c68c 00000000 ee0bcc00                                       
> 1f20: 00000000 ee0aa500 c003c68c 00000000 00000000 00000000 ee0e1fac ee0e1f48                                       
> 1f40: c00412b0 c003c698 c001257c 00000000 00000000 ee0aa500 00000000 00000000                                       
> 1f60: dead4ead ffffffff ffffffff ee0e1f6c ee0e1f6c 00000000 00000000 dead4ead                                       
> 1f80: ffffffff ffffffff ee0e1f88 ee0e1f88 ee0bcc00 c00411b8 00000000 00000000                                       
> 1fa0: 00000000 ee0e1fb0 c000fcd8 c00411c4 00000000 00000000 00000000 00000000                                       
> 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                       
> 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff                                       
> Backtrace:                                                                                                          
> [<bf04ebec>] (ehci_handle_start_intr_unlinks [ehci_hcd]) from [<bf04ffb0>] (ehci_bus_suspend+0x388/0x464 [ehci_hcd])
>  r6:ede8152c r5:ede81480 r4:ede81300 r3:ede81550                                                                    
> [<bf04fc28>] (ehci_bus_suspend [ehci_hcd]) from [<bf00f2c8>] (hcd_bus_suspend+0xd0/0x1dc [usbcore])                 
>  r10:00000400 r9:edd8e940 r8:00000001 r7:bf024928 r6:00000007 r5:ede82f80                                           
>  r4:ede81300                                                                                                        
> [<bf00f1f8>] (hcd_bus_suspend [usbcore]) from [<bf01ba0c>] (generic_suspend+0x24/0x44 [usbcore])                    
>  r8:00000402 r7:00000001 r6:00000007 r5:ffffffff r4:ede82f80                                                        
> [<bf01b9e8>] (generic_suspend [usbcore]) from [<bf013730>] (usb_suspend_both+0x108/0x1a8 [usbcore])                 
> [<bf013628>] (usb_suspend_both [usbcore]) from [<bf0145fc>] (usb_runtime_suspend+0x38/0x78 [usbcore])               
>  r10:00000003 r9:00000008 r8:00000000 r7:60000113 r6:ede82f80 r5:ede82fe8                                           
>  r4:00000000 r3:00000001                                                                                            
> [<bf0145c4>] (usb_runtime_suspend [usbcore]) from [<c02c3e98>] (__rpm_callback+0x44/0x6c)                           
>  r6:bf0145c4 r5:ede82fe8 r4:ede83058 r3:00000000                                                                    
> [<c02c3e54>] (__rpm_callback) from [<c02c3f38>] (rpm_callback+0x78/0x90)                                            
>  r6:00000000 r5:00000008 r4:ede82fe8 r3:00000004                                                                    
> [<c02c3ec0>] (rpm_callback) from [<c02c4560>] (rpm_suspend+0x28c/0x4a8)                                             
>  r5:00000008 r4:ede82fe8                                                                                            
> [<c02c42d4>] (rpm_suspend) from [<c02c559c>] (__pm_runtime_suspend+0x40/0x8c)                                       
>  r10:00000000 r9:00000000 r8:eedd7400 r7:60000113 r6:00000008 r5:ede83058                                           
>  r4:ede82fe8                                                                                                        
> [<c02c555c>] (__pm_runtime_suspend) from [<bf014694>] (usb_runtime_idle+0x34/0x3c [usbcore])                        
>  r7:00000002 r6:bf014660 r5:ede82fe8 r4:ede82fe8                                                                    
> [<bf014660>] (usb_runtime_idle [usbcore]) from [<c02c3e98>] (__rpm_callback+0x44/0x6c)                              
>  r4:ede83058 r3:00000000                                                                                            
> [<c02c3e54>] (__rpm_callback) from [<c02c4974>] (rpm_idle+0x148/0x2ec)                                              
>  r6:eedd3240 r5:00000000 r4:ede82fe8 r3:bf01d80c                                                                    
> [<c02c482c>] (rpm_idle) from [<c02c56d4>] (pm_runtime_work+0x70/0x9c)                                               
>  r8:eedd7400 r7:c06e6100 r6:eedd3240 r5:ede83058 r4:ede830b4 r3:00000000                                            
> [<c02c5664>] (pm_runtime_work) from [<c003be98>] (process_one_work+0x250/0x428)                                     
>  r5:ede830b4 r4:ee0aa500                                                                                            
> [<c003bc48>] (process_one_work) from [<c003c95c>] (worker_thread+0x2d0/0x424)                                       
>  r10:00000000 r9:ee0aa518 r8:eedd3260 r7:c06e6100 r6:eedd3240 r5:eedd3240                                           
>  r4:ee0aa500                                                                                                        
> [<c003c68c>] (worker_thread) from [<c00412b0>] (kthread+0xf8/0x10c)                                                 
>  r10:00000000 r9:00000000 r8:00000000 r7:c003c68c r6:ee0aa500 r5:00000000                                           
>  r4:ee0bcc00                                                                                                        
> [<c00411b8>] (kthread) from [<c000fcd8>] (ret_from_fork+0x14/0x3c)                                                  
>  r7:00000000 r6:00000000 r5:c00411b8 r4:ee0bcc00                                                                    
> Code: e5930028 e5942114 e1500002 0a000008 (e8930005)                                                                


-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux