From owner-freebsd-current@FreeBSD.ORG Wed Nov 16 22:35:40 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B047D1065673 for ; Wed, 16 Nov 2011 22:35:40 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFBE8FC12 for ; Wed, 16 Nov 2011 22:35:39 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so1599821bkb.13 for ; Wed, 16 Nov 2011 14:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gFIkbonxzgnwvFnE5nPRjG0dg/+jY4Twudzvmgsm8uc=; b=ghBWUQurG6REYko2eAVtnP3U5iNpUpkZzejq+9em1mghCD2pDyieFQPaD9ovu+ke0m NoTsGjdZ6JNUjSjbfGoQKrJqL8v/vVsuAuILAkPepCFI+xeOCHLgS7pbli8eg6m9XhQ8 rLcBckg3KZJyF/9U084lrVYUzkqcgUmHALrOo= Received: by 10.204.152.87 with SMTP id f23mr22588447bkw.18.1321482938714; Wed, 16 Nov 2011 14:35:38 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id w11sm77646fad.7.2011.11.16.14.35.37 (version=SSLv3 cipher=OTHER); Wed, 16 Nov 2011 14:35:37 -0800 (PST) Sender: Alexander Motin Message-ID: <4EC43ABA.7060407@FreeBSD.org> Date: Thu, 17 Nov 2011 00:35:38 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111112 Thunderbird/8.0 MIME-Version: 1.0 To: Maksim Yevmenkin References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: [RFC] ahci(4) patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 16 Nov 2011 22:35:40 -0000 Hi. On 16.11.2011 23:59, Maksim Yevmenkin wrote: > would anyone object to the following ahci(4) patch? > > == > > --- ahci.c.orig 2011-11-16 21:35:26.000000000 +0000 > +++ ahci.c 2011-11-16 21:35:41.000000000 +0000 > @@ -500,7 +500,7 @@ > for (unit = 0; unit< ctlr->channels; unit++) { > if ((ctlr->ichannels& (1<< unit)) == 0) > continue; > - child = device_add_child(dev, "ahcich", -1); > + child = device_add_child(dev, "ahcich", unit); > if (child == NULL) > device_printf(dev, "failed to add channel device\n"); > else > > == > > the idea is to have "static" numbering for ada(4) disks. I do. The only way I see this useful is if you have BIOS configured for non-hot-swappable disks, in which case you have some AHCI channels disabled, but want to keep numbers of the rest. While I don't like this mode in general, especially when it can't be disabled, that patch could be useful in these cases. But in other cases, when you have several AHCI controllers, it just wont not work. You will receive error on attempt to create second ahcich0. -- Alexander Motin