From 561ecfcbce01bde08dbe271371bd6e6faf85b5af Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 3 May 2006 15:08:43 +0000 Subject: [PATCH] Add a missing ohci_waitintr() call that allows polled operation of bulk transfers to have a chance of working. Kernel crash dumps to umass() work with this change. Submitted-by: Gary Taken-from: FreeBSD PR:usb/93720 --- sys/bus/usb/ohci.c | 5 ++++- sys/dev/usbmisc/umass/umass.c | 12 ++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/bus/usb/ohci.c b/sys/bus/usb/ohci.c index 99c16587a9..df7ec460db 100644 --- a/sys/bus/usb/ohci.c +++ b/sys/bus/usb/ohci.c @@ -1,7 +1,7 @@ /* * $NetBSD: ohci.c,v 1.138 2003/02/08 03:32:50 ichiro Exp $ * $FreeBSD: src/sys/dev/usb/ohci.c,v 1.141 2003/12/22 15:40:10 shiba Exp $ - * $DragonFly: src/sys/bus/usb/ohci.c,v 1.13 2006/04/29 22:05:21 dillon Exp $ + * $DragonFly: src/sys/bus/usb/ohci.c,v 1.14 2006/05/03 15:08:41 dillon Exp $ */ /* Also, already ported: * $NetBSD: ohci.c,v 1.140 2003/05/13 04:42:00 gson Exp $ @@ -3014,6 +3014,9 @@ ohci_device_bulk_start(usbd_xfer_handle xfer) crit_exit(); + if (sc->sc_bus.use_polling) + ohci_waitintr(sc, xfer); + return (USBD_IN_PROGRESS); } diff --git a/sys/dev/usbmisc/umass/umass.c b/sys/dev/usbmisc/umass/umass.c index 88a478c30d..89ae4f1da9 100644 --- a/sys/dev/usbmisc/umass/umass.c +++ b/sys/dev/usbmisc/umass/umass.c @@ -26,7 +26,7 @@ * * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ * $FreeBSD: src/sys/dev/usb/umass.c,v 1.96 2003/12/19 12:19:11 sanpei Exp $ - * $DragonFly: src/sys/dev/usbmisc/umass/umass.c,v 1.16 2006/05/02 16:08:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/umass/umass.c,v 1.17 2006/05/03 15:08:43 dillon Exp $ */ /* @@ -2555,21 +2555,17 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) } } -/* umass_cam_poll - * all requests are handled through umass_cam_action, requests - * are never pending. So, nothing to do here. - */ Static void umass_cam_poll(struct cam_sim *sim) { -#ifdef USB_DEBUG struct umass_softc *sc = (struct umass_softc *) sim->softc; DPRINTF(UDMASS_SCSI, ("%s: CAM poll\n", USBDEVNAME(sc->sc_dev))); -#endif - /* nop */ + usbd_set_polling(sc->sc_udev, 1); + usbd_dopoll(sc->iface); + usbd_set_polling(sc->sc_udev, 0); } -- 2.41.0