On Mon, Nov 17, 2008 at 10:10 PM, Elia Yehuda <span dir="ltr"><<a href="mailto:z4ziggy@gmail.com">z4ziggy@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><br><br><div class="gmail_quote"><div class="Ih2E3d">On Tue, Nov 18, 2008 at 3:44 AM, Joseph Smith <span dir="ltr"><<a href="mailto:joe@settoplinux.org" target="_blank">joe@settoplinux.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
<br>
On Tue, 18 Nov 2008 00:59:07 +0200, "Elia Yehuda" <<a href="mailto:z4ziggy@gmail.com" target="_blank">z4ziggy@gmail.com</a>><br>
wrote:<br>
<div>> just noticed ive put it in cpu_bus_ops... have a laugh...<br>
><br>
</div>No worries, this is how we learn :-)<br>
<div>><br>
> but i dont have "static struct device_operations mc_ops" - where should i<br>
> add<br>
> the .ops_pci ?<br>
><br>
</div>Little confused about what your trying to do here. This doesn't work??<br>
<br>
static const struct pci_driver northbridge_driver __pci_driver = {<br>
         .ops    = &northbridge_operations,<br>
         .vendor = PCI_VENDOR_ID_INTEL,<br>
         .device = 0x7120,<br>
};<br>
<font color="#888888"></font></blockquote></div><div><br>this works just fine. i simply don't know where to add ".ops_pci" since i dont have <br>"static struct device_operations mc_ops" in northbridge.c</div>
</div></div></blockquote><div><br>You should be able to add it to pci_domain_ops, but be sure to check that it actually runs. Otherwise, you'll need to create that mc_ops driver with just the .ops_pci and everything else set to NULL, and use this:<br>
<br>static void enable_dev(struct device *dev)<br>{<br>    struct device_path path; //unused?<br><br>    /* Set the operations if it is a special bus type */<br>    if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {<br>        dev->ops = &pci_domain_ops;<br>
        pci_set_method(dev);<br>    } else if (dev->path.type == DEVICE_PATH_APIC_CLUSTER) {<br>        dev->ops = &cpu_bus_ops;<br>    } else if (dev->path.type == DEVICE_PATH_PCI) {<br>        dev->ops = &mc_ops;<br>
    } <br></div></div>}<br><br>I hope you can understand what I'm trying to say, I'm a bit tired right now.<br><br>-Corey<br>