Update recently added drivers to use the if_*addr_r*lock() wrapper
functions instead of using the IF_ADDR_LOCK directly. The wrapper functions are the supported interface for device drivers. Reviewed by: bz, philip MFC after: 1 week
This commit is contained in:
parent
19d52de5f4
commit
b02a80a7c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229613
@ -14115,7 +14115,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
|
||||
i = 0;
|
||||
config = BXE_SP(sc, mcast_config);
|
||||
|
||||
IF_ADDR_LOCK(ifp);
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
@ -14144,7 +14144,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
|
||||
config_table->cam_entry.lsb_mac_addr);
|
||||
}
|
||||
|
||||
IF_ADDR_UNLOCK(ifp);
|
||||
if_maddr_runlock(ifp);
|
||||
|
||||
old = config->hdr.length;
|
||||
|
||||
@ -14172,7 +14172,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
|
||||
/* Accept one or more multicasts */
|
||||
memset(mc_filter, 0, 4 * MC_HASH_SIZE);
|
||||
|
||||
IF_ADDR_LOCK(ifp);
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family != AF_LINK)
|
||||
@ -14184,7 +14184,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
|
||||
bit &= 0x1f;
|
||||
mc_filter[regidx] |= (1 << bit);
|
||||
}
|
||||
IF_ADDR_UNLOCK(ifp);
|
||||
if_maddr_runlock(ifp);
|
||||
|
||||
for (i = 0; i < MC_HASH_SIZE; i++)
|
||||
REG_WR(sc, MC_HASH_OFFSET(sc, i), mc_filter[i]);
|
||||
|
@ -760,7 +760,7 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
|
||||
int mcnt = 0;
|
||||
struct ifnet *ifp = ha->ifp;
|
||||
|
||||
IF_ADDR_LOCK(ifp);
|
||||
if_maddr_rlock(ifp);
|
||||
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
|
||||
@ -776,7 +776,7 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
|
||||
mcnt++;
|
||||
}
|
||||
|
||||
IF_ADDR_UNLOCK(ifp);
|
||||
if_maddr_runlock(ifp);
|
||||
|
||||
qla_hw_set_multi(ha, mta, mcnt, add_multi);
|
||||
|
||||
|
@ -301,7 +301,7 @@ sfxge_mac_filter_set_locked(struct sfxge_softc *sc)
|
||||
* 0xff. */
|
||||
bucket[0xff] = 1;
|
||||
|
||||
IF_ADDR_LOCK(ifp);
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
if (ifma->ifma_addr->sa_family == AF_LINK) {
|
||||
sa = (struct sockaddr_dl *)ifma->ifma_addr;
|
||||
@ -309,7 +309,7 @@ sfxge_mac_filter_set_locked(struct sfxge_softc *sc)
|
||||
bucket[index] = 1;
|
||||
}
|
||||
}
|
||||
IF_ADDR_UNLOCK(ifp);
|
||||
if_maddr_runlock(ifp);
|
||||
}
|
||||
return efx_mac_hash_set(enp, bucket);
|
||||
}
|
||||
@ -391,10 +391,10 @@ sfxge_port_start(struct sfxge_softc *sc)
|
||||
goto fail2;
|
||||
|
||||
/* Set the unicast address */
|
||||
IF_ADDR_LOCK(ifp);
|
||||
if_addr_rlock(ifp);
|
||||
bcopy(LLADDR((struct sockaddr_dl *)ifp->if_addr->ifa_addr),
|
||||
mac_addr, sizeof(mac_addr));
|
||||
IF_ADDR_UNLOCK(ifp);
|
||||
if_addr_runlock(ifp);
|
||||
if ((rc = efx_mac_addr_set(enp, mac_addr)) != 0)
|
||||
goto fail;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user