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 d1778b7148)
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>
Beat Jörg <Beat.Joerg@ssatr.ch>
Gao feng <gaofeng@cn.fujitsu.com>
Dipankar Sarma <dipankar@in.ibm.com>
[....send patches to get your name here....]

View File

@ -2555,7 +2555,8 @@ qemuControllerModelUSBToCaps(int model)
static int
qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
qemuBuildUSBControllerDevStr(virDomainDefPtr domainDef,
virDomainControllerDefPtr def,
virBitmapPtr qemuCaps,
virBuffer *buf)
{
@ -2564,8 +2565,12 @@ qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
model = def->model;
if (model == -1)
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
if (model == -1) {
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);
caps = qemuControllerModelUSBToCaps(model);
@ -2651,7 +2656,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
break;
case VIR_DOMAIN_CONTROLLER_TYPE_USB:
if (qemuBuildUSBControllerDevStr(def, qemuCaps, &buf) == -1)
if (qemuBuildUSBControllerDevStr(domainDef, def, qemuCaps, &buf) == -1)
goto error;
if (nusbcontroller)