On Sun, Feb 10, 2019 at 07:12:38PM +0100, Sebastian Reitenbach wrote: > I get the same bad ROM checksum message with the broken device, > and indeed, the device that worked before, now gives the same bad ROM checksum > message when I insert it. It only give a different checksum: > previously working device: 0x2243 > non-working device: 0x2c64 > > cheers, > Sebastian
This should fix attach but there's some other remaining problem. The device detaches itself again when I try to use it. diff 709e530bc956c51de2da4aff727d8da450babdc4 /usr/src blob - 74025dba1aff37e328c92779398e428caef72c04 file + sys/dev/ic/ar9287.c --- sys/dev/ic/ar9287.c +++ sys/dev/ic/ar9287.c @@ -100,7 +100,8 @@ void ar9280_spur_mitigate(struct athn_softc *, struct int ar9287_attach(struct athn_softc *sc) { - sc->eep_base = AR9287_EEP_START_LOC; + sc->eep_base = (sc->flags & ATHN_FLAG_USB) ? + AR9287_HTC_EEP_START_LOC : AR9287_EEP_START_LOC; sc->eep_size = sizeof(struct ar9287_eeprom); sc->ngpiopins = (sc->flags & ATHN_FLAG_USB) ? 16 : 11; sc->led_pin = 8; blob - 340b28c2f84de4d40f15c42f13b1727a6f497bb0 file + sys/dev/ic/ar9287reg.h --- sys/dev/ic/ar9287reg.h +++ sys/dev/ic/ar9287reg.h @@ -60,6 +60,7 @@ * ROM layout used by AR9287 (2GHz only). */ #define AR9287_EEP_START_LOC 128 +#define AR9287_HTC_EEP_START_LOC 256 #define AR9287_NUM_2G_CAL_PIERS 3 #define AR9287_NUM_2G_CCK_TARGET_POWERS 3 #define AR9287_NUM_2G_20_TARGET_POWERS 3