From owner-freebsd-current@FreeBSD.ORG Mon Aug 25 15:34:28 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6969F16A4BF for ; Mon, 25 Aug 2003 15:34:28 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EAA643FDD for ; Mon, 25 Aug 2003 15:34:27 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h7PMYLaK058747 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 26 Aug 2003 00:34:23 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h7PMYJ9B020749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Aug 2003 00:34:20 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h7PMYJDb036107; Tue, 26 Aug 2003 00:34:19 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h7PMYJIx036106; Tue, 26 Aug 2003 00:34:19 +0200 (CEST) Date: Tue, 26 Aug 2003 00:34:18 +0200 From: Bernd Walter To: Lars Eggert Message-ID: <20030825223418.GJ39362@cicely12.cicely.de> References: <3F4AD502.5010709@isi.edu> <3F4A7B91.8070803@isi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4A7B91.8070803@isi.edu> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: current Subject: Re: panic with CF drive + USB reader X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2003 22:34:28 -0000 On Mon, Aug 25, 2003 at 02:11:45PM -0700, Lars Eggert wrote: > Here's another, different one: > > (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 > (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error > (da2:umass-sim0:0:0:0): SCSI Status: Check Condition > (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:0,0 > (da2:umass-sim0:0:0:0): No additional sense information > (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data) > umass0: BBB reset failed, STALLED > (da2:umass-sim0:0:0:0): AutoSense Failed > umass0: BBB reset failed, STALLED > (da2:umass-sim0:0:0:0): AutoSense Failed > umass0: BBB reset failed, STALLED > (da2:umass-sim0:0:0:0): AutoSense Failed > umass0: BBB reset failed, STALLED > (da2:umass-sim0:0:0:0): AutoSense Failed > umass0: BBB reset failed, STALLED > (da2:umass-sim0:0:0:0): AutoSense Failed > umass0: BBB reset failed, STALLED > (da2:umass-sim0:0:0:0): AutoSense Failed > umass0: BBB reset failed, STALLED Seems that handling the stalled condition failed. Can you try the following patch: RCS file: /home/ncvs/src/sys/dev/usb/usbdi.c,v retrieving revision 1.76 diff -u -r1.76 usbdi.c --- usbdi.c 26 May 2002 22:00:06 -0000 1.76 +++ usbdi.c 15 Jun 2003 04:23:48 -0000 @@ -931,8 +931,17 @@ usbd_do_request_flags(usbd_device_handle dev, usb_device_request_t *req, void *data, u_int16_t flags, int *actlen, u_int32_t timo) { - return (usbd_do_request_flags_pipe(dev, dev->default_pipe, req, - data, flags, actlen, timo)); + int actlen2; + usbd_status ret; + + ret = usbd_do_request_flags_pipe(dev, dev->default_pipe, req, + data, flags, &actlen2, timo); + if (actlen != NULL) + *actlen = actlen2; + if (ret == USBD_STALLED && actlen2 == UGETW(req->wLength)) { + ret = USBD_NORMAL_COMPLETION; + } + return (ret); } I'm not shure that this patch will have an effect for your drive, but it helped in other cases of broken stall conditions. However not all stall brokeness can be worked around this way. Why the stall condition was triggered is another question. > /cf: bad dir ino 47104 at offset 0: mangled entry > panic: ufs_dirbad: bad dir The panic is also another issue. I guess someone has told upper layers success without this beeing the case. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de