aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qlxge
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-08 00:01:28 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-04-08 00:01:28 +0000
commit5bf982c16291be8a897a99964c3c0021b0344562 (patch)
treec46267b09de716e17a34230e5075cc08d16917bd /sys/dev/qlxge
parent9fa72d33d990aab4cb2ffd0d772a9a6596714459 (diff)
downloadsrc-5bf982c16291be8a897a99964c3c0021b0344562.tar.gz
src-5bf982c16291be8a897a99964c3c0021b0344562.zip
Diffstat (limited to 'sys/dev/qlxge')
-rw-r--r--sys/dev/qlxge/qls_dump.c3
-rw-r--r--sys/dev/qlxge/qls_hw.c15
-rw-r--r--sys/dev/qlxge/qls_ioctl.c3
-rw-r--r--sys/dev/qlxge/qls_os.c9
4 files changed, 4 insertions, 26 deletions
diff --git a/sys/dev/qlxge/qls_dump.c b/sys/dev/qlxge/qls_dump.c
index 952107e351be..ea6a7350f590 100644
--- a/sys/dev/qlxge/qls_dump.c
+++ b/sys/dev/qlxge/qls_dump.c
@@ -503,7 +503,6 @@ static void
qls_wr_ofunc_reg(qla_host_t *ha, uint32_t reg, uint32_t value)
{
uint32_t ofunc;
- int ret = 0;
ofunc = qls_get_other_fnum(ha);
@@ -512,7 +511,7 @@ qls_wr_ofunc_reg(qla_host_t *ha, uint32_t reg, uint32_t value)
reg = Q81_CTL_PROC_ADDR_REG_BLOCK | (ofunc << Q81_FUNCTION_SHIFT) | reg;
- ret = qls_wr_mpi_reg(ha, reg, value);
+ qls_wr_mpi_reg(ha, reg, value);
return;
}
diff --git a/sys/dev/qlxge/qls_hw.c b/sys/dev/qlxge/qls_hw.c
index a0a92e2f5d2a..0fda6da46ebc 100644
--- a/sys/dev/qlxge/qls_hw.c
+++ b/sys/dev/qlxge/qls_hw.c
@@ -445,9 +445,7 @@ qls_set_promisc(qla_host_t *ha)
void
qls_reset_promisc(qla_host_t *ha)
{
- int ret;
-
- ret = qls_load_route_idx_reg_locked(ha, (Q81_CTL_RI_TYPE_NICQMASK |
+ qls_load_route_idx_reg_locked(ha, (Q81_CTL_RI_TYPE_NICQMASK |
Q81_CTL_RI_IDX_PROMISCUOUS | Q81_CTL_RI_DST_DFLTQ), 0);
return;
}
@@ -467,9 +465,7 @@ qls_set_allmulti(qla_host_t *ha)
void
qls_reset_allmulti(qla_host_t *ha)
{
- int ret;
-
- ret = qls_load_route_idx_reg_locked(ha, (Q81_CTL_RI_TYPE_NICQMASK |
+ qls_load_route_idx_reg_locked(ha, (Q81_CTL_RI_TYPE_NICQMASK |
Q81_CTL_RI_IDX_ALLMULTI | Q81_CTL_RI_DST_DFLTQ), 0);
return;
}
@@ -538,11 +534,8 @@ qls_tx_tso_chksum(qla_host_t *ha, struct mbuf *mp, q81_tx_tso_t *tx_mac)
uint32_t ehdrlen, ip_hlen;
int ret = 0;
uint16_t etype;
- device_t dev;
uint8_t buf[sizeof(struct ip6_hdr)];
- dev = ha->pci_dev;
-
eh = mtod(mp, struct ether_vlan_header *);
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
@@ -2133,7 +2126,7 @@ qls_mbx_cmd(qla_host_t *ha, uint32_t *in_mbx, uint32_t i_count,
uint32_t *out_mbx, uint32_t o_count)
{
int i, ret = -1;
- uint32_t data32, mbx_cmd = 0;
+ uint32_t data32;
uint32_t count = 50;
QL_DPRINT2((ha->pci_dev, "%s: enter[0x%08x 0x%08x 0x%08x]\n",
@@ -2155,8 +2148,6 @@ qls_mbx_cmd(qla_host_t *ha, uint32_t *in_mbx, uint32_t i_count,
ha->mbx_done = 0;
- mbx_cmd = *in_mbx;
-
for (i = 0; i < i_count; i++) {
ret = qls_mbx_wr_reg(ha, i, *in_mbx);
diff --git a/sys/dev/qlxge/qls_ioctl.c b/sys/dev/qlxge/qls_ioctl.c
index 1ce380d9c5eb..d32ee5e22eb7 100644
--- a/sys/dev/qlxge/qls_ioctl.c
+++ b/sys/dev/qlxge/qls_ioctl.c
@@ -84,15 +84,12 @@ qls_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
{
qla_host_t *ha;
int rval = 0;
- device_t pci_dev;
qls_mpi_dump_t *mpi_dump;
if ((ha = (qla_host_t *)dev->si_drv1) == NULL)
return ENXIO;
- pci_dev= ha->pci_dev;
-
switch(cmd) {
case QLA_MPI_DUMP:
mpi_dump = (qls_mpi_dump_t *)data;
diff --git a/sys/dev/qlxge/qls_os.c b/sys/dev/qlxge/qls_os.c
index a45e10da492d..66216eeb7aed 100644
--- a/sys/dev/qlxge/qls_os.c
+++ b/sys/dev/qlxge/qls_os.c
@@ -485,7 +485,6 @@ static int
qls_pci_detach(device_t dev)
{
qla_host_t *ha = NULL;
- struct ifnet *ifp;
QL_DPRINT2((dev, "%s: enter\n", __func__));
@@ -494,8 +493,6 @@ qls_pci_detach(device_t dev)
return (ENOMEM);
}
- ifp = ha->ifp;
-
(void)QLA_LOCK(ha, __func__, 0);
qls_stop(ha);
QLA_UNLOCK(ha, __func__);
@@ -1207,9 +1204,6 @@ static void
qls_stop(qla_host_t *ha)
{
struct ifnet *ifp = ha->ifp;
- device_t dev;
-
- dev = ha->pci_dev;
ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING);
@@ -1372,7 +1366,6 @@ int
qls_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp)
{
struct mbuf *mp = nmp;
- struct ifnet *ifp;
int ret = 0;
uint32_t offset;
bus_dma_segment_t segs[1];
@@ -1380,8 +1373,6 @@ qls_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp)
QL_DPRINT2((ha->pci_dev, "%s: enter\n", __func__));
- ifp = ha->ifp;
-
if (mp == NULL) {
mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ha->msize);