aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cxgbe/common/t4_msg.h2
-rw-r--r--sys/dev/cxgbe/t4_main.c6
-rw-r--r--sys/dev/e1000/if_em.c2
-rw-r--r--sys/dev/irdma/icrdma.c4
-rw-r--r--sys/dev/irdma/irdma_cm.c38
-rw-r--r--sys/dev/irdma/irdma_hw.c132
-rw-r--r--sys/dev/irdma/irdma_main.h3
-rw-r--r--sys/dev/mlx5/mlx5_en/en.h2
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_main.c30
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_rx.c4
-rw-r--r--sys/dev/nvme/nvme.h16
-rw-r--r--sys/dev/nvme/nvme_ctrlr.c2
-rw-r--r--sys/dev/sound/midi/midi.c20
-rw-r--r--sys/dev/sound/pcm/channel.c20
-rw-r--r--sys/dev/sound/pcm/channel.h1
15 files changed, 154 insertions, 128 deletions
diff --git a/sys/dev/cxgbe/common/t4_msg.h b/sys/dev/cxgbe/common/t4_msg.h
index 214080964fbb..31a52dbb616e 100644
--- a/sys/dev/cxgbe/common/t4_msg.h
+++ b/sys/dev/cxgbe/common/t4_msg.h
@@ -2478,7 +2478,7 @@ struct cpl_rx_data_ack_core {
#define F_RX_DACK_CHANGE V_RX_DACK_CHANGE(1U)
struct cpl_rx_phys_addr {
- __be32 RSS[2];
+ __be32 rss[2];
__be32 op_to_tid;
__be32 pci_rlx_order_to_len;
__be64 phys_addr;
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 15b3fd94fa54..946eb84457a3 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -7194,11 +7194,10 @@ vi_full_init(struct vi_info *vi)
{
struct adapter *sc = vi->adapter;
struct sge_rxq *rxq;
- int rc, i, j;
+ int rc, i, j, extra;
int hashconfig = rss_gethashconfig();
#ifdef RSS
int nbuckets = rss_getnumbuckets();
- int extra;
#endif
ASSERT_SYNCHRONIZED_OP(sc);
@@ -7255,7 +7254,6 @@ vi_full_init(struct vi_info *vi)
vi->hashen = hashconfig_to_hashen(hashconfig);
-#ifdef RSS
/*
* We may have had to enable some hashes even though the global config
* wants them disabled. This is a potential problem that must be
@@ -7289,7 +7287,7 @@ vi_full_init(struct vi_info *vi)
CH_ALERT(vi, "UDP/IPv4 4-tuple hashing forced on.\n");
if (extra & RSS_HASHTYPE_RSS_UDP_IPV6)
CH_ALERT(vi, "UDP/IPv6 4-tuple hashing forced on.\n");
-#endif
+
rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, vi->rss[0],
0, 0);
if (rc != 0) {
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index bc841ba87ceb..7d7655a7ae6f 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -3638,7 +3638,7 @@ em_initialize_transmit_unit(if_ctx_t ctx)
bus_addr = txr->tx_paddr;
/* Clear checksum offload context. */
- offp = (caddr_t)&txr->csum_flags;
+ offp = (caddr_t)txr + offsetof(struct tx_ring, csum_flags);
endp = (caddr_t)(txr + 1);
bzero(offp, endp - offp);
diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c
index 576a185b013f..a4f3904a820c 100644
--- a/sys/dev/irdma/icrdma.c
+++ b/sys/dev/irdma/icrdma.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
*
- * Copyright (c) 2021 - 2023 Intel Corporation
+ * Copyright (c) 2021 - 2025 Intel Corporation
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
@@ -52,7 +52,7 @@
/**
* Driver version
*/
-char irdma_driver_version[] = "1.2.36-k";
+char irdma_driver_version[] = "1.2.37-k";
/**
* irdma_init_tunable - prepare tunables
diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c
index d4d4f328fb43..f3ca761b32f6 100644
--- a/sys/dev/irdma/irdma_cm.c
+++ b/sys/dev/irdma/irdma_cm.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
*
- * Copyright (c) 2015 - 2023 Intel Corporation
+ * Copyright (c) 2015 - 2025 Intel Corporation
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
@@ -1683,31 +1683,6 @@ irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr)
return vlan_id;
}
-static int
-irdma_manage_qhash_wait(struct irdma_pci_f *rf, struct irdma_cm_info *cm_info)
-{
- struct irdma_cqp_request *cqp_request = cm_info->cqp_request;
- int cnt = rf->sc_dev.hw_attrs.max_cqp_compl_wait_time_ms * CQP_TIMEOUT_THRESHOLD;
- u32 ret_val;
-
- if (!cqp_request)
- return -ENOMEM;
- do {
- irdma_cqp_ce_handler(rf, &rf->ccq.sc_cq);
- mdelay(1);
- } while (!READ_ONCE(cqp_request->request_done) && --cnt);
-
- ret_val = cqp_request->compl_info.op_ret_val;
- irdma_put_cqp_request(&rf->cqp, cqp_request);
- if (cnt) {
- if (!ret_val)
- return 0;
- return -EINVAL;
- }
-
- return -ETIMEDOUT;
-}
-
/**
* irdma_add_mqh_ifa_cb - Adds multiple qhashes for IPv4/IPv6
* @arg: Calback argument structure from irdma_add_mqh
@@ -1771,16 +1746,7 @@ irdma_add_mqh_ifa_cb(void *arg, struct ifaddr *ifa, u_int count)
irdma_iw_get_vlan_prio(child_listen_node->loc_addr,
cm_info->user_pri,
cm_info->ipv4);
- ret = irdma_manage_qhash(iwdev, cm_info,
- IRDMA_QHASH_TYPE_TCP_SYN,
- IRDMA_QHASH_MANAGE_TYPE_ADD,
- NULL, false);
- if (ret) {
- kfree(child_listen_node);
- return ret;
- }
- /* wait for qhash finish */
- ret = irdma_manage_qhash_wait(iwdev->rf, cm_info);
+ ret = irdma_add_qhash_wait_no_lock(iwdev, cm_info);
if (ret) {
kfree(child_listen_node);
return ret;
diff --git a/sys/dev/irdma/irdma_hw.c b/sys/dev/irdma/irdma_hw.c
index 05004b1ccc83..64c05b8663e0 100644
--- a/sys/dev/irdma/irdma_hw.c
+++ b/sys/dev/irdma/irdma_hw.c
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
*
- * Copyright (c) 2015 - 2023 Intel Corporation
+ * Copyright (c) 2015 - 2025 Intel Corporation
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
@@ -2581,35 +2581,22 @@ irdma_send_syn_cqp_callback(struct irdma_cqp_request *cqp_request)
}
/**
- * irdma_manage_qhash - add or modify qhash
+ * irdma_qhash_info_prepare - fill info for qhash op
* @iwdev: irdma device
+ * @cqp_info: cqp info
* @cminfo: cm info for qhash
* @etype: type (syn or quad)
* @mtype: type of qhash
- * @cmnode: cmnode associated with connection
- * @wait: wait for completion
*/
-int
-irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo,
- enum irdma_quad_entry_type etype,
- enum irdma_quad_hash_manage_type mtype, void *cmnode,
- bool wait)
+static void
+irdma_qhash_info_prepare(struct irdma_device *iwdev,
+ struct cqp_cmds_info *cqp_info,
+ struct irdma_cm_info *cminfo,
+ enum irdma_quad_entry_type etype,
+ enum irdma_quad_hash_manage_type mtype)
{
struct irdma_qhash_table_info *info;
- struct irdma_cqp *iwcqp = &iwdev->rf->cqp;
- struct irdma_cqp_request *cqp_request;
- struct cqp_cmds_info *cqp_info;
- struct irdma_cm_node *cm_node = cmnode;
- int status;
-
- cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, wait);
- if (!cqp_request)
- return -ENOMEM;
- cminfo->cqp_request = cqp_request;
- if (!wait)
- atomic_inc(&cqp_request->refcnt);
- cqp_info = &cqp_request->info;
info = &cqp_info->in.u.manage_qhash_table_entry.info;
memset(info, 0, sizeof(*info));
info->vsi = &iwdev->vsi;
@@ -2641,6 +2628,105 @@ irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo,
info->src_ip[2] = cminfo->rem_addr[2];
info->src_ip[3] = cminfo->rem_addr[3];
}
+ cqp_info->cqp_cmd = IRDMA_OP_MANAGE_QHASH_TABLE_ENTRY;
+ cqp_info->post_sq = 1;
+}
+
+/**
+ * irdma_add_qhash_wait_no_lock - add qhash, blocking w/o lock
+ * @iwdev: irdma device
+ * @cminfo: cm info for qhash
+ */
+int
+irdma_add_qhash_wait_no_lock(struct irdma_device *iwdev,
+ struct irdma_cm_info *cminfo)
+{
+ struct irdma_qhash_table_info *info;
+ struct irdma_cqp *iwcqp = &iwdev->rf->cqp;
+ struct irdma_cqp_request *cqp_request;
+ struct cqp_cmds_info *cqp_info;
+ int cnt = iwdev->rf->sc_dev.hw_attrs.max_cqp_compl_wait_time_ms * CQP_TIMEOUT_THRESHOLD;
+ int status;
+ int ret_val;
+
+ cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, false);
+ if (!cqp_request)
+ return -ENOMEM;
+
+ cqp_info = &cqp_request->info;
+ info = &cqp_info->in.u.manage_qhash_table_entry.info;
+ irdma_qhash_info_prepare(iwdev, cqp_info, cminfo, IRDMA_QHASH_TYPE_TCP_SYN,
+ IRDMA_QHASH_MANAGE_TYPE_ADD);
+ if (info->ipv4_valid)
+ irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM,
+ "ADD caller: %pS loc_port=0x%04x rem_port=0x%04x loc_addr=%x rem_addr=%x mac=%x:%x:%x:%x:%x:%x, vlan_id=%d\n",
+ __builtin_return_address(0), info->src_port,
+ info->dest_port, info->src_ip[0], info->dest_ip[0],
+ info->mac_addr[0], info->mac_addr[1],
+ info->mac_addr[2], info->mac_addr[3],
+ info->mac_addr[4], info->mac_addr[5],
+ cminfo->vlan_id);
+ else
+ irdma_debug(&iwdev->rf->sc_dev, IRDMA_DEBUG_CM,
+ "ADD caller: %pS loc_port=0x%04x rem_port=0x%04x loc_addr=%x:%x:%x:%x rem_addr=%x:%x:%x:%x mac=%x:%x:%x:%x:%x:%x, vlan_id=%d\n",
+ __builtin_return_address(0), info->src_port,
+ info->dest_port, IRDMA_PRINT_IP6(info->src_ip),
+ IRDMA_PRINT_IP6(info->dest_ip), info->mac_addr[0],
+ info->mac_addr[1], info->mac_addr[2],
+ info->mac_addr[3], info->mac_addr[4],
+ info->mac_addr[5], cminfo->vlan_id);
+
+ cqp_info->in.u.manage_qhash_table_entry.cqp = &iwdev->rf->cqp.sc_cqp;
+ cqp_info->in.u.manage_qhash_table_entry.scratch = (uintptr_t)cqp_request;
+ status = irdma_handle_cqp_op(iwdev->rf, cqp_request);
+ if (status) {
+ irdma_put_cqp_request(iwcqp, cqp_request);
+ irdma_dev_warn(&iwdev->ibdev, "manage_qhash cqp op failure %d\n", status);
+ return status;
+ }
+
+ do {
+ irdma_cqp_ce_handler(iwdev->rf, &iwdev->rf->ccq.sc_cq);
+ mdelay(1);
+ } while (!READ_ONCE(cqp_request->request_done) && --cnt);
+
+ ret_val = cqp_request->compl_info.op_ret_val;
+ status = (cnt) ? ret_val : -ETIMEDOUT;
+
+ irdma_put_cqp_request(iwcqp, cqp_request);
+
+ return status;
+}
+
+/**
+ * irdma_manage_qhash - add or modify qhash
+ * @iwdev: irdma device
+ * @cminfo: cm info for qhash
+ * @etype: type (syn or quad)
+ * @mtype: type of qhash
+ * @cmnode: cmnode associated with connection
+ * @wait: wait for completion
+ */
+int
+irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo,
+ enum irdma_quad_entry_type etype,
+ enum irdma_quad_hash_manage_type mtype, void *cmnode,
+ bool wait)
+{
+ struct irdma_qhash_table_info *info;
+ struct irdma_cqp *iwcqp = &iwdev->rf->cqp;
+ struct irdma_cqp_request *cqp_request;
+ struct cqp_cmds_info *cqp_info;
+ struct irdma_cm_node *cm_node = cmnode;
+ int status;
+
+ cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, wait);
+ if (!cqp_request)
+ return -ENOMEM;
+
+ cqp_info = &cqp_request->info;
+ info = &cqp_info->in.u.manage_qhash_table_entry.info;
+ irdma_qhash_info_prepare(iwdev, cqp_info, cminfo, etype, mtype);
if (cmnode) {
cqp_request->callback_fcn = irdma_send_syn_cqp_callback;
cqp_request->param = cmnode;
@@ -2671,8 +2757,6 @@ irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo,
cqp_info->in.u.manage_qhash_table_entry.cqp = &iwdev->rf->cqp.sc_cqp;
cqp_info->in.u.manage_qhash_table_entry.scratch = (uintptr_t)cqp_request;
- cqp_info->cqp_cmd = IRDMA_OP_MANAGE_QHASH_TABLE_ENTRY;
- cqp_info->post_sq = 1;
status = irdma_handle_cqp_op(iwdev->rf, cqp_request);
if (status && cm_node && !wait)
irdma_rem_ref_cm_node(cm_node);
diff --git a/sys/dev/irdma/irdma_main.h b/sys/dev/irdma/irdma_main.h
index 5b292ceafea8..9181f3b70463 100644
--- a/sys/dev/irdma/irdma_main.h
+++ b/sys/dev/irdma/irdma_main.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
*
- * Copyright (c) 2015 - 2023 Intel Corporation
+ * Copyright (c) 2015 - 2025 Intel Corporation
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
@@ -563,6 +563,7 @@ int irdma_manage_qhash(struct irdma_device *iwdev, struct irdma_cm_info *cminfo,
enum irdma_quad_entry_type etype,
enum irdma_quad_hash_manage_type mtype, void *cmnode,
bool wait);
+int irdma_add_qhash_wait_no_lock(struct irdma_device *iwdev, struct irdma_cm_info *cminfo);
void irdma_receive_ilq(struct irdma_sc_vsi *vsi, struct irdma_puda_buf *rbuf);
void irdma_free_sqbuf(struct irdma_sc_vsi *vsi, void *bufp);
void irdma_free_qp_rsrc(struct irdma_qp *iwqp);
diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h
index f59902be226a..768f58188220 100644
--- a/sys/dev/mlx5/mlx5_en/en.h
+++ b/sys/dev/mlx5/mlx5_en/en.h
@@ -53,10 +53,8 @@
#include <sys/kthread.h>
#include <sys/counter.h>
-#ifdef RSS
#include <net/rss_config.h>
#include <netinet/in_rss.h>
-#endif
#include <machine/bus.h>
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 4658bebb7845..daa98752c59b 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -2915,24 +2915,7 @@ err_modify:
static void
mlx5e_get_rss_key(void *key_ptr)
{
-#ifdef RSS
rss_getkey(key_ptr);
-#else
- static const u32 rsskey[] = {
- cpu_to_be32(0xD181C62C),
- cpu_to_be32(0xF7F4DB5B),
- cpu_to_be32(0x1983A2FC),
- cpu_to_be32(0x943E1ADB),
- cpu_to_be32(0xD9389E6B),
- cpu_to_be32(0xD1039C2C),
- cpu_to_be32(0xA74499AD),
- cpu_to_be32(0x593D56D9),
- cpu_to_be32(0xF3253C06),
- cpu_to_be32(0x2ADC1FFC),
- };
- CTASSERT(sizeof(rsskey) == MLX5E_RSS_KEY_SIZE);
- memcpy(key_ptr, rsskey, MLX5E_RSS_KEY_SIZE);
-#endif
}
static void
@@ -3044,15 +3027,12 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla
CTASSERT(MLX5_FLD_SZ_BYTES(tirc, rx_hash_toeplitz_key) >=
MLX5E_RSS_KEY_SIZE);
-#ifdef RSS
+
/*
* The FreeBSD RSS implementation does currently not
* support symmetric Toeplitz hashes:
*/
MLX5_SET(tirc, tirc, rx_hash_symmetric, 0);
-#else
- MLX5_SET(tirc, tirc, rx_hash_symmetric, 1);
-#endif
mlx5e_get_rss_key(hkey);
switch (tt) {
@@ -3061,12 +3041,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla
MLX5_L3_PROT_TYPE_IPV4);
MLX5_SET(rx_hash_field_select, hfs, l4_prot_type,
MLX5_L4_PROT_TYPE_TCP);
-#ifdef RSS
if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV4)) {
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_IP);
} else
-#endif
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_ALL);
break;
@@ -3076,12 +3054,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla
MLX5_L3_PROT_TYPE_IPV6);
MLX5_SET(rx_hash_field_select, hfs, l4_prot_type,
MLX5_L4_PROT_TYPE_TCP);
-#ifdef RSS
if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV6)) {
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_IP);
} else
-#endif
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_ALL);
break;
@@ -3091,12 +3067,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla
MLX5_L3_PROT_TYPE_IPV4);
MLX5_SET(rx_hash_field_select, hfs, l4_prot_type,
MLX5_L4_PROT_TYPE_UDP);
-#ifdef RSS
if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV4)) {
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_IP);
} else
-#endif
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_ALL);
break;
@@ -3106,12 +3080,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla
MLX5_L3_PROT_TYPE_IPV6);
MLX5_SET(rx_hash_field_select, hfs, l4_prot_type,
MLX5_L4_PROT_TYPE_UDP);
-#ifdef RSS
if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV6)) {
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_IP);
} else
-#endif
MLX5_SET(rx_hash_field_select, hfs, selected_fields,
MLX5_HASH_ALL);
break;
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
index eb569488631a..262558d529dc 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
@@ -358,7 +358,6 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
/* check if a Toeplitz hash was computed */
if (cqe->rss_hash_type != 0) {
mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result);
-#ifdef RSS
/* decode the RSS hash type */
switch (cqe->rss_hash_type &
(CQE_RSS_DST_HTYPE_L4 | CQE_RSS_DST_HTYPE_IP)) {
@@ -386,9 +385,6 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH);
break;
}
-#else
- M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH);
-#endif
#ifdef M_HASHTYPE_SETINNER
if (cqe_is_tunneled(cqe))
M_HASHTYPE_SETINNER(mb);
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
index c8eba3df9c2a..ddbc149802f4 100644
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -29,15 +29,13 @@
#ifndef __NVME_H__
#define __NVME_H__
-#ifdef _KERNEL
-#include <sys/types.h>
-#endif
-
#include <sys/param.h>
-#include <sys/endian.h>
-#ifndef _KERNEL
+#ifdef _KERNEL
+#include <sys/systm.h>
+#else
#include <stdbool.h>
#endif
+#include <sys/endian.h>
struct sbuf;
@@ -1540,8 +1538,7 @@ enum nvme_log_page {
/* 0xC0-0xFF - vendor specific */
/*
- * The following are Intel Specific log pages, but they seem
- * to be widely implemented.
+ * The following are Intel Specific log pages for older models.
*/
INTEL_LOG_READ_LAT_LOG = 0xc1,
INTEL_LOG_WRITE_LAT_LOG = 0xc2,
@@ -1550,7 +1547,7 @@ enum nvme_log_page {
INTEL_LOG_DRIVE_MKT_NAME = 0xdd,
/*
- * HGST log page, with lots ofs sub pages.
+ * HGST log page, with lots of sub pages.
*/
HGST_INFO_LOG = 0xc1,
};
@@ -1910,7 +1907,6 @@ void nvme_sc_sbuf(const struct nvme_completion *cpl, struct sbuf *sbuf);
void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen);
#ifdef _KERNEL
-#include <sys/systm.h>
#include <sys/disk.h>
struct bio;
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 41542d24c107..1ad4735cbef8 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -907,7 +907,7 @@ again:
size = sizeof(struct nvme_hmb_desc) * ctrlr->hmb_nchunks;
err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev),
- 16, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL,
+ PAGE_SIZE, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL,
size, 1, size, 0, NULL, NULL, &ctrlr->hmb_desc_tag);
if (err != 0) {
nvme_printf(ctrlr, "HMB desc tag create failed %d\n", err);
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index e14a28557406..cca7b93abf5f 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -658,21 +658,19 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td)
mtx_lock(&m->lock);
mtx_lock(&m->qlock);
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (!MIDIQ_EMPTY(m->inq))
- events |= events & (POLLIN | POLLRDNORM);
-
- if (events & (POLLOUT | POLLWRNORM))
- if (MIDIQ_AVAIL(m->outq) < m->hiwat)
- events |= events & (POLLOUT | POLLWRNORM);
-
- if (revents == 0) {
- if (events & (POLLIN | POLLRDNORM))
+ revents |= events & (POLLIN | POLLRDNORM);
+ else
selrecord(td, &m->rsel);
-
- if (events & (POLLOUT | POLLWRNORM))
+ }
+ if (events & (POLLOUT | POLLWRNORM)) {
+ if (MIDIQ_AVAIL(m->outq) < m->hiwat)
+ revents |= events & (POLLOUT | POLLWRNORM);
+ else
selrecord(td, &m->wsel);
}
+
mtx_unlock(&m->lock);
mtx_unlock(&m->qlock);
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 011dc1427c2e..7c3f0e3dc9f0 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -581,14 +581,30 @@ chn_read(struct pcm_channel *c, struct uio *buf)
}
void
-chn_intr(struct pcm_channel *c)
+chn_intr_locked(struct pcm_channel *c)
{
- CHN_LOCK(c);
+
+ CHN_LOCKASSERT(c);
+
c->interrupts++;
+
if (c->direction == PCMDIR_PLAY)
chn_wrintr(c);
else
chn_rdintr(c);
+}
+
+void
+chn_intr(struct pcm_channel *c)
+{
+
+ if (CHN_LOCKOWNED(c)) {
+ chn_intr_locked(c);
+ return;
+ }
+
+ CHN_LOCK(c);
+ chn_intr_locked(c);
CHN_UNLOCK(c);
}
diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 6415f5c88984..0b17c4a130a7 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -298,6 +298,7 @@ int chn_oss_setorder(struct pcm_channel *, unsigned long long *);
int chn_oss_getmask(struct pcm_channel *, uint32_t *);
void chn_resetbuf(struct pcm_channel *c);
+void chn_intr_locked(struct pcm_channel *c);
void chn_intr(struct pcm_channel *c);
int chn_abort(struct pcm_channel *c);