Ticket #3124: reproduce.diff
File reproduce.diff, 1.8 KB (added by , 16 years ago) |
---|
-
src/add-ons/kernel/drivers/network/3com/pci/if_xl.c
144 144 145 145 #include <pci/if_xlreg.h> 146 146 147 //QQQ 148 149 extern const char *gDeviceNameList[]; 150 147 151 /* 148 152 * TX Checksumming is disabled by default for two reasons: 149 153 * - TX Checksumming will occasionally produce corrupt packets … … 1056 1060 1057 1061 t = xl_devs; 1058 1062 1063 1064 //QQQ 1065 //continue as on device found 1066 device_set_desc(dev, t->xl_name); 1067 return (BUS_PROBE_DEFAULT); 1068 //QQQ 1069 1070 1059 1071 while (t->xl_name != NULL) { 1060 1072 if ((pci_get_vendor(dev) == t->xl_vid) && 1061 1073 (pci_get_device(dev) == t->xl_did)) { … … 1232 1244 mtx_init(&sc->xl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 1233 1245 MTX_DEF); 1234 1246 ifmedia_init(&sc->ifmedia, 0, xl_ifmedia_upd, xl_ifmedia_sts); 1247 //QQQ 1248 //init device name 1249 ifp = sc->xl_ifp = if_alloc(IFT_ETHER); 1250 if (ifp == NULL) { 1251 device_printf(dev, "can not if_alloc()\n"); 1252 error = ENOSPC; 1253 goto fail; 1254 } 1255 ifp->if_softc = sc; 1256 ktrace_printf("3com: xl_attach: a, gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 1257 if_initname(ifp, device_get_name(dev), device_get_unit(dev)); 1258 ktrace_printf("3com: xl_attach: b, gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 1259 //continue as on failure 1260 error=ENXIO; 1261 goto fail; 1262 //QQQ 1235 1263 1236 1264 did = pci_get_device(dev); 1237 1265 … … 1730 1758 if (sc->xl_res) 1731 1759 bus_release_resource(dev, res, rid, sc->xl_res); 1732 1760 1761 ktrace_printf("xl_detach: aa, gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 1733 1762 if (ifp) 1734 1763 if_free(ifp); 1764 ktrace_printf("xl_detach: ab, gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 1735 1765 1736 1766 if (sc->xl_mtag) { 1737 1767 bus_dmamap_destroy(sc->xl_mtag, sc->xl_tmpmap);