summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/brocade
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/brocade')
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.c2
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad_ethtool.c6
-rw-r--r--drivers/net/ethernet/brocade/bna/cna_fwimg.c4
3 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 3a77f9ead004..556aab75f490 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -600,9 +600,9 @@ bnad_cq_process(struct bnad *bnad, struct bna_ccb *ccb, int budget)
prefetch(bnad->netdev);
cq = ccb->sw_q;
- cmpl = &cq[ccb->producer_index];
while (packets < budget) {
+ cmpl = &cq[ccb->producer_index];
if (!cmpl->valid)
break;
/* The 'valid' field is set by the adapter, only after writing
diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
index 882cad71ad62..d26adac6ab99 100644
--- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
+++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
@@ -997,10 +997,8 @@ bnad_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
unsigned long flags = 0;
int ret = 0;
- /* Check if the flash read request is valid */
- if (eeprom->magic != (bnad->pcidev->vendor |
- (bnad->pcidev->device << 16)))
- return -EFAULT;
+ /* Fill the magic value */
+ eeprom->magic = bnad->pcidev->vendor | (bnad->pcidev->device << 16);
/* Query the flash partition based on the offset */
flash_part = bnad_get_flash_partition_by_offset(bnad,
diff --git a/drivers/net/ethernet/brocade/bna/cna_fwimg.c b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
index 6a68e8d93309..6f72771caea6 100644
--- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c
+++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
@@ -68,10 +68,8 @@ bfa_cb_image_get_chunk(enum bfi_asic_gen asic_gen, u32 off)
switch (asic_gen) {
case BFI_ASIC_GEN_CT:
return (bfi_image_ct_cna + off);
- break;
case BFI_ASIC_GEN_CT2:
return (bfi_image_ct2_cna + off);
- break;
default:
return NULL;
}
@@ -83,10 +81,8 @@ bfa_cb_image_get_size(enum bfi_asic_gen asic_gen)
switch (asic_gen) {
case BFI_ASIC_GEN_CT:
return bfi_image_ct_cna_size;
- break;
case BFI_ASIC_GEN_CT2:
return bfi_image_ct2_cna_size;
- break;
default:
return 0;
}