From owner-freebsd-scsi Thu Apr 11 22:54:31 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from van-laarhoven.org (ap-z-5ab8.adsl.wanadoo.nl [212.129.218.184]) by hub.freebsd.org (Postfix) with SMTP id 3931B37B416 for ; Thu, 11 Apr 2002 22:53:50 -0700 (PDT) Received: (qmail 36108 invoked from network); 12 Apr 2002 05:53:48 -0000 Received: from heather.van-laarhoven.org (10.66.0.2) by uitsmijter.van-laarhoven.org with SMTP; 12 Apr 2002 05:53:48 -0000 Date: Fri, 12 Apr 2002 07:53:48 +0200 (CEST) From: Nick Hibma To: Chad Kline Cc: "freebsd-scsi@freebsd.org" Subject: Re: usb mass storage driver - umass In-Reply-To: Message-ID: <20020412075211.Y31033-100000@heather.van-laarhoven.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Could you compile your umass driver with the UMASS_DEBUG flag set? Add CFLAGS+= -DUMASS_DEBUG to /sys/modules/umass/Makefile, do a make clean make obj make clean make make install kldload umass Or if you have compiled the module into the kernel add a options UMASS_DEBUG to your kernel config. Nick On Thu, 11 Apr 2002, Chad Kline wrote: > > i see the problems: (camera always plugged in at boot) > > 1. in computerA (messages below) all the time. > 2. in computerB, camera functions, but if unplugged/replugged, > the same problems occur upon "camcontrol rescan 0". > (BBB failures, therefore, mount errors). > > so i tried commenting out the rescan call in umass.c > after the "if (!cold)" statement, cuz of a possible > bug there, but that didn't change anything i could see. > > thanks for your help. > > >Do you see these problems during boot or during attach after boot? > > > >The state machine is a nifty mechanism where you start a USB transfer > >and when it completes you handle the return value and start the next > >one. Because the umass USB protocol requires multiple steps there are > >many states that it goes through, including recovery. > > > >I presume that you added those 'OLYMPUS - ...' messages? > > > >Try the attached umass driver. Maybe that it solves your problem: > > > >Nick > > > >On Sun, 7 Apr 2002, Chad Kline wrote: > > > > > > > > since usb mass storage driver (umass.c) > > > is tied to scsi stuff, i am posting to > > > see if anyone may be able to direct > > > me to bring about a solution to this problem. > > > > > > from the following, i assume i the link/controller/camera > > > are operational to some extent - as the camera ID is > > > detected just fine by the driver as well as > > > userland programs. > > > > > > $ dmesg (kernel/driver detection, > > > QUIRK=command status signature fix, 0x5343->0x5542) > > > for OLYMPUS C-1's) > > > > > > FreeBSD 4.5-RELEASE #3: Sat Apr 6 22:12:40 AKST 2002 > > > ohci0: mem 0xe1000000-0xe1000fff > >irq > > > 10 at device 19.0 on pci0 > > > usb0: OHCI version 1.0, legacy support > > > usb0: on ohci0 > > > usb0: USB revision 1.0 > > > uhub0: OPTi OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > > > uhub0: 2 ports with 2 removable, self powered > > > OLYMPUS - APPLYING CSS QUIRK! > > > OLYMPUS - APPLYING CSS QUIRK! > > > OLYMPUS - APPLYING CSS QUIRK! > > > umass0: OLYMPUS C-1Z,D-150Z, rev 1.10/10.15, addr 2 > > > OLYMPUS - case TSTATE_BBB_RESET1: > > > umass0: BBB reset failed, TIMEOUT > > > OLYMPUS - case TSTATE_BBB_RESET2: > > > umass0: BBB bulk-in clear stall failed, TIMEOUT > > > OLYMPUS - case TSTATE_BBB_RESET3: > > > umass0: BBB bulk-out clear stall failed, TIMEOUT > > > > > > $ usbdevs (userland program) > > > > > > Controller /dev/usb0: > > > addr 1: self powered, config 1, OHCI root hub(0x0000), > > > OPTi(0x0000), rev 0x0100 port 1 > > > addr 2: self powered, config 1, C-1 Digital Camera(0x0102), > > > Olympus(0x07b4), rev 0x1015 port 2 powered > > > > > > without umass0 (USB mass storage driver) being able to > > > complete it's task, i cannot mount the camera's smartmedia > > > disk. supposedly this camera supposedly has "the convenient > > > Auto Connect USB feature lets your computer automatically recognize > > > your Brio Zoom D-150 so you don't have to install any additional > > > software". so i think i should be able to mount this camera. > > > i don't have windows, and don't know of bsd/unix USB snoop software. > > > > > > the failure is in this function - a status state machine. > > > i can't find a calling function, so i assume it's installed > > > as an interrupt handler (i don't know too much about how > > > unix installs handlers/remaps interrupt signals). > > > > > > umass.c: > > > > > > Static void > > > umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, > > > usbd_status err) > > > { > > > /***** Bulk Reset *****/ > > > case TSTATE_BBB_RESET1: > > > if (err) { > > > printf("OLYMPUS - TSTATE_BBB_RESET1\n"); > > > printf("%s: BBB reset failed, %s\n", > > > USBDEVNAME(sc->sc_dev), usbd_errstr(err)); > > > } > > > umass_clear_endpoint_stall(sc, > > > sc->bulkin, sc->bulkin_pipe, TSTATE_BBB_RESET2, > > > sc->transfer_xfer[XFER_BBB_RESET2]); > > > > > > return; > > > case TSTATE_BBB_RESET2: > > > if (err) { /* should not occur */ > > > printf("OLYMPUS - TSTATE_BBB_RESET2!\n"); > > > printf("%s: BBB bulk-in clear stall failed, %s\n", > > > USBDEVNAME(sc->sc_dev), usbd_errstr(err)); > > > /* no error recovery, otherwise we end up in a loop */ > > > } > > > umass_clear_endpoint_stall(sc, > > > sc->bulkout, sc->bulkout_pipe, TSTATE_BBB_RESET3, > > > sc->transfer_xfer[XFER_BBB_RESET3]); > > > > > > return; > > > case TSTATE_BBB_RESET3: > > > if (err) { /* should not occur */ > > > printf("OLYMPUS - TSTATE_BBB_RESET3!\n"); > > > printf("%s: BBB bulk-out clear stall failed, %s\n", > > > USBDEVNAME(sc->sc_dev), usbd_errstr(err)); > > > /* no error recovery, otherwise we end up in a loop */ > > > } > > > sc->transfer_state = TSTATE_IDLE; > > > if (sc->transfer_priv) { > > > sc->transfer_cb(sc, sc->transfer_priv, > > > sc->transfer_datalen, > > > sc->transfer_status); > > > } > > > > > > return; > > > > > > /***** Default *****/ > > > default: > > > panic("%s: Unknown state %d\n", > > > USBDEVNAME(sc->sc_dev), sc->transfer_state); > > > } > > > > > > > > > > > > _________________________________________________________________ > > > MSN Photos is the easiest way to share and print your photos: > > > http://photos.msn.com/support/worldwide.aspx > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-scsi" in the body of the message > > > > > > >-- > >n_hibma@van-laarhoven.org http://www.van-laarhoven.org/ > >n_hibma@FreeBSD.org http://www.etla.net/~n_hibma/ > ><< umass.c >> > > > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > -- n_hibma@van-laarhoven.org http://www.van-laarhoven.org/ n_hibma@FreeBSD.org http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message