Date: Mon, 27 Jan 2003 03:06:19 +0900 (JST) From: sanpei@sanpei.org (MIHIRA Sanpei Yoshiro) To: culverk@yumyumyum.org Cc: freebsd-current@FreeBSD.ORG Subject: Re: FreeBSD panic with umass Message-ID: <200301261806.h0QI6JH11435@cherry.sanpei.org> In-Reply-To: Your message of "Tue, 21 Jan 2003 02:01:36 -0500 (EST)". <20030121015437.I18263-100000@alpha.yumyumyum.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I have GENESYS USB2IDE Interface Card(GL641). And I also have same problem(umass0: BBB bulk-in clear stall failed, IOERROR) NetBSD was aleady fixed http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=19971 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/usb/umass_scsipi.c I created patch for FreeBSD-current. Try this one. May I commit this changes? --- MIHIRA, Sanpei Yoshiro Tokyo, Japan. Index: sys/dev/usb/umass.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/umass.c,v retrieving revision 1.71 diff -u -r1.71 umass.c --- sys/dev/usb/umass.c 21 Jan 2003 08:55:44 -0000 1.71 +++ sys/dev/usb/umass.c 26 Jan 2003 17:54:45 -0000 @@ -373,6 +373,16 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, FORCE_SHORT_INQUIRY }, + /* sanpei */ + { USB_VENDOR_GENESYS, 0x0702 /* GENESYS_GL641USB2 */, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE + }, + /* sanpei */ + { USB_VENDOR_GENESYS, GL641USB, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE + }, { VID_EOT, PID_EOT, RID_EOT, 0, 0 } }; @@ -2367,6 +2377,11 @@ */ if (sc->transform(sc, cmd, cmdlen, &rcmd, &rcmdlen)) { +#if 1 /* XXX sanpei */ + if ((sc->quirks & FORCE_SHORT_INQUIRY) && (rcmd[0] == INQUIRY)) { + csio->dxfer_len = SHORT_INQUIRY_LENGTH; + } +#endif sc->transfer(sc, ccb->ccb_h.target_lun, rcmd, rcmdlen, csio->data_ptr, csio->dxfer_len, dir, @@ -2559,6 +2574,11 @@ (unsigned char *) &sc->cam_scsi_sense, sizeof(sc->cam_scsi_sense), &rcmd, &rcmdlen)) { +#if 1 /* XXX sanpei */ + if ((sc->quirks & FORCE_SHORT_INQUIRY) && (rcmd[0] == INQUIRY)) { + csio->sense_len = SHORT_INQUIRY_LENGTH; + } +#endif sc->transfer(sc, ccb->ccb_h.target_lun, rcmd, rcmdlen, &csio->sense_data, @@ -2750,6 +2770,18 @@ return 1; } /* fallthrough */ +#if 1 /* XXX sanpei */ + case INQUIRY: + /* some drives wedge when asked for full inquiry information. */ + if (sc->quirks & FORCE_SHORT_INQUIRY) { + memset(*rcmd, 0, cmdlen); + memcpy(*rcmd, cmd, cmdlen); + *rcmdlen = cmdlen; + (*rcmd)[4] = SHORT_INQUIRY_LENGTH; + return 1; + } + /* fallthrough */ +#endif default: *rcmd = cmd; /* We don't need to copy it */ *rcmdlen = cmdlen; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301261806.h0QI6JH11435>