From owner-p4-projects@FreeBSD.ORG Sun Nov 23 10:59:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9BE1C1065673; Sun, 23 Nov 2008 10:59:26 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602BD106564A for ; Sun, 23 Nov 2008 10:59:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 52BED8FC16 for ; Sun, 23 Nov 2008 10:59:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mANAxQDG007251 for ; Sun, 23 Nov 2008 10:59:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mANAxQNG007249 for perforce@freebsd.org; Sun, 23 Nov 2008 10:59:26 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 23 Nov 2008 10:59:26 GMT Message-Id: <200811231059.mANAxQNG007249@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 153384 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: Sun, 23 Nov 2008 10:59:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=153384 Change 153384 by hselasky@hselasky_laptop001 on 2008/11/23 10:58:30 More fixes to mass storage test. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_msctest.c#12 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_msctest.c#12 (text+ko) ==== @@ -273,12 +273,12 @@ USETDW(sc->cbw.dCBWDataTransferLength, sc->data_len); sc->cbw.bCBWFlags = ((sc->dir == DIR_IN) ? CBWFLAGS_IN : CBWFLAGS_OUT); sc->cbw.bCBWLUN = sc->lun; + sc->cbw.bCDBLength = sc->cmd_len; if (sc->cbw.bCDBLength > sizeof(sc->cbw.CBWCDB)) { sc->cbw.bCDBLength = sizeof(sc->cbw.CBWCDB); DPRINTFN(0, "Truncating long command!\n"); } xfer->frlengths[0] = sizeof(sc->cbw); - xfer->flags.stall_pipe = 1; usb2_set_frame_data(xfer, &sc->cbw, 0); usb2_start_hardware(xfer); @@ -537,16 +537,14 @@ repeat_inquiry: sc->cbw.CBWCDB[0] = 0x12; /* INQUIRY */ + sc->cbw.CBWCDB[1] = 0; + sc->cbw.CBWCDB[2] = 0; + sc->cbw.CBWCDB[3] = 0; + sc->cbw.CBWCDB[4] = 0x24; /* length */ + sc->cbw.CBWCDB[5] = 0; err = bbb_command_start(sc, DIR_IN, 0, - sc->buffer, 256, 6, USB_MS_HZ); - if (err == 1) { - err = bbb_command_start(sc, DIR_IN, 0, - sc->buffer, 256, 12, USB_MS_HZ); - if (err == 1) { - err = bbb_command_start(sc, DIR_IN, 0, - sc->buffer, 256, 16, USB_MS_HZ); - } - } + sc->buffer, 0x24, 6, USB_MS_HZ); + if ((sc->actlen != 0) && (err == 0)) { sid_type = sc->buffer[0] & 0x1F; if (sid_type == 0x05) {