Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Add typecast for type mismatch.



details:   https://anonhg.NetBSD.org/src/rev/af5ce109d398
branches:  trunk
changeset: 1027194:af5ce109d398
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Dec 10 11:16:54 2021 +0000

description:
Add typecast for type mismatch.

  FreeBSD: 994dd6328c66fc277438ad51ed074f3c52096147
  DPDK:    d8e52b2cf771c31b523b46852fd86225b5a2c721

diffstat:

 sys/dev/pci/ixgbe/ixgbe_82599.c     |  12 ++++++------
 sys/dev/pci/ixgbe/ixgbe_common.c    |   6 +++---
 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c |   6 +++---
 sys/dev/pci/ixgbe/ixgbe_dcb_82599.c |   6 +++---
 sys/dev/pci/ixgbe/ixgbe_x550.c      |   6 +++---
 5 files changed, 18 insertions(+), 18 deletions(-)

diffs (161 lines):

diff -r ee0a7c0bc147 -r af5ce109d398 sys/dev/pci/ixgbe/ixgbe_82599.c
--- a/sys/dev/pci/ixgbe/ixgbe_82599.c   Fri Dec 10 11:14:18 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82599.c   Fri Dec 10 11:16:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82599.c,v 1.23 2021/04/30 06:55:32 msaitoh Exp $ */
+/* $NetBSD: ixgbe_82599.c,v 1.24 2021/12/10 11:16:54 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_82599.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_82599.c,v 1.23 2021/04/30 06:55:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_82599.c,v 1.24 2021/12/10 11:16:54 msaitoh Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_82599.h"
@@ -1598,7 +1598,7 @@
         * is for FDIRCMD.  Then do a 64-bit register write from FDIRHASH.
         */
        fdirhashcmd = (u64)fdircmd << 32;
-       fdirhashcmd |= ixgbe_atr_compute_sig_hash_82599(input, common);
+       fdirhashcmd |= (u64)ixgbe_atr_compute_sig_hash_82599(input, common);
        IXGBE_WRITE_REG64(hw, IXGBE_FDIRHASH, fdirhashcmd);
 
        DEBUGOUT2("Tx Queue=%x hash=%x\n", queue, (u32)fdirhashcmd);
@@ -1687,7 +1687,7 @@
 {
        u32 mask = IXGBE_NTOHS(input_mask->formatted.dst_port);
        mask <<= IXGBE_FDIRTCPM_DPORTM_SHIFT;
-       mask |= IXGBE_NTOHS(input_mask->formatted.src_port);
+       mask |= (u32)IXGBE_NTOHS(input_mask->formatted.src_port);
        mask = ((mask & 0x55555555) << 1) | ((mask & 0xAAAAAAAA) >> 1);
        mask = ((mask & 0x33333333) << 2) | ((mask & 0xCCCCCCCC) >> 2);
        mask = ((mask & 0x0F0F0F0F) << 4) | ((mask & 0xF0F0F0F0) >> 4);
@@ -1919,14 +1919,14 @@
                /* record source and destination port (little-endian)*/
                fdirport = IXGBE_NTOHS(input->formatted.dst_port);
                fdirport <<= IXGBE_FDIRPORT_DESTINATION_SHIFT;
-               fdirport |= IXGBE_NTOHS(input->formatted.src_port);
+               fdirport |= (u32)IXGBE_NTOHS(input->formatted.src_port);
                IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport);
        }
 
        /* record VLAN (little-endian) and flex_bytes(big-endian) */
        fdirvlan = IXGBE_STORE_AS_BE16(input->formatted.flex_bytes);
        fdirvlan <<= IXGBE_FDIRVLAN_FLEX_SHIFT;
