Module Name: src Committed By: snj Date: Sun Dec 10 10:10:25 UTC 2017
Modified Files: src/sys/arch/amiga/dev [netbsd-8]: if_bah_zbus.c src/sys/arch/arm/broadcom [netbsd-8]: bcm53xx_eth.c src/sys/arch/powerpc/booke/dev [netbsd-8]: pq3etsec.c src/sys/arch/usermode/dev [netbsd-8]: if_veth.c src/sys/dev/ic [netbsd-8]: an.c athn.c atw.c bwi.c dwc_gmac.c malo.c rt2560.c rt2661.c rt2860.c rtw.c rtwvar.h smc90cx6.c smc90cx6var.h wi.c src/sys/dev/pci [netbsd-8]: if_ipw.c if_iwi.c if_iwm.c if_iwn.c if_rtwn.c if_wm.c if_wpi.c src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c ixv.c src/sys/dev/pcmcia [netbsd-8]: if_malo_pcmcia.c src/sys/dev/scsipi [netbsd-8]: if_se.c src/sys/dev/usb [netbsd-8]: if_upl.c src/sys/net [netbsd-8]: if.c if.h if_arc.h if_arcsubr.c if_bridge.c if_etherip.c if_faith.c if_gif.c if_loop.c if_mpls.c if_pppoe.c if_srt.c if_stf.c if_tap.c if_vlan.c src/sys/netinet [netbsd-8]: ip_carp.c src/sys/rump/net/lib/libshmif [netbsd-8]: if_shmem.c src/sys/rump/net/lib/libvirtif [netbsd-8]: if_virt.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #427): sys/arch/amiga/dev/if_bah_zbus.c: 1.17 sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30 sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32 sys/arch/usermode/dev/if_veth.c: 1.9 sys/dev/ic/an.c: 1.66 sys/dev/ic/athn.c: 1.17 sys/dev/ic/atw.c: 1.162 sys/dev/ic/bwi.c: 1.33 sys/dev/ic/dwc_gmac.c: 1.41-1.42 sys/dev/ic/malo.c: 1.10 sys/dev/ic/rt2560.c: 1.31 sys/dev/ic/rt2661.c: 1.36 sys/dev/ic/rt2860.c: 1.29 sys/dev/ic/rtw.c: 1.127 sys/dev/ic/rtwvar.h: 1.46 sys/dev/ic/smc90cx6.c: 1.71 sys/dev/ic/smc90cx6var.h: 1.12 sys/dev/ic/wi.c: 1.244 sys/dev/pci/if_ipw.c: 1.66 sys/dev/pci/if_iwi.c: 1.104 sys/dev/pci/if_iwm.c: 1.76 sys/dev/pci/if_iwn.c: 1.86 sys/dev/pci/if_rtwn.c: 1.13 sys/dev/pci/if_wm.c: 1.541 sys/dev/pci/if_wpi.c: 1.79 sys/dev/pci/ixgbe/ixgbe.c: 1.106 sys/dev/pci/ixgbe/ixv.c: 1.73 via patch sys/dev/pcmcia/if_malo_pcmcia.c: 1.15 sys/dev/scsipi/if_se.c: 1.95 sys/dev/usb/if_upl.c: 1.60 sys/net/if.c: 1.396 sys/net/if.h: 1.241 sys/net/if_arc.h: 1.23 sys/net/if_arcsubr.c: 1.78 sys/net/if_bridge.c: 1.136-1.137 sys/net/if_etherip.c: 1.39 sys/net/if_faith.c: 1.56 sys/net/if_gif.c: 1.131 sys/net/if_loop.c: 1.96 sys/net/if_mpls.c: 1.30 sys/net/if_pppoe.c: 1.129 sys/net/if_srt.c: 1.27 sys/net/if_stf.c: 1.102 sys/net/if_tap.c: 1.100 sys/net/if_vlan.c: 1.105 sys/netinet/ip_carp.c: 1.91 sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74 sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56 if_initalize() and if_attach() failed when resource allocation failed (e.g. allocating softint). Without this change, it panics. It's bad because resource shortage really occured when a lot of pseudo interface is created. To avoid this problem, don't panic and change return value of if_initialize() and if_attach() to int. Caller fanction will be recover from error cleanly by checking the return value. Return if bah_attach_subr() failed. If if_attach() failed in the attach function, return. - If if_initialize() failed in the attach function, free resources and return. - Add some missing frees in bridge_clone_destroy(). - KNF If error occured in bcmeth_ccb_attach(), free resources and return. If error occured in pq3etsec_attach(), free resources and return. If error occured in the attach function, free resources and return. - If if_initialize() failed in athn_attach(), free resources and return. - Add missing pmf_event_deregister() in athn_detach(). - Free resources correctly on some errors in atw_attach(). - Use apint*() insread of printf() in the attach function. If if_initialize() failed in the attach function, return. - If if_initialize() failed in the attach function, free resources and return. - Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach failed. - If if_initialize() failed in the attach function, free resources and return. - ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc. - If if_initialize() failed in the attach function, free resources and return. - Fix error path in the attach function correctly. If if_initialize() failed in the attach function, free resources and return. If if_attach() failed in the attach function, free resources and return. - If if_initialize() failed in the attach function, free resources and return. - KNF - If if_attach() failed in the attach function, free resources and return. - KNF Fix compile error. Fix compile error. We don't need '&mii', but just 'mii' for mii_detach(). Don't free sc_rthash twice To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.10.1 src/sys/arch/amiga/dev/if_bah_zbus.c cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/arch/arm/broadcom/bcm53xx_eth.c cvs rdiff -u -r1.29.8.1 -r1.29.8.2 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.8 -r1.8.8.1 src/sys/arch/usermode/dev/if_veth.c cvs rdiff -u -r1.65 -r1.65.2.1 src/sys/dev/ic/an.c cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/dev/ic/athn.c cvs rdiff -u -r1.161 -r1.161.6.1 src/sys/dev/ic/atw.c cvs rdiff -u -r1.31.6.1 -r1.31.6.2 src/sys/dev/ic/bwi.c cvs rdiff -u -r1.40 -r1.40.6.1 src/sys/dev/ic/dwc_gmac.c cvs rdiff -u -r1.9 -r1.9.6.1 src/sys/dev/ic/malo.c cvs rdiff -u -r1.30 -r1.30.2.1 src/sys/dev/ic/rt2560.c cvs rdiff -u -r1.35 -r1.35.2.1 src/sys/dev/ic/rt2661.c cvs rdiff -u -r1.26.2.2 -r1.26.2.3 src/sys/dev/ic/rt2860.c cvs rdiff -u -r1.126 -r1.126.2.1 src/sys/dev/ic/rtw.c cvs rdiff -u -r1.45 -r1.45.6.1 src/sys/dev/ic/rtwvar.h cvs rdiff -u -r1.70 -r1.70.2.1 src/sys/dev/ic/smc90cx6.c cvs rdiff -u -r1.11 -r1.11.30.1 src/sys/dev/ic/smc90cx6var.h cvs rdiff -u -r1.243 -r1.243.6.1 src/sys/dev/ic/wi.c cvs rdiff -u -r1.64.2.1 -r1.64.2.2 src/sys/dev/pci/if_ipw.c cvs rdiff -u -r1.103 -r1.103.2.1 src/sys/dev/pci/if_iwi.c cvs rdiff -u -r1.73.2.1 -r1.73.2.2 src/sys/dev/pci/if_iwm.c cvs rdiff -u -r1.84.6.1 -r1.84.6.2 src/sys/dev/pci/if_iwn.c cvs rdiff -u -r1.12 -r1.12.2.1 src/sys/dev/pci/if_rtwn.c cvs rdiff -u -r1.508.4.8 -r1.508.4.9 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.78 -r1.78.2.1 src/sys/dev/pci/if_wpi.c cvs rdiff -u -r1.88.2.4 -r1.88.2.5 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.1 -r1.56.2.2 src/sys/dev/pci/ixgbe/ixv.c cvs rdiff -u -r1.13.6.1 -r1.13.6.2 src/sys/dev/pcmcia/if_malo_pcmcia.c cvs rdiff -u -r1.94 -r1.94.8.1 src/sys/dev/scsipi/if_se.c cvs rdiff -u -r1.59 -r1.59.8.1 src/sys/dev/usb/if_upl.c cvs rdiff -u -r1.394.2.2 -r1.394.2.3 src/sys/net/if.c cvs rdiff -u -r1.239.2.1 -r1.239.2.2 src/sys/net/if.h cvs rdiff -u -r1.22 -r1.22.90.1 src/sys/net/if_arc.h cvs rdiff -u -r1.77 -r1.77.6.1 src/sys/net/if_arcsubr.c cvs rdiff -u -r1.134.6.3 -r1.134.6.4 src/sys/net/if_bridge.c cvs rdiff -u -r1.38 -r1.38.10.1 src/sys/net/if_etherip.c cvs rdiff -u -r1.55 -r1.55.8.1 src/sys/net/if_faith.c cvs rdiff -u -r1.126.2.3 -r1.126.2.4 src/sys/net/if_gif.c cvs rdiff -u -r1.94.6.2 -r1.94.6.3 src/sys/net/if_loop.c cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/net/if_mpls.c cvs rdiff -u -r1.125.6.3 -r1.125.6.4 src/sys/net/if_pppoe.c cvs rdiff -u -r1.26 -r1.26.6.1 src/sys/net/if_srt.c cvs rdiff -u -r1.101.8.1 -r1.101.8.2 src/sys/net/if_stf.c cvs rdiff -u -r1.99.6.1 -r1.99.6.2 src/sys/net/if_tap.c cvs rdiff -u -r1.97.2.9 -r1.97.2.10 src/sys/net/if_vlan.c cvs rdiff -u -r1.90.2.1 -r1.90.2.2 src/sys/netinet/ip_carp.c cvs rdiff -u -r1.72 -r1.72.8.1 src/sys/rump/net/lib/libshmif/if_shmem.c cvs rdiff -u -r1.54 -r1.54.8.1 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.