aboutsummaryrefslogtreecommitdiff
path: root/hw/openpic.h
diff options
context:
space:
mode:
authorWei Yang <weiyang@linux.vnet.ibm.com>2012-03-08 12:10:44 +1100
committerGerd Hoffmann <kraxel@redhat.com>2012-03-13 10:15:32 +0100
commit86e18cae209f8101ff9a6013a1ff6ae620c06944 (patch)
treed77d552348fe1b467b945de52c817252e6c28f15 /hw/openpic.h
parentfcb70eca3f14349a0ef8e74dc808360f81592026 (diff)
usb-ohci: DMA writeback bug fixes
This patch fixes two bugs in the OHCI device where the device writes back data to system memory that should be exclusively under the control of the guest side driver. In OHCI specification Section 5.2.7, it mentioned "In all cases, Host Controller Driver is responsible for the insertion and removal of all Endpoint Descriptors in the various Host Controller Endpoint Descriptor lists". In the ohci_frame_boundary(), ohci_put_hcca() writes the entire hcca back including the interrupt ED lists which should be under driver control. This violates the specification and can race with a host driver updating that list at the same time. In the OHCI Spec Section 4.6, Transfer Descriptor Queue Processing, it mentioned "Since the TD pointed to by TailP is not accessed by the HC, the Host Controller Driver can initialize that TD and link at least one other to it without creating a coherency or synchronization problem". While the function ohci_put_ed() writes the entire endpoint descriptor back including the TailP which should under driver control. This violate the specification and can race with a host driver updating the TD list at the same time. In each case the solution is to make sure we don't write data which is under driver control. Cc: Gerd Hoffman <kraxel@redhat.com> Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/openpic.h')
0 files changed, 0 insertions, 0 deletions