Module Name: src Committed By: riastradh Date: Thu Mar 3 05:53:23 UTC 2022
Modified Files: src/sys/dev/usb: if_aue.c if_axe.c if_axen.c if_smsc.c if_udav.c if_ure.c if_url.c usbnet.c Log Message: usbnet: Apply hardware multicast filter updates synchronously again. To make this work: 1. Do it only under a new lock, unp_mcastlock. This lock lives at IPL_SOFTCLOCK so it can be taken from network stack callouts. It is forbidden to acquire the usbnet core lock under unp_mcastlock. 2. Do it only after usbnet_init_rx_tx and before usbnet_stop; if issued at any other time, drop the update on the floor. 3. Make usbnet_init_rx_tx apply any pending multicast filter updates under the lock before setting the flag that allows SIOCADDMULTI or SIOCDELMULTI to apply the updates. 4. Remove core lock asserts from various drivers' register access routines. This is necessary because the multicast filter updates are done with register reads/writes, but _cannot_ take the core lock when the caller holds softnet_lock. This now programs the hardware multicast filter redundantly in many drivers which already explicitly call *_uno_mcast from the *_uno_init routines. This is probably harmless, but it will likely be better to remove the explicit calls. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/dev/usb/if_aue.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/usb/if_axe.c cvs rdiff -u -r1.83 -r1.84 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.82 -r1.83 src/sys/dev/usb/if_smsc.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/usb/if_udav.c src/sys/dev/usb/if_url.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/usb/if_ure.c cvs rdiff -u -r1.81 -r1.82 src/sys/dev/usb/usbnet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.