From owner-freebsd-usb@FreeBSD.ORG Sun Sep 27 14:12:12 2009 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 538E4106568D for ; Sun, 27 Sep 2009 14:12:12 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id B13758FC0A for ; Sun, 27 Sep 2009 14:12:11 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8REC5Bc020046; Sun, 27 Sep 2009 22:12:05 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8REC5nV020045; Sun, 27 Sep 2009 22:12:05 +0800 (KRAST) (envelope-from eugen) Date: Sun, 27 Sep 2009 22:12:05 +0800 From: Eugene Grosbein To: usb@freebsd.org Message-ID: <20090927141205.GA19251@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090926081733.GA24121@svzserv.kemerovo.su> User-Agent: Mutt/1.4.2.3i Cc: Hans Petter Selasky Subject: Re: 8.0-RC1: AMD CS5536 (Geode) USB 2.0 controller strange behavour X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2009 14:12:12 -0000 > Could you check if these are due to device timeouts in the CAM layer? > There is some debugging you can turn on: > > sysctl hw.usb.umass.debug=-1 > > Probably it will flood the console. That's not a problem. Anyway, I rlogin to this system and use syslog to write all console/kernel logs to console.log and kernel.log So, I have done: %sysctl hw.usb.umass.debug=-1 hw.usb.umass.debug: 0 -> -1 Then used another terminal to ran: %iostat -d -K -w 10 da0 da0 KB/t tps MB/s 2.88 0 0.00 After it started, I switched back to first terminal and ran: %dd if=/dev/zero bs=64k of=/dev/da0 count=1000 It started to work, meantime iostat output was: 63.62 17 1.05 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 64.00 2 0.15 62.31 83 5.06 0.25 0 0.00 0.00 0 0.00 0.00 0 0.00 ^C To this moment, dd has finished his work and printed: 1000+0 records in 1000+0 records out 65536000 bytes transferred in 78.627073 secs (833504 bytes/sec) One can see, it sent first chunk of data to the device than there was quite large period of time without any activity, more than 50 seconds. Then it has finished. As for debug log, its uncompressed size is over megabyte so I've made it available here (25KB compressed): http://www.grosbein.pp.ru/umass.log.gz I cannot read/understand it yet. > Maybe you could add some prints to > /sys/dev/usb/storage/umass.c in all the "default:" cases in the USB callbacks > and print out the "error" code. That would quickly indicate if your device has > an issue with timing, I.E. that the firmware in the USB device part is hanging. I still suppose the device is fine because it presents no such problem being connected to another box with the same 8.0-RC1 (same sources). Also, I don't feel myself confident with the code to debug it yet... Eugene Grosbein