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 ?
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.
Onemore thing troubles me is that why the ports are powered down after ehci
driver is loaded , i didn't enable PM option! Bellow is the bootup log
related to EHCI portion. Please shed some lights on me , or direct me to the
right list!
Thanks a lot !
chris, sun
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ehci_hcd: block sizes: qh 128 qtd 96 itd 192 sitd 96
PCI: enabling device 0000:00:0d.2 (0140 -> 0142)
PCI: Enabling bus mastering for device 0000:00:0d.2
ehci_hcd 0000:00:0d.2: EHCI Host Controller
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
ehci_hcd 0000:00:0d.2: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:0d.2: reset hcs_params 0x2192 dbg=0 cc=2 pcc=1 ports=2
ehci_hcd 0000:00:0d.2: reset portroute 1 0
ehci_hcd 0000:00:0d.2: reset hcc_params 0012 thresh 1 uframes 256/512/1024
PCI: Enabling Mem-Wr-Inval for device 0000:00:0d.2
ehci_hcd 0000:00:0d.2: MWI active
ehci_hcd 0000:00:0d.2: ...powerdown ports...
ehci_hcd 0000:00:0d.2: supports USB remote wakeup
ehci_hcd 0000:00:0d.2: irq 28, io mem 0x4b002000
ehci_hcd 0000:00:0d.2: reset command 080002 (park)=0 ithresh=8 period=1024
Reset
HALT
ehci_hcd 0000:00:0d.2: init command 010009 (park)=0 ithresh=1 period=256 RUN
ehci_hcd 0000:00:0d.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: default language 0x0409
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.17.8 ehci_hcd
usb usb1: SerialNumber: 0000:00:0d.2
usb usb1: uevent
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: individual port power switching
hub 1-0:1.0: individual port over-current protection
hub 1-0:1.0: Single TT
hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
hub 1-0:1.0: power on to power good time: 20ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: enabling power on all ports
ehci_irq: status=0x00000004 addr=0x4b002024
PCD deteted, i=2
command=10009
status=0 reset_done=0
status=1002 reset_done=0
-------------------------------------------------------------------------
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users