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 <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost, clare%csel.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost
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.
 
 thanks!
 
 
 .mrg.
 


Home | Main Index | Thread Index | Old Index