When I leave out the device_t sc_dev part in struct gscpcib_softc, i.e. I do not have this structure member, but the rest of the diff, then the gpio will attach, but accessing with e.g. 'gpioctl gpio0 6 set out' will lead to an uvm_map error an beam the machine to the eternal hunting grounds... (aka panic).
Something(tm) must be modifying the gscpcib_softc structure in the attach routine, around pcibattach(). Setting the sc->sc_gpio_present to true, then calling pcibattach(), and after this, sc- >sc_gpio_present is not longer true. I don't want to committ my fix right away, I'd really like to understand what is going on here.
hints appreciated... - Marc Balmer
Attachment:
gscpcib_01.diff
Description: Binary data