Index: pci/winmodem.c =================================================================== RCS file: winmodem.c diff -N winmodem.c --- /dev/null Mon Oct 4 22:21:58 1999 +++ winmodem.c Wed Sep 29 00:23:27 1999 @@ -0,0 +1,61 @@ +/* Copyright (c) 1999. M. Warner Losh. All Rights Reserved. */ +/* DO NOT DISTRIBUTE */ + +#include +#include +#include +#include +#include +#include +#include + +static int +winmodem_probe(device_t dev) +{ + /* At least one winmodem is class 7, subclass 0x80 */ + if (pci_get_class(dev) == 0x7 && pci_get_subclass(dev) == 0x80) { + device_set_desc(dev, "WinModem *UNSUPPORTED*"); + return -50; + } + /* + * Looking at the mindshare book, I'd guess that generic modem means + * winmodem? + */ + if (pci_get_class(dev) == 0x7 && pci_get_subclass(dev) == 0x03 && + pci_get_progif(dev) == 0x00) { + device_set_desc(dev, "Generic modem, winmodem? *UNSUPPORTED*"); + return -50; + } + return ENXIO; +} + +static int +winmodem_attach(device_t dev) +{ + return 0; +} + +static int +winmodem_detach(device_t dev) +{ + return 0; +} + +static device_method_t winmodem_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, winmodem_probe), + DEVMETHOD(device_attach, winmodem_attach), + DEVMETHOD(device_detach, winmodem_detach), + + { 0, 0 } +}; + +static driver_t winmodem_driver = { + "winmodem", + winmodem_methods, + 1, +}; + +static devclass_t winmodem_devclass; + +DRIVER_MODULE(winmodem, pci, winmodem_driver, winmodem_devclass, 0, 0); Index: conf/files =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sys/conf/files,v retrieving revision 1.261 diff -u -r1.261 files --- files 1999/10/01 05:24:17 1.261 +++ files 1999/10/02 06:10:25 @@ -687,6 +687,7 @@ clean "pci_if.h" pci/simos.c optional simos pci/alpm.c optional alpm +pci/winmodem.c optional winmodem pci/xrpu.c optional xrpu posix4/posix4_mib.c standard posix4/p1003_1b.c standard