Skip to content

Commit f489a4b

Browse files
Rasesh Modydavem330
authored andcommitted
bna: Fix Ucast Failure Handling
Failure of the UCAST set for base mac address fails when user configures a duplicate mac address that matches that of another vNIC on the same port. The bna does not handle the ucast failure and keeps this address in cache. On disable of the vNIC, bna tries to delete the failed base mac address and the fw asserts. On failure of ucast address, mark ucast address set to false. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4b23058 commit f489a4b

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

drivers/net/ethernet/brocade/bna/bna.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ void bna_bfi_rx_enet_stop_rsp(struct bna_rx *rx,
455455
void bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr);
456456
void bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf,
457457
struct bfi_msgq_mhdr *msghdr);
458+
void bna_bfi_rxf_ucast_set_rsp(struct bna_rxf *rxf,
459+
struct bfi_msgq_mhdr *msghdr);
458460

459461
/* APIs for BNA */
460462
void bna_rx_mod_init(struct bna_rx_mod *rx_mod, struct bna *bna,

drivers/net/ethernet/brocade/bna/bna_enet.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ bna_msgq_rsp_handler(void *arg, struct bfi_msgq_mhdr *msghdr)
298298
case BFI_ENET_I2H_RSS_ENABLE_RSP:
299299
case BFI_ENET_I2H_RX_PROMISCUOUS_RSP:
300300
case BFI_ENET_I2H_RX_DEFAULT_RSP:
301-
case BFI_ENET_I2H_MAC_UCAST_SET_RSP:
302301
case BFI_ENET_I2H_MAC_UCAST_CLR_RSP:
303302
case BFI_ENET_I2H_MAC_UCAST_ADD_RSP:
304303
case BFI_ENET_I2H_MAC_UCAST_DEL_RSP:
@@ -311,6 +310,12 @@ bna_msgq_rsp_handler(void *arg, struct bfi_msgq_mhdr *msghdr)
311310
bna_bfi_rxf_cfg_rsp(&rx->rxf, msghdr);
312311
break;
313312

313+
case BFI_ENET_I2H_MAC_UCAST_SET_RSP:
314+
bna_rx_from_rid(bna, msghdr->enet_id, rx);
315+
if (rx)
316+
bna_bfi_rxf_ucast_set_rsp(&rx->rxf, msghdr);
317+
break;
318+
314319
case BFI_ENET_I2H_MAC_MCAST_ADD_RSP:
315320
bna_rx_from_rid(bna, msghdr->enet_id, rx);
316321
if (rx)

drivers/net/ethernet/brocade/bna/bna_tx_rx.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,21 @@ bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr)
710710
bfa_fsm_send_event(rxf, RXF_E_FW_RESP);
711711
}
712712

713+
void
714+
bna_bfi_rxf_ucast_set_rsp(struct bna_rxf *rxf,
715+
struct bfi_msgq_mhdr *msghdr)
716+
{
717+
struct bfi_enet_rsp *rsp =
718+
(struct bfi_enet_rsp *)msghdr;
719+
720+
if (rsp->error) {
721+
/* Clear ucast from cache */
722+
rxf->ucast_active_set = 0;
723+
}
724+
725+
bfa_fsm_send_event(rxf, RXF_E_FW_RESP);
726+
}
727+
713728
void
714729
bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf,
715730
struct bfi_msgq_mhdr *msghdr)

0 commit comments

Comments
 (0)