-       fdirvlan |= IXGBE_NTOHS(input->formatted.vlan_id);
+       fdirvlan |= (u32)IXGBE_NTOHS(input->formatted.vlan_id);
        IXGBE_WRITE_REG(hw, IXGBE_FDIRVLAN, fdirvlan);
 
        if (cloud_mode) {
diff -r ee0a7c0bc147 -r af5ce109d398 sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c  Fri Dec 10 11:14:18 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c  Fri Dec 10 11:16:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.33 2021/08/02 12:56:24 andvar Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.34 2021/12/10 11:16:54 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_common.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.33 2021/08/02 12:56:24 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.34 2021/12/10 11:16:54 msaitoh Exp $");
 
 #include "ixgbe_common.h"
 #include "ixgbe_phy.h"
@@ -783,7 +783,7 @@
                DEBUGOUT("NVM Read Error\n");
                return ret_val;
        }
-       *pba_num |= data;
+       *pba_num |= (u32)data;
 
        return IXGBE_SUCCESS;
 }
diff -r ee0a7c0bc147 -r af5ce109d398 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c
--- a/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c       Fri Dec 10 11:14:18 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c       Fri Dec 10 11:16:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_dcb_82598.c,v 1.9 2021/04/30 06:55:32 msaitoh Exp $ */
+/* $NetBSD: ixgbe_dcb_82598.c,v 1.10 2021/12/10 11:16:54 msaitoh Exp $ */
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_dcb_82598.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_dcb_82598.c,v 1.9 2021/04/30 06:55:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_dcb_82598.c,v 1.10 2021/12/10 11:16:54 msaitoh Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_dcb.h"
@@ -201,7 +201,7 @@
        for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
                max_credits = max[i];
                reg = max_credits << IXGBE_TDTQ2TCCR_MCL_SHIFT;
-               reg |= refill[i];
+               reg |= (u32)(refill[i]);
                reg |= (u32)(bwg_id[i]) << IXGBE_TDTQ2TCCR_BWG_SHIFT;
 
                if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
diff -r ee0a7c0bc147 -r af5ce109d398 sys/dev/pci/ixgbe/ixgbe_dcb_82599.c
--- a/sys/dev/pci/ixgbe/ixgbe_dcb_82599.c       Fri Dec 10 11:14:18 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_dcb_82599.c       Fri Dec 10 11:16:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_dcb_82599.c,v 1.9 2021/04/30 06:55:32 msaitoh Exp $ */
+/* $NetBSD: ixgbe_dcb_82599.c,v 1.10 2021/12/10 11:16:54 msaitoh Exp $ */
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_dcb_82599.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_dcb_82599.c,v 1.9 2021/04/30 06:55:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_dcb_82599.c,v 1.10 2021/12/10 11:16:54 msaitoh Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_dcb.h"
@@ -200,7 +200,7 @@
        for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
                max_credits = max[i];
                reg = max_credits << IXGBE_RTTDT2C_MCL_SHIFT;
-               reg |= refill[i];
+               reg |= (u32)(refill[i]);
                reg |= (u32)(bwg_id[i]) << IXGBE_RTTDT2C_BWG_SHIFT;
 
                if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
diff -r ee0a7c0bc147 -r af5ce109d398 sys/dev/pci/ixgbe/ixgbe_x550.c
--- a/sys/dev/pci/ixgbe/ixgbe_x550.c    Fri Dec 10 11:14:18 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_x550.c    Fri Dec 10 11:16:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_x550.c,v 1.21 2021/12/10 11:14:18 msaitoh Exp $ */
+/* $NetBSD: ixgbe_x550.c,v 1.22 2021/12/10 11:16:54 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_x550.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.21 2021/12/10 11:14:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.22 2021/12/10 11:16:54 msaitoh Exp $");
 
 #include "ixgbe_x550.h"
 #include "ixgbe_x540.h"
@@ -845,7 +845,7 @@
 
        for (i = 0; i < sizeof(ixgbe_fw_map) / sizeof(ixgbe_fw_map[0]); ++i) {
                if (hw->phy.autoneg_advertised & ixgbe_fw_map[i].phy_speed)
-                       setup[0] |= ixgbe_fw_map[i].fw_speed;
+                       setup[0] |= (u32)(ixgbe_fw_map[i].fw_speed);
        }
        setup[0] |= FW_PHY_ACT_SETUP_LINK_HP | FW_PHY_ACT_SETUP_LINK_AN;
 



Home | Main Index | Thread Index | Old Index