Re: [RFC] ahci(4) patch

From: Maksim Yevmenkin <emax_at_freebsd.org>
Date: Wed, 16 Nov 2011 14:44:24 -0800
On Wed, Nov 16, 2011 at 2:35 PM, Alexander Motin <mav_at_freebsd.org> wrote:
> 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
>> _at__at_ -500,7 +500,7 _at__at_
>>        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.

shouldn't achcichX be destroyed when disk is detached/removed/etc.?
the particular problem i'm trying to address is disk re-numbering when
one of the disks fails/removed/etc. i'm trying to use hints to wire
disks to controllers/busses. it works perfectly fine with da(4) disks
(even hot swappable ones) , but i can not make it to work with ada(4)
disks. i'm perfectly fine to hid this under some sort of option
(something similar to ATA_STATIC_ID, AHCI_STATIC_ID for example)

thanks,
max
Received on Wed Nov 16 2011 - 21:44:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC