NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/53716: PCengines APU2 requires AHCI enabler

The following reply was made to PR kern/53716; it has been noted by GNATS.

From: matthew green <>
Subject: re: kern/53716: PCengines APU2 requires AHCI enabler
Date: Sun, 11 Nov 2018 08:45:06 +1100

 hi Shinichi,
 can you re-work this as a quirk rather than as a direct
 check?  see eg ahci_pci_has_quirk() and friends, similar
 to the existing AHCI_PCI_QUIRK_FORCE check immediately
 above your new code, and then move the code that makes
 the actual change into its own function so that the
 match function remains relatively short and clear.
 infact, could you make it such that the match simply
 returns non zero, and move the actual switch into the
 attach function?  generally, match should not change
 any device state, only attach should.  eg, for the case
 that a more specific driver may exist for this card it
 will return a higher match value than ahci itself, and
 the match function will have made a change to the
 device that may not be expected, and the other driver
 (who will have attach called, not ahci), will be
 started with the device in an unexpected state.

Home | Main Index | Thread Index | Old Index