Nathan Goings wrote: > I purchased an Edimax EW-7128Gn that contains a ralink RT3060 chip and > it's unrecognized. > > dmesg: > vendor "Ralink", unknown product 0x3060 (class network subclass > miscellaneous, rev 0x00) at pci4 dev 0 function 0 not configured > > The documentation says a/g/n but this is a b/g/n. Ralink's drivers use > the same firmware across what is supported and the 3060. The linux > drivers are grouped in the 2860/3062 (which is supported). Plus the > official drivers are open source! > > So my plan was to force the 3062 (later the 2860) onto the 3060 and see > if it worked. Otherwise compare the linux drivers between > 2860/3060/3062/3090 and compare the OpenBSD ralink between > 2561/2561S/2661/2860 (per sys/dev/pci/if_ral_pci.c) and make the > required changes (EEPROM? microcode?) > > Here's my problem, upon updating /sys/dev/pci/pcidevs (also changed > pcidevs.h and pcidevs_data.h, unsure how they are auto-generated)
AFAICT it's: - update /sys/dev/pci/pcidevs - run make in /sys/dev/pci/ (see /sys/dev/pci/Makefile for the details) > I then > updated sys/dev/pci/if_ral_pci.c (and associated cardbus) for > pci_matchid ral_pci_devices so that the 3060 is matched by the ralink > driver (and by default switch case the rt2860 is used) I still get > "unknown product 0x3060...not configured" in dmesg. > AFAIK this is step one. Assuming you added the PCI IDs correctly, the driver's attach function should run. However, to the best of my understanding, you chose a more or less random attach function for your unsupported device. My guess is that the attach function didn't run, or hasn't got the proper support for your device and therefore fails, leaving you with a "not configured" device. (Frankly, step one should be to first compare drivers and see if OpenBSD has the code necessary to support your device and add the missing pieces, instead of semi-randomly trying to run some OpenBSD code on your unsupported device. Also beware of differences in how the code is licensed in case you want to literally copy stuff.) > pcidevs entry: (and correct changes in .h and _data.h) > product RALINK RT3060 0x3060 RT3060 > > and for completeness, I'm successfully building and installing a GENERIC > kernal *and* userland. > > First, how do I correctly compile and associate a "not configured" > product to a specific driver, and second, how do I debug such an > association?