Hi,

about BBU detection,

From: Jonathan Matthew <[email protected]>
Subject: Re: mfii(4): add bio(4) support
Date: Thu, 8 Mar 2018 21:56:53 +1000

>> > I also don't get a sensor for the battery.  I haven't looked into this yet.
>> > Any idea why that would happen?
>> 
>> could you try following (only 1st hunk, only 2nd hunk, or both) patch?
>> # I'm not sure this is right fix...
> 
> The 2nd hunk makes the battery sensors show up here.

>> @@ -3682,7 +3669,7 @@ mfii_create_sensors(struct mfii_softc *sc)
>>      strlcpy(sc->sc_sensordev.xname, DEVNAME(sc),
>>          sizeof(sc->sc_sensordev.xname));
>>  
>> -    if (ISSET(letoh32(sc->sc_info.mci_adapter_ops ), MFI_INFO_AOPS_BBU)) {
>> +    if (ISSET(letoh32(sc->sc_info.mci_hw_present), MFI_INFO_HW_BBU)) {
>>              sc->sc_bbu = mallocarray(4, sizeof(*sc->sc_bbu),
>>                  M_DEVBUF, M_WAITOK | M_ZERO);
>>  

that line (in mfi(4)) was introduced in mfi.c r1.142 like as

 if (MFI_INFO_HW_BBU && MFI_INFO_AOPS_BBU)

and modified(relaxed?) in r1.143 like as

 if (MFI_INFO_AOPS_BBU)


then, how about this?

 if (MFI_INFO_HW_BBU || MFI_INFO_AOPS_BBU)

Best regards,

--
FUKAUMI Naoki

Reply via email to