From owner-p4-projects@FreeBSD.ORG Thu Jul 27 18:23:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0A4516A4DD; Thu, 27 Jul 2006 18:23:14 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76E2F16A4F3 for ; Thu, 27 Jul 2006 18:23:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12A2A43D6B for ; Thu, 27 Jul 2006 18:23:13 +0000 (GMT) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6RINC7I007357 for ; Thu, 27 Jul 2006 18:23:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6RINC9M007354 for perforce@freebsd.org; Thu, 27 Jul 2006 18:23:12 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 27 Jul 2006 18:23:12 GMT Message-Id: <200607271823.k6RINC9M007354@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 102576 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2006 18:23:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=102576 Change 102576 by hselasky@hselasky_mini_itx on 2006/07/27 18:22:38 It appears some USB devices are broken, and does not work after clearing STALL on the INTERRUPT pipe. Hence the DATA-TOGGLE bit is not important when only short packets are sent, with length less than wMaxPacketSize, only clear stall on BULK endpoints, and INTERRUPT endpoints that transfer more than wMaxPacketSize bytes, per transfer. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ubsa.c#7 edit .. //depot/projects/usb/src/sys/dev/usb/ukbd.c#9 edit .. //depot/projects/usb/src/sys/dev/usb/ulpt.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/umodem.c#9 edit .. //depot/projects/usb/src/sys/dev/usb/ums.c#9 edit .. //depot/projects/usb/src/sys/dev/usb/uplcom.c#8 edit .. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#13 edit .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/uvisor.c#7 edit .. //depot/projects/usb/src/sys/dev/usb/uvscom.c#9 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ubsa.c#7 (text+ko) ==== @@ -745,8 +745,7 @@ /* clear stall first: */ sc->sc_flag |= (UBSA_FLAG_WRITE_STALL| - UBSA_FLAG_READ_STALL| - UBSA_FLAG_INTR_STALL); + UBSA_FLAG_READ_STALL); usbd_transfer_start(sc->sc_xfer[4]); return 0; ==== //depot/projects/usb/src/sys/dev/usb/ukbd.c#9 (text+ko) ==== @@ -705,10 +705,6 @@ genkbd_diag(kbd, bootverbose); } - /* clear stall first */ - - sc->sc_flags |= UKBD_FLAG_INTR_STALL; - /* start the keyboard */ usbd_transfer_start(sc->sc_xfer[0]); ==== //depot/projects/usb/src/sys/dev/usb/ulpt.c#11 (text+ko) ==== ==== //depot/projects/usb/src/sys/dev/usb/umodem.c#9 (text+ko) ==== @@ -538,8 +538,7 @@ /* clear stall first */ sc->sc_flag |= (UMODEM_FLAG_READ_STALL| - UMODEM_FLAG_WRITE_STALL| - UMODEM_FLAG_INTR_STALL); + UMODEM_FLAG_WRITE_STALL); if (sc->sc_xfer_intr[0]) { usbd_transfer_start(sc->sc_xfer_intr[0]); ==== //depot/projects/usb/src/sys/dev/usb/ums.c#9 (text+ko) ==== @@ -735,10 +735,6 @@ sc->sc_status.dz = 0; /* sc->sc_status.dt = 0; */ - /* clear stall first */ - - sc->sc_flags |= UMS_FLAG_INTR_STALL; - /* start interrupt transfer */ usbd_transfer_start(sc->sc_xfer[0]); ==== //depot/projects/usb/src/sys/dev/usb/uplcom.c#8 (text+ko) ==== @@ -776,8 +776,7 @@ DPRINTF(0, "sc=%p\n", sc); /* clear stall first */ - sc->sc_flag |= (UPLCOM_FLAG_INTR_STALL| - UPLCOM_FLAG_READ_STALL| + sc->sc_flag |= (UPLCOM_FLAG_READ_STALL| UPLCOM_FLAG_WRITE_STALL); usbd_transfer_start(sc->sc_xfer_intr[0]); ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#13 (text+ko) ==== ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#11 (text+ko) ==== ==== //depot/projects/usb/src/sys/dev/usb/uvisor.c#7 (text+ko) ==== ==== //depot/projects/usb/src/sys/dev/usb/uvscom.c#9 (text+ko) ==== @@ -473,10 +473,6 @@ goto detach; } - /* clear stall first */ - - sc->sc_flag |= UVSCOM_FLAG_INTR_STALL; - /* start interrupt pipe */ usbd_transfer_start(sc->sc_xfer[4]);