mac80211: fix incorrect strlen of .write in debugfs
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 12/41 ASoC: SOF: Intel: hda: Resume codec to do jack detection
From: Kai-Heng Feng <[email protected]>
[ Upstream commit bcd7059abc19e6ec5b2260dff6a008fb99c4eef9 ]
Instead of queueing jackpoll_work, runtime resume the codec to let it use different jack detection methods based on jackpoll_interval.
This partially matches SOF driver's behavior with commit a6e7d0a4bdb0 ("ALSA: hda: fix jack detection with Realtek codecs when in D3"), the difference is SOF unconditionally resumes the codec.
--- sound/soc/sof/intel/hda-codec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sof/intel/hda-codec.c +1 -2
@@ -93,8 +93,7 @@ void hda_codec_jack_check(struct snd_sof_dev *sdev)* has been recorded in STATESTS */ if (codec->jacktbl.used) -schedule_delayed_work (&codec->jackpoll_work, - codec->jackpoll_interval); + pm_request_resume(&codec->core.dev); }#else void hda_codec_jack_wake_enable (struct snd_sof_dev *sdev) {}
Signature · 1 line
2.27.0
PATCH 13/41 ALSA: hda: Add AlderLake-P PCI ID and HDMI codec vid
In reply to a message not in the archiveFrom: Kai Vehmanen <[email protected]>
[ Upstream commit 5e941fc033e411118fb3a7d9e0b97f8cf702cd39 ]
Add HD Audio PCI ID and HDMI codec vendor ID for Intel AlderLake-P.
--- sound/pci/hda/hda_intel.c | 3 +++ sound/pci/hda/patch_hdmi.c | 1 + 2 files changed, 4 insertions(+)
sound/pci/hda/hda_intel.c +3 -0
@@ -2507,6 +2507,9 @@ static const struct pci_device_id azx_ids[] = {/* Alderlake-S */ { PCI_DEVICE(0x8086, 0x7ad0), .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, + /* Alderlake-P */ + { PCI_DEVICE(0x8086, 0x51c8), + .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, /* Elkhart Lake */ { PCI_DEVICE(0x8086, 0x4b55), .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
sound/pci/hda/patch_hdmi.c +1 -0
@@ -4349,6 +4349,7 @@ HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),HDA_CODEC_ENTRY (0x80862812 ,"Tigerlake HDMI" , patch_i915_tgl_hdmi),HDA_CODEC_ENTRY (0x80862814 ,"DG1 HDMI" , patch_i915_tgl_hdmi),HDA_CODEC_ENTRY (0x80862815 ,"Alderlake HDMI" , patch_i915_tgl_hdmi), +HDA_CODEC_ENTRY (0x8086281c ,"Alderlake-P HDMI" , patch_i915_tgl_hdmi),HDA_CODEC_ENTRY (0x80862816 ,"Rocketlake HDMI" , patch_i915_tgl_hdmi),HDA_CODEC_ENTRY (0x8086281a ,"Jasperlake HDMI" , patch_i915_icl_hdmi), HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
Signature · 1 line
2.27.0
PATCH 15/41 mac80211: fix incorrect strlen of .write in debugfs
In reply to a message not in the archiveFrom: Shayne Chen <[email protected]>
[ Upstream commit 6020d534fa012b80c6d13811dc4d2dfedca2e403 ]
This fixes strlen mismatch problems happening in some .write callbacks of debugfs.
When trying to configure airtime_flags in debugfs, an error appeared:
ash: write error: Invalid argument
The error is returned from kstrtou16() since a wrong length makes it miss the real end of input string. To fix this, use count as the string length, and set proper end of string for a char buffer.
The debug print is shown - airtime_flags_write: count = 2, len = 8, where the actual length is 2, but "len = strlen(buf)" gets 8.
Also cleanup the other similar cases for the sake of consistency.
--- net/mac80211/debugfs.c | 44 +++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 24 deletions(-)
net/mac80211/debugfs.c +20 -24
@@ -120,18 +120,17 @@ static ssize_t aqm_write(struct file *file, {struct ieee80211_local *local = file->private_data;char buf[100 ]; -size_t len; -if (count >sizeof (buf)) +if (count >=sizeof (buf))return -EINVAL ;if (copy_from_user (buf, user_buf, count))return -EFAULT ; - buf[sizeof (buf) -1 ] ='\0' ; - len =strlen (buf); -if (len >0 && buf[len-1 ] =='\n' ) - buf[len-1 ] =0 ; +if (count && buf[count -1 ] =='\n' ) + buf[count -1 ] ='\0' ; +else + buf[count] ='\0' ;if (sscanf (buf,"fq_limit %u" , &local->fq.limit) ==1 )return count;
@@ -177,18 +176,17 @@ static ssize_t airtime_flags_write(struct file *file, {struct ieee80211_local *local = file->private_data;char buf[16 ]; -size_t len; -if (count >sizeof (buf)) +if (count >=sizeof (buf))return -EINVAL ;if (copy_from_user (buf, user_buf, count))return -EFAULT ; - buf[sizeof (buf) -1 ] =0 ; - len =strlen (buf); -if (len >0 && buf[len -1 ] =='\n' ) - buf[len -1 ] =0 ; +if (count && buf[count -1 ] =='\n' ) + buf[count -1 ] ='\0' ; +else + buf[count] ='\0' ;if (kstrtou16 (buf,0 , &local->airtime_flags))return -EINVAL ;
@@ -237,20 +235,19 @@ static ssize_t aql_txq_limit_write(struct file *file, {struct ieee80211_local *local = file->private_data;char buf[100 ]; -size_t len;u32 ac, q_limit_low, q_limit_high, q_limit_low_old, q_limit_high_old;struct sta_info *sta; -if (count >sizeof (buf)) +if (count >=sizeof (buf))return -EINVAL ;if (copy_from_user (buf, user_buf, count))return -EFAULT ; - buf[sizeof (buf) -1 ] =0 ; - len =strlen (buf); -if (len >0 && buf[len -1 ] =='\n' ) - buf[len -1 ] =0 ; +if (count && buf[count -1 ] =='\n' ) + buf[count -1 ] ='\0' ; +else + buf[count] ='\0' ;if (sscanf (buf,"%u %u %u" , &ac, &q_limit_low, &q_limit_high) !=3 )return -EINVAL ;
@@ -306,18 +303,17 @@ static ssize_t force_tx_status_write(struct file *file, {struct ieee80211_local *local = file->private_data;char buf[3 ]; -size_t len; -if (count >sizeof (buf)) +if (count >=sizeof (buf))return -EINVAL ;if (copy_from_user (buf, user_buf, count))return -EFAULT ; - buf[sizeof (buf) -1 ] ='\0' ; - len =strlen (buf); -if (len >0 && buf[len -1 ] =='\n' ) - buf[len -1 ] =0 ; +if (count && buf[count -1 ] =='\n' ) + buf[count -1 ] ='\0' ; +else + buf[count] ='\0' ;if (buf[0 ] =='0' && buf[1 ] =='\0' ) local->force_tx_status =0 ;
Signature · 7 lines
2.27.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
PATCH 18/41 scsi: ibmvfc: Set default timeout to avoid crash during migration
In reply to a message not in the archiveFrom: Brian King <[email protected]>
[ Upstream commit 764907293edc1af7ac857389af9dc858944f53dc ]
While testing live partition mobility, we have observed occasional crashes of the Linux partition. What we've seen is that during the live migration, for specific configurations with large amounts of memory, slow network links, and workloads that are changing memory a lot, the partition can end up being suspended for 30 seconds or longer. This resulted in the following scenario:
CPU 0 CPU 1
------------------------------- ----------------------------------scsi_queue_rq migration_store
-> blk_mq_start_request -> rtas_ibm_suspend_me
-> blk_add_timer -> on_each_cpu(rtas_percpu_suspend_me
_______________________________________V
|
V
-> IPI from CPU 1
-> rtas_percpu_suspend_me
-> __rtas_suspend_last_cpu-- Linux partition suspended for > 30 seconds --
-> for_each_online_cpu(cpu)
plpar_hcall_norets(H_PROD
-> scsi_dispatch_cmd
-> scsi_times_out
-> scsi_abort_command
-> queue_delayed_work -> ibmvfc_queuecommand_lck
-> ibmvfc_send_event
-> ibmvfc_send_crq
- returns H_CLOSED
<- returns SCSI_MLQUEUE_HOST_BUSY
-> __blk_mq_requeue_request
-> scmd_eh_abort_handler
-> scsi_try_to_abort_cmd
- returns SUCCESS
-> scsi_queue_insertNormally, the SCMD_STATE_COMPLETE bit would protect against the command completion and the timeout, but that doesn't work here, since we don't check that at all in the SCSI_MLQUEUE_HOST_BUSY path.
In this case we end up calling scsi_queue_insert on a request that has already been queued, or possibly even freed, and we crash.
The patch below simply increases the default I/O timeout to avoid this race condition. This is also the timeout value that nearly all IBM SAN storage recommends setting as the default value.
--- drivers/scsi/ibmvscsi/ibmvfc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/ibmvscsi/ibmvfc.c +3 -1
@@ -2957,8 +2957,10 @@ static int ibmvfc_slave_configure(struct scsi_device *sdev)unsigned long flags =0 ;spin_lock_irqsave (shost->host_lock, flags); -if (sdev->type ==TYPE_DISK ) +if (sdev->type ==TYPE_DISK ) { sdev->allow_restart =1 ; +blk_queue_rq_timeout (sdev->request_queue,120 *HZ ); + }spin_unlock_irqrestore (shost->host_lock, flags);return 0 ; }
Signature · 1 line
2.27.0
PATCH 19/41 ALSA: hda: Add Cometlake-R PCI ID
In reply to a message not in the archiveFrom: Kai-Chuan Hsieh <[email protected]>
[ Upstream commit f84d3a1ec375e46a55cc3ba85c04272b24bd3921 ]
Add HD Audio Device PCI ID for the Intel Cometlake-R platform
--- sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+)
sound/pci/hda/hda_intel.c +3 -0
@@ -2484,6 +2484,9 @@ static const struct pci_device_id azx_ids[] = {/* CometLake-S */ { PCI_DEVICE(0x8086, 0xa3f0), .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, + /* CometLake-R */ + { PCI_DEVICE(0x8086, 0xf0c8), + .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, /* Icelake */ { PCI_DEVICE(0x8086, 0x34c8), .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
Signature · 1 line
2.27.0
PATCH 22/41 nvme: check the PRINFO bit before deciding the host buffer length
In reply to a message not in the archiveFrom: Revanth Rajashekar <[email protected]>
[ Upstream commit 4d6b1c95b974761c01cbad92321b82232b66d2a2 ]
According to NVMe spec v1.4, section 8.3.1, the PRINFO bit and the metadata size play a vital role in deteriming the host buffer size.
If PRIFNO bit is set and MS==8, the host doesn't add the metadata buffer, instead the controller adds it.
--- drivers/nvme/host/core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
drivers/nvme/host/core.c +15 -2
@@ -1489,8 +1489,21 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio) } length = (io.nblocks +1 ) << ns->lba_shift; - meta_len = (io.nblocks +1 ) * ns->ms; - metadata =nvme_to_user_ptr (io.metadata); + +if ((io.control &NVME_RW_PRINFO_PRACT ) && + ns->ms ==sizeof (struct t10_pi_tuple )) { +/* +* Protection information is stripped/inserted by the +* controller. +*/ +if (nvme_to_user_ptr (io.metadata)) +return -EINVAL ; + meta_len =0 ; + metadata =NULL ; + }else { + meta_len = (io.nblocks +1 ) * ns->ms; + metadata =nvme_to_user_ptr (io.metadata); + }if (ns->features &NVME_NS_EXT_LBAS ) { length += meta_len;
Signature · 7 lines
2.27.0 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 23/41 nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout
In reply to a message not in the archiveFrom: Chao Leng <[email protected]>
[ Upstream commit 7674073b2ed35ac951a49c425dec6b39d5a57140 ]
A crash happens when inject completing request long time(nearly 30s). Each name space has a request queue, when inject completing request long time, multi request queues may have time out requests at the same time, nvme_rdma_timeout will execute concurrently. Multi requests in different request queues may be queued in the same rdma queue, multi nvme_rdma_timeout may call nvme_rdma_stop_queue at the same time. The first nvme_rdma_timeout will clear NVME_RDMA_Q_LIVE and continue stopping the rdma queue(drain qp), but the others check NVME_RDMA_Q_LIVE is already cleared, and then directly complete the requests, complete request before the qp is fully drained may lead to a use-after-free condition.
Add a multex lock to serialize nvme_rdma_stop_queue.
--- drivers/nvme/host/rdma.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/nvme/host/rdma.c +11 -4
@@ -97,6 +97,7 @@ struct nvme_rdma_queue {struct completion cm_done;bool pi_support;int cq_size; +struct mutex queue_lock; };struct nvme_rdma_ctrl {
@@ -579,6 +580,7 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl,int ret; queue = &ctrl->queues[idx]; +mutex_init (&queue->queue_lock); queue->ctrl = ctrl;if (idx && ctrl->ctrl.max_integrity_segments) queue->pi_support = true;
@@ -598,7 +600,8 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl,if (IS_ERR (queue->cm_id)) {dev_info (ctrl->ctrl.device,"failed to create CM ID: %ld\n" ,PTR_ERR (queue->cm_id)); -return PTR_ERR (queue->cm_id); + ret =PTR_ERR (queue->cm_id); + goto out_destroy_mutex; }if (ctrl->ctrl.opts->mask &NVMF_OPT_HOST_TRADDR )
@@ -628,6 +631,8 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl, out_destroy_cm_id:rdma_destroy_id (queue->cm_id);nvme_rdma_destroy_queue_ib (queue); +out_destroy_mutex: +mutex_destroy (&queue->queue_lock);return ret; }
@@ -639,9 +644,10 @@ static void __nvme_rdma_stop_queue(struct nvme_rdma_queue *queue)static void nvme_rdma_stop_queue (struct nvme_rdma_queue *queue) { -if (!test_and_clear_bit (NVME_RDMA_Q_LIVE , &queue->flags)) -return ; -__nvme_rdma_stop_queue (queue); +mutex_lock (&queue->queue_lock); +if (test_and_clear_bit (NVME_RDMA_Q_LIVE , &queue->flags)) +__nvme_rdma_stop_queue (queue); +mutex_unlock (&queue->queue_lock); }static void nvme_rdma_free_queue (struct nvme_rdma_queue *queue)
@@ -651,6 +657,7 @@ static void nvme_rdma_free_queue(struct nvme_rdma_queue *queue)nvme_rdma_destroy_queue_ib (queue);rdma_destroy_id (queue->cm_id); +mutex_destroy (&queue->queue_lock); }static void nvme_rdma_free_io_queues (struct nvme_rdma_ctrl *ctrl)
Signature · 7 lines
2.27.0 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 24/41 nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout
In reply to a message not in the archiveFrom: Chao Leng <[email protected]>
[ Upstream commit 9ebbfe495ecd2e51bc92ac21ed5817c3b9e223ce ]
Each name space has a request queue, if complete request long time, multi request queues may have time out requests at the same time, nvme_tcp_timeout will execute concurrently. Multi requests in different request queues may be queued in the same tcp queue, multi nvme_tcp_timeout may call nvme_tcp_stop_queue at the same time. The first nvme_tcp_stop_queue will clear NVME_TCP_Q_LIVE and continue stopping the tcp queue(cancel io_work), but the others check NVME_TCP_Q_LIVE is already cleared, and then directly complete the requests, complete request before the io work is completely canceled may lead to a use-after-free condition.
Add a multex lock to serialize nvme_tcp_stop_queue.
--- drivers/nvme/host/tcp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/nvme/host/tcp.c +10 -4
@@ -76,6 +76,7 @@ struct nvme_tcp_queue {struct work_struct io_work;int io_cpu; +struct mutex queue_lock;struct mutex send_mutex;struct llist_head req_list;struct list_head send_list;
@@ -1219,6 +1220,7 @@ static void nvme_tcp_free_queue(struct nvme_ctrl *nctrl, int qid)sock_release (queue->sock);kfree (queue->pdu); +mutex_destroy (&queue->queue_lock); }static int nvme_tcp_init_connection (struct nvme_tcp_queue *queue)
@@ -1380,6 +1382,7 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl,struct nvme_tcp_queue *queue = &ctrl->queues[qid];int ret, rcv_pdu_size; +mutex_init (&queue->queue_lock); queue->ctrl = ctrl;init_llist_head (&queue->req_list);INIT_LIST_HEAD (&queue->send_list);
@@ -1398,7 +1401,7 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl,if (ret) {dev_err (nctrl->device,"failed to create socket: %d\n" , ret); -return ret; + goto err_destroy_mutex; }/* Single syn retry */
@@ -1507,6 +1510,8 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl, err_sock:sock_release (queue->sock); queue->sock =NULL ; +err_destroy_mutex: +mutex_destroy (&queue->queue_lock);return ret; }
@@ -1534,9 +1539,10 @@ static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)struct nvme_tcp_ctrl *ctrl =to_tcp_ctrl (nctrl);struct nvme_tcp_queue *queue = &ctrl->queues[qid]; -if (!test_and_clear_bit (NVME_TCP_Q_LIVE , &queue->flags)) -return ; -__nvme_tcp_stop_queue (queue); +mutex_lock (&queue->queue_lock); +if (test_and_clear_bit (NVME_TCP_Q_LIVE , &queue->flags)) +__nvme_tcp_stop_queue (queue); +mutex_unlock (&queue->queue_lock); }static int nvme_tcp_start_queue (struct nvme_ctrl *nctrl,int idx)
Signature · 7 lines
2.27.0 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 25/41 nvme-pci: allow use of cmb on v1.4 controllers
In reply to a message not in the archiveFrom: Klaus Jensen <[email protected]>
[ Upstream commit 20d3bb92e84d417b0494a3b6867f0c86713db257 ]
Since NVMe v1.4 the Controller Memory Buffer must be explicitly enabled by the host.
--- drivers/nvme/host/pci.c | 14 ++++++++++++++ include/linux/nvme.h | 6 ++++++ 2 files changed, 20 insertions(+)
drivers/nvme/host/pci.c +14 -0
@@ -23,6 +23,7 @@#include <linux/t10-pi.h> #include <linux/types.h> #include <linux/io-64-nonatomic-lo-hi.h> +#include <linux/io-64-nonatomic-hi-lo.h> #include <linux/sed-opal.h> #include <linux/pci-p2pdma.h>
@@ -1825,6 +1826,9 @@ static void nvme_map_cmb(struct nvme_dev *dev)if (dev->cmb_size)return ; +if (NVME_CAP_CMBS (dev->ctrl.cap)) +writel (NVME_CMBMSC_CRE , dev->bar +NVME_REG_CMBMSC ); + dev->cmbsz =readl (dev->bar +NVME_REG_CMBSZ );if (!dev->cmbsz)return ;
@@ -1838,6 +1842,16 @@ static void nvme_map_cmb(struct nvme_dev *dev)if (offset > bar_size)return ; +/* +* Tell the controller about the host side address mapping the CMB, +* and enable CMB decoding for the NVMe 1.4+ scheme: +*/ +if (NVME_CAP_CMBS (dev->ctrl.cap)) { +hi_lo_writeq (NVME_CMBMSC_CRE |NVME_CMBMSC_CMSE | + (pci_bus_address (pdev, bar) + offset), + dev->bar +NVME_REG_CMBMSC ); + } +/* * Controllers may support a CMB size larger than their BAR, * for example, due to being behind a bridge. Reduce the CMB to
include/linux/nvme.h +6 -0
@@ -116,6 +116,9 @@ enum {NVME_REG_BPMBL =0x0048 ,/* Boot Partition Memory Buffer * Location */ +NVME_REG_CMBMSC =0x0050 ,/* Controller Memory Buffer Memory +* Space Control +*/ NVME_REG_PMRCAP =0x0e00 ,/* Persistent Memory Capabilities */ NVME_REG_PMRCTL =0x0e04 ,/* Persistent Memory Region Control */ NVME_REG_PMRSTS = 0x0e08, /* Persistent Memory Region Status */
@@ -135,6 +138,7 @@ enum {#define NVME_CAP_CSS (cap) (((cap) >> 37) & 0xff)#define NVME_CAP_MPSMIN (cap) (((cap) >> 48) & 0xf)#define NVME_CAP_MPSMAX (cap) (((cap) >> 52) & 0xf) +#define NVME_CAP_CMBS (cap) (((cap) >> 57) & 0x1)#define NVME_CMB_BIR (cmbloc) ((cmbloc) & 0x7)#define NVME_CMB_OFST (cmbloc) (((cmbloc) >> 12) & 0xfffff)
@@ -192,6 +196,8 @@ enum {NVME_CSTS_SHST_OCCUR =1 <<2 ,NVME_CSTS_SHST_CMPLT =2 <<2 ,NVME_CSTS_SHST_MASK =3 <<2 , +NVME_CMBMSC_CRE =1 <<0 , + NVME_CMBMSC_CMSE = 1 << 1, }; struct nvme_id_power_state {
Signature · 7 lines
2.27.0 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 26/41 nvmet: set right status on error in id-ns handler
In reply to a message not in the archiveFrom: Chaitanya Kulkarni <[email protected]>
[ Upstream commit bffcd507780ea614b5543c66f2e37ce0d55cd449 ]
The function nvmet_execute_identify_ns() doesn't set the status if call to nvmet_find_namespace() fails. In that case we set the status of the request to the value return by the nvmet_copy_sgl().
Set the status to NVME_SC_INVALID_NS and adjust the code such that request will have the right status on nvmet_find_namespace() failure.
Without this patch :-
NVME Identify Namespace 3:
nsze : 0
ncap : 0
nuse : 0
nsfeat : 0
nlbaf : 0
flbas : 0
mc : 0
dpc : 0
dps : 0
nmic : 0
rescap : 0
fpi : 0
dlfeat : 0
nawun : 0
nawupf : 0
nacwu : 0
nabsn : 0
nabo : 0
nabspf : 0
noiob : 0
nvmcap : 0
mssrl : 0
mcl : 0
msrc : 0
nsattr : 0
nvmsetid: 0
anagrpid: 0
endgid : 0
nguid : 00000000000000000000000000000000
eui64 : 0000000000000000
lbaf 0 : ms:0 lbads:0 rp:0 (in use)
With this patch-series :-feb3b88b501e (HEAD -> nvme-5.11) nvmet: remove extra variable in identify ns 6302aa67210a nvmet: remove extra variable in id-desclist ed57951da453 nvmet: remove extra variable in smart log nsid be384b8c24dc nvmet: set right status on error in id-ns handler
NVMe status: INVALID_NS: The namespace or the format of that namespace is invalid(0xb)
--- drivers/nvme/target/admin-cmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/nvme/target/admin-cmd.c +6 -2
@@ -487,8 +487,10 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req)/* return an all zeroed buffer if we can't find an active namespace */ ns =nvmet_find_namespace (ctrl, req->cmd->identify.nsid); -if (!ns) +if (!ns) { + status =NVME_SC_INVALID_NS ; goto done; + }nvmet_ns_revalidate (ns);
@@ -541,7 +543,9 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req) id->nsattr |= (1 <<0 );nvmet_put_namespace (ns); done: - status =nvmet_copy_to_sgl (req,0 , id,sizeof (*id)); +if (!status) + status =nvmet_copy_to_sgl (req,0 , id,sizeof (*id)); +kfree (id); out:nvmet_req_complete (req, status);
Signature · 7 lines
2.27.0 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 28/41 selftests/powerpc: Only test lwm/stmw on big endian
In reply to a message not in the archiveFrom: Michael Ellerman <[email protected]>
[ Upstream commit dd3a44c06f7b4f14e90065bf05d62c255b20005f ]
Newer binutils (>= 2.36) refuse to assemble lmw/stmw when building in little endian mode. That breaks compilation of our alignment handler test:
/tmp/cco4l14N.s: Assembler messages:
/tmp/cco4l14N.s:1440: Error: lmw' invalid when little-endian /tmp/cco4l14N.s:1814: Error: stmw' invalid when little-endian
make[2]: *** [../../lib.mk:139: /output/kselftest/powerpc/alignment/alignment_handler] Error 1
These tests do pass on little endian machines, as the kernel will still emulate those instructions even when running little endian (which is arguably a kernel bug).
But we don't really need to test that case, so ifdef those instructions out to get the alignment test building again.
--- .../testing/selftests/powerpc/alignment/alignment_handler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/powerpc/alignment/alignment_handler.c +4 -1
@@ -443,7 +443,6 @@ int test_alignment_handler_integer(void)LOAD_DFORM_TEST (ldu);LOAD_XFORM_TEST (ldx);LOAD_XFORM_TEST (ldux); -LOAD_DFORM_TEST (lmw);STORE_DFORM_TEST (stb);STORE_XFORM_TEST (stbx);STORE_DFORM_TEST (stbu);
@@ -462,7 +461,11 @@ int test_alignment_handler_integer(void)STORE_XFORM_TEST (stdx);STORE_DFORM_TEST (stdu);STORE_XFORM_TEST (stdux); + +#ifdef __BIG_ENDIAN__ +LOAD_DFORM_TEST (lmw);STORE_DFORM_TEST (stmw); +#endif return rc; }
Signature · 1 line
2.27.0
PATCH 29/41 drm/amd/display: Update dram_clock_change_latency for DCN2.1
In reply to a message not in the archiveFrom: Jake Wang <[email protected]>
[ Upstream commit 901c1ec05ef277ce9d43cb806a225b28b3efe89a ]
[WHY]
dram clock change latencies get updated using ddr4 latency table, but does that update does not happen before validation. This value should not be the default and should be number received from df for better mode support.
This may cause a PState hang on high refresh panels with short vblanks such as on 1080p 360hz or 300hz panels.
[HOW]
Update latency from 23.84 to 11.72.
--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 -1
@@ -295,7 +295,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = { .num_banks = 8, .num_chans = 4, .vmm_page_size_bytes = 4096, - .dram_clock_change_latency_us = 23.84, + .dram_clock_change_latency_us = 11.72, .return_bus_width_bytes = 64, .dispclk_dppclk_vco_speed_mhz = 3600, .xfc_bus_transport_time_us = 4,
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 30/41 drm/amd/display: Allow PSTATE chnage when no displays are enabled
In reply to a message not in the archiveFrom: Aric Cyr <[email protected]>
[ Upstream commit 8bc3d461d0a95bbcc2a0a908bbadc87e198a86a8 ]
[Why]
When no displays are currently enabled, display driver should not disallow PSTATE switching.
[How]
Allow PSTATE switching if either the active configuration supports it, or there are no active displays.
--- .../gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +4 -2
@@ -239,6 +239,7 @@ static void dcn3_update_clocks(struct clk_mgr *clk_mgr_base,struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu;bool force_reset = false;bool update_uclk = false; +bool p_state_change_support;if (dc->work_arounds.skip_clock_update || !clk_mgr->smu_present)return ;
@@ -279,8 +280,9 @@ static void dcn3_update_clocks(struct clk_mgr *clk_mgr_base, clk_mgr_base->clks.socclk_khz = new_clocks->socclk_khz; clk_mgr_base->clks.prev_p_state_change_support = clk_mgr_base->clks.p_state_change_support; -if (should_update_pstate_support (safe_to_lower, new_clocks->p_state_change_support, clk_mgr_base->clks.p_state_change_support)) { - clk_mgr_base->clks.p_state_change_support = new_clocks->p_state_change_support; + p_state_change_support = new_clocks->p_state_change_support || (display_count ==0 ); +if (should_update_pstate_support (safe_to_lower, p_state_change_support, clk_mgr_base->clks.p_state_change_support)) { + clk_mgr_base->clks.p_state_change_support = p_state_change_support;/* to disable P-State switching, set UCLK min = max */ if (!clk_mgr_base->clks.p_state_change_support)
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 31/41 drm/amd/display: Change function decide_dp_link_settings to avoid infinite looping
In reply to a message not in the archiveFrom: Bing Guo <[email protected]>
[ Upstream commit 4716a7c50c5c66d6ddc42401e1e0ba13b492e105 ]
Why:
Function decide_dp_link_settings() loops infinitely when required bandwidth can't be supported.
How:
Check the required bandwidth against verified_link_cap before trying to find a link setting for it.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +3 -0
@@ -2375,6 +2375,9 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_setting initial_link_setting;uint32_t link_bw; +if (req_bw >dc_link_bandwidth_kbps (link, &link->verified_link_cap)) +return false; +/* search for the minimum link setting that: * 1. is supported according to the link training result * 2. could support the b/w requested by the timing
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 32/41 drm/amd/display: Use hardware sequencer functions for PG control
In reply to a message not in the archiveFrom: Nicholas Kazlauskas <[email protected]>
[ Upstream commit c74f865f14318217350aa33363577cb95b06eb82 ]
[Why & How]
These can differ per ASIC or not be present. Don't call the dcn20 ones directly but rather the ones defined by the ASIC init table.
--- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 18 ++++++++++++++---- .../gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 9 +++++++-- 2 files changed, 21 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +14 -4
@@ -646,8 +646,13 @@ static void power_on_plane(if (REG (DC_IP_REQUEST_CNTL )) {REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 ); - hws->funcs.dpp_pg_control (hws, plane_id, true); - hws->funcs.hubp_pg_control (hws, plane_id, true); + +if (hws->funcs.dpp_pg_control) + hws->funcs.dpp_pg_control (hws, plane_id, true); + +if (hws->funcs.hubp_pg_control) + hws->funcs.hubp_pg_control (hws, plane_id, true); +REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); DC_LOG_DEBUG(
@@ -1079,8 +1084,13 @@ void dcn10_plane_atomic_power_down(struct dc *dc,if (REG (DC_IP_REQUEST_CNTL )) {REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 ); - hws->funcs.dpp_pg_control (hws, dpp->inst, false); - hws->funcs.hubp_pg_control (hws, hubp->inst, false); + +if (hws->funcs.dpp_pg_control) + hws->funcs.dpp_pg_control (hws, dpp->inst, false); + +if (hws->funcs.hubp_pg_control) + hws->funcs.hubp_pg_control (hws, hubp->inst, false); + dpp->funcs->dpp_reset (dpp);REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 );
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +7 -2
@@ -1069,8 +1069,13 @@ static void dcn20_power_on_plane(if (REG (DC_IP_REQUEST_CNTL )) {REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 ); -dcn20_dpp_pg_control (hws, pipe_ctx->plane_res.dpp->inst, true); -dcn20_hubp_pg_control (hws, pipe_ctx->plane_res.hubp->inst, true); + +if (hws->funcs.dpp_pg_control) + hws->funcs.dpp_pg_control (hws, pipe_ctx->plane_res.dpp->inst, true); + +if (hws->funcs.hubp_pg_control) + hws->funcs.hubp_pg_control (hws, pipe_ctx->plane_res.hubp->inst, true); +REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); DC_LOG_DEBUG(
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 33/41 drm/amd/display: Fixed corruptions on HPDRX link loss restore
In reply to a message not in the archiveFrom: Vladimir Stempen <[email protected]>
[ Upstream commit 4b08d8c78360241d270396a9de6eb774e88acd00 ]
[why]
Heavy corruption or blank screen reported on wake, with 6k display connected and FEC enabled
[how]
When Disable/Enable stream for display pipes on HPDRX, DC should take into account ODM split pipes.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -2
@@ -3023,14 +3023,14 @@ bool dc_link_handle_hpd_rx_irq(struct dc_link *link, union hpd_irq_data *out_hpdfor (i =0 ; i <MAX_PIPES ; i++) { pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off && - pipe_ctx->stream->link == link) + pipe_ctx->stream->link == link && !pipe_ctx->prev_odm_pipe)core_link_disable_stream (pipe_ctx); }for (i =0 ; i <MAX_PIPES ; i++) { pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off && - pipe_ctx->stream->link == link) + pipe_ctx->stream->link == link && !pipe_ctx->prev_odm_pipe)core_link_enable_stream (link->dc->current_state, pipe_ctx); }
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx