From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 15 20:58:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30FD01065670 for ; Mon, 15 Mar 2010 20:58:31 +0000 (UTC) (envelope-from scdbackup@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 7D67B8FC13 for ; Mon, 15 Mar 2010 20:58:28 +0000 (UTC) Received: (qmail invoked by alias); 15 Mar 2010 20:58:25 -0000 Received: from 165.126.46.212.adsl.ncore.de (HELO 192.168.2.69) [212.46.126.165] by mail.gmx.net (mp003) with SMTP; 15 Mar 2010 21:58:25 +0100 X-Authenticated: #2145628 X-Provags-ID: V01U2FsdGVkX19uXU0YxN5u9dxJnn4L54p4GhQZb+nILAG8Imc/4t e/upzLQ+jM7YUn Date: Mon, 15 Mar 2010 21:57:34 +0100 From: "Thomas Schmitt" To: freebsd-hackers@freebsd.org References: <20100315201119.GA4860@triton8.kn-bremen.de> In-Reply-To: <20100315201119.GA4860@triton8.kn-bremen.de> Message-Id: <10608773149940@192.168.2.69> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53000000000000003 Subject: Re: How to slow down SATA to 1.5 GBit/s ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 20:58:31 -0000 Hi, > I have Cc'd mav@ who afaik did most of the ahci(4) work, I found a similar PR http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg70510.html and bothered mav for instructions how to upgrade to a system that would suffice for diagnosing. Meanwhile i suspect that there is a general problem with SCSI commands which report error codes. I even found a little bug in cdrskin by watching when it gets stuck. (SCSI error or "sense" replies are not necessarily a sign of a program error. They are often just part of the dialog.) > Well I guess drives simply don't like `random other' commands being > sent to them while a burn is in progress... It depends on the media type. CD and DVD-R[W] are vulnerable. It's a classic side effect of hald. On Linux, the burn just ends with some more or less plausible SCSI error. FreeBSD 8.0 freshly from DVD was less graceful. Now it seems to know when not to let me touch the drive. ("Now" is already before ahci.) > I don't know if hald also sends direct scsi > commands via pass(4) devices, so that > may even need to be blocked too Making drive access exclusive is quite a tragic drama on Linux. Most burn programs rely on an undocumented meaning of open(O_EXCL). That would work well ... if there wasn't an older slightly incompatible undocumented meaning. (Cough.) O_EXCL works on inode level, whereas we actually would need locking on SCSI generic level, where all possible users of a drive come together. FreeBSD offers at least as many bypasses to the drive as Linux does. I imagine that it is not easy to lock them all. I'm not done with exploring yet. > > The port of xfburn generously (or daringly) > > writes into /etc/devfs.rules : > Ouch! :) Yeah. What happened to good old group "floppy" ? camcontrol devlist tells the particular device files. (I learned today on my way to ahci.) Have a nice day :) Thomas