Fix default USB controller for ppc64

Fix the default usb controller for pseries systems if none
specified.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
(cherry picked from commit d1778b71480ff76e22be3ab47936b919deb27145)
This commit is contained in:
Dipankar Sarma 2012-06-19 15:51:47 +05:30 committed by Cole Robinson
parent 91b4315b81
commit 340ab1c91c
2 changed files with 10 additions and 4 deletions

View File

@ -236,6 +236,7 @@ Patches have also been contributed by:
Radu Caragea <dmns_serp@yahoo.com> Radu Caragea <dmns_serp@yahoo.com>
Beat Jörg <Beat.Joerg@ssatr.ch> Beat Jörg <Beat.Joerg@ssatr.ch>
Gao feng <gaofeng@cn.fujitsu.com> Gao feng <gaofeng@cn.fujitsu.com>
Dipankar Sarma <dipankar@in.ibm.com>
[....send patches to get your name here....] [....send patches to get your name here....]

View File

@ -2555,7 +2555,8 @@ qemuControllerModelUSBToCaps(int model)
static int static int
qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def, qemuBuildUSBControllerDevStr(virDomainDefPtr domainDef,
virDomainControllerDefPtr def,
virBitmapPtr qemuCaps, virBitmapPtr qemuCaps,
virBuffer *buf) virBuffer *buf)
{ {
@ -2564,8 +2565,12 @@ qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
model = def->model; model = def->model;
if (model == -1) if (model == -1) {
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI; if (STREQ(domainDef->os.arch, "ppc64"))
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
else
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
}
smodel = qemuControllerModelUSBTypeToString(model); smodel = qemuControllerModelUSBTypeToString(model);
caps = qemuControllerModelUSBToCaps(model); caps = qemuControllerModelUSBToCaps(model);
@ -2651,7 +2656,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
break; break;
case VIR_DOMAIN_CONTROLLER_TYPE_USB: case VIR_DOMAIN_CONTROLLER_TYPE_USB:
if (qemuBuildUSBControllerDevStr(def, qemuCaps, &buf) == -1) if (qemuBuildUSBControllerDevStr(domainDef, def, qemuCaps, &buf) == -1)
goto error; goto error;
if (nusbcontroller) if (nusbcontroller)