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 Reduce diff against FreeBSD r280181.



details:   https://anonhg.NetBSD.org/src/rev/dbee606cc525
branches:  trunk
changeset: 339846:dbee606cc525
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Aug 13 10:03:37 2015 +0000

description:
Reduce diff against FreeBSD r280181.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c      |  42 +++++++++++++++++++++++-------------------
 sys/dev/pci/ixgbe/ixgbe_api.c  |   4 ++--
 sys/dev/pci/ixgbe/ixgbe_api.h  |   3 ++-
 sys/dev/pci/ixgbe/ixgbe_type.h |  12 +++++-------
 sys/dev/pci/ixgbe/ixv.c        |  12 +++++++-----
 5 files changed, 39 insertions(+), 34 deletions(-)

diffs (truncated from 350 to 300 lines):

diff -r 05456aaeffcf -r dbee606cc525 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Aug 13 09:00:29 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Aug 13 10:03:37 2015 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.c 279805 2015-03-09 10:29:15Z araujo $*/
-/*$NetBSD: ixgbe.c,v 1.34 2015/08/13 04:56:43 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.35 2015/08/13 10:03:37 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -136,15 +136,15 @@
 #if 0
 static int      ixgbe_shutdown(device_t);
 #endif
-#if IXGBE_LEGACY_TX
+#ifdef IXGBE_LEGACY_TX
 static void     ixgbe_start(struct ifnet *);
 static void     ixgbe_start_locked(struct tx_ring *, struct ifnet *);
-#else
+#else /* ! IXGBE_LEGACY_TX */
 static int     ixgbe_mq_start(struct ifnet *, struct mbuf *);
 static int     ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *);
 static void    ixgbe_qflush(struct ifnet *);
-static void    ixgbe_deferred_mq_start(void *);
-#endif
+static void    ixgbe_deferred_mq_start(void *, int);
+#endif /* IXGBE_LEGACY_TX */
 static int      ixgbe_ioctl(struct ifnet *, u_long, void *);
 static void    ixgbe_ifstop(struct ifnet *, int);
 static int     ixgbe_init(struct ifnet *);
@@ -338,7 +338,7 @@
 ** of unsupported SFP+ modules, note that
 ** doing so you are on your own :)
 */
-static int allow_unsupported_sfp = true;
+static int allow_unsupported_sfp = false;
 SYSCTL_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp);
 
 /*
@@ -608,8 +608,7 @@
                */
                adapter->sfp_probe = TRUE;
                error = 0;
