added probing for nics claimed as bridge (nForcex)

This commit is contained in:
Sergey Bolshakov 2006-01-24 14:40:50 +00:00
parent 170f3a8a3c
commit d4e5e4a267
3 changed files with 11 additions and 5 deletions

View File

@ -318,7 +318,7 @@ enum insmod_return my_insmod(const char * mod_name, enum driver_type type, char
} }
#ifndef DISABLE_NETWORK #ifndef DISABLE_NETWORK
if (type == NETWORK_DEVICES) if (type == NETWORK_DEVICES || type == BRIDGE_OTHER)
net_devices = get_net_devices(); net_devices = get_net_devices();
#endif #endif
@ -334,7 +334,7 @@ enum insmod_return my_insmod(const char * mod_name, enum driver_type type, char
} }
#endif #endif
#ifndef DISABLE_NETWORK #ifndef DISABLE_NETWORK
if (type == NETWORK_DEVICES) { if (type == NETWORK_DEVICES || type = BRIDGE_OTHER) {
char ** new_net_devices = get_net_devices(); char ** new_net_devices = get_net_devices();
while (new_net_devices && *new_net_devices) { while (new_net_devices && *new_net_devices) {
char ** ptr = net_devices; char ** ptr = net_devices;

View File

@ -196,6 +196,9 @@ static void pci_probe(enum driver_type type)
case NETWORK_DEVICES: case NETWORK_DEVICES:
that_class = PCI_CLASS_NETWORK_ETHERNET << 8; that_class = PCI_CLASS_NETWORK_ETHERNET << 8;
break; break;
case BRIDGE_OTHER:
that_class = PCI_CLASS_BRIDGE_OTHER << 8;
break;
case USB_CONTROLLERS: case USB_CONTROLLERS:
that_class = PCI_CLASS_SERIAL_USB << 8; that_class = PCI_CLASS_SERIAL_USB << 8;
break; break;
@ -262,7 +265,7 @@ static void pci_probe(enum driver_type type)
} }
#endif /* DISABLE_MEDIAS */ #endif /* DISABLE_MEDIAS */
#ifndef DISABLE_NETWORK #ifndef DISABLE_NETWORK
if (type == NETWORK_DEVICES) { if (type == NETWORK_DEVICES || type == BRIDGE_OTHER) {
int wait_msg = 0; int wait_msg = 0;
enum insmod_return failed; enum insmod_return failed;
if (IS_AUTOMATIC) { if (IS_AUTOMATIC) {
@ -272,7 +275,7 @@ static void pci_probe(enum driver_type type)
stg1_info_message("About to load driver for network device: %s", stg1_info_message("About to load driver for network device: %s",
pcidb->module); pcidb->module);
prepare_intf_descr(pcidb->module); prepare_intf_descr(pcidb->module);
failed = my_insmod(pcidb->module, NETWORK_DEVICES, NULL); failed = my_insmod(pcidb->module, type, NULL);
if (wait_msg) if (wait_msg)
remove_wait_message(); remove_wait_message();
warning_insmod_failed(failed); warning_insmod_failed(failed);
@ -802,6 +805,8 @@ char ** get_net_devices(void)
if (!already_probed) { if (!already_probed) {
already_probed = 1; /* cut off loop brought by: probe_that_type => my_insmod => get_net_devices */ already_probed = 1; /* cut off loop brought by: probe_that_type => my_insmod => get_net_devices */
probe_that_type(NETWORK_DEVICES); probe_that_type(NETWORK_DEVICES);
/* for some chipsets having nic in it, i.e. nForcex */
probe_that_type(BRIDGE_OTHER);
} }
while (ptr && *ptr) { while (ptr && *ptr) {

View File

@ -24,7 +24,7 @@
enum media_type { CDROM, DISK, FLOPPY, TAPE, UNKNOWN_MEDIA }; enum media_type { CDROM, DISK, FLOPPY, TAPE, UNKNOWN_MEDIA };
enum driver_type { IDE_ADAPTERS, SCSI_ADAPTERS, MEDIA_ADAPTERS, NETWORK_DEVICES, USB_CONTROLLERS, ANY_DRIVER_TYPE }; enum driver_type { IDE_ADAPTERS, SCSI_ADAPTERS, MEDIA_ADAPTERS, NETWORK_DEVICES, USB_CONTROLLERS, BRIDGE_OTHER, ANY_DRIVER_TYPE };
void get_medias(enum media_type media, char *** names, char *** models); void get_medias(enum media_type media, char *** names, char *** models);
char ** get_net_devices(void); char ** get_net_devices(void);
@ -50,5 +50,6 @@ void prepare_intf_descr(const char * intf_descr);
#define PCI_CLASS_NETWORK_ETHERNET 0x0200 #define PCI_CLASS_NETWORK_ETHERNET 0x0200
#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
#define PCI_CLASS_SERIAL_USB 0x0c03 #define PCI_CLASS_SERIAL_USB 0x0c03
#define PCI_CLASS_BRIDGE_OTHER 0x0680
#endif #endif