Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2014 07:50:01 GMT
From:      Hans Petter Selasky <hps@bitfrost.no>
To:        freebsd-usb@FreeBSD.org
Subject:   Re: usb/185628: usbd_req_re_enumerate set address failed USB_ERR_STALLED for Seagate USB drives between r259425 and r260321
Message-ID:  <201401100750.s0A7o1eX097689@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR usb/185628; it has been noted by GNATS.

From: Hans Petter Selasky <hps@bitfrost.no>
To: Alex Goncharov <alex_goncharov_usa@yahoo.com>, 
 freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: usb/185628: usbd_req_re_enumerate set address failed USB_ERR_STALLED
 for Seagate USB drives between r259425 and r260321
Date: Fri, 10 Jan 2014 08:48:38 +0100

 This is a multi-part message in MIME format.
 --------------080508060307050403080600
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 On 01/10/14 04:02, Alex Goncharov wrote:
 >
 >> Number:         185628
 >> Category:       usb
 >> Synopsis:       usbd_req_re_enumerate set address failed USB_ERR_STALLED for Seagate USB drives between r259425 and r260321
 >> Confidential:   no
 >> Severity:       non-critical
 >> Priority:       low
 >> Responsible:    freebsd-usb
 >> State:          open
 >> Quarter:
 >> Keywords:
 >> Date-Required:
 >> Class:          sw-bug
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Fri Jan 10 03:10:00 UTC 2014
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Alex Goncharov
 >> Release:        9.2-STABLE, built from svn source, r260321
 >> Organization:
 >> Environment:
 > FreeBSD 9.2-STABLE FreeBSD 9.2-STABLE #0 r260321 Sun Jan  5 13:06:01 EST 2014
 >> Description:
 > This is an extremely reproducible and very upsetting new problem.
 
 Here is a patch you can try, as an attachment.
 
 --HPS
 
 
 --------------080508060307050403080600
 Content-Type: text/x-patch;
  name="umass.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="umass.diff"
 
 === umass.c
 ==================================================================
 --- umass.c	(revision 260392)
 +++ umass.c	(local)
 @@ -1362,9 +1362,18 @@
  		sc->sc_transfer.data_ptr += actlen;
  		sc->sc_transfer.actlen += actlen;
  
 +		/*
 +		 * Filter out transfers containing a short packet when
 +		 * they shouldn't:
 +		 */
  		if (actlen < sumlen) {
 -			/* short transfer */
 -			sc->sc_transfer.data_rem = 0;
 +			if (actlen % 512) {
 +				/* short transfer for sure */
 +				sc->sc_transfer.data_rem = 0;
 +			} else {
 +				/* get the remaining data, if any */
 +				sc->sc_transfer.data_timeout = 1000;
 +			}
  		}
  	case USB_ST_SETUP:
  		DPRINTF(sc, UDMASS_BBB, "max_bulk=%d, data_rem=%d\n",
 
 --------------080508060307050403080600--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401100750.s0A7o1eX097689>