tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xorg pci probing



One nit:

+wsdisplayio_busid_pci(device_t self, pci_chipset_tag_t pc,
+    pcitag_t tag, void *data)
+{
+       struct wsdisplayio_bus_id *busid = data;
+
+       busid->bus_type = WSDISPLAYIO_BUS_PCI;
+       busid->ubus.pci.domain = device_unit(device_parent(self));

Please add a KASSERT here, as this doesn't do the right thing in all cases, consider the following:

  mymfdev0 at pci1 dev 3 function 0
  mymfdevfb0 at mymfdev0
  wsdisplay0 at mymfdevfb0

   ^ will get a 'domain' of 0 instead of the desired 1

The KASSERT should look like this:

  KASSERT(device_is_a(device_parent(self), "pci"))


Home | Main Index | Thread Index | Old Index