Module Name:    src
Committed By:   riastradh
Date:           Thu Sep 22 14:27:52 UTC 2022

Modified Files:
        src/sys/dev/usb: umass.c

Log Message:
umass(4): Reduce timeout for control xfers to standard USB timeout.

This should reduce the timeout for a failed sd@umass transfer from
n*(1min + 5sec) to 1min + n*5sec where n is the number of reset and
clear-stall steps.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/dev/usb/umass.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.188 src/sys/dev/usb/umass.c:1.189
--- src/sys/dev/usb/umass.c:1.188	Sun Mar 20 19:26:27 2022
+++ src/sys/dev/usb/umass.c	Thu Sep 22 14:27:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.188 2022/03/20 19:26:27 andvar Exp $	*/
+/*	$NetBSD: umass.c,v 1.189 2022/09/22 14:27:52 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.188 2022/03/20 19:26:27 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.189 2022/09/22 14:27:52 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1012,8 +1012,8 @@ umass_setup_ctrl_transfer(struct umass_s
 
 	/* Initialise a USB control transfer and then schedule it */
 
-	usbd_setup_default_xfer(xfer, sc->sc_udev, (void *) sc, sc->timeout,
-		req, buffer, buflen, flags, sc->sc_methods->wire_state);
+	usbd_setup_default_xfer(xfer, sc->sc_udev, sc, USBD_DEFAULT_TIMEOUT,
+	    req, buffer, buflen, flags, sc->sc_methods->wire_state);
 
 	err = usbd_transfer(xfer);
 	if (err && err != USBD_IN_PROGRESS) {

Reply via email to