- probe usbhid very first
- probe by PCI_CLASS_STORAGE_RAID too
This commit is contained in:
parent
b3d7bc862d
commit
b8e0eb7bac
77
probing.c
77
probing.c
@ -193,6 +193,9 @@ static void pci_probe(enum driver_type type)
|
||||
case IDE_ADAPTERS:
|
||||
that_class = PCI_CLASS_STORAGE_IDE << 8;
|
||||
break;
|
||||
case RAID_ADAPTERS:
|
||||
that_class = PCI_CLASS_STORAGE_RAID << 8;
|
||||
break;
|
||||
case NETWORK_DEVICES:
|
||||
that_class = PCI_CLASS_NETWORK_ETHERNET << 8;
|
||||
break;
|
||||
@ -248,16 +251,14 @@ static void pci_probe(enum driver_type type)
|
||||
/* vendor & device matched */
|
||||
log_message("(pcimap) module is \"%s\"", pcidb->module);
|
||||
#ifndef DISABLE_MEDIAS
|
||||
if (type == IDE_ADAPTERS || type == SCSI_ADAPTERS) {
|
||||
if (type == IDE_ADAPTERS || type == SCSI_ADAPTERS || type == RAID_ADAPTERS) {
|
||||
int wait_msg = 0;
|
||||
enum insmod_return failed;
|
||||
if (IS_AUTOMATIC) {
|
||||
wait_message("Loading driver for %s adapter: %s",
|
||||
type == SCSI_ADAPTERS ? "SCSI" : "IDE", pcidb->module);
|
||||
wait_message("Loading driver for storage adapter: %s", pcidb->module);
|
||||
wait_msg = 1;
|
||||
} else
|
||||
stg1_info_message("About to load driver for %s adapter: %s",
|
||||
type == SCSI_ADAPTERS ? "SCSI" : "IDE", pcidb->module);
|
||||
stg1_info_message("About to load driver for storage adapter: %s", pcidb->module);
|
||||
failed = my_insmod(pcidb->module, type, NULL);
|
||||
if (wait_msg)
|
||||
remove_wait_message();
|
||||
@ -335,10 +336,18 @@ static void pci_probe(enum driver_type type)
|
||||
/* load all usb controller modules now, starting from possible ehci-hcd */
|
||||
/* to prevent case when old-timed module sitting on newer host controller */
|
||||
if (type == USB_CONTROLLERS) {
|
||||
enum insmod_return failed;
|
||||
for (n=HCD_NUM-1; n >= 0; n--) {
|
||||
if (need_usb_hcd[n]) {
|
||||
stg1_info_message("About to load driver for usb controller: %s", usb_hcd[n]);
|
||||
my_insmod(usb_hcd[n], USB_CONTROLLERS, NULL);
|
||||
/* do it AUTOMATIC -- for usb kbd case */
|
||||
/* and ever silent
|
||||
wait_message("Loading driver for USB controller: %s", usb_hcd[n]);
|
||||
*/
|
||||
failed = my_insmod(usb_hcd[n], USB_CONTROLLERS, NULL);
|
||||
/*
|
||||
remove_wait_message();
|
||||
*/
|
||||
warning_insmod_failed(failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -349,6 +358,7 @@ static void usb_probe(enum driver_type type)
|
||||
{
|
||||
static int already_probed_usb_controllers = 0;
|
||||
static int already_mounted_usbdev = 0;
|
||||
static int already_probed_hid = 0;
|
||||
|
||||
FILE * f;
|
||||
char buf[200];
|
||||
@ -357,15 +367,9 @@ static void usb_probe(enum driver_type type)
|
||||
switch (type) {
|
||||
#ifdef ENABLE_USBNET
|
||||
case NETWORK_DEVICES:
|
||||
/*
|
||||
usbdb = usbnet_usb_ids;
|
||||
*/
|
||||
break;
|
||||
#endif
|
||||
case MEDIA_ADAPTERS:
|
||||
/*
|
||||
usbdb = usbstorage_usb_ids;
|
||||
*/
|
||||
case HID_DEVICES:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -382,9 +386,13 @@ static void usb_probe(enum driver_type type)
|
||||
log_message("USB: couldn't mount /proc/bus/usb");
|
||||
return;
|
||||
}
|
||||
wait_message("Waiting for USB stuff to show up.");
|
||||
/* no need to show wait message -- we're doing this very first
|
||||
wait_message("Waiting for USB stuff to show up.");
|
||||
*/
|
||||
sleep(2); /* sucking background work */
|
||||
remove_wait_message();
|
||||
/*
|
||||
remove_wait_message();
|
||||
*/
|
||||
}
|
||||
|
||||
/* dirty hacks */
|
||||
@ -406,33 +414,16 @@ static void usb_probe(enum driver_type type)
|
||||
return;
|
||||
}
|
||||
|
||||
while (NULL != fgets(buf, sizeof(buf), f)) {
|
||||
int vendor, device;
|
||||
struct usb_module_map * usbdb;
|
||||
|
||||
if (strstr(buf, "Keyboard")) {
|
||||
my_insmod("usbkbd", ANY_DRIVER_TYPE, NULL);
|
||||
my_insmod("keybdev", ANY_DRIVER_TYPE, NULL);
|
||||
}
|
||||
|
||||
if (sscanf(buf, "P: Vendor=%x ProdID=%x", &vendor, &device) != 2)
|
||||
continue;
|
||||
|
||||
for (usbdb = usb_ids; usbdb; usbdb = usbdb->next) {
|
||||
if (usbdb->vendor == vendor && usbdb->device == device) {
|
||||
log_message("USB: device %04x %04x is \"%s\"", vendor, device, usbdb->module);
|
||||
#ifdef ENABLE_USBNET
|
||||
if (type == NETWORK_DEVICES) {
|
||||
stg1_info_message("About to load driver for usb network device:\n \n%s", usbdb->module);
|
||||
prepare_intf_descr(usbdb->module);
|
||||
warning_insmod_failed(my_insmod(usbdb->module, NETWORK_DEVICES, NULL));
|
||||
if (intf_descr_for_discover) /* for modules providing more than one net intf */
|
||||
net_discovered_interface(NULL);
|
||||
}
|
||||
#endif
|
||||
if (type == HID_DEVICES && !already_probed_hid) {
|
||||
while (NULL != fgets(buf, sizeof(buf), f)) {
|
||||
if (strstr(buf, "Keyboard") || strstr(buf, "Mouse")) {
|
||||
my_insmod("usbhid", ANY_DRIVER_TYPE, NULL);
|
||||
already_probed_hid = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
@ -449,6 +440,8 @@ static void probe_that_type(enum driver_type type)
|
||||
update_splash();
|
||||
pci_probe(SCSI_ADAPTERS);
|
||||
update_splash();
|
||||
pci_probe(RAID_ADAPTERS);
|
||||
update_splash();
|
||||
usb_probe(MEDIA_ADAPTERS);
|
||||
update_splash();
|
||||
} else {
|
||||
@ -762,6 +755,10 @@ void get_medias(enum media_type media, char *** names, char *** models)
|
||||
}
|
||||
#endif /* DISABLE_MEDIAS */
|
||||
|
||||
void probe_hiddev()
|
||||
{
|
||||
usb_probe(HID_DEVICES);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
int net_device_available(char * device)
|
||||
|
@ -24,9 +24,10 @@
|
||||
|
||||
enum media_type { CDROM, DISK, FLOPPY, TAPE, UNKNOWN_MEDIA };
|
||||
|
||||
enum driver_type { IDE_ADAPTERS, SCSI_ADAPTERS, MEDIA_ADAPTERS, NETWORK_DEVICES, USB_CONTROLLERS, BRIDGE_OTHER, ANY_DRIVER_TYPE };
|
||||
enum driver_type { IDE_ADAPTERS, SCSI_ADAPTERS, RAID_ADAPTERS, MEDIA_ADAPTERS, NETWORK_DEVICES, HID_DEVICES, USB_CONTROLLERS, BRIDGE_OTHER, ANY_DRIVER_TYPE };
|
||||
|
||||
void get_medias(enum media_type media, char *** names, char *** models);
|
||||
void probe_hiddev();
|
||||
char ** get_net_devices(void);
|
||||
void net_discovered_interface(char * intf_name);
|
||||
char * get_net_intf_description(char * intf_name);
|
||||
@ -47,6 +48,7 @@ void prepare_intf_descr(const char * intf_descr);
|
||||
#define PCI_BASE_CLASS_STORAGE 0x01
|
||||
#define PCI_CLASS_STORAGE_SCSI 0x0100
|
||||
#define PCI_CLASS_STORAGE_IDE 0x0101
|
||||
#define PCI_CLASS_STORAGE_RAID 0x0104
|
||||
#define PCI_CLASS_NETWORK_ETHERNET 0x0200
|
||||
#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
|
||||
#define PCI_CLASS_SERIAL_USB 0x0c03
|
||||
|
@ -1,8 +1,10 @@
|
||||
# -*- rpm-spec -*-
|
||||
# $Id$
|
||||
|
||||
%def_without shell
|
||||
|
||||
Name: propagator
|
||||
Version: 20060124
|
||||
Version: 20061123
|
||||
Release: alt1
|
||||
|
||||
Summary: 'Early userspace' set of binaries
|
||||
@ -11,7 +13,7 @@ Group: System/Kernel and hardware
|
||||
|
||||
Source0: %name-%version.tar.bz2
|
||||
|
||||
BuildRequires: dietlibc diet-bzlib >= 20050707 diet-newt >= 20050707 diet-slang >= 20050707 mar
|
||||
BuildRequires: gcc3.4 dietlibc diet-bzlib >= 20050707 diet-newt >= 20050707 diet-slang >= 20050707 mar
|
||||
|
||||
%description
|
||||
%name is a set of binaries useful in 'early userspace' environment,
|
||||
@ -21,7 +23,8 @@ including init and various helpers for hw probing and bootstrapping.
|
||||
%setup -qc
|
||||
|
||||
%build
|
||||
%__make
|
||||
%set_gcc_version 3.4
|
||||
make %{?_with_shell:WITH_SHELL=t}
|
||||
|
||||
%install
|
||||
%make_install DESTDIR=%buildroot LIBDIR=%_libdir install
|
||||
@ -31,6 +34,11 @@ including init and various helpers for hw probing and bootstrapping.
|
||||
%_libdir/%name
|
||||
|
||||
%changelog
|
||||
* Thu Nov 23 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 20061123-alt1
|
||||
- added conditional shell spawning
|
||||
- fixed probing of some RAID adaptors
|
||||
- probe usbhid early
|
||||
|
||||
* Tue Jan 24 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 20060124-alt1
|
||||
- added tweaks for nForce nics
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user