Skip to contentSkip to conversation

Update the driver version to 3.2.21.1

PATCH In review Rasesh Mody 2 participants 6 messages May 20, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Update the driver version to 3.2.21.1

Hi Dave,

Re-submitting the following patch series. It includes enhancements, bug fixes and firmware updates for BNA driver. It updates the Brocade BFA driver to v3.2.21.1.

The patches have been compiled and tested against net-next 3.9.0.

Thanks,
Rasesh

Rasesh Mody (4):
bna: Clear Driver Config Flags When HW Resets
bna: Fix Ucast Failure Handling
bna: Enahncement to Identify Default IOC Function
bna: Driver and Firmware Updated

 drivers/net/ethernet/brocade/bna/bfa_defs.h  |    3 ++-
 drivers/net/ethernet/brocade/bna/bfa_ioc.c   |    7 ++++---
 drivers/net/ethernet/brocade/bna/bfa_ioc.h   |    2 ++
 drivers/net/ethernet/brocade/bna/bna.h       |    2 ++
 drivers/net/ethernet/brocade/bna/bna_enet.c  |    7 ++++++-
 drivers/net/ethernet/brocade/bna/bna_tx_rx.c |   15 +++++++++++++++
 drivers/net/ethernet/brocade/bna/bnad.c      |    3 +++
 drivers/net/ethernet/brocade/bna/bnad.h      |    2 +-
 drivers/net/ethernet/brocade/bna/cna.h       |    4 ++--
 9 files changed, 37 insertions(+), 8 deletions(-)
#1 lore raw

PATCH 1/4 bna: Clear Driver Config Flags When HW Resets

Driver configuration flags are retained across open/stop operations preventing configurations to be set in next open/stop. Setting MTU on a 1020 causes network to fail until a reboot is performed on the host.

Clear the flags when configuration resets in hardware.

---
 drivers/net/ethernet/brocade/bna/bnad.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/ethernet/brocade/bna/bnad.c +3 -0
index ce4a030..a6c16a2 100644
@@ -2624,6 +2624,9 @@ bnad_stop(struct net_device *netdev)
 	bnad_destroy_tx(bnad, 0);
 	bnad_destroy_rx(bnad, 0);
 
+	/* These config flags are cleared in the hardware */
+	bnad->cfg_flags &= ~(BNAD_CF_ALLMULTI | BNAD_CF_PROMISC);
+
 	/* Synchronize mailbox IRQ */
 	bnad_mbox_irq_sync(bnad);
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/4 bna: Fix Ucast Failure Handling

In reply to Rasesh Mody

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.

---
 drivers/net/ethernet/brocade/bna/bna.h       |    2 ++
 drivers/net/ethernet/brocade/bna/bna_enet.c  |    7 ++++++-
 drivers/net/ethernet/brocade/bna/bna_tx_rx.c |   15 +++++++++++++++
 3 files changed, 23 insertions(+), 1 deletions(-)
drivers/net/ethernet/brocade/bna/bna.h +2 -0
index 25dae75..f1eafc4 100644
@@ -455,6 +455,8 @@ void bna_bfi_rx_enet_stop_rsp(struct bna_rx *rx,
 void bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr);
 void bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf,
 			       struct bfi_msgq_mhdr *msghdr);
+void bna_bfi_rxf_ucast_set_rsp(struct bna_rxf *rxf,
+			       struct bfi_msgq_mhdr *msghdr);
 
 /* APIs for BNA */
 void bna_rx_mod_init(struct bna_rx_mod *rx_mod, struct bna *bna,
drivers/net/ethernet/brocade/bna/bna_enet.c +6 -1
index db14f69..3ca77fa 100644
@@ -298,7 +298,6 @@ bna_msgq_rsp_handler(void *arg, struct bfi_msgq_mhdr *msghdr)
 	case BFI_ENET_I2H_RSS_ENABLE_RSP:
 	case BFI_ENET_I2H_RX_PROMISCUOUS_RSP:
 	case BFI_ENET_I2H_RX_DEFAULT_RSP:
-	case BFI_ENET_I2H_MAC_UCAST_SET_RSP:
 	case BFI_ENET_I2H_MAC_UCAST_CLR_RSP:
 	case BFI_ENET_I2H_MAC_UCAST_ADD_RSP:
 	case BFI_ENET_I2H_MAC_UCAST_DEL_RSP:
@@ -311,6 +310,12 @@ bna_msgq_rsp_handler(void *arg, struct bfi_msgq_mhdr *msghdr)
 			bna_bfi_rxf_cfg_rsp(&rx->rxf, msghdr);
 		break;
 
+	case BFI_ENET_I2H_MAC_UCAST_SET_RSP:
+		bna_rx_from_rid(bna, msghdr->enet_id, rx);
+		if (rx)
+			bna_bfi_rxf_ucast_set_rsp(&rx->rxf, msghdr);
+		break;
+
 	case BFI_ENET_I2H_MAC_MCAST_ADD_RSP:
 		bna_rx_from_rid(bna, msghdr->enet_id, rx);
 		if (rx)
drivers/net/ethernet/brocade/bna/bna_tx_rx.c +15 -0
index ea6f4a0..57cd1bf 100644
@@ -711,6 +711,21 @@ bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr)
 }
 
 void
