Nuke the useless chip driver. It gets in the way when you want to load
a functional driver for the device.
This commit is contained in:
parent
5eacd0690f
commit
f1954f5752
@ -1147,6 +1147,7 @@ pci_probe_nomatch(device_t dev, device_t child)
|
||||
desc = pci_ata_match(child);
|
||||
if (!desc) desc = pci_usb_match(child);
|
||||
if (!desc) desc = pci_vga_match(child);
|
||||
if (!desc) desc = pci_chip_match(child);
|
||||
if (!desc) {
|
||||
desc = "unknown card";
|
||||
unknown++;
|
||||
|
@ -150,6 +150,7 @@ struct pci_devinfo {
|
||||
const char *pci_ata_match(struct device *dev);
|
||||
const char *pci_usb_match(struct device *dev);
|
||||
const char *pci_vga_match(struct device *dev);
|
||||
const char *pci_chip_match(struct device *dev);
|
||||
|
||||
/* low level PCI config register functions provided by pcibus.c */
|
||||
|
||||
|
@ -1147,6 +1147,7 @@ pci_probe_nomatch(device_t dev, device_t child)
|
||||
desc = pci_ata_match(child);
|
||||
if (!desc) desc = pci_usb_match(child);
|
||||
if (!desc) desc = pci_vga_match(child);
|
||||
if (!desc) desc = pci_chip_match(child);
|
||||
if (!desc) {
|
||||
desc = "unknown card";
|
||||
unknown++;
|
||||
|
@ -1101,9 +1101,8 @@ pci_ata_match(device_t dev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static const char*
|
||||
chip_match(device_t dev)
|
||||
const char*
|
||||
pci_chip_match(device_t dev)
|
||||
{
|
||||
unsigned rev;
|
||||
|
||||
@ -1313,53 +1312,6 @@ chip_match(device_t dev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int chip_probe(device_t dev)
|
||||
{
|
||||
const char *desc;
|
||||
|
||||
desc = chip_match(dev);
|
||||
if (desc) {
|
||||
if (pci_get_class(dev) == PCIC_BRIDGE
|
||||
&& pci_get_subclass(dev) == PCIS_BRIDGE_HOST) {
|
||||
/*
|
||||
* Suppress printing this device since the nexus
|
||||
* has already described it.
|
||||
*/
|
||||
device_quiet(dev);
|
||||
}
|
||||
|
||||
device_set_desc_copy(dev, desc);
|
||||
return -10000; /* Low match priority */
|
||||
}
|
||||
|
||||
return ENXIO;
|
||||
}
|
||||
|
||||
static int chip_attach(device_t dev)
|
||||
{
|
||||
chipset_attach(dev, device_get_unit(dev));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static device_method_t chip_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, chip_probe),
|
||||
DEVMETHOD(device_attach, chip_attach),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t chip_driver = {
|
||||
"chip",
|
||||
chip_methods,
|
||||
1,
|
||||
};
|
||||
|
||||
static devclass_t chip_devclass;
|
||||
|
||||
DRIVER_MODULE(chip, pci, chip_driver, chip_devclass, 0, 0);
|
||||
|
||||
/*---------------------------------------------------------
|
||||
**
|
||||
** Catchall driver for VGA devices
|
||||
|
@ -150,6 +150,7 @@ struct pci_devinfo {
|
||||
const char *pci_ata_match(struct device *dev);
|
||||
const char *pci_usb_match(struct device *dev);
|
||||
const char *pci_vga_match(struct device *dev);
|
||||
const char *pci_chip_match(struct device *dev);
|
||||
|
||||
/* low level PCI config register functions provided by pcibus.c */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user