tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xorg pci probing
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
+ case WSDISPLAYIO_GET_BUSID: {
+ struct wsdisplayio_bus_pci pci;
+ struct wsdisplayio_bus_id *bus = data;
+ pci.pci_pc = sc->sc_pc;
+ pci.pci_tag = sc->sc_pcitag;
+ bus->bus_type = WSDISPLAYIO_BUS_PCI;
+ return wsdisplayio_busid(&sc->sc_dev, bus, &pci);
+ }
This looks overly complicated and is repeated all over the place.
Something like this should be sufficient:
case WSDISPLAYIO_GET_BUSID:
return wsdisplayio_pci_busid(sc->sc_dev, sc->sc_pc, sc->sc_tag, data);
also, I'd keep the sbus and pci cases separate, there is no need
whatsoever to cram them in the same function - all you get with that
is a bunch of mostly unnecessary dependancies.
( ok, the sbus case is academic right now but still )
Finally, accessing data may need copyin()/copyout().
Something completely different - you added voyagerfb to i386's ALL
config a while ago as part of your 'all vga' rototill. First, the
SM502 is not a VGA, it doesn't even pretend to be one. Second, there
is no chance to encounter this device in an x86 box, according to the
docs it supports ARM, MIPS and SuperH CPUs ( yes, it's a little bit
more than just a graphics device )
If you want to add all VGAs you forgot igsfb which is VGA-compatible
and does exist as PCI cards for PCs.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQEVAwUBTTXFy8pnzkX8Yg2nAQKwdAgAq9OXgsTiTQr4xEK+bkbLJuRqFvjM4+Vq
zYEDMda9lu70qAhUqDv93iJugMQtU3li0UHgj+5SDiuZ/86LVBOpRe3/EHSWpd9R
9fsCpel9opl7g7JMokw74vIU1zy+9sGAUyrFtXe1lO5u9ORNgbWBZYGEF0Ojh4d/
EFY94XdjvwV0MHdZxjda1IDBEt2qK8XK4Pu6EOkIK2F4wwOJaat5zveuE50stvPh
/ZWPozR5a+cqvzexc0/9+LIor/SpLipRN4x3MO6u2+ZXF5x7Kf3LlFmm1L70I+Pp
/LPL62EGXhZenpQW70kTenhojirBdyPAq1xspBfszYNm92IcxoLxjQ==
=0won
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index