<div dir="ltr"><div>Hello</div><div><br></div><div>This is a newbie question: I am trying to write a simple DragonFly kernel module for the gmux device that is attached to the LPC bus. Probing works fine but I am stuck with the attachment routine: I can't allocate IO ports for the device. </div><div><br></div><div>The device shows up in the device tree but is not attached: </div><div><br></div><div>---</div><div># devinfo -rv | grep GMUX:</div><div><br></div><div>unknown pnpinfo _HID=APP000B _UID=0 at handle=\_SB_.PCI0.LPCB.GMUX</div><div>---</div><div><br></div><div>I looked up acpi tables (acpidump etc), the IO resources for GMUX seem to be there: </div><div><br></div><div>--- ---</div><div>    Scope (\_SB.PCI0.LPCB)</div><div>    {</div><div>        Device (GMUX)</div><div>        {</div><div>            Name (_HID, EisaId ("APP000B"))  // _HID: Hardware ID</div><div>            Name (_CID, "gmux")  // _CID: Compatible ID</div><div>            Name (_STA, 0x0B)  // _STA: Status</div><div>            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings</div><div>            {</div><div>                IO (Decode16,</div><div>                    0x0700,             // Range Minimum</div><div>                    0x07FF,             // Range Maximum</div><div>                    0x01,               // Alignment</div><div>                    0xFF,               // Length</div><div>                    )</div><div>            })</div><div>--- ---</div><div><br></div><div>Also, looking devinfo -rv shows that the range 0x0700 to 0x07FF has been set aside by the kernel: </div><div><br></div><div>---</div><div># devinfo -u </div><div><br></div><div>. . .</div><div>I/O ports: </div><div>    . . .</div><div>    0x400 - 0x1fff (root0)</div><div>    . . .</div><div>---</div><div><br></div><div>So am I right supposing that bus_alloc_resource_any should be able to claim the range 0x700 to 0x7FF for the gmux device? At the moment, trying to allocate IO ports with bus_alloc_resource returns NULL. </div><div><br></div><div>I wonder if anyone has suggestions about what has gone wrong or where to dig further? I attach the code. </div><div><br></div><div>Thanks</div><div><br></div><div>Peeter</div><div><br></div><div>--</div><div><br></div></div>