+bna_bfi_rxf_ucast_set_rsp(struct bna_rxf *rxf,
+			struct bfi_msgq_mhdr *msghdr)
+{
+	struct bfi_enet_rsp *rsp =
+		(struct bfi_enet_rsp *)msghdr;
+
+	if (rsp->error) {
+		/* Clear ucast from cache */
+		rxf->ucast_active_set = 0;
+	}
+
+	bfa_fsm_send_event(rxf, RXF_E_FW_RESP);
+}
+
+void
 bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf,
 			struct bfi_msgq_mhdr *msghdr)
 {
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/4 bna: Enahncement to Identify Default IOC Function

In reply to Rasesh Mody

User should not be allowed to delete base function of eth port. Add a new field to the bfa ioc attributes structure to indicate if the given ioc is default function on the port or not.

---
 drivers/net/ethernet/brocade/bna/bfa_defs.h |    3 ++-
 drivers/net/ethernet/brocade/bna/bfa_ioc.c  |    7 ++++---
 drivers/net/ethernet/brocade/bna/bfa_ioc.h  |    2 ++
 3 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/ethernet/brocade/bna/bfa_defs.h +2 -1
index e423f82..b7d8127 100644
@@ -164,7 +164,8 @@ struct bfa_ioc_attr {
 	u8				port_mode;	/*!< enum bfa_mode */
 	u8				cap_bm;		/*!< capability */
 	u8				port_mode_cfg;	/*!< enum bfa_mode */
-	u8				rsvd[4];	/*!< 64bit align */
+	u8				def_fn;		/*!< 1 if default fn */
+	u8				rsvd[3];	/*!< 64bit align */
 };
 
 /* Adapter capability mask definition */
drivers/net/ethernet/brocade/bna/bfa_ioc.c +4 -3
index f2b73ff..6f3cac0 100644
@@ -2371,7 +2371,7 @@ bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr)
 	memset((void *)ioc_attr, 0, sizeof(struct bfa_ioc_attr));
 
 	ioc_attr->state = bfa_ioc_get_state(ioc);
-	ioc_attr->port_id = ioc->port_id;
+	ioc_attr->port_id = bfa_ioc_portid(ioc);
 	ioc_attr->port_mode = ioc->port_mode;
 
 	ioc_attr->port_mode_cfg = ioc->port_mode_cfg;
@@ -2381,8 +2381,9 @@ bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr)
 
 	bfa_ioc_get_adapter_attr(ioc, &ioc_attr->adapter_attr);
 
-	ioc_attr->pci_attr.device_id = ioc->pcidev.device_id;
-	ioc_attr->pci_attr.pcifn = ioc->pcidev.pci_func;
+	ioc_attr->pci_attr.device_id = bfa_ioc_devid(ioc);
+	ioc_attr->pci_attr.pcifn = bfa_ioc_pcifn(ioc);
+	ioc_attr->def_fn = bfa_ioc_is_default(ioc);
 	bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev);
 }
 
drivers/net/ethernet/brocade/bna/bfa_ioc.h +2 -0
index 63a85e5..f04e0aa 100644
@@ -222,6 +222,8 @@ struct bfa_ioc_hwif {
 #define bfa_ioc_bar0(__ioc)		((__ioc)->pcidev.pci_bar_kva)
 #define bfa_ioc_portid(__ioc)		((__ioc)->port_id)
 #define bfa_ioc_asic_gen(__ioc)		((__ioc)->asic_gen)
+#define bfa_ioc_is_default(__ioc)	\
+	(bfa_ioc_pcifn(__ioc) == bfa_ioc_portid(__ioc))
 #define bfa_ioc_fetch_stats(__ioc, __stats) \
 		(((__stats)->drv_stats) = (__ioc)->stats)
 #define bfa_ioc_clr_stats(__ioc)	\
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/4 bna: Driver and Firmware Updated

In reply to Rasesh Mody

Driver and Firmware versions updated to 3.2.21.1.

---
 drivers/net/ethernet/brocade/bna/bnad.h |    2 +-
 drivers/net/ethernet/brocade/bna/cna.h  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/brocade/bna/bnad.h +1 -1
index c1d0bc0..aefee77 100644
@@ -71,7 +71,7 @@ struct bnad_rx_ctrl {
 #define BNAD_NAME			"bna"
 #define BNAD_NAME_LEN			64
 
-#define BNAD_VERSION			"3.1.2.1"
+#define BNAD_VERSION			"3.2.21.1"
 
 #define BNAD_MAILBOX_MSIX_INDEX		0
 #define BNAD_MAILBOX_MSIX_VECTORS	1
drivers/net/ethernet/brocade/bna/cna.h +2 -2
index 14ca931..c37f706 100644
@@ -37,8 +37,8 @@
 
 extern char bfa_version[];
 
-#define CNA_FW_FILE_CT	"ctfw-3.1.0.0.bin"
-#define CNA_FW_FILE_CT2	"ct2fw-3.1.0.0.bin"
+#define CNA_FW_FILE_CT	"ctfw-3.2.1.0.bin"
+#define CNA_FW_FILE_CT2	"ct2fw-3.2.1.0.bin"
 #define FC_SYMNAME_MAX	256	/*!< max name server symbolic name size */
 
 #pragma pack(1)
Signature · 1 line
1.7.1
maintainer
#5 lore raw
In reply to Rasesh Mody

From: Rasesh Mody <[email protected]>
Date: Mon, 20 May 2013 13:08:00 -0700

Quoted 5 lines

Re-submitting the following patch series. It includes enhancements, bug fixes and firmware updates for BNA driver. It updates the Brocade BFA driver to v3.2.21.1.

The patches have been compiled and tested against net-next 3.9.0.

Series applied, thanks.