From owner-freebsd-current@FreeBSD.ORG Tue Jul 22 23:32:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D95EF37B401 for ; Tue, 22 Jul 2003 23:32:39 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22ECB43FB1 for ; Tue, 22 Jul 2003 23:32:39 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfkao.dialup.mindspring.com ([165.247.209.88] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19fDAs-0002iq-00; Tue, 22 Jul 2003 23:32:31 -0700 Message-ID: <3F1E2BB9.64E9A616@mindspring.com> Date: Tue, 22 Jul 2003 23:31:21 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Kenneth D. Merry" References: <20030720125750.F19406@alpha.siliconlandmark.com> <20030722192024.GA47886@panzer.kdm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a45cc5ac0d552399a0359028058f9d66ea3ca473d225a0f487350badd9bab72f9c350badd9bab72f9c cc: current@freebsd.org cc: Andre Guibert de Bruet cc: Harald Schmalzbauer Subject: Re: where is kern.ca.da.no_6_byte? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 06:32:40 -0000 "Kenneth D. Merry" wrote: > On Sun, Jul 20, 2003 at 19:40:58 +0200, Harald Schmalzbauer wrote: > > Why has this tunable by default a value which makes the machine unstable by > > every umass I plug in which has no "qirk" entry? And if I look how many > > quirks there are I assume that almost every device needs no_6byte set. > > Why not make it default? Perhaps this would prevent criminal people from > > intentionally crashing servers when intruding my serverroom armed with > > dozends of USB devices;) > > The problem is that some devices can't handle 6 byte commands, and some > devices can't handle 10 byte commands. If we "fix" things for one set of > devices we'll break things for another. > > You're correct that many USB devices need 10 byte CDBs from the outset, > because they're so broken that if they get a CDB they don't recognize, they > hang up. > > We have code in the da(4) driver now that detects errors from a device > in response to a 6 byte command and tries a 10 byte command instead, but > that doesn't help if the device hangs the first time it gets a 6 byte > command. I guess this is a problem if the device is self-powered, but otherwise you should be able to reset it by powering it down and back up, worst case. If the things explode on 6-when-expecting-10, are there also those that explode on 10-when-expecting-6? If not, it seems that you could try 10 first then fall back to 6. Murphey says these things would exist, though, if only to keep you from working around the problem that way. If the reason it's hung is it wants 4 more bytes... might it be possible to just send it 4 more bytes to unhang it? As far as I'm concerned, USB is a Very Black Art(tm), and has been since day one. 8-(. You have to wonder how Windows manages... -- Terry