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



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.

thanks!


.mrg.


Home | Main Index | Thread Index | Old Index