-       } else if ((error == IXGBE_ERR_SFP_NOT_SUPPORTED)
-           && (hw->allow_unsupported_sfp == false)) {
+       } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) {
                aprint_error_dev(dev,"Unsupported SFP+ module detected!\n");
                error = EIO;
                goto err_late;
@@ -1094,7 +1093,7 @@
  * Called from a taskqueue to drain queued transmit packets.
  */
 static void
-ixgbe_deferred_mq_start(void *arg)
+ixgbe_deferred_mq_start(void *arg, int pending)
 {
        struct tx_ring *txr = arg;
        struct adapter *adapter = txr->adapter;
@@ -1341,7 +1340,7 @@
        /* Enable Fan Failure Interrupt */
        gpie |= IXGBE_SDP1_GPIEN;
 
-       /* Add for Thermal detection */
+       /* Add for Module detection */
        if (hw->mac.type == ixgbe_mac_82599EB)
                gpie |= IXGBE_SDP2_GPIEN;
 
@@ -1633,11 +1632,12 @@
        struct ix_queue *que = arg;
        struct adapter  *adapter = que->adapter;
        struct ixgbe_hw *hw = &adapter->hw;
-       struct ifnet   *ifp = adapter->ifp;
+       struct ifnet    *ifp = adapter->ifp;
        struct          tx_ring *txr = adapter->tx_rings;
        bool            more = false;
        u32             reg_eicr;
 
+
        reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
 
        adapter->stats.legint.ev_count++;
@@ -2669,6 +2669,7 @@
                que->msix = vector;
                adapter->que_mask |= (u64)(1 << que->msix);
 #ifdef RSS
+               /*
                 * The queue ID is used as the RSS layer bucket ID.
                 * We look up the queue ID -> RSS CPU ID and select
                 * that.
@@ -2677,7 +2678,7 @@
 #else
                /*
                 * Bind the msix vector, and thus the
-                * ring to the corresponding cpu.
+                * rings to the corresponding cpu.
                 *
                 * This just happens to match the default RSS round-robin
                 * bucket -> queue -> CPU allocation.
@@ -4112,6 +4113,7 @@
                        mp = rxbuf->buf;
 
                mp->m_pkthdr.len = mp->m_len = rxr->mbuf_sz;
+
                /* If we're dealing with an mbuf that was copied rather
                 * than replaced, there's no need to go through busdma.
                 */
@@ -4823,6 +4825,7 @@
 
        rbuf = &rxr->rx_buffers[i];
 
+
        /*
        ** With advanced descriptors the writeback
        ** clobbers the buffer addrs, so its easier
@@ -4830,16 +4833,17 @@
        ** the normal refresh path to get new buffers
        ** and mapping.
        */
+
        if (rbuf->buf != NULL) {/* Partial chain ? */
                rbuf->fmp->m_flags |= M_PKTHDR;
                m_freem(rbuf->fmp);
                rbuf->fmp = NULL;
                rbuf->buf = NULL; /* rbuf->buf is part of fmp's chain */
        } else if (rbuf->buf) {
-               m_free(rbuf->buf);
-               rbuf->buf = NULL;
-       }
- 
+               m_free(rbuf->buf);
+               rbuf->buf = NULL;
+       }
+
        rbuf->flags = 0;
 
        return;
@@ -4973,7 +4977,6 @@
                ** that determines what we are
                */
                sendmp = rbuf->fmp;
-
                if (sendmp != NULL) {  /* secondary frag */
                        rbuf->buf = rbuf->fmp = NULL;
                        mp->m_flags &= ~M_PKTHDR;
@@ -5007,6 +5010,7 @@
                        sendmp->m_pkthdr.len = mp->m_len;
                }
                ++processed;
+
                /* Pass the head pointer on */
                if (eop == 0) {
                        nbuf->fmp = sendmp;
@@ -5234,6 +5238,7 @@
        struct rx_ring  *rxr;
        u32             ctrl;
 
+
        /*
        ** We get here thru init_locked, meaning
        ** a soft reset, this has already cleared
@@ -5258,7 +5263,6 @@
 
        if ((ec->ec_capenable & ETHERCAP_VLAN_HWFILTER) == 0)
                return;
-
        /*
        ** A soft reset zero's out the VFTA, so
        ** we need to repopulate it now.
@@ -6390,7 +6394,7 @@
        else if (adapter->advertise == 3)
                 speed = IXGBE_LINK_SPEED_1GB_FULL |
                        IXGBE_LINK_SPEED_10GB_FULL;
-       else {/* bogus value */
+       else {  /* bogus value */
                adapter->advertise = last;
                return (EINVAL);
        }
diff -r 05456aaeffcf -r dbee606cc525 sys/dev/pci/ixgbe/ixgbe_api.c
--- a/sys/dev/pci/ixgbe/ixgbe_api.c     Thu Aug 13 09:00:29 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_api.c     Thu Aug 13 10:03:37 2015 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_api.c 251964 2013-06-18 21:28:19Z jfv $*/
-/*$NetBSD: ixgbe_api.c,v 1.8 2015/08/05 04:08:44 msaitoh Exp $*/
+/*$NetBSD: ixgbe_api.c,v 1.9 2015/08/13 10:03:38 msaitoh Exp $*/
 
 #include "ixgbe_api.h"
 #include "ixgbe_common.h"
@@ -163,7 +163,7 @@
                             "Unsupported device id: %x",
                             hw->device_id);
                break;
-       }
+       }
 
        DEBUGOUT2("ixgbe_set_mac_type found mac: %d, returns: %d\n",
                  hw->mac.type, ret_val);
diff -r 05456aaeffcf -r dbee606cc525 sys/dev/pci/ixgbe/ixgbe_api.h
--- a/sys/dev/pci/ixgbe/ixgbe_api.h     Thu Aug 13 09:00:29 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_api.h     Thu Aug 13 10:03:37 2015 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_api.h 251964 2013-06-18 21:28:19Z jfv $*/
-/*$NetBSD: ixgbe_api.h,v 1.5 2015/08/05 04:08:44 msaitoh Exp $*/
+/*$NetBSD: ixgbe_api.h,v 1.6 2015/08/13 10:03:38 msaitoh Exp $*/
 
 #ifndef _IXGBE_API_H_
 #define _IXGBE_API_H_
