Thanks for your reply! Appreciate it !

the debugging code in ehci_hub_status_data() shows that the port status 
always return "0x1000" with or without flah devices plugged in.
Only difference is in the ehci_irq(), when no device plugged, IRQ won't fire 
up. with device plugged and boot up, the port status is "0x1803" but no 
further action sare taken.

Could you please describe a bit more about what issues have been fixed in 
2.6.20 , related to EHCI ? I took a peek of the 2.6.20 code , didn't find it 
would make a difference if the RESUME bit is not set in ehci_irq().

i was mistaken by saying "port was powering down" , it is he USB power i was 
talking about, we have a LED indicating the USB power , it was turned off 
right after usb was initialized. Is that suppose to be like this?

Thanks
lei
----- Original Message ----- 
From: "Alan Stern" <[EMAIL PROTECTED]>
To: "Lei Sun" <[EMAIL PROTECTED]>
Cc: <Linux-usb-users@lists.sourceforge.net>
Sent: Wednesday, March 14, 2007 1:57 PM
Subject: Re: [Linux-usb-users] problem with EHCI controller


> On Wed, 14 Mar 2007, Lei Sun wrote:
>
>> Hi :
>>   I have a customized xscale based board, with philips ISP1562 PCI USB
>> controller, I am using linux-2.6.17.8 without "CONFIG_PM" option.
>>   When booting up with a flash drive plugged, the kernel seems to be able
>> detect and configure the host controller correctly, but it's not be able 
>> to
>> detect the flash device.
>>   I added some debugging code in "ehci_irq" function, here is what 
>> happened.
>>
>> 1. ehci_irq is called, with status = 0x00000004 , corresponds to "PCD: 
>> Port
>> Change Detected"
>>
>> 2. read from command register returned 10009, corresponds to controller 
>> is
>> in "RUN" mode.
>>
>> 3. Read port status register (2 ports total), port#1 return 0, port#2
>> returned 1002,  by looking at the code bellow:
>>
>>             status = readl (&ehci->regs->port_status [i]);
>>     634             if (status & PORT_OWNER)
>>     635                 continue;
>>     636             if (!(status & PORT_RESUME)
>>     637                     || ehci->reset_done [i] != 0)
>>     638                 continue;
>>     639
>>     640             /* start 20 msec resume signaling from this port,
>>     641              * and make khubd collect PORT_STAT_C_SUSPEND to
>>     642              * stop that signaling.
>>     643              */
>>     644             ehci->reset_done [i] = jiffies + msecs_to_jiffies 
>> (20);
>>     645             ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
>>     648             usb_hcd_resume_root_hub(hcd);
>>
>>
>> The code expects the PORT_RESUME of the status register to be set, thus 
>> to
>> resume root hub, however that bit i read from status register is not set!
>> Could this related to hardware ?
>
> This problem has been fixed in 2.6.20.
>
>> Another question is, Do I HAVE TO enable "CONFIG_PM" to make this piece 
>> of
>> code working? Because if CONFIG_PM is not defined , the
>> "usb_hcd_resume_root_hub() " does nothing.
>
> You don't need to have CONFIG_PM turned on.
>
>> Onemore thing troubles me is that why the ports are powered down after 
>> ehci
>> driver is loaded , i didn't enable PM option!
>
> What makes you think the port is powered down?  You said yourself that the
> status was 0x1002.  The 0x1000 bit is PORT POWER, so the port is powered
> on.
>
>>  Bellow is the bootup log
>> related to EHCI portion. Please shed some lights on me , or direct me to 
>> the
>> right list!
>
> You should test the ehci_hub_status_data() function.  That's where a
> newly-connected device gets reported.
>
> Alan Stern
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to