I have written an UHCI Host controller driver with support for Mass bulk storage only.
When I run this under Qemu, it works totally fine.
Under the real hardware, I have the following problem:-
To check, I restarted the controller after port reset and when I send any GetDesc or SetAddress request they all fail because the controller status = 0x20 again -> indicating that the host controller is halted.Initially, the port status (PORTSC) is 0x97.
After Host reset, it is 0x93
Now when I do PortReset it becomes 0x95
After this the UHCI Controller Status reads as 0x20 -> indicating that the controller has stopped/halted (though I have stared it before port reset)
On Qemu, the port status is initially 0x83, then after port reset it becomes 0x85.
Why is the Line Status bit 4 set on real hardware ?
Please help...More Details:
On the real hardware I see 4 UHCI Controllers, 1 EHCI Controller
PCI details for UHCI Controllers:- Bus: 0, Device: 29 and Function = 1,2,3,4 respectively
I see that Port Status is 0x80 on Function 1,2,3 and it is 0x93 on Functon 4
I have disabled Legacy and SMI by writting 0 to LEGSUP PCI registry for Function 4 where I find the device status as attached (i.e 0x93) . Though the UCHI doc mentions LEGSUP is for function 2 which I do not understand well
Thanks,
- MoMan