Date: Wed, 28 Mar 2007 11:41:53 +0200 From: Markus Henschel <m.henschel@bally-wulff.de> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-usb@FreeBSD.org Subject: Re: usb/110855: ugen: interrupt in msgs are truncated when buffer is full Message-ID: <460A3861.3000207@bally-wulff.de> In-Reply-To: <200703271940.l2RJe90x058558@freefall.freebsd.org> References: <200703271940.l2RJe90x058558@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hans Petter Selasky schrieb: > The following reply was made to PR usb/110855; it has been noted by > GNATS. > > From: Hans Petter Selasky <hselasky@c2i.net> To: Markus Henschel > <m.henschel@bally-wulff.de> Cc: freebsd-usb@freebsd.org, > freebsd-gnats-submit@freebsd.org Subject: Re: usb/110855: ugen: > interrupt in msgs are truncated when buffer is full Date: Tue, 27 Mar > 2007 21:33:37 +0200 > > On Tuesday 27 March 2007 18:55, Markus Henschel wrote: >> Hans Petter Selasky schrieb: >>> On Tuesday 27 March 2007 11:30, Markus Henschel wrote: >>>> Hans Petter Selasky schrieb: >>>>> On Monday 26 March 2007 16:13, Markus Henschel wrote: >>>>>>> Number: 110855 Category: usb Synopsis: >>>>>>> ugen: interrupt in msgs are truncated when buffer is full >>>>>>> Confidential: no Severity: serious Priority: >>>>>>> medium Responsible: freebsd-usb State: open >>>>>>> Quarter: Keywords: Date-Required: Class: change-request >>>>>>> Submitter-Id: current-users Arrival-Date: Mon Mar 26 >>>>>>> 14:20:04 GMT 2007 Closed-Date: Last-Modified: Originator: >>>>>>> Markus Henschel Release: 6.2 custom kernel Organization: >>>>>>> >>>>>> >>>>>> Bally Wulff Automaten GmbH >>>>>> >>>>>>> Environment: >>>>>> >>>>>> FreeBSD freebsd-1.bally.de 6.2-RELEASE FreeBSD 6.2-RELEASE >>>>>> #11: Fri Mar 23 21:28:38 CET 2007 >>>>>> prog@freebsd-1.bally.de:/usr/obj/usr/src/sys/BALLYWULFF >>>>>> i386 >>>>>> >>>>>>> Description: >>>>>> >>>>>> We use ugen for some user space drivers. When an interrupt >>>>>> in endpoint is used ugen creates a queue that is filled by >>>>>> the kernel. The user space driver is responsible for >>>>>> reading data from the device file. If this happens too slow >>>>>> the queue is full and new msgs arriving from the usb >>>>>> device are lost. This behavior is OK. >>>>>> >>>>>> The problem is that the queue is not a multiple of the >>>>>> interrupt in endpoints msgs size. So it is possible that >>>>>> the last msg in the queue is truncated. This is very hard >>>>>> to detect for a user space driver. The data stream seen by >>>>>> the user space driver will contain an incomplete msgs >>>>>> directly followed by the next message without knowing >>>>>> truncation happened (except when using some data corruption >>>>>> detection mechanism). >>>>>> >>>>>> It would be much better if ugen would fill the queues of >>>>>> interrupt in endpoints until there is no more space for a >>>>>> complete msg. This way the user space driver will not loose >>>>>> sync with the incoming msgs. >>>>> >>>>> The new USB stack has this fixed already. What I do is that >>>>> the USB driver stops polling the interrupt endpoint when the >>>>> user-land application does not read data. When the user-land >>>>> application has read a packet, the interrupt endpoint is >>>>> started again. The only problem is that some devices, like a >>>>> Microsoft mouse I have, stops working immediately when its >>>>> internal buffer overflows. Bad hardware design. But if your >>>>> hardware is not like that, the new ugen, which is part of the >>>>> new USB driver, will work great for you. >>>>> >>>>> Also packet alignment is kept between reads: Only one packet >>>>> per read. >>>>> >>>>> See: >>>>> >>>>> http://www.turbocat.net/~hselasky/usb4bsd >>>>> >>>>> --HPS >>>> >>>> Thanks, >>>> >>>> I gave it a try and it seems to work fine :-). Could you please >>>> explain how reading an interrupt in endpoint works internally >>>> with the new ugen? Is there still a buffer that recieves data >>>> from the endpoint or is each read request from user land >>>> synchronously triggering a read data request on the interrupt >>>> endpoint? >>> >>> Yes, there is a buffer, but the buffer is packet-based, and not a >>> "ring" based, so you will never get problem with packet >>> alignment. >>> >>>> Why isn't O_NONBLOCK working anymore? >>> >>> It is implemented, and it should work. Can you explain more what >>> is not working? >>> >>> --HPS >> >> With the old ugen I did something like: >> >> int iDevice=open("/dev/ugen0.4", O_RDONLY); fcntl(iDevice, F_SETFL, >> O_NONBLOCK); > > I've just committed a patch for that to the P4 tree. It will be in > SVN in not too long. It was just the matter of a missing IOCTL that > F_SETFL uses. Usually the following works when you want to set/clear > non-blocking mode: > > int t = 1; fcntl(iDevice, FIONBIO, &t) > >> >> Now the fcntl call fails. But instead this works and does the same: >> >> >> >> >> int iDevice=open("/dev/ugen0.4", O_RDONLY|O_NONBLOCK); >> >> >> I thought the O_NONBLOCK flag was just for the open call itself?!? >> Whatever, it does what I need :-) >> >> The only thing that keeps me from using the new usb stack is umass >> now. When inserting an usb flash memory stick it is detected and >> says umass attached to ii but then it takes ages (more that 30s) >> for the device files to become available. A "camcontrol rescan all" >> hangs during this time too.Is it possible to use the old umass >> with the new stack or just revert umass to an older version from >> you like 1.6.1? > > If you use the SVN version, reverting won't help much. Could you turn > on debugging: sysctl hw.usb.umass.debug=-1 > > And see what is going on when you plug your umass device. > >> >> BTW: The performance of the new usb stack is great. umass >> throughput with the memory stick nearly increased by 50%!! > > Cool. > > --HPS _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, > send any mail to "freebsd-usb-unsubscribe@freebsd.org" > Hi, here is the dmesg output with hw.usb.umass.debug=-1: umass0: <JetFlash Mass Storage Device, class 0/0, rev 2.00/1.41, addr 126> umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0: Get Max Lun not supported (USBD_STALLED) umass0:umass_cam_action: 0:-1:-1:XPT_PATH_INQ:. umass0:0:0:-1: Attached to scbus0 umass0:umass_cam_rescan: scbus0: scanning for 0:0:-1 umass0:umass_cam_action: 0:-1:-1:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/36b data/18b sense umass0:umass_bbb_dump_cbw: CBW 1: cmd = 6b (0x120000002400), data = 36b, lun = 0, dir = in umass0:umass_attach: Attach finishedumass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=36 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 274: sig = 0x28120799 (invalid), tag = 274, res = 134217728, status = 0x8f (<invalid>) umass0:umass_t_bbb_status_callback: truncating residue from 134217728 to 36 bytes umass0:umass_t_bbb_status_callback: bad CSW signature 0x28120799 != 0x53425355 umass0:umass_t_bbb_status_callback: Failed to read CSW: USBD_NORMAL_COMPLETION, try 0 umass0:umass_transfer_start: transfer index = 5 umass0:umass_transfer_start: transfer index = 8 umass0:umass_t_bbb_status_callback: Failed to read CSW: USBD_TIMEOUT, try 1 umass0:umass_tr_error: transfer error, USBD_TIMEOUT -> reset umass0:umass_transfer_start: transfer index = 0 umass0:umass_t_bbb_reset1_callback: BBB reset! umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/36b data/18b sense umass0:umass_transfer_start: transfer index = 1 umass0:umass_transfer_start: transfer index = 2 umass0:umass_transfer_start: transfer index = 3 umass0:umass_bbb_dump_cbw: CBW 2: cmd = 6b (0x120000002400), data = 36b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=36 umass0:umass_transfer_start: transfer index = 5 umass0:umass_transfer_start: transfer index = 8 umass0:umass_t_bbb_status_callback: Failed to read CSW: USBD_TIMEOUT, try 0 umass0:umass_transfer_start: transfer index = 5 umass0:umass_transfer_start: transfer index = 8 umass0:umass_t_bbb_status_callback: Failed to read CSW: USBD_TIMEOUT, try 1 umass0:umass_tr_error: transfer error, USBD_TIMEOUT -> reset umass0:umass_transfer_start: transfer index = 0 umass0:umass_t_bbb_reset1_callback: BBB reset! umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/36b data/18b sense umass0:umass_transfer_start: transfer index = 1 umass0:umass_transfer_start: transfer index = 2 umass0:umass_transfer_start: transfer index = 3 umass0:umass_bbb_dump_cbw: CBW 3: cmd = 6b (0x120000002400), data = 36b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=36 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 3: sig = 0x53425355 (valid), tag = 3, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/255b data/18b sense umass0:umass_bbb_dump_cbw: CBW 4: cmd = 6b (0x12018000ff00), data = 255b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=255 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 4: sig = 0x53425355 (valid), tag = 4, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_SET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 5: cmd = 6b (0x000000000000), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 5: sig = 0x53425355 (valid), tag = 5, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 6: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 6: sig = 0x53425355 (valid), tag = 6, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 7: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umassX:umass_cam_rescan_callback: xpt0: Rescan succeeded umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 7: sig = 0x53425355 (valid), tag = 7, res = 0, status = 0x00 (good) da0 at umass-sim0 bus 0 target 0 lun 0 da0: <JetFlash TS512MJFV30 8.07> Removable Direct Access SCSI-2 device umass0:umass_cam_action: 0:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. da0: 40.000MB/s transfers da0: 484MB (991232 512 byte sectors: 64H 32S/T 484C) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 8: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 8: sig = 0x53425355 (valid), tag = 8, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 9: cmd = 6b (0x1e0000000100), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 9: sig = 0x53425355 (valid), tag = 9, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 10: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 10: sig = 0x53425355 (valid), tag = 10, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b cmd/512b data/32b sense umass0:umass_bbb_dump_cbw: CBW 11: cmd = 10b (0x280000000000...), data = 512b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=512 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 11: sig = 0x53425355 (valid), tag = 11, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 12: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 12: sig = 0x53425355 (valid), tag = 12, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 13: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 13: sig = 0x53425355 (valid), tag = 13, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 14: cmd = 6b (0x1e0000000000), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 14: sig = 0x53425355 (valid), tag = 14, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 15: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 15: sig = 0x53425355 (valid), tag = 15, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 16: cmd = 6b (0x1e0000000100), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 16: sig = 0x53425355 (valid), tag = 16, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 17: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 17: sig = 0x53425355 (valid), tag = 17, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b cmd/512b data/32b sense umass0:umass_bbb_dump_cbw: CBW 18: cmd = 10b (0x280000000001...), data = 512b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=512 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 18: sig = 0x53425355 (valid), tag = 18, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b cmd/512b data/32b sense umass0:umass_bbb_dump_cbw: CBW 19: cmd = 10b (0x280000000000...), data = 512b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=512 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 19: sig = 0x53425355 (valid), tag = 19, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 20: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 20: sig = 0x53425355 (valid), tag = 20, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 21: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 21: sig = 0x53425355 (valid), tag = 21, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 22: cmd = 6b (0x1e0000000000), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 22: sig = 0x53425355 (valid), tag = 22, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 23: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 23: sig = 0x53425355 (valid), tag = 23, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 24: cmd = 6b (0x1e0000000100), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 24: sig = 0x53425355 (valid), tag = 24, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 25: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 25: sig = 0x53425355 (valid), tag = 25, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 26: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 26: sig = 0x53425355 (valid), tag = 26, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 27: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 27: sig = 0x53425355 (valid), tag = 27, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 28: cmd = 6b (0x1e0000000000), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 28: sig = 0x53425355 (valid), tag = 28, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 29: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 29: sig = 0x53425355 (valid), tag = 29, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 30: cmd = 6b (0x1e0000000100), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 30: sig = 0x53425355 (valid), tag = 30, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 31: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 31: sig = 0x53425355 (valid), tag = 31, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 32: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 32: sig = 0x53425355 (valid), tag = 32, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 33: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 33: sig = 0x53425355 (valid), tag = 33, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x1e, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 34: cmd = 6b (0x1e0000000000), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 34: sig = 0x53425355 (valid), tag = 34, res = 0, status = 0x00 (good) I tried a memory stick from another manufacturer that worked without problems. Here is the output for comparison: umass0: <LG USB DRIVE, class 0/0, rev 2.00/2.00, addr 126> umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:umass_cam_action: 0:-1:-1:XPT_PATH_INQ:. umass0:0:0:-1: Attached to scbus0 umass0:umass_cam_rescan: scbus0: scanning for 0:0:-1 umass0:umass_cam_action: 0:-1:-1:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/36b data/18b sense umass0:umass_bbb_dump_cbw: CBW 1: cmd = 6b (0x120000002400), data = 36b, lun = 0, dir = in umass0:umass_attach: Attach finished umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=36 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 1: sig = 0x53425355 (valid), tag = 1, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x12, flags: 0x40, 6b cmd/255b data/18b sense umass0:umass_bbb_dump_cbw: CBW 2: cmd = 6b (0x12018000ff00), data = 255b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=255 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 2: sig = 0x53425355 (valid), tag = 2, res = 219, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_SET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x00, flags: 0xc0, 6b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 3: cmd = 6b (0x000000000000), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 3: sig = 0x53425355 (valid), tag = 3, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 4: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 4: sig = 0x53425355 (valid), tag = 4, res = 14, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 5: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umassX:umass_cam_rescan_callback: xpt0: Rescan succeeded umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 5: sig = 0x53425355 (valid), tag = 5, res = 0, status = 0x00 (good) da0 at umass-sim0 bus 0 target 0 lun 0 da0: < > Fixed Direct Access SCSI-0 device umass0:umass_cam_action: 0:0:0:XPT_GET_TRAN_SETTINGS:. umass0:umass_cam_action: 0:0:0:XPT_PATH_INQ:. da0: 40.000MB/s transfers da0: 1000MB (2048000 512 byte sectors: 64H 32S/T 1000C) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 6: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 6: sig = 0x53425355 (valid), tag = 6, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b cmd/512b data/32b sense umass0:umass_bbb_dump_cbw: CBW 7: cmd = 10b (0x280000000000...), data = 512b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=512 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 7: sig = 0x53425355 (valid), tag = 7, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 8: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 8: sig = 0x53425355 (valid), tag = 8, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 9: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 9: sig = 0x53425355 (valid), tag = 9, res = 14, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 10: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 10: sig = 0x53425355 (valid), tag = 10, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b cmd/512b data/32b sense umass0:umass_bbb_dump_cbw: CBW 11: cmd = 10b (0x280000000001...), data = 512b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=512 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 11: sig = 0x53425355 (valid), tag = 11, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x28, flags: 0x40, 10b cmd/512b data/32b sense umass0:umass_bbb_dump_cbw: CBW 12: cmd = 10b (0x280000000000...), data = 512b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=512 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 12: sig = 0x53425355 (valid), tag = 12, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 13: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 13: sig = 0x53425355 (valid), tag = 13, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 14: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 14: sig = 0x53425355 (valid), tag = 14, res = 14, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 15: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 15: sig = 0x53425355 (valid), tag = 15, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 16: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 16: sig = 0x53425355 (valid), tag = 16, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 17: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 17: sig = 0x53425355 (valid), tag = 17, res = 14, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x25, flags: 0x40, 10b cmd/8b data/32b sense umass0:umass_bbb_dump_cbw: CBW 18: cmd = 10b (0x250000000000...), data = 8b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=8 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 18: sig = 0x53425355 (valid), tag = 18, res = 0, status = 0x00 (good) umass0:umass_cam_action: 0:0:0:XPT_SCSI_IO: cmd: 0x35, flags: 0xc0, 10b cmd/0b data/32b sense umass0:umass_bbb_dump_cbw: CBW 19: cmd = 10b (0x350000000000...), data = 0b, lun = 0, dir = out umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 19: sig = 0x53425355 (valid), tag = 19, res = 0, status = 0x01 (failed) umass0:umass_t_bbb_status_callback: Command failed, residue = 0 umass0:umass_cam_cb: Fetching 32 bytes of sense data umass0:umass_bbb_dump_cbw: CBW 20: cmd = 6b (0x030000002000), data = 32b, lun = 0, dir = in umass0:umass_transfer_start: transfer index = 4 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=32 umass0:umass_t_bbb_data_read_callback: max_bulk=131072, data_rem=0 umass0:umass_transfer_start: transfer index = 8 umass0:umass_bbb_dump_csw: CSW 20: sig = 0x53425355 (valid), tag = 20, res = 14, status = 0x00 (good) Tell me if you need more information. -- Regards, Markus Henschel Development BALLY WULFF Automaten GmbH Maybachufer 48-51 12045 Berlin Phone: +49(30)62002 161 FAX: +49(30)62002 230 http://www.ballywulff.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?460A3861.3000207>