Index: sys/dev/usb/ohci.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ohci.c,v retrieving revision 1.232 diff -u -p -u -r1.232 ohci.c --- sys/dev/usb/ohci.c 29 Jan 2013 00:00:15 -0000 1.232 +++ sys/dev/usb/ohci.c 22 Mar 2013 11:02:33 -0000 @@ -1731,21 +1750,23 @@ ohci_device_request(usbd_xfer_handle xfe sed = opipe->sed; opipe->u.ctl.length = len; - /* Update device address and length since they may have changed - during the setup of the control pipe in usbd_new_device(). */ + /* + * Update device address and length since they may have changed + * during the setup of the control pipe in usbd_new_device(). + */ /* XXX This only needs to be done once, but it's too early in open. */ /* XXXX Should not touch ED here! */ usb_syncmem(&sed->dma, sed->offs + offsetof(ohci_ed_t, ed_flags), sizeof(sed->ed.ed_flags), - BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); sed->ed.ed_flags = HTOO32( (O32TOH(sed->ed.ed_flags) & ~(OHCI_ED_ADDRMASK | OHCI_ED_MAXPMASK)) | OHCI_ED_SET_FA(addr) | OHCI_ED_SET_MAXP(UGETW(opipe->pipe.endpoint->edesc->wMaxPacketSize))); usb_syncmem(&sed->dma, sed->offs + offsetof(ohci_ed_t, ed_flags), sizeof(sed->ed.ed_flags), - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); next = stat; @@ -1794,7 +1815,7 @@ ohci_device_request(usbd_xfer_handle xfe stat->len = 0; stat->xfer = xfer; usb_syncmem(&stat->dma, stat->offs, sizeof(stat->td), - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); #ifdef OHCI_DEBUG if (ohcidebug > 5) { @@ -1805,11 +1826,15 @@ ohci_device_request(usbd_xfer_handle xfe #endif /* Insert ED in schedule */ - sed->ed.ed_tailp = HTOO32(tail->physaddr); usb_syncmem(&sed->dma, sed->offs + offsetof(ohci_ed_t, ed_tailp), sizeof(sed->ed.ed_tailp), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + sed->ed.ed_tailp = HTOO32(tail->physaddr); + usb_syncmem(&sed->dma, + sed->offs + offsetof(ohci_ed_t, ed_tailp), + sizeof(sed->ed.ed_tailp), + BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); opipe->tail.td = tail; OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_CLF); if (xfer->timeout && !sc->sc_bus.use_polling) {