net/ixgbe: fix mask bits register set error for FDIR
[dpdk.git] / drivers / net / bnx2x / ecore_sp.c
index 31ab8cf..7532967 100644 (file)
@@ -1,37 +1,16 @@
 /*-
- * Copyright (c) 2007-2013 QLogic Corporation. All rights reserved.
+ * Copyright (c) 2007-2013 Cavium Inc. All rights reserved.
  *
  * Eric Davis        <edavis@broadcom.com>
  * David Christensen <davidch@broadcom.com>
  * Gary Zambrano     <zambrano@broadcom.com>
  *
  * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
+ * Copyright (c) 2015-2018 Cavium Inc.
  * All rights reserved.
+ * www.cavium.com
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written consent.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
+ * See LICENSE.bnx2x_pmd for copyright and licensing details.
  */
 
 #include "bnx2x.h"
@@ -2697,7 +2676,7 @@ static void ecore_mcast_hdl_del(struct bnx2x_softc *sc,
  * @cmd:
  * @start_cnt: first line in the ramrod data that may be used
  *
- * This function is called iff there is enough place for the current command in
+ * This function is called if there is enough place for the current command in
  * the ramrod data.
  * Returns number of lines filled in the ramrod data in total.
  */
@@ -2746,7 +2725,7 @@ static int ecore_mcast_validate_e2(__rte_unused struct bnx2x_softc *sc,
                /* DEL command deletes all currently configured MACs */
        case ECORE_MCAST_CMD_DEL:
                o->set_registry_size(o, 0);
-               /* Don't break */
+               /* fall-through */
 
                /* RESTORE command will restore the entire multicast configuration */
        case ECORE_MCAST_CMD_RESTORE:
@@ -2855,7 +2834,7 @@ static int ecore_mcast_setup_e2(struct bnx2x_softc *sc,
        if (ECORE_LIST_IS_EMPTY(&o->pending_cmds_head))
                o->clear_sched(o);
 
-       /* The below may be TRUE iff there was enough room in ramrod
+       /* The below may be TRUE if there was enough room in ramrod
         * data for all pending commands and for the current
         * command. Otherwise the current command would have been added
         * to the pending commands and p->mcast_list_len would have been
@@ -3423,7 +3402,7 @@ void ecore_init_mac_credit_pool(struct bnx2x_softc *sc,
                /* CAM credit is equally divided between all active functions
                 * on the PORT!.
                 */
-               if ((func_num > 0)) {
+               if (func_num > 0) {
                        if (!CHIP_REV_IS_SLOW(sc))
                                cam_sz = (MAX_MAC_CREDIT_E1H / (2 * func_num));
                        else
@@ -3440,7 +3419,7 @@ void ecore_init_mac_credit_pool(struct bnx2x_softc *sc,
                 * CAM credit is equaly divided between all active functions
                 * on the PATH.
                 */
-               if ((func_num > 0)) {
+               if (func_num > 0) {
                        if (!CHIP_REV_IS_SLOW(sc))
                                cam_sz = (MAX_MAC_CREDIT_E2 / func_num);
                        else