From owner-freebsd-current@FreeBSD.ORG Tue Jul 22 18:15:23 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 B135F37B401 for ; Tue, 22 Jul 2003 18:15:23 -0700 (PDT) Received: from lightpro1.lightpro.de (lightpro1.lightpro.de [213.133.98.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8809943F75 for ; Tue, 22 Jul 2003 18:15:22 -0700 (PDT) (envelope-from h@schmalzbauer.de) Received: from akima (ppp-62-245-210-236.mnet-online.de [62.245.210.236]) (authenticated bits=0)h6N1FJS5011072; Wed, 23 Jul 2003 03:15:20 +0200 From: "Harald Schmalzbauer" To: "Kenneth D. Merry" Date: Wed, 23 Jul 2003 03:14:55 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20030722192024.GA47886@panzer.kdm.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: current@freebsd.org cc: Andre Guibert de Bruet 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 01:15:24 -0000 Kenneth D. Merry wrote: > > OIC. It's not available until the device is pluged in, which makes it > > absolutely useless. > > When I plug it in the machine behaves abnormal, so I need to > > set it BEFORE > > connecting USB devices. > > Then you can set it in your loader.conf file instead. It's a loader > tunable as well as a sysctl variable. The da(4) driver will read that > tunable value and set the variable correctly before your drive is probed. Ok, I didn't know that there is a difference between loader set tunables and tunables set with sysctl -w! > > > 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. Thanky you very much for that explanation. It's always good to know why things are not working as expected. This expanded my limited knowledge. Thank you, -Harry > > We've got plans to basically quirk all USB devices (and perhaps ATAPI and > firewire if necessary, but USB is the one that causes the most trouble) so > that no 6 byte commands get sent. So, hopefully this won't be an > issue for > too much longer. > > Ken > -- > Kenneth Merry > ken@kdm.org >