* The bstp_port structure is about to be freed by the parent bridge. */
| 2267 | * The bstp_port structure is about to be freed by the parent bridge. |
| 2268 | */ |
| 2269 | void |
| 2270 | bstp_destroy(struct bstp_port *bp) |
| 2271 | { |
| 2272 | KASSERT(bp->bp_active == 0, ("port is still attached")); |
| 2273 | taskqueue_drain(taskqueue_swi, &bp->bp_statetask); |
| 2274 | taskqueue_drain(taskqueue_swi, &bp->bp_rtagetask); |
| 2275 | taskqueue_drain(taskqueue_swi, &bp->bp_mediatask); |
| 2276 | |
| 2277 | if (bp->bp_bs->bs_root_port == bp) |
| 2278 | bstp_assign_roles(bp->bp_bs); |
| 2279 | } |
no test coverage detected