[OpenIndiana-discuss] [oi-dev] AMD Hudson SATA

Rich rercola at acm.jhu.edu
Thu Aug 30 21:13:41 UTC 2012


Does forceload matter if the ahci driver isn't in the miniroot?

[Dunno if it is or not, just suggesting you look.]

- Rich

On Thu, Aug 30, 2012 at 4:18 PM, Jim Klimov <jimklimov at cos.ru> wrote:
> So, this adventure is going from strange to weird and back.
> The Live image with original ahci driver occasionally sees the
> HDD in SATA mode, sometimes it doesn't. Reloading the ahci driver
> (original or updated - see patch below; I've now also enabled
> AHCI_CAP_INIT_PORT_RESET) in the latter case sometimes helps.
> It does not seem that the driver tweak does anything (nothing
> in dmesg for example).
>
> The installed OS does not see the disk at all and refuses to
> load (panics). I tried to sanitize it by importing and exporting
> the rpool, and by installing from scratch - both while in SATA
> mode - the resulting OS does not boot the same way. With kmdb
> pause after panic I see the following relevant messages:
>
> ---
> Cannot mount pool on /pci at 0,0/pci17aa,5104 at 11/disk at 0,0:a fstype zfs
> * The path is correct when I'm booted off the live image
> ---
> Loaded modules: [ scsi_vhci mac uppc mr_sas sd unix mpt zfs krtld
> sata apix pmcs genunix specfs pcplusmp cpu.generic mpt_sas ]
> * I don't see ahci here. Adding it to /etc/system (forceload: drv/ahci)
> and /etc/driver_aliases does not influence the result.
> ---
>
> As I understand the lookout of things, the miniroot does not
> load the ahci module for some reason, and then honestly does
> not see the disk attached to ahci controller.
>
> Suggestions welcome.
>
>
> 2012-08-30 14:07, Jim Klimov wrote:
>>
>> Hi all,
>>
>> I am struggling to get AHCI working with my new Thinkpad E335 notebook.
>> According to OI Device Driver utility, it includes an "AMD Hudson SATA
>> Controller" when it is BIOS-enabled into SATA (AHCI) mode.
>>
>> However, only twice of a dozen bootups did it see the HDD behind it,
>> once was in the shop when I was testing the notebook for compatibility ;)
>>
>> The system did install and work stably with the controller in
>> "Compatibility mode" (seeing the disk as CMDK IDE), but I'd prefer
>> SATA working in a stable manner. Apparently, some port-reset hints,
>> etc. are in order as for some other controllers in the driver.
>>
>> I'm trying to give a spin to recent bug report on similar issue,
>> but I'd take into account that my box has a different devid
>> (mine is pci1022,7804):
>> https://www.illumos.org/issues/3099
>>
>> Do I understand correctly that it is enough to patch ahci.c and build
>> the driver and replace one on the laptop?
>>
>> # gdiff -Nabur usr/src/uts/common/io/sata/adapters/ahci/ahci.c.orig
>> usr/src/uts/common/io/sata/adapters/ahci/ahci.c
>>
>> --- usr/src/uts/common/io/sata/adapters/ahci/ahci.c.orig 2012-04-19
>> 02:17:42.110503288 +0400
>> +++ usr/src/uts/common/io/sata/adapters/ahci/ahci.c     2012-08-30
>> 13:57:09.358521233 +0400
>> @@ -4118,6 +4118,31 @@
>>                      "is set 0xf and no port multiplier is attached",
>> NULL);
>>          }
>>
>> +       /* AMD Hudson D3 AHCI 0x1002 : 0x7801, reportedly similar to
>> SB700/750
>> +        * See: https://www.illumos.org/issues/3099
>> +        * I'll also try 0x7804 as on my box
>> +        */
>> +       if (ahci_ctlp->ahcictl_venid == 0x1002 &&
>> +           ( ahci_ctlp->ahcictl_devid == 0x7801 ||
>> +             ahci_ctlp->ahcictl_devid == 0x7804 ) ) {
>> +               ahci_ctlp->ahcictl_cap |= AHCI_CAP_COMMU_32BIT_DMA;
>> +//             ahci_ctlp->ahcictl_cap |= AHCI_CAP_INIT_PORT_RESET;
>> +               ahci_ctlp->ahcictl_cap |= AHCI_CAP_SRST_NO_HOSTPORT;
>> +
>> +               AHCIDBG(AHCIDBG_INIT, ahci_ctlp,
>> +                   "AMD Hudson D3 cannot do 64-bit DMA for communication
>> "
>> +                   "memory descriptors though CAP indicates support, "
>> +                   "so force it to use 32-bit DMA", NULL);
>> +//             AHCIDBG(AHCIDBG_INIT, ahci_ctlp,
>> +//                 "AMD Hudson D3 need to do a port reset during
>> initialization",
>> +//                 NULL);
>> +               AHCIDBG(AHCIDBG_INIT, ahci_ctlp,
>> +                   "AMD Hudson D3 will get software reset failure if
>> pmport "
>> +                   "is set 0xf and no port multiplier is attached",
>> NULL);
>> +       }
>> +
>> +
>> +
>>          /*
>>           * Check if capabilities list is supported and if so,
>>           * get initial capabilities pointer and clear bits 0,1.
>>
>>
>
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss



More information about the OpenIndiana-discuss mailing list