qemu/hw usb-uhci.c
CVSROOT: /sources/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]> 06/04/24 21:38:50
Modified files:
hw : usb-uhci.c
Log message:
HCHALTED status bit handling (Lonnie Mendez)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/usb-uhci.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Hello Fabrice,
This patch introduces an already fixed bug with linux guest os. The message is: "controller still running". The attached patch fixes this problem.
Believe me it would save both of us a lot of time, if you would simply add the large usb patch.
With kind regards,
Tino H. Seifert
Quoted 11 lines · Fabrice Bellard
CVSROOT: /sources/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]> 06/04/24 21:38:50Modified files:
hw :usb-uhci.cLog message:
HCHALTED status bit handling (Lonnie Mendez)
Quoted 11 lines
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/usb-uhci.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Index: hw/usb-uhci.c
===================================================================
RCS file: /sources/qemu/qemu/hw/usb-uhci.c,v
retrieving revision 1.7
usb-uhci.c +1 -1
@@ -175,7 +175,7 @@/* start frame processing */ qemu_mod_timer (s->frame_timer,qemu_get_clock (vm_clock)); s->status &= ~UHCI_STS_HCHALTED ; - }else if (!(val &UHCI_CMD_RS ) && !(s->cmd &UHCI_CMD_RS )) { + }else if (!(val &UHCI_CMD_RS )) { s->status |=UHCI_STS_HCHALTED ; }if (val &UHCI_CMD_GRESET ) {
Quoted 7 lines · [email protected] wrote:
Hello Fabrice,
This patch introduces an already fixed bug with linux guest os. The message is: "controller still running". The attached patch fixes this problem.
To expand on this, I saw windows checking the status register several
times to look for hchalt once R/S bit was written 0. However, Linux guest hcd only checks the status register once before giving up. So the much simpler patch here works in both cases. However, it also means we can't properly indicate when the frame has really stopped and the host controller halted. This isn't something that shows up with the code in CVS because the hub is always attached and thus the linux hcd doesn't try to suspend the bus (Windows XP will do this and there is a patch I'll try to submit later on this week - very busy).
OK for the UHCI fix.
I need more time to accept your big patch. I think it would have been better to separate the bug fixes, the new USB host drivers and the API changes. I would have included the first two without problem, but I need to better understand your API changes before commiting them.
Regards,
Fabrice.
Quoted 63 lines · [email protected] wrote:
Hello Fabrice,
This patch introduces an already fixed bug with linux guest os. The message is: "controller still running". The attached patch fixes this problem.
Believe me it would save both of us a lot of time, if you would simply add the large usb patch.With kind regards,
Tino H. SeifertQuoted 50 lines · Fabrice Bellard
CVSROOT: /sources/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]> 06/04/24 21:38:50Modified files:
hw :usb-uhci.cLog message:
HCHALTED status bit handling (Lonnie Mendez)CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/usb-uhci.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel------------------------------------------------------------------------
Index:
hw/usb-uhci.c
===================================================================
RCS file: /sources/qemu/qemu/hw/usb-uhci.c,v
retrieving revision 1.7
diff -u -r1.7usb-uhci.cusb-uhci.c +1
-2@@ -175,7 +175,7 @@/* start frame processing */ qemu_mod_timer (s->frame_timer,qemu_get_clock (vm_clock)); s->status &= ~UHCI_STS_HCHALTED ; - }else if (!(val &UHCI_CMD_RS ) && !(s->cmd &UHCI_CMD_RS )) { + }else if (!(val &UHCI_CMD_RS )) { s->status |=UHCI_STS_HCHALTED ; }if (val &UHCI_CMD_GRESET ) { ------------------------------------------------------------------------_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Hi,
Quoted 4 lines · Fabrice Bellard
I need more time to accept your big patch. I think it would have been better to separate the bug fixes, the new USB host drivers and the API changes. I would have included the first two without problem, but I need to better understand your API changes before commiting them.
Note that it is common to feed the maintainer small patches in Open Source projects.
Just look at Linux. If you tried to get such a huge patch past a maintainer, you would utterly fail.
And rightly so. A maintainer is supposed to understand exactly what the changes are about.
Further, if you split the patch into nice little pieces, not only are you and everyone else more aware of what exactly you did, but it is way easier to spot errors or mistakes.
Hth,
Dscho