Date: Tue, 26 Aug 2003 00:34:18 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: Lars Eggert <larse@ISI.EDU> Cc: current <current@freebsd.org> Subject: Re: panic with CF drive + USB reader Message-ID: <20030825223418.GJ39362@cicely12.cicely.de> In-Reply-To: <3F4A7B91.8070803@isi.edu> References: <3F4AD502.5010709@isi.edu> <3F4A7B91.8070803@isi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030825223418.GJ39362>