Don't check for ohci/uhci to be loaded, check for the usb module.

This commit is contained in:
Nick Hibma 2000-09-02 10:17:58 +00:00
parent 9f25b65fb8
commit 5bfc478e32
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65364
2 changed files with 4 additions and 6 deletions

View File

@ -65,9 +65,8 @@ MALLOC_DECLARE(M_USBHC);
#endif /* __FreeBSD__ */
/* these three defines are used by usbd to autoload the usb kld */
#define USB_KLD "usb"
#define USB_OHCI "ohci/usb"
#define USB_UHCI "uhci/usb"
#define USB_KLD "usb" /* name of usb module */
#define USB_UHUB "usb/uhub" /* root hub */
#define USB_MAX_DEVICES 128
#define USB_START_ADDR 0

View File

@ -902,9 +902,8 @@ main(int argc, char **argv)
int itimeout = TIMEOUT; /* timeout for select */
struct timeval tv;
if (modfind(USB_OHCI) < 0 && modfind(USB_UHCI) < 0) {
if (kldload(USB_KLD) < 0 ||
(modfind(USB_OHCI) < 0 && modfind(USB_UHCI) < 0)) {
if (modfind(USB_UHUB) < 0) {
if (kldload(USB_KLD) < 0 || modfind(USB_UHUB) < 0) {
perror(USB_KLD ": Kernel module not available");
return 1;
}