@@ -39,6 +39,7 @@
 #include "ixgbe_type.h"
 
 void ixgbe_dcb_get_rtrup2tc(struct ixgbe_hw *hw, u8 *map);
+
 s32 ixgbe_init_shared_code(struct ixgbe_hw *hw);
 
 extern s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw);
diff -r 05456aaeffcf -r dbee606cc525 sys/dev/pci/ixgbe/ixgbe_type.h
--- a/sys/dev/pci/ixgbe/ixgbe_type.h    Thu Aug 13 09:00:29 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_type.h    Thu Aug 13 10:03:37 2015 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_type.h 251964 2013-06-18 21:28:19Z jfv $*/
-/*$NetBSD: ixgbe_type.h,v 1.12 2015/08/13 04:56:43 msaitoh Exp $*/
+/*$NetBSD: ixgbe_type.h,v 1.13 2015/08/13 10:03:38 msaitoh Exp $*/
 
 #ifndef _IXGBE_TYPE_H_
 #define _IXGBE_TYPE_H_
@@ -136,7 +136,6 @@
 #define IXGBE_DEV_ID_X540_VF_HV                        0x1530
 #define IXGBE_DEV_ID_X540_BYPASS               0x155C
 
-
 /* General Registers */
 #define IXGBE_CTRL             0x00000
 #define IXGBE_STATUS           0x00008
@@ -343,7 +342,6 @@
 #define IXGBE_RSSRK(_i)                (0x05C80 + ((_i) * 4))  /* 10 of these (0-9) */
 
 
-
 /* Flow Director registers */
 #define IXGBE_FDIRCTRL 0x0EE00
 #define IXGBE_FDIRHKEY 0x0EE68
@@ -645,7 +643,6 @@
 #define IXGBE_RTTBCNRD 0x0498C
 
 
-
 /* FCoE DMA Context Registers */
 #define IXGBE_FCPTRL           0x02410 /* FC User Desc. PTR Low */
 #define IXGBE_FCPTRH           0x02414 /* FC USer Desc. PTR High */
@@ -1818,7 +1815,7 @@
 #define IXGBE_GSSR_MAC_CSR_SM  0x0008
 #define IXGBE_GSSR_FLASH_SM    0x0010
 #define IXGBE_GSSR_SW_MNG_SM   0x0400
- 
+
 /* FW Status register bitmask */
 #define IXGBE_FWSTS_FWRI       0x00000200 /* Firmware Reset Indication */
 
@@ -2482,7 +2479,7 @@
 
 /* Transmit Descriptor - Legacy */
 struct ixgbe_legacy_tx_desc {
-       u64 buffer_addr;       /* Address of the descriptor's data buffer */
+       u64 buffer_addr; /* Address of the descriptor's data buffer */
        union {
                __le32 data;
                struct {
@@ -2661,7 +2658,7 @@
 /* BitTimes (BT) conversion */
 #define IXGBE_BT2KB(BT)                ((BT + (8 * 1024 - 1)) / (8 * 1024))
 #define IXGBE_B2BT(BT)         (BT * 8)
- 
+
 /* Calculate Delay to respond to PFC */
 #define IXGBE_PFC_D    672
 
@@ -3315,6 +3312,7 @@
 #define IXGBE_ERR_OUT_OF_MEM                   -34
 #define IXGBE_ERR_FEATURE_NOT_SUPPORTED                -36
 #define IXGBE_ERR_EEPROM_PROTECTED_REGION      -37
+
 #define IXGBE_NOT_IMPLEMENTED                  0x7FFFFFFF
 
 #endif /* _IXGBE_TYPE_H_ */
diff -r 05456aaeffcf -r dbee606cc525 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Thu Aug 13 09:00:29 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Thu Aug 13 10:03:37 2015 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/ixv.c 275358 2014-12-01 11:45:24Z hselasky $*/
-/*$NetBSD: ixv.c,v 1.11 2015/08/13 04:56:43 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.12 2015/08/13 10:03:38 msaitoh Exp $*/



Home | Main Index | Thread Index | Old Index