Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 2014 06:10:01 GMT
From:      Alex Goncharov <alex_goncharov_usa@yahoo.com>
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:  <201401120610.s0C6A1Fx064199@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: Alex Goncharov <alex_goncharov_usa@yahoo.com>
To: "freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@FreeBSD.org>,
  Hans Petter Selasky <hps@bitfrost.no>, freebsd-usb@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: Sat, 11 Jan 2014 21:58:02 -0800 (PST)

 --2120775178-1643984294-1389506282=:33519
 Content-Type: text/plain; charset=us-ascii
 
 ,-- On Fri, 1/10/14, Hans Petter Selasky <hps@bitfrost.no> wrote:
 ,-- On 01/10/14 12:49, Alex Goncharov  wrote:
 >> Maybe; but think about the fact correlations: the fact of the two
 >> system's upgrade, two identical Seagate units, and  other HDDs being
 >> non-stalled.
 > 
 > If you are running EHCI, there has been no changes in the USB stack,
 
 Apparently, there have been; this is what causes the bogus error:
 
 ------------------------------------------------------------------------
 r259454 | hselasky | 2013-12-16 03:51:58 -0500 (Mon, 16 Dec 2013) | 11 lines
 
 MFC r244503 and r246565:
 
 Make sure all USB drivers allocate buffer memory
 through the USB API and/or busdma.
 
 The following assumptions have been made:
 umass - buffers passed from CAM/SCSI layer are OK
 network - mbufs are OK.
 
 Some other nits while at it.
 ------------------------------------------------------------------------
 
 I am attaching the code difference for the two relevant files
 
 ----------------------------------------
 M       sys/dev/usb/storage/ustorage_fs.c
 M       sys/dev/usb/usb_msctest.c
 ----------------------------------------
 
 in this change set, skipping the irrelevant 'sys/dev/usb/wlan' ones.
 
 Can this be fixed reasonably soon, please? (I miss my HDDs :)
 
 -- Alex
 --2120775178-1643984294-1389506282=:33519
 Content-Type: text/x-patch; name="sys-dev-usb-2013-12-16-2013-12-17.diff"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="sys-dev-usb-2013-12-16-2013-12-17.diff"
 
 SW5kZXg6IHN5cy9kZXYvdXNiL3N0b3JhZ2UvdXN0b3JhZ2VfZnMuYwo9PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvZGV2L3VzYi9zdG9yYWdlL3Vz
 dG9yYWdlX2ZzLmMJKHJldmlzaW9uIDI1OTQ0OSkKKysrIHN5cy9kZXYvdXNi
 L3N0b3JhZ2UvdXN0b3JhZ2VfZnMuYwkocmV2aXNpb24gMjU5NDk0KQpAQCAt
 NzQsNyArNzQsNyBAQAogLyogRGVmaW5lIHNvbWUgbGltaXRzICovCiAKICNp
 Zm5kZWYgVVNUT1JBR0VfRlNfQlVMS19TSVpFIAotI2RlZmluZQlVU1RPUkFH
 RV9GU19CVUxLX1NJWkUgKDFVTCA8PCAxNykJLyogYnl0ZXMgKi8KKyNkZWZp
 bmUJVVNUT1JBR0VfRlNfQlVMS19TSVpFCSgxVSA8PCAxNykJLyogYnl0ZXMg
 Ki8KICNlbmRpZgogCiAjaWZuZGVmCVVTVE9SQUdFX0ZTX01BWF9MVU4KQEAg
 LTg1LDggKzg1LDYgQEAKICNkZWZpbmUJVVNUT1JBR0VfUURBVEFfTUFYCTQw
 CS8qIGJ5dGVzICovCiAjZW5kaWYKIAotI2RlZmluZSBzY19jbWRfZGF0YSBz
 Y19jYncuQ0JXQ0RCCi0KIC8qCiAgKiBUaGUgU0NTSSBJRCBzdHJpbmcgbXVz
 dCBiZSBleGFjdGx5IDI4IGNoYXJhY3RlcnMgbG9uZwogICogZXhsdWRpbmcg
 dGhlIHRlcm1pbmF0aW5nIHplcm8uCkBAIC0xNzYs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ID0gdXNiZF94ZmVyX2dldF9mcmFtZV9idWZmZXIoCisJICAgIHNjLT54ZmVy
 W1NUX0RBVEFfUkRdLCAwKTsKKwlzYy0+Y2J3ID0gdXNiZF94ZmVyX2dldF9m
 cmFtZV9idWZmZXIoCisJICAgIHNjLT54ZmVyW1NUX0NPTU1BTkRdLCAwKTsK
 KwlzYy0+Y3N3ID0gdXNiZF94ZmVyX2dldF9mcmFtZV9idWZmZXIoCisJICAg
 IHNjLT54ZmVyW1NUX1NUQVRVU10sIDApOworCiAJcmV0dXJuIChzYyk7CiB9
 CiAK
 
 --2120775178-1643984294-1389506282=:33519--



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