summaryrefslogtreecommitdiffstats
path: root/sys/dev/qlnx/qlnxe/qlnx_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/qlnx/qlnxe/qlnx_os.c')
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_os.c642
1 files changed, 283 insertions, 359 deletions
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index 5d6d1fd..90ac191 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -303,7 +303,7 @@ qlnx_sp_intr(void *arg)
ha = (qlnx_host_t *)p_hwfn->p_dev;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
for (i = 0; i < ha->cdev.num_hwfns; i++) {
if (&ha->cdev.hwfns[i] == p_hwfn) {
@@ -311,7 +311,7 @@ qlnx_sp_intr(void *arg)
break;
}
}
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -353,8 +353,7 @@ qlnx_create_sp_taskqueues(qlnx_host_t *ha)
taskqueue_start_threads(&ha->sp_taskqueue[i], 1, PI_NET, "%s",
tq_name);
- QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__,
- ha->sp_taskqueue[i]));
+ QL_DPRINT1(ha, "%p\n", ha->sp_taskqueue[i]);
}
return (0);
@@ -518,7 +517,7 @@ qlnx_fp_taskqueue_exit:
ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
}
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret));
+ QL_DPRINT2(ha, "exit ret = %d\n", ret);
return;
}
@@ -548,8 +547,7 @@ qlnx_create_fp_taskqueues(qlnx_host_t *ha)
taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s",
tq_name);
- QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__,
- fp->fp_taskqueue));
+ QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue);
}
return (0);
@@ -711,15 +709,14 @@ qlnx_pci_attach(device_t dev)
else
ha->num_rss = ha->msix_count - ha->cdev.num_hwfns;
- QL_DPRINT1(ha, (dev, "%s:\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]"
+ QL_DPRINT1(ha, "\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]"
"\n\t\t\tdbells [%p, 0x%08x 0x%08x]"
"\n\t\t\tmsix [%p, 0x%08x 0x%08x 0x%x 0x%x]"
"\n\t\t\t[ncpus = %d][num_rss = 0x%x] [num_tc = 0x%x]\n",
- __func__, ha->pci_reg, rsrc_len_reg,
+ ha->pci_reg, rsrc_len_reg,
ha->reg_rid, ha->pci_dbells, rsrc_len_dbells, ha->dbells_rid,
ha->msix_bar, rsrc_len_msix, ha->msix_rid, pci_msix_count(dev),
- ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc));
-
+ ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc);
if (pci_alloc_msix(dev, &ha->msix_count)) {
device_printf(dev, "%s: pci_alloc_msix[%d] failed\n", __func__,
ha->msix_count);
@@ -755,9 +752,9 @@ qlnx_pci_attach(device_t dev)
goto qlnx_pci_attach_err;
}
- QL_DPRINT1(ha, (dev, "%s: p_hwfn [%p] sp_irq_rid %d"
- " sp_irq %p sp_handle %p\n", __func__, p_hwfn,
- ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]));
+ QL_DPRINT1(ha, "p_hwfn [%p] sp_irq_rid %d"
+ " sp_irq %p sp_handle %p\n", p_hwfn,
+ ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]);
}
@@ -800,8 +797,8 @@ qlnx_pci_attach(device_t dev)
goto qlnx_pci_attach_err;
ha->grcdump_size[i] = ha->grcdump_size[i] << 2;
- QL_DPRINT1(ha, (dev, "grcdump_size[%d] = 0x%08x\n",
- i, ha->grcdump_size[i]));
+ QL_DPRINT1(ha, "grcdump_size[%d] = 0x%08x\n",
+ i, ha->grcdump_size[i]);
ha->grcdump[i] = qlnx_zalloc(ha->grcdump_size[i]);
if (ha->grcdump[i] == NULL) {
@@ -815,8 +812,8 @@ qlnx_pci_attach(device_t dev)
goto qlnx_pci_attach_err;
ha->idle_chk_size[i] = ha->idle_chk_size[i] << 2;
- QL_DPRINT1(ha, (dev, "idle_chk_size[%d] = 0x%08x\n",
- i, ha->idle_chk_size[i]));
+ QL_DPRINT1(ha, "idle_chk_size[%d] = 0x%08x\n",
+ i, ha->idle_chk_size[i]);
ha->idle_chk[i] = qlnx_zalloc(ha->idle_chk_size[i]);
@@ -855,8 +852,8 @@ qlnx_pci_attach(device_t dev)
FW_MAJOR_VERSION, FW_MINOR_VERSION, FW_REVISION_VERSION,
FW_ENGINEERING_VERSION);
- QL_DPRINT1(ha, (dev, "%s: STORM_FW version %s MFW version %s\n",
- __func__, ha->stormfw_ver, ha->mfw_ver));
+ QL_DPRINT1(ha, "STORM_FW version %s MFW version %s\n",
+ ha->stormfw_ver, ha->mfw_ver);
qlnx_init_ifnet(dev, ha);
@@ -874,7 +871,7 @@ qlnx_pci_attach_err0:
goto qlnx_pci_attach_err;
}
- QL_DPRINT2(ha, (dev, "%s: success\n", __func__));
+ QL_DPRINT2(ha, "success\n");
return (0);
@@ -958,7 +955,7 @@ qlnx_release(qlnx_host_t *ha)
dev = ha->pci_dev;
- QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
for (i = 0; i < QLNX_MAX_HW_FUNCS; i++) {
if (ha->idle_chk[i] != NULL) {
@@ -1041,7 +1038,7 @@ qlnx_release(qlnx_host_t *ha)
(void) bus_release_resource(dev, SYS_RES_MEMORY, ha->msix_rid,
ha->msix_bar);
- QL_DPRINT2(ha, (dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -1053,14 +1050,14 @@ qlnx_trigger_dump(qlnx_host_t *ha)
if (ha->ifp != NULL)
ha->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING);
- QL_DPRINT2(ha, (ha->pci_dev, "%s: start\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
for (i = 0; i < ha->cdev.num_hwfns; i++) {
qlnx_grc_dump(ha, &ha->grcdump_dwords[i], i);
qlnx_idle_chk(ha, &ha->idle_chk_dwords[i], i);
}
- QL_DPRINT2(ha, (ha->pci_dev, "%s: end\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -1779,12 +1776,11 @@ qlnx_add_sysctls(qlnx_host_t *ha)
"\tpersonality = 6 => Default in Shared Memory\n");
ha->dbg_level = 0;
-
SYSCTL_ADD_UINT(ctx, children,
OID_AUTO, "debug", CTLFLAG_RW,
&ha->dbg_level, ha->dbg_level, "Debug Level");
- ha->dp_level = 0;
+ ha->dp_level = 0x01;
SYSCTL_ADD_UINT(ctx, children,
OID_AUTO, "dp_level", CTLFLAG_RW,
&ha->dp_level, ha->dp_level, "DP Level");
@@ -1999,7 +1995,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha)
ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO));
- QL_DPRINT2(ha, (dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -2009,6 +2005,8 @@ qlnx_init_locked(qlnx_host_t *ha)
{
struct ifnet *ifp = ha->ifp;
+ QL_DPRINT1(ha, "Driver Initialization start \n");
+
qlnx_stop(ha);
if (qlnx_load(ha) == 0) {
@@ -2026,13 +2024,13 @@ qlnx_init(void *arg)
ha = (qlnx_host_t *)arg;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
QLNX_LOCK(ha);
qlnx_init_locked(ha);
QLNX_UNLOCK(ha);
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -2221,8 +2219,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
switch (cmd) {
case SIOCSIFADDR:
- QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx)\n",
- __func__, cmd));
+ QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd);
if (ifa->ifa_addr->sa_family == AF_INET) {
ifp->if_flags |= IFF_UP;
@@ -2231,10 +2228,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
qlnx_init_locked(ha);
QLNX_UNLOCK(ha);
}
- QL_DPRINT4(ha, (ha->pci_dev,
- "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
- __func__, cmd,
- ntohl(IA_SIN(ifa)->sin_addr.s_addr)));
+ QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n",
+ cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr));
arp_ifinit(ifp, ifa);
} else {
@@ -2243,8 +2238,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
case SIOCSIFMTU:
- QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFMTU (0x%lx)\n",
- __func__, cmd));
+ QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd);
if (ifr->ifr_mtu > QLNX_MAX_MTU) {
ret = EINVAL;
@@ -2263,8 +2257,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
case SIOCSIFFLAGS:
- QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n",
- __func__, cmd));
+ QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd);
QLNX_LOCK(ha);
@@ -2292,8 +2285,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
case SIOCADDMULTI:
- QL_DPRINT4(ha, (ha->pci_dev,
- "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd));
+ QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd);
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
if (qlnx_set_multi(ha, 1))
@@ -2302,8 +2294,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
case SIOCDELMULTI:
- QL_DPRINT4(ha, (ha->pci_dev,
- "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd));
+ QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd);
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
if (qlnx_set_multi(ha, 0))
@@ -2313,9 +2304,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
- QL_DPRINT4(ha, (ha->pci_dev,
- "%s: SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n",
- __func__, cmd));
+ QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd);
+
ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd);
break;
@@ -2323,8 +2313,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
mask = ifr->ifr_reqcap ^ ifp->if_capenable;
- QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFCAP (0x%lx)\n",
- __func__, cmd));
+ QL_DPRINT4(ha, "SIOCSIFCAP (0x%lx)\n", cmd);
if (mask & IFCAP_HWCSUM)
ifp->if_capenable ^= IFCAP_HWCSUM;
@@ -2367,8 +2356,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
p_ptt = ecore_ptt_acquire(p_hwfn);
if (!p_ptt) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s :"
- " ecore_ptt_acquire failed\n", __func__));
+ QL_DPRINT1(ha, "ecore_ptt_acquire failed\n");
ret = -1;
break;
}
@@ -2386,20 +2374,19 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
ret = copyout(&i2c, ifr->ifr_data, sizeof(i2c));
- QL_DPRINT8(ha, (ha->pci_dev, "SIOCGI2C copyout ret = %d"
- " len = %d addr = 0x%02x offset = 0x%04x"
- " data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x"
- " 0x%02x 0x%02x 0x%02x\n",
+ QL_DPRINT8(ha, "SIOCGI2C copyout ret = %d \
+ len = %d addr = 0x%02x offset = 0x%04x \
+ data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x \
+ 0x%02x 0x%02x 0x%02x\n",
ret, i2c.len, i2c.dev_addr, i2c.offset,
i2c.data[0], i2c.data[1], i2c.data[2], i2c.data[3],
- i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]));
+ i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]);
break;
}
#endif /* #if (__FreeBSD_version >= 1100101) */
default:
- QL_DPRINT4(ha, (ha->pci_dev, "%s: default (0x%lx)\n",
- __func__, cmd));
+ QL_DPRINT4(ha, "default (0x%lx)\n", cmd);
ret = ether_ioctl(ifp, cmd, data);
break;
}
@@ -2416,14 +2403,14 @@ qlnx_media_change(struct ifnet *ifp)
ha = (qlnx_host_t *)ifp->if_softc;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
ifm = &ha->media;
if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
ret = EINVAL;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return (ret);
}
@@ -2435,7 +2422,7 @@ qlnx_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
ha = (qlnx_host_t *)ifp->if_softc;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
ifmr->ifm_status = IFM_AVALID;
ifmr->ifm_active = IFM_ETHER;
@@ -2451,8 +2438,7 @@ qlnx_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
(IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE);
}
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit (%s)\n", __func__,
- (ha->link_up ? "link_up" : "link_down")));
+ QL_DPRINT2(ha, "exit (%s)\n", (ha->link_up ? "link_up" : "link_down"));
return;
}
@@ -2478,20 +2464,19 @@ qlnx_free_tx_pkt(qlnx_host_t *ha, struct qlnx_fastpath *fp,
QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_MBUF_NULL);
- QL_DPRINT1(ha, (ha->pci_dev, "%s: (mp == NULL) "
+ QL_DPRINT1(ha, "(mp == NULL) "
" tx_idx = 0x%x"
" ecore_prod_idx = 0x%x"
" ecore_cons_idx = 0x%x"
" hw_bd_cons = 0x%x"
" txq_db_last = 0x%x"
" elem_left = 0x%x\n",
- __func__,
fp->rss_id,
ecore_chain_get_prod_idx(&txq->tx_pbl),
ecore_chain_get_cons_idx(&txq->tx_pbl),
le16toh(*txq->hw_cons_ptr),
txq->tx_db.raw,
- ecore_chain_get_elem_left(&txq->tx_pbl)));
+ ecore_chain_get_elem_left(&txq->tx_pbl));
fp->err_tx_free_pkt_null++;
@@ -2552,20 +2537,20 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp,
QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF);
- QL_DPRINT1(ha, (ha->pci_dev, "%s: (diff = 0x%x) "
+ QL_DPRINT1(ha, "(diff = 0x%x) "
" tx_idx = 0x%x"
" ecore_prod_idx = 0x%x"
" ecore_cons_idx = 0x%x"
" hw_bd_cons = 0x%x"
" txq_db_last = 0x%x"
" elem_left = 0x%x\n",
- __func__, diff,
+ diff,
fp->rss_id,
ecore_chain_get_prod_idx(&txq->tx_pbl),
ecore_chain_get_cons_idx(&txq->tx_pbl),
le16toh(*txq->hw_cons_ptr),
txq->tx_db.raw,
- ecore_chain_get_elem_left(&txq->tx_pbl)));
+ ecore_chain_get_elem_left(&txq->tx_pbl));
fp->err_tx_cons_idx_conflict++;
@@ -2587,7 +2572,7 @@ qlnx_transmit(struct ifnet *ifp, struct mbuf *mp)
struct qlnx_fastpath *fp;
int rss_id = 0, ret = 0;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
#if __FreeBSD_version >= 1100000
if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE)
@@ -2615,7 +2600,7 @@ qlnx_transmit(struct ifnet *ifp, struct mbuf *mp)
qlnx_transmit_exit:
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret));
+ QL_DPRINT2(ha, "exit ret = %d\n", ret);
return ret;
}
@@ -2629,7 +2614,7 @@ qlnx_qflush(struct ifnet *ifp)
ha = (qlnx_host_t *)ifp->if_softc;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
for (rss_id = 0; rss_id < ha->num_rss; rss_id++) {
@@ -2648,7 +2633,7 @@ qlnx_qflush(struct ifnet *ifp)
mtx_unlock(&fp->tx_mtx);
}
}
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -2792,7 +2777,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
uint32_t nbds_in_hdr = 0;
uint32_t offset = 0;
- QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT8(ha, "enter\n");
if (!ha->link_up)
return (-1);
@@ -2844,8 +2829,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
struct mbuf *m;
- QL_DPRINT8(ha, (ha->pci_dev, "%s: EFBIG [%d]\n", __func__,
- m_head->m_pkthdr.len));
+ QL_DPRINT8(ha, "EFBIG [%d]\n", m_head->m_pkthdr.len);
fp->tx_defrag++;
@@ -2855,9 +2839,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
fp->tx_pkts_freed++;
m_freem(m_head);
*m_headp = NULL;
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: m_defrag() = NULL [%d]\n",
- __func__, ret));
+ QL_DPRINT1(ha, "m_defrag() = NULL [%d]\n", ret);
return (ENOBUFS);
}
@@ -2869,9 +2851,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
fp->err_tx_defrag_dmamap_load++;
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: bus_dmamap_load_mbuf_sg failed0[%d, %d]\n",
- __func__, ret, m_head->m_pkthdr.len));
+ QL_DPRINT1(ha,
+ "bus_dmamap_load_mbuf_sg failed0 [%d, %d]\n",
+ ret, m_head->m_pkthdr.len);
fp->tx_pkts_freed++;
m_freem(m_head);
@@ -2885,9 +2867,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
fp->err_tx_non_tso_max_seg++;
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: (%d) nsegs too many for non-TSO[%d, %d]\n",
- __func__, ret, nsegs, m_head->m_pkthdr.len));
+ QL_DPRINT1(ha,
+ "(%d) nsegs too many for non-TSO [%d, %d]\n",
+ ret, nsegs, m_head->m_pkthdr.len);
fp->tx_pkts_freed++;
m_freem(m_head);
@@ -2902,10 +2884,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
fp->err_tx_dmamap_load++;
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: bus_dmamap_load_mbuf_sg failed1[%d, %d]\n",
- __func__, ret, m_head->m_pkthdr.len));
-
+ QL_DPRINT1(ha, "bus_dmamap_load_mbuf_sg failed1 [%d, %d]\n",
+ ret, m_head->m_pkthdr.len);
fp->tx_pkts_freed++;
m_freem(m_head);
*m_headp = NULL;
@@ -2924,9 +2904,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
if ((nsegs + QLNX_TX_ELEM_RESERVE) >
(int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: (%d, 0x%x) insuffient BDs"
- "in chain[%d] trying to free packets\n",
- __func__, nsegs, elem_left, fp->rss_id));
+ QL_DPRINT1(ha, "(%d, 0x%x) insuffient BDs"
+ " in chain[%d] trying to free packets\n",
+ nsegs, elem_left, fp->rss_id);
fp->tx_nsegs_gt_elem_left++;
@@ -2935,9 +2915,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left =
ecore_chain_get_elem_left(&txq->tx_pbl))) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: (%d, 0x%x) insuffient BDs in chain[%d]\n",
- __func__, nsegs, elem_left, fp->rss_id));
+ QL_DPRINT1(ha,
+ "(%d, 0x%x) insuffient BDs in chain[%d]\n",
+ nsegs, elem_left, fp->rss_id);
fp->err_tx_nsegs_gt_elem_left++;
fp->tx_ring_full = 1;
@@ -3165,7 +3145,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp)
qlnx_txq_doorbell_wr32(ha, txq->doorbell_addr, txq->tx_db.raw);
- QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT8(ha, "exit\n");
return (0);
}
@@ -3185,6 +3165,8 @@ qlnx_stop(qlnx_host_t *ha)
* propagate the if_drv_flags
* state to each tx thread
*/
+ QL_DPRINT1(ha, "QLNX STATE = %d\n",ha->state);
+
if (ha->state == QLNX_STATE_OPEN) {
for (i = 0; i < ha->num_rss; i++) {
struct qlnx_fastpath *fp = &ha->fp_array[i];
@@ -3277,8 +3259,7 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, struct qlnx_fastpath *fp,
mp = sw_rx_data->data;
if (mp == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n",
- __func__));
+ QL_DPRINT1(ha, "mp = NULL\n");
fp->err_rx_mp_null++;
rxq->sw_rx_cons =
(rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1);
@@ -3293,10 +3274,8 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, struct qlnx_fastpath *fp,
if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: New buffer allocation failed, dropping"
- " incoming packet and reusing its buffer\n",
- __func__));
+ QL_DPRINT1(ha, "New buffer allocation failed, dropping"
+ " incoming packet and reusing its buffer\n");
qlnx_reuse_rx_data(rxq);
fp->err_rx_alloc_errors++;
@@ -3356,29 +3335,29 @@ qlnx_tpa_start(qlnx_host_t *ha,
dev = ha->pci_dev;
agg_index = cqe->tpa_agg_index;
- QL_DPRINT7(ha, (dev, "%s[%d]: enter\n "
- "\t type = 0x%x\n"
- "\t bitfields = 0x%x\n"
- "\t seg_len = 0x%x\n"
- "\t pars_flags = 0x%x\n"
- "\t vlan_tag = 0x%x\n"
- "\t rss_hash = 0x%x\n"
- "\t len_on_first_bd = 0x%x\n"
- "\t placement_offset = 0x%x\n"
- "\t tpa_agg_index = 0x%x\n"
- "\t header_len = 0x%x\n"
- "\t ext_bd_len_list[0] = 0x%x\n"
- "\t ext_bd_len_list[1] = 0x%x\n"
- "\t ext_bd_len_list[2] = 0x%x\n"
- "\t ext_bd_len_list[3] = 0x%x\n"
- "\t ext_bd_len_list[4] = 0x%x\n",
- __func__, fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len,
+ QL_DPRINT7(ha, "[rss_id = %d]: enter\n \
+ \t type = 0x%x\n \
+ \t bitfields = 0x%x\n \
+ \t seg_len = 0x%x\n \
+ \t pars_flags = 0x%x\n \
+ \t vlan_tag = 0x%x\n \
+ \t rss_hash = 0x%x\n \
+ \t len_on_first_bd = 0x%x\n \
+ \t placement_offset = 0x%x\n \
+ \t tpa_agg_index = 0x%x\n \
+ \t header_len = 0x%x\n \
+ \t ext_bd_len_list[0] = 0x%x\n \
+ \t ext_bd_len_list[1] = 0x%x\n \
+ \t ext_bd_len_list[2] = 0x%x\n \
+ \t ext_bd_len_list[3] = 0x%x\n \
+ \t ext_bd_len_list[4] = 0x%x\n",
+ fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len,
cqe->pars_flags.flags, cqe->vlan_tag,
cqe->rss_hash, cqe->len_on_first_bd, cqe->placement_offset,
cqe->tpa_agg_index, cqe->header_len,
cqe->ext_bd_len_list[0], cqe->ext_bd_len_list[1],
cqe->ext_bd_len_list[2], cqe->ext_bd_len_list[3],
- cqe->ext_bd_len_list[4]));
+ cqe->ext_bd_len_list[4]);
if (agg_index >= ETH_TPA_MAX_AGGS_NUM) {
fp->err_rx_tpa_invalid_agg_num++;
@@ -3389,11 +3368,10 @@ qlnx_tpa_start(qlnx_host_t *ha,
bus_dmamap_sync(ha->rx_tag, sw_rx_data->map, BUS_DMASYNC_POSTREAD);
mp = sw_rx_data->data;
- QL_DPRINT7(ha, (dev, "%s[%d]: mp = %p \n ", __func__, fp->rss_id, mp));
+ QL_DPRINT7(ha, "[rss_id = %d]: mp = %p \n ", fp->rss_id, mp);
if (mp == NULL) {
- QL_DPRINT7(ha, (dev, "%s[%d]: mp = NULL\n", __func__,
- fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: mp = NULL\n", fp->rss_id);
fp->err_rx_mp_null++;
rxq->sw_rx_cons = (rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1);
@@ -3402,10 +3380,9 @@ qlnx_tpa_start(qlnx_host_t *ha,
if ((le16toh(cqe->pars_flags.flags)) & CQE_FLAGS_ERR) {
- QL_DPRINT7(ha, (dev, "%s[%d]: CQE in CONS = %u has error,"
- " flags = %x, dropping incoming packet\n", __func__,
- fp->rss_id, rxq->sw_rx_cons,
- le16toh(cqe->pars_flags.flags)));
+ QL_DPRINT7(ha, "[%d]: CQE in CONS = %u has error,"
+ " flags = %x, dropping incoming packet\n", fp->rss_id,
+ rxq->sw_rx_cons, le16toh(cqe->pars_flags.flags));
fp->err_rx_hw_errors++;
@@ -3418,9 +3395,9 @@ qlnx_tpa_start(qlnx_host_t *ha,
if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
- QL_DPRINT7(ha, (dev, "%s[%d]: New buffer allocation failed,"
+ QL_DPRINT7(ha, "[%d]: New buffer allocation failed,"
" dropping incoming packet and reusing its buffer\n",
- __func__, fp->rss_id));
+ fp->rss_id);
fp->err_rx_alloc_errors++;
QLNX_INC_IQDROPS(ifp);
@@ -3472,9 +3449,9 @@ qlnx_tpa_start(qlnx_host_t *ha,
if (rxq->tpa_info[agg_index].agg_state != QLNX_AGG_STATE_NONE) {
- QL_DPRINT7(ha, (dev, "%s[%d]: invalid aggregation state,"
+ QL_DPRINT7(ha, "[%d]: invalid aggregation state,"
" dropping incoming packet and reusing its buffer\n",
- __func__, fp->rss_id));
+ fp->rss_id);
QLNX_INC_IQDROPS(ifp);
@@ -3511,7 +3488,7 @@ qlnx_tpa_start(qlnx_host_t *ha,
for (i = 0; i < ETH_TPA_CQE_START_LEN_LIST_SIZE; i++) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 4\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 4\n ", fp->rss_id);
if (cqe->ext_bd_len_list[i] == 0)
break;
@@ -3523,8 +3500,7 @@ qlnx_tpa_start(qlnx_host_t *ha,
mpc = sw_rx_data->data;
if (mpc == NULL) {
- QL_DPRINT7(ha, (ha->pci_dev, "%s[%d]: mpc = NULL\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: mpc = NULL\n", fp->rss_id);
fp->err_rx_mp_null++;
if (mpf != NULL)
m_freem(mpf);
@@ -3538,10 +3514,9 @@ qlnx_tpa_start(qlnx_host_t *ha,
}
if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
- QL_DPRINT7(ha, (dev,
- "%s[%d]: New buffer allocation failed, dropping"
- " incoming packet and reusing its buffer\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: New buffer allocation failed,"
+ " dropping incoming packet and reusing its"
+ " buffer\n", fp->rss_id);
qlnx_reuse_rx_data(rxq);
@@ -3579,9 +3554,9 @@ qlnx_tpa_start(qlnx_host_t *ha,
if (rxq->tpa_info[agg_index].agg_state != QLNX_AGG_STATE_NONE) {
- QL_DPRINT7(ha, (dev, "%s[%d]: invalid aggregation state,"
- " dropping incoming packet and reusing its buffer\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: invalid aggregation state, dropping"
+ " incoming packet and reusing its buffer\n",
+ fp->rss_id);
QLNX_INC_IQDROPS(ifp);
@@ -3661,10 +3636,9 @@ qlnx_tpa_start(qlnx_host_t *ha,
rxq->tpa_info[agg_index].agg_state = QLNX_AGG_STATE_START;
- QL_DPRINT7(ha, (dev, "%s[%d]: 5\n" "\tagg_state = %d\n"
- "\t mpf = %p mpl = %p\n", __func__, fp->rss_id,
- rxq->tpa_info[agg_index].agg_state,
- rxq->tpa_info[agg_index].mpf, rxq->tpa_info[agg_index].mpl));
+ QL_DPRINT7(ha, "[%d]: 5\n\tagg_state = %d\n\t mpf = %p mpl = %p\n",
+ fp->rss_id, rxq->tpa_info[agg_index].agg_state,
+ rxq->tpa_info[agg_index].mpf, rxq->tpa_info[agg_index].mpl);
return;
}
@@ -3683,23 +3657,23 @@ qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp,
dev = ha->pci_dev;
- QL_DPRINT7(ha, (dev, "%s[%d]: enter\n "
- "\t type = 0x%x\n"
- "\t tpa_agg_index = 0x%x\n"
- "\t len_list[0] = 0x%x\n"
- "\t len_list[1] = 0x%x\n"
- "\t len_list[2] = 0x%x\n"
- "\t len_list[3] = 0x%x\n"
- "\t len_list[4] = 0x%x\n"
- "\t len_list[5] = 0x%x\n",
- __func__, fp->rss_id, cqe->type, cqe->tpa_agg_index,
+ QL_DPRINT7(ha, "[%d]: enter\n \
+ \t type = 0x%x\n \
+ \t tpa_agg_index = 0x%x\n \
+ \t len_list[0] = 0x%x\n \
+ \t len_list[1] = 0x%x\n \
+ \t len_list[2] = 0x%x\n \
+ \t len_list[3] = 0x%x\n \
+ \t len_list[4] = 0x%x\n \
+ \t len_list[5] = 0x%x\n",
+ fp->rss_id, cqe->type, cqe->tpa_agg_index,
cqe->len_list[0], cqe->len_list[1], cqe->len_list[2],
- cqe->len_list[3], cqe->len_list[4], cqe->len_list[5]));
+ cqe->len_list[3], cqe->len_list[4], cqe->len_list[5]);
agg_index = cqe->tpa_agg_index;
if (agg_index >= ETH_TPA_MAX_AGGS_NUM) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 0\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 0\n ", fp->rss_id);
fp->err_rx_tpa_invalid_agg_num++;
return;
}
@@ -3707,7 +3681,7 @@ qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp,
for (i = 0; i < ETH_TPA_CQE_CONT_LEN_LIST_SIZE; i++) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 1\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 1\n ", fp->rss_id);
if (cqe->len_list[i] == 0)
break;
@@ -3726,8 +3700,7 @@ qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp,
if (mpc == NULL) {
- QL_DPRINT7(ha, (dev, "%s[%d]: mpc = NULL\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: mpc = NULL\n", fp->rss_id);
fp->err_rx_mp_null++;
if (mpf != NULL)
@@ -3743,10 +3716,9 @@ qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp,
if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
- QL_DPRINT7(ha, (dev,
- "%s[%d]: New buffer allocation failed, dropping"
- " incoming packet and reusing its buffer\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: New buffer allocation failed,"
+ " dropping incoming packet and reusing its"
+ " buffer\n", fp->rss_id);
qlnx_reuse_rx_data(rxq);
@@ -3782,8 +3754,8 @@ qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp,
(rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1);
}
- QL_DPRINT7(ha, (dev, "%s[%d]: 2\n" "\tmpf = %p mpl = %p\n",
- __func__, fp->rss_id, mpf, mpl));
+ QL_DPRINT7(ha, "[%d]: 2\n" "\tmpf = %p mpl = %p\n",
+ fp->rss_id, mpf, mpl);
if (mpf != NULL) {
mp = rxq->tpa_info[agg_index].mpl;
@@ -3811,29 +3783,29 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
dev = ha->pci_dev;
- QL_DPRINT7(ha, (dev, "%s[%d]: enter\n "
- "\t type = 0x%x\n"
- "\t tpa_agg_index = 0x%x\n"
- "\t total_packet_len = 0x%x\n"
- "\t num_of_bds = 0x%x\n"
- "\t end_reason = 0x%x\n"
- "\t num_of_coalesced_segs = 0x%x\n"
- "\t ts_delta = 0x%x\n"
- "\t len_list[0] = 0x%x\n"
- "\t len_list[1] = 0x%x\n"
- "\t len_list[2] = 0x%x\n"
- "\t len_list[3] = 0x%x\n",
- __func__, fp->rss_id, cqe->type, cqe->tpa_agg_index,
+ QL_DPRINT7(ha, "[%d]: enter\n \
+ \t type = 0x%x\n \
+ \t tpa_agg_index = 0x%x\n \
+ \t total_packet_len = 0x%x\n \
+ \t num_of_bds = 0x%x\n \
+ \t end_reason = 0x%x\n \
+ \t num_of_coalesced_segs = 0x%x\n \
+ \t ts_delta = 0x%x\n \
+ \t len_list[0] = 0x%x\n \
+ \t len_list[1] = 0x%x\n \
+ \t len_list[2] = 0x%x\n \
+ \t len_list[3] = 0x%x\n",
+ fp->rss_id, cqe->type, cqe->tpa_agg_index,
cqe->total_packet_len, cqe->num_of_bds,
cqe->end_reason, cqe->num_of_coalesced_segs, cqe->ts_delta,
cqe->len_list[0], cqe->len_list[1], cqe->len_list[2],
- cqe->len_list[3]));
+ cqe->len_list[3]);
agg_index = cqe->tpa_agg_index;
if (agg_index >= ETH_TPA_MAX_AGGS_NUM) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 0\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 0\n ", fp->rss_id);
fp->err_rx_tpa_invalid_agg_num++;
return (0);
@@ -3842,7 +3814,7 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
for (i = 0; i < ETH_TPA_CQE_END_LEN_LIST_SIZE; i++) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 1\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 1\n ", fp->rss_id);
if (cqe->len_list[i] == 0)
break;
@@ -3850,8 +3822,7 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
if (rxq->tpa_info[agg_index].agg_state !=
QLNX_AGG_STATE_START) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 2\n ", __func__,
- fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 2\n ", fp->rss_id);
qlnx_reuse_rx_data(rxq);
continue;
@@ -3865,8 +3836,7 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
if (mpc == NULL) {
- QL_DPRINT7(ha, (dev, "%s[%d]: mpc = NULL\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: mpc = NULL\n", fp->rss_id);
fp->err_rx_mp_null++;
if (mpf != NULL)
@@ -3881,10 +3851,9 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
}
if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
- QL_DPRINT7(ha, (dev,
- "%s[%d]: New buffer allocation failed, dropping"
- " incoming packet and reusing its buffer\n",
- __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: New buffer allocation failed,"
+ " dropping incoming packet and reusing its"
+ " buffer\n", fp->rss_id);
qlnx_reuse_rx_data(rxq);
@@ -3920,11 +3889,11 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
(rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1);
}
- QL_DPRINT7(ha, (dev, "%s[%d]: 5\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 5\n ", fp->rss_id);
if (mpf != NULL) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 6\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 6\n ", fp->rss_id);
mp = rxq->tpa_info[agg_index].mpl;
mp->m_len = ha->rx_buf_size;
@@ -3933,7 +3902,7 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
if (rxq->tpa_info[agg_index].agg_state != QLNX_AGG_STATE_START) {
- QL_DPRINT7(ha, (dev, "%s[%d]: 7\n ", __func__, fp->rss_id));
+ QL_DPRINT7(ha, "[%d]: 7\n ", fp->rss_id);
if (rxq->tpa_info[agg_index].mpf != NULL)
m_freem(rxq->tpa_info[agg_index].mpf);
@@ -3966,10 +3935,10 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp,
QLNX_INC_IPACKETS(ifp);
QLNX_INC_IBYTES(ifp, (cqe->total_packet_len));
- QL_DPRINT7(ha, (dev, "%s[%d]: 8 csum_data = 0x%x csum_flags = 0x%lx\n "
- "m_len = 0x%x m_pkthdr_len = 0x%x\n",
- __func__, fp->rss_id, mp->m_pkthdr.csum_data,
- mp->m_pkthdr.csum_flags, mp->m_len, mp->m_pkthdr.len));
+ QL_DPRINT7(ha, "[%d]: 8 csum_data = 0x%x csum_flags = 0x%lx\n \
+ m_len = 0x%x m_pkthdr_len = 0x%x\n",
+ fp->rss_id, mp->m_pkthdr.csum_data,
+ mp->m_pkthdr.csum_flags, mp->m_len, mp->m_pkthdr.len);
(*ifp->if_input)(ifp, mp);
@@ -4027,7 +3996,7 @@ qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
cqe_type = cqe->fast_path_regular.type;
if (cqe_type == ETH_RX_CQE_TYPE_SLOW_PATH) {
- QL_DPRINT3(ha, (ha->pci_dev, "Got a slowath CQE\n"));
+ QL_DPRINT3(ha, "Got a slowath CQE\n");
ecore_eth_cqe_completion(p_hwfn,
(struct eth_slow_path_rx_cqe *)cqe);
@@ -4068,8 +4037,7 @@ qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
mp = sw_rx_data->data;
if (mp == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n",
- __func__));
+ QL_DPRINT1(ha, "mp = NULL\n");
fp->err_rx_mp_null++;
rxq->sw_rx_cons =
(rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1);
@@ -4083,12 +4051,11 @@ qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
len = le16toh(fp_cqe->pkt_len);
pad = fp_cqe->placement_offset;
- QL_DPRINT3(ha,
- (ha->pci_dev, "CQE type = %x, flags = %x, vlan = %x,"
+ QL_DPRINT3(ha, "CQE type = %x, flags = %x, vlan = %x,"
" len %u, parsing flags = %d pad = %d\n",
cqe_type, fp_cqe->bitfields,
le16toh(fp_cqe->vlan_tag),
- len, le16toh(fp_cqe->pars_flags.flags), pad));
+ len, le16toh(fp_cqe->pars_flags.flags), pad);
data = mtod(mp, uint8_t *);
data = data + pad;
@@ -4106,11 +4073,9 @@ qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
if ((le16toh(cqe->fast_path_regular.pars_flags.flags)) &
CQE_FLAGS_ERR) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "CQE in CONS = %u has error, flags = %x,"
+ QL_DPRINT1(ha, "CQE in CONS = %u has error, flags = %x,"
" dropping incoming packet\n", sw_comp_cons,
- le16toh(cqe->fast_path_regular.pars_flags.flags)));
-
+ le16toh(cqe->fast_path_regular.pars_flags.flags));
fp->err_rx_hw_errors++;
qlnx_reuse_rx_data(rxq);
@@ -4122,10 +4087,8 @@ qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
if (qlnx_alloc_rx_buffer(ha, rxq) != 0) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "New buffer allocation failed, dropping"
- " incoming packet and reusing its buffer\n"));
-
+ QL_DPRINT1(ha, "New buffer allocation failed, dropping"
+ " incoming packet and reusing its buffer\n");
qlnx_reuse_rx_data(rxq);
fp->err_rx_alloc_errors++;
@@ -4141,10 +4104,8 @@ qlnx_rx_int(qlnx_host_t *ha, struct qlnx_fastpath *fp, int budget,
m_adj(mp, pad);
mp->m_pkthdr.len = len;
- QL_DPRINT1(ha,
- (ha->pci_dev, "%s: len = %d len_on_first_bd = %d\n",
- __func__, len, len_on_first_bd));
-
+ QL_DPRINT1(ha, "len = %d len_on_first_bd = %d\n",
+ len, len_on_first_bd);
if ((len > 60 ) && (len > len_on_first_bd)) {
mp->m_len = len_on_first_bd;
@@ -4295,16 +4256,13 @@ qlnx_fp_isr(void *arg)
idx = ivec->rss_idx;
if ((idx = ivec->rss_idx) >= ha->num_rss) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: illegal interrupt[%d]\n",
- __func__, idx));
+ QL_DPRINT1(ha, "illegal interrupt[%d]\n", idx);
ha->err_illegal_intr++;
return;
}
fp = &ha->fp_array[idx];
if (fp == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: fp_array[%d] NULL\n",
- __func__, idx));
ha->err_fp_null++;
} else {
ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0);
@@ -4332,11 +4290,11 @@ qlnx_sp_isr(void *arg)
ha->sp_interrupts++;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
ecore_int_sp_dpc(p_hwfn);
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -4384,8 +4342,7 @@ qlnx_alloc_dmabuf(qlnx_host_t *ha, qlnx_dma_t *dma_buf)
&dma_buf->dma_tag);
if (ret) {
- QL_DPRINT1(ha,
- (dev, "%s: could not create dma tag\n", __func__));
+ QL_DPRINT1(ha, "could not create dma tag\n");
goto qlnx_alloc_dmabuf_exit;
}
ret = bus_dmamem_alloc(dma_buf->dma_tag,
@@ -4394,8 +4351,7 @@ qlnx_alloc_dmabuf(qlnx_host_t *ha, qlnx_dma_t *dma_buf)
&dma_buf->dma_map);
if (ret) {
bus_dma_tag_destroy(dma_buf->dma_tag);
- QL_DPRINT1(ha,
- (dev, "%s: bus_dmamem_alloc failed\n", __func__));
+ QL_DPRINT1(ha, "bus_dmamem_alloc failed\n");
goto qlnx_alloc_dmabuf_exit;
}
@@ -4457,11 +4413,11 @@ qlnx_dma_alloc_coherent(void *ecore_dev, bus_addr_t *phys, uint32_t size)
dma_p = (qlnx_dma_t *)((uint8_t *)dma_buf.dma_b + size);
memcpy(dma_p, &dma_buf, sizeof(qlnx_dma_t));
-
- QL_DPRINT5(ha, (dev, "%s: [%p %p %p %p 0x%08x ]\n", __func__,
+/*
+ QL_DPRINT5(ha, "[%p %p %p %p 0x%08x ]\n",
(void *)dma_buf.dma_map, (void *)dma_buf.dma_tag,
- dma_buf.dma_b, (void *)dma_buf.dma_addr, size));
-
+ dma_buf.dma_b, (void *)dma_buf.dma_addr, size);
+*/
return (dma_buf.dma_b);
}
@@ -4482,11 +4438,11 @@ qlnx_dma_free_coherent(void *ecore_dev, void *v_addr, bus_addr_t phys,
size = (size + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
dma_p = (qlnx_dma_t *)((uint8_t *)v_addr + size);
-
- QL_DPRINT5(ha, (dev, "%s: [%p %p %p %p 0x%08x ]\n", __func__,
+/*
+ QL_DPRINT5(ha, "[%p %p %p %p 0x%08x ]\n",
(void *)dma_p->dma_map, (void *)dma_p->dma_tag,
- dma_p->dma_b, (void *)dma_p->dma_addr, size));
-
+ dma_p->dma_b, (void *)dma_p->dma_addr, size);
+*/
dma_buf = *dma_p;
qlnx_free_dmabuf((qlnx_host_t *)ecore_dev, &dma_buf);
@@ -4518,8 +4474,7 @@ qlnx_alloc_parent_dma_tag(qlnx_host_t *ha)
&ha->parent_tag);
if (ret) {
- QL_DPRINT1(ha, (dev, "%s: could not create parent dma tag\n",
- __func__));
+ QL_DPRINT1(ha, "could not create parent dma tag\n");
return (-1);
}
@@ -4554,8 +4509,7 @@ qlnx_alloc_tx_dma_tag(qlnx_host_t *ha)
NULL, /* lockfuncarg */
&ha->tx_tag)) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: tx_tag alloc failed\n",
- __func__));
+ QL_DPRINT1(ha, "tx_tag alloc failed\n");
return (-1);
}
@@ -4588,8 +4542,7 @@ qlnx_alloc_rx_dma_tag(qlnx_host_t *ha)
NULL, /* lockfuncarg */
&ha->rx_tag)) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: rx_tag alloc failed\n",
- __func__));
+ QL_DPRINT1(ha, " rx_tag alloc failed\n");
return (-1);
}
@@ -4679,15 +4632,15 @@ qlnx_pci_write_config_dword(void *ecore_dev, uint32_t pci_reg,
int
qlnx_pci_find_capability(void *ecore_dev, int cap)
{
- int reg;
+ int reg;
+ qlnx_host_t *ha;
+
+ ha = ecore_dev;
- if (pci_find_cap(((qlnx_host_t *)ecore_dev)->pci_dev, PCIY_EXPRESS,
- &reg) == 0)
+ if (pci_find_cap(ha->pci_dev, PCIY_EXPRESS, &reg) == 0)
return reg;
else {
- QL_DPRINT1(((qlnx_host_t *)ecore_dev),
- (((qlnx_host_t *)ecore_dev)->pci_dev,
- "%s: failed\n", __func__));
+ QL_DPRINT1(ha, "failed\n");
return 0;
}
}
@@ -5074,13 +5027,14 @@ qlnx_get_protocol_stats(void *cdev, int proto_type, void *proto_stats)
enum ecore_mcp_protocol_type type;
union ecore_mcp_protocol_stats *stats;
struct ecore_eth_stats eth_stats;
- device_t dev;
+ qlnx_host_t *ha;
- dev = ((qlnx_host_t *)cdev)->pci_dev;
+ ha = cdev;
stats = proto_stats;
type = proto_type;
switch (type) {
+
case ECORE_MCP_LAN_STATS:
ecore_get_vport_stats((struct ecore_dev *)cdev, &eth_stats);
stats->lan_stats.ucast_rx_pkts = eth_stats.common.rx_ucast_pkts;
@@ -5089,11 +5043,9 @@ qlnx_get_protocol_stats(void *cdev, int proto_type, void *proto_stats)
break;
default:
- ((qlnx_host_t *)cdev)->err_get_proto_invalid_type++;
+ ha->err_get_proto_invalid_type++;
- QL_DPRINT1(((qlnx_host_t *)cdev),
- (dev, "%s: invalid protocol type 0x%x\n", __func__,
- type));
+ QL_DPRINT1(ha, "invalid protocol type 0x%x\n", type);
break;
}
return;
@@ -5109,8 +5061,7 @@ qlnx_get_mfw_version(qlnx_host_t *ha, uint32_t *mfw_ver)
p_ptt = ecore_ptt_acquire(p_hwfn);
if (p_ptt == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s : ecore_ptt_acquire failed\n", __func__));
+ QL_DPRINT1(ha, "ecore_ptt_acquire failed\n");
return (-1);
}
ecore_mcp_get_mfw_ver(p_hwfn, p_ptt, mfw_ver, NULL);
@@ -5130,8 +5081,7 @@ qlnx_get_flash_size(qlnx_host_t *ha, uint32_t *flash_size)
p_ptt = ecore_ptt_acquire(p_hwfn);
if (p_ptt == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s : ecore_ptt_acquire failed\n", __func__));
+ QL_DPRINT1(ha,"ecore_ptt_acquire failed\n");
return (-1);
}
ecore_mcp_get_flash_size(p_hwfn, p_ptt, flash_size);
@@ -5234,11 +5184,11 @@ qlnx_sb_init(struct ecore_dev *cdev, struct ecore_sb_info *sb_info,
p_hwfn = &cdev->hwfns[hwfn_index];
rel_sb_id = sb_id / cdev->num_hwfns;
- QL_DPRINT2(((qlnx_host_t *)cdev), (((qlnx_host_t *)cdev)->pci_dev,
- "%s: hwfn_index = %d p_hwfn = %p sb_id = 0x%x rel_sb_id = 0x%x "
- "sb_info = %p sb_virt_addr = %p sb_phy_addr = %p\n",
- __func__, hwfn_index, p_hwfn, sb_id, rel_sb_id, sb_info,
- sb_virt_addr, (void *)sb_phy_addr));
+ QL_DPRINT2(((qlnx_host_t *)cdev),
+ "hwfn_index = %d p_hwfn = %p sb_id = 0x%x rel_sb_id = 0x%x \
+ sb_info = %p sb_virt_addr = %p sb_phy_addr = %p\n",
+ hwfn_index, p_hwfn, sb_id, rel_sb_id, sb_info,
+ sb_virt_addr, (void *)sb_phy_addr);
rc = ecore_int_sb_init(p_hwfn, p_hwfn->p_main_ptt, sb_info,
sb_virt_addr, sb_phy_addr, rel_sb_id);
@@ -5262,14 +5212,12 @@ qlnx_alloc_mem_sb(qlnx_host_t *ha, struct ecore_sb_info *sb_info, u16 sb_id)
sb_virt = OSAL_DMA_ALLOC_COHERENT(cdev, (&sb_phys), size);
if (!sb_virt) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Status block allocation failed\n", __func__));
+ QL_DPRINT1(ha, "Status block allocation failed\n");
return -ENOMEM;
}
rc = qlnx_sb_init(cdev, sb_info, sb_virt, sb_phys, sb_id);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: failed\n", __func__));
OSAL_DMA_FREE_COHERENT(cdev, sb_virt, sb_phys, size);
}
@@ -5365,8 +5313,7 @@ qlnx_alloc_rx_buffer(qlnx_host_t *ha, struct qlnx_rx_queue *rxq)
mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rx_buf_size);
if (mp == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s : Failed to allocate Rx data\n", __func__));
+ QL_DPRINT1(ha, "Failed to allocate Rx data\n");
return -ENOMEM;
}
@@ -5380,10 +5327,8 @@ qlnx_alloc_rx_buffer(qlnx_host_t *ha, struct qlnx_rx_queue *rxq)
if (ret || !dma_addr || (nsegs != 1)) {
m_freem(mp);
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: bus_dmamap_load failed[%d, 0x%016llx, %d]\n",
- __func__, ret, (long long unsigned int)dma_addr,
- nsegs));
+ QL_DPRINT1(ha, "bus_dmamap_load failed[%d, 0x%016llx, %d]\n",
+ ret, (long long unsigned int)dma_addr, nsegs);
return -ENOMEM;
}
@@ -5418,8 +5363,7 @@ qlnx_alloc_tpa_mbuf(qlnx_host_t *ha, uint16_t rx_buf_size,
mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rx_buf_size);
if (mp == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s : Failed to allocate Rx data\n", __func__));
+ QL_DPRINT1(ha, "Failed to allocate Rx data\n");
return -ENOMEM;
}
@@ -5433,10 +5377,8 @@ qlnx_alloc_tpa_mbuf(qlnx_host_t *ha, uint16_t rx_buf_size,
if (ret || !dma_addr || (nsegs != 1)) {
m_freem(mp);
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: bus_dmamap_load failed[%d, 0x%016llx, %d]\n",
- __func__, ret, (long long unsigned int)dma_addr,
- nsegs));
+ QL_DPRINT1(ha, "bus_dmamap_load failed[%d, 0x%016llx, %d]\n",
+ ret, (long long unsigned int)dma_addr, nsegs);
return -ENOMEM;
}
@@ -5533,13 +5475,11 @@ qlnx_alloc_mem_rxq(qlnx_host_t *ha, struct qlnx_rx_queue *rxq)
}
num_allocated = i;
if (!num_allocated) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Rx buffers allocation failed\n", __func__));
+ QL_DPRINT1(ha, "Rx buffers allocation failed\n");
goto err;
} else if (num_allocated < rxq->num_rx_buffers) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Allocated less buffers than"
- " desired (%d allocated)\n", __func__, num_allocated));
+ QL_DPRINT1(ha, "Allocated less buffers than"
+ " desired (%d allocated)\n", num_allocated);
}
#ifdef QLNX_SOFT_LRO
@@ -5551,16 +5491,14 @@ qlnx_alloc_mem_rxq(qlnx_host_t *ha, struct qlnx_rx_queue *rxq)
#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO)
if (tcp_lro_init_args(lro, ifp, 0, rxq->num_rx_buffers)) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: tcp_lro_init[%d] failed\n",
- __func__, rxq->rxq_id));
+ QL_DPRINT1(ha, "tcp_lro_init[%d] failed\n",
+ rxq->rxq_id);
goto err;
}
#else
if (tcp_lro_init(lro)) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: tcp_lro_init[%d] failed\n",
- __func__, rxq->rxq_id));
+ QL_DPRINT1(ha, "tcp_lro_init[%d] failed\n",
+ rxq->rxq_id);
goto err;
}
#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */
@@ -5684,9 +5622,9 @@ qlnx_alloc_tx_br(qlnx_host_t *ha, struct qlnx_fastpath *fp)
fp->tx_br = buf_ring_alloc(TX_RING_SIZE, M_DEVBUF,
M_NOWAIT, &fp->tx_mtx);
if (fp->tx_br == NULL) {
- QL_DPRINT1(ha, (ha->pci_dev, "buf_ring_alloc failed for "
- " fp[%d, %d]\n", ha->dev_unit, fp->rss_id));
- return -ENOMEM;
+ QL_DPRINT1(ha, "buf_ring_alloc failed for fp[%d, %d]\n",
+ ha->dev_unit, fp->rss_id);
+ return -ENOMEM;
}
return 0;
}
@@ -5793,7 +5731,7 @@ qlnx_start_vport(struct ecore_dev *cdev,
vport_start_params.mtu = mtu;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: setting mtu to %d\n", __func__, mtu));
+ QL_DPRINT2(ha, "Setting mtu to %d and VPORT ID = %d\n", mtu, vport_id);
for_each_hwfn(cdev, i) {
struct ecore_hwfn *p_hwfn = &cdev->hwfns[i];
@@ -5804,17 +5742,15 @@ qlnx_start_vport(struct ecore_dev *cdev,
rc = ecore_sp_vport_start(p_hwfn, &vport_start_params);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Failed to start VPORT V-PORT %d "
- "with MTU %d\n", __func__, vport_id, mtu));
+ QL_DPRINT1(ha, "Failed to start VPORT V-PORT %d"
+ " with MTU %d\n" , vport_id, mtu);
return -ENOMEM;
}
ecore_hw_start_fastpath(p_hwfn);
- QL_DPRINT2(ha, (ha->pci_dev,
- "%s: Started V-PORT %d with MTU %d\n",
- __func__, vport_id, mtu));
+ QL_DPRINT2(ha, "Started V-PORT %d with MTU %d\n",
+ vport_id, mtu);
}
return 0;
}
@@ -5852,8 +5788,10 @@ qlnx_update_vport(struct ecore_dev *cdev,
/* RSS - is a bit tricky, since upper-layer isn't familiar with hwfns.
* We need to re-fix the rss values per engine for CMT.
*/
-
+ if (params->rss_params->update_rss_config)
sp_params.rss_params = params->rss_params;
+ else
+ sp_params.rss_params = NULL;
for_each_hwfn(cdev, i) {
@@ -5875,8 +5813,7 @@ qlnx_update_vport(struct ecore_dev *cdev,
}
for (j = 0; j < ECORE_RSS_IND_TABLE_SIZE;) {
- QL_DPRINT3(ha, (ha->pci_dev,
- "%p %p %p %p %p %p %p %p \n",
+ QL_DPRINT3(ha, "%p %p %p %p %p %p %p %p \n",
rss->rss_ind_table[j],
rss->rss_ind_table[j+1],
rss->rss_ind_table[j+2],
@@ -5884,28 +5821,28 @@ qlnx_update_vport(struct ecore_dev *cdev,
rss->rss_ind_table[j+4],
rss->rss_ind_table[j+5],
rss->rss_ind_table[j+6],
- rss->rss_ind_table[j+7]));
+ rss->rss_ind_table[j+7]);
j += 8;
}
}
sp_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
+
+ QL_DPRINT1(ha, "Update sp vport ID=%d\n", params->vport_id);
+
rc = ecore_sp_vport_update(p_hwfn, &sp_params,
ECORE_SPQ_MODE_EBLOCK, NULL);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s:Failed to update VPORT\n", __func__));
+ QL_DPRINT1(ha, "Failed to update VPORT\n");
return rc;
}
- QL_DPRINT2(ha, (ha->pci_dev,
- "%s: Updated V-PORT %d: tx_active_flag %d,"
- "rx_active_flag %d [tx_update %d], [rx_update %d]\n",
- __func__,
+ QL_DPRINT2(ha, "Updated V-PORT %d: tx_active_flag %d, \
+ rx_active_flag %d [tx_update %d], [rx_update %d]\n",
params->vport_id, params->vport_active_tx_flg,
params->vport_active_rx_flg,
params->update_vport_active_tx_flg,
- params->update_vport_active_rx_flg));
+ params->update_vport_active_rx_flg);
}
return 0;
@@ -5999,10 +5936,11 @@ qlnx_start_queues(qlnx_host_t *ha)
ifp = ha->ifp;
+ QL_DPRINT1(ha, "Num RSS = %d\n", ha->num_rss);
+
if (!ha->num_rss) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Cannot update V-VPORT as active as there"
- " are no Rx queues\n", __func__));
+ QL_DPRINT1(ha, "Cannot update V-VPORT as active as there"
+ " are no Rx queues\n");
return -EINVAL;
}
@@ -6014,15 +5952,13 @@ qlnx_start_queues(qlnx_host_t *ha)
vlan_removal_en, tx_switching, hw_lro_enable);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Start V-PORT failed %d\n", __func__, rc));
+ QL_DPRINT1(ha, "Start V-PORT failed %d\n", rc);
return rc;
}
- QL_DPRINT2(ha, (ha->pci_dev,
- "%s: Start vport ramrod passed,"
- " vport_id = %d, MTU = %d, vlan_removal_en = %d\n", __func__,
- vport_id, (int)(ifp->if_mtu + 0xe), vlan_removal_en));
+ QL_DPRINT2(ha, "Start vport ramrod passed, "
+ "vport_id = %d, MTU = %d, vlan_removal_en = %d\n",
+ vport_id, (int)(ifp->if_mtu + 0xe), vlan_removal_en);
for_each_rss(i) {
struct ecore_rxq_start_ret_params rx_ret_params;
@@ -6055,9 +5991,7 @@ qlnx_start_queues(qlnx_host_t *ha)
&rx_ret_params);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Start RXQ #%d failed %d\n", __func__,
- i, rc));
+ QL_DPRINT1(ha, "Start RXQ #%d failed %d\n", i, rc);
return rc;
}
@@ -6091,9 +6025,8 @@ qlnx_start_queues(qlnx_host_t *ha)
&tx_ret_params);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Start TXQ #%d failed %d\n",
- __func__, txq->index, rc));
+ QL_DPRINT1(ha, "Start TXQ #%d failed %d\n",
+ txq->index, rc);
return rc;
}
@@ -6173,8 +6106,7 @@ qlnx_start_queues(qlnx_host_t *ha)
rc = qlnx_update_vport(cdev, &vport_update_params);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Update V-PORT failed %d\n", __func__, rc));
+ QL_DPRINT1(ha, "Update V-PORT failed %d\n", rc);
return rc;
}
@@ -6188,7 +6120,7 @@ qlnx_drain_txq(qlnx_host_t *ha, struct qlnx_fastpath *fp,
uint16_t hw_bd_cons;
uint16_t ecore_cons_idx;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
hw_bd_cons = le16toh(*txq->hw_cons_ptr);
@@ -6206,8 +6138,7 @@ qlnx_drain_txq(qlnx_host_t *ha, struct qlnx_fastpath *fp,
hw_bd_cons = le16toh(*txq->hw_cons_ptr);
}
- QL_DPRINT2(ha, (ha->pci_dev, "%s[%d, %d]: done\n", __func__,
- fp->rss_id, txq->index));
+ QL_DPRINT2(ha, "[%d, %d]: done\n", fp->rss_id, txq->index);
return 0;
}
@@ -6237,10 +6168,11 @@ qlnx_stop_queues(qlnx_host_t *ha)
vport_update_params.update_inner_vlan_removal_flg = 0;
vport_update_params.inner_vlan_removal_flg = 0;
+ QL_DPRINT1(ha, "Update vport ID= %d\n", vport_update_params.vport_id);
+
rc = qlnx_update_vport(cdev, &vport_update_params);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s:Failed to update vport\n",
- __func__));
+ QL_DPRINT1(ha, "Failed to update vport\n");
return rc;
}
@@ -6273,9 +6205,8 @@ qlnx_stop_queues(qlnx_host_t *ha)
fp->txq[tc]->handle);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Failed to stop TXQ #%d\n",
- __func__, tx_queue_id));
+ QL_DPRINT1(ha, "Failed to stop TXQ #%d\n",
+ tx_queue_id);
return rc;
}
}
@@ -6284,8 +6215,7 @@ qlnx_stop_queues(qlnx_host_t *ha)
rc = ecore_eth_rx_queue_stop(p_hwfn, fp->rxq->handle, false,
false);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Failed to stop RXQ #%d\n", __func__, i));
+ QL_DPRINT1(ha, "Failed to stop RXQ #%d\n", i);
return rc;
}
}
@@ -6298,8 +6228,7 @@ qlnx_stop_queues(qlnx_host_t *ha)
rc = ecore_sp_vport_stop(p_hwfn, p_hwfn->hw_info.opaque_fid, 0);
if (rc) {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s: Failed to stop VPORT\n", __func__));
+ QL_DPRINT1(ha, "Failed to stop VPORT\n");
return rc;
}
}
@@ -6578,7 +6507,7 @@ qlnx_load(qlnx_host_t *ha)
cdev = &ha->cdev;
dev = ha->pci_dev;
- QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
rc = qlnx_alloc_mem_arrays(ha);
if (rc)
@@ -6590,8 +6519,8 @@ qlnx_load(qlnx_host_t *ha)
if (rc)
goto qlnx_load_exit1;
- QL_DPRINT2(ha, (dev, "%s: Allocated %d RSS queues on %d TC/s\n",
- __func__, ha->num_rss, ha->num_tc));
+ QL_DPRINT2(ha, "Allocated %d RSS queues on %d TC/s\n",
+ ha->num_rss, ha->num_tc);
for (i = 0; i < ha->num_rss; i++) {
@@ -6600,15 +6529,14 @@ qlnx_load(qlnx_host_t *ha)
NULL, qlnx_fp_isr, &ha->irq_vec[i],
&ha->irq_vec[i].handle))) {
- QL_DPRINT1(ha, (dev, "could not setup interrupt\n"));
-
+ QL_DPRINT1(ha, "could not setup interrupt\n");
goto qlnx_load_exit2;
}
- QL_DPRINT2(ha, (dev, "%s: rss_id = %d irq_rid %d"
- " irq %p handle %p\n", __func__, i,
+ QL_DPRINT2(ha, "rss_id = %d irq_rid %d \
+ irq %p handle %p\n", i,
ha->irq_vec[i].irq_rid,
- ha->irq_vec[i].irq, ha->irq_vec[i].handle));
+ ha->irq_vec[i].irq, ha->irq_vec[i].handle);
bus_bind_intr(dev, ha->irq_vec[i].irq, (i % mp_ncpus));
}
@@ -6617,8 +6545,7 @@ qlnx_load(qlnx_host_t *ha)
if (rc)
goto qlnx_load_exit2;
- QL_DPRINT2(ha, (dev, "%s: Start VPORT, RXQ and TXQ succeeded\n",
- __func__));
+ QL_DPRINT2(ha, "Start VPORT, RXQ and TXQ succeeded\n");
/* Add primary mac and set Rx filters */
rc = qlnx_set_rx_mode(ha);
@@ -6644,7 +6571,7 @@ qlnx_load_exit1:
ha->num_rss = 0;
qlnx_load_exit0:
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit [%d]\n", __func__, rc));
+ QL_DPRINT2(ha, "exit [%d]\n", rc);
return rc;
}
@@ -6701,7 +6628,8 @@ qlnx_unload(qlnx_host_t *ha)
cdev = &ha->cdev;
dev = ha->pci_dev;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
+ QL_DPRINT2(ha, "enter\n");
+ QL_DPRINT1(ha, " QLNX STATE = %d\n",ha->state);
if (ha->state == QLNX_STATE_OPEN) {
@@ -6731,7 +6659,7 @@ qlnx_unload(qlnx_host_t *ha)
ha->state = QLNX_STATE_CLOSED;
- QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__));
+ QL_DPRINT2(ha, "exit\n");
return;
}
@@ -6748,8 +6676,7 @@ qlnx_grc_dumpsize(qlnx_host_t *ha, uint32_t *num_dwords, int hwfn_index)
p_ptt = ecore_ptt_acquire(p_hwfn);
if (!p_ptt) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: ecore_ptt_acquire failed\n",
- __func__));
+ QL_DPRINT1(ha, "ecore_ptt_acquire failed\n");
return (rval);
}
@@ -6758,9 +6685,8 @@ qlnx_grc_dumpsize(qlnx_host_t *ha, uint32_t *num_dwords, int hwfn_index)
if (rval == DBG_STATUS_OK)
rval = 0;
else {
- QL_DPRINT1(ha, (ha->pci_dev,
- "%s : ecore_dbg_grc_get_dump_buf_size failed [0x%x]\n",
- __func__, rval));
+ QL_DPRINT1(ha, "ecore_dbg_grc_get_dump_buf_size failed"
+ "[0x%x]\n", rval);
}
ecore_ptt_release(p_hwfn, p_ptt);
@@ -6781,8 +6707,7 @@ qlnx_idle_chk_size(qlnx_host_t *ha, uint32_t *num_dwords, int hwfn_index)
p_ptt = ecore_ptt_acquire(p_hwfn);
if (!p_ptt) {
- QL_DPRINT1(ha, (ha->pci_dev, "%s: ecore_ptt_acquire failed\n",
- __func__));
+ QL_DPRINT1(ha, "ecore_ptt_acquire failed\n");
return (rval);
}
@@ -6791,9 +6716,8 @@ qlnx_idle_chk_size(qlnx_host_t *ha, uint32_t *num_dwords, int hwfn_index)
if (rval == DBG_STATUS_OK)
rval = 0;
else {
- QL_DPRINT1(ha, (ha->pci_dev, "%s : "
- "ecore_dbg_idle_chk_get_dump_buf_size failed [0x%x]\n",
- __func__, rval));
+ QL_DPRINT1(ha, "ecore_dbg_idle_chk_get_dump_buf_size failed"
+ " [0x%x]\n", rval);
}
ecore_ptt_release(p_hwfn, p_ptt);
OpenPOWER on IntegriCloud