Import of kernel-4.18.0-553.80.1.el8_10
This commit is contained in:
parent
4bb7ff2b91
commit
89b59548e7
@ -12,7 +12,7 @@ RHEL_MINOR = 10
|
|||||||
#
|
#
|
||||||
# Use this spot to avoid future merge conflicts.
|
# Use this spot to avoid future merge conflicts.
|
||||||
# Do not trim this comment.
|
# Do not trim this comment.
|
||||||
RHEL_RELEASE = 553.79.1
|
RHEL_RELEASE = 553.80.1
|
||||||
|
|
||||||
#
|
#
|
||||||
# ZSTREAM
|
# ZSTREAM
|
||||||
|
|||||||
@ -540,87 +540,6 @@ out:
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hctx_io_poll_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
|
|
||||||
seq_printf(m, "considered=%lu\n", hctx->poll_considered);
|
|
||||||
seq_printf(m, "invoked=%lu\n", hctx->poll_invoked);
|
|
||||||
seq_printf(m, "success=%lu\n", hctx->poll_success);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t hctx_io_poll_write(void *data, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
|
|
||||||
hctx->poll_considered = hctx->poll_invoked = hctx->poll_success = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int hctx_dispatched_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
seq_printf(m, "%8u\t%lu\n", 0U, hctx->dispatched[0]);
|
|
||||||
|
|
||||||
for (i = 1; i < BLK_MQ_MAX_DISPATCH_ORDER - 1; i++) {
|
|
||||||
unsigned int d = 1U << (i - 1);
|
|
||||||
|
|
||||||
seq_printf(m, "%8u\t%lu\n", d, hctx->dispatched[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_printf(m, "%8u+\t%lu\n", 1U << (i - 1), hctx->dispatched[i]);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t hctx_dispatched_write(void *data, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < BLK_MQ_MAX_DISPATCH_ORDER; i++)
|
|
||||||
hctx->dispatched[i] = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int hctx_queued_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
|
|
||||||
seq_printf(m, "%lu\n", hctx->queued);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t hctx_queued_write(void *data, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
|
|
||||||
hctx->queued = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int hctx_run_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
|
|
||||||
seq_printf(m, "%lu\n", hctx->run);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count,
|
|
||||||
loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
|
||||||
|
|
||||||
hctx->run = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int hctx_active_show(void *data, struct seq_file *m)
|
static int hctx_active_show(void *data, struct seq_file *m)
|
||||||
{
|
{
|
||||||
struct blk_mq_hw_ctx *hctx = data;
|
struct blk_mq_hw_ctx *hctx = data;
|
||||||
@ -674,57 +593,6 @@ CTX_RQ_SEQ_OPS(default, HCTX_TYPE_DEFAULT);
|
|||||||
CTX_RQ_SEQ_OPS(read, HCTX_TYPE_READ);
|
CTX_RQ_SEQ_OPS(read, HCTX_TYPE_READ);
|
||||||
CTX_RQ_SEQ_OPS(poll, HCTX_TYPE_POLL);
|
CTX_RQ_SEQ_OPS(poll, HCTX_TYPE_POLL);
|
||||||
|
|
||||||
static int ctx_dispatched_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_ctx *ctx = data;
|
|
||||||
|
|
||||||
seq_printf(m, "%lu %lu\n", ctx->rq_dispatched[1], ctx->rq_dispatched[0]);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t ctx_dispatched_write(void *data, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_ctx *ctx = data;
|
|
||||||
|
|
||||||
ctx->rq_dispatched[0] = ctx->rq_dispatched[1] = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ctx_merged_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_ctx *ctx = data;
|
|
||||||
|
|
||||||
seq_printf(m, "%lu\n", ctx->rq_merged);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t ctx_merged_write(void *data, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_ctx *ctx = data;
|
|
||||||
|
|
||||||
ctx->rq_merged = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ctx_completed_show(void *data, struct seq_file *m)
|
|
||||||
{
|
|
||||||
struct blk_mq_ctx *ctx = data;
|
|
||||||
|
|
||||||
seq_printf(m, "%lu %lu\n", ctx->rq_completed[1], ctx->rq_completed[0]);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t ctx_completed_write(void *data, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
struct blk_mq_ctx *ctx = data;
|
|
||||||
|
|
||||||
ctx->rq_completed[0] = ctx->rq_completed[1] = 0;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int blk_mq_debugfs_show(struct seq_file *m, void *v)
|
static int blk_mq_debugfs_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
const struct blk_mq_debugfs_attr *attr = m->private;
|
const struct blk_mq_debugfs_attr *attr = m->private;
|
||||||
@ -800,10 +668,6 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_hctx_attrs[] = {
|
|||||||
{"tags_bitmap", 0400, hctx_tags_bitmap_show},
|
{"tags_bitmap", 0400, hctx_tags_bitmap_show},
|
||||||
{"sched_tags", 0400, hctx_sched_tags_show},
|
{"sched_tags", 0400, hctx_sched_tags_show},
|
||||||
{"sched_tags_bitmap", 0400, hctx_sched_tags_bitmap_show},
|
{"sched_tags_bitmap", 0400, hctx_sched_tags_bitmap_show},
|
||||||
{"io_poll", 0600, hctx_io_poll_show, hctx_io_poll_write},
|
|
||||||
{"dispatched", 0600, hctx_dispatched_show, hctx_dispatched_write},
|
|
||||||
{"queued", 0600, hctx_queued_show, hctx_queued_write},
|
|
||||||
{"run", 0600, hctx_run_show, hctx_run_write},
|
|
||||||
{"active", 0400, hctx_active_show},
|
{"active", 0400, hctx_active_show},
|
||||||
{"dispatch_busy", 0400, hctx_dispatch_busy_show},
|
{"dispatch_busy", 0400, hctx_dispatch_busy_show},
|
||||||
{"type", 0400, hctx_type_show},
|
{"type", 0400, hctx_type_show},
|
||||||
@ -814,9 +678,6 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_ctx_attrs[] = {
|
|||||||
{"default_rq_list", 0400, .seq_ops = &ctx_default_rq_list_seq_ops},
|
{"default_rq_list", 0400, .seq_ops = &ctx_default_rq_list_seq_ops},
|
||||||
{"read_rq_list", 0400, .seq_ops = &ctx_read_rq_list_seq_ops},
|
{"read_rq_list", 0400, .seq_ops = &ctx_read_rq_list_seq_ops},
|
||||||
{"poll_rq_list", 0400, .seq_ops = &ctx_poll_rq_list_seq_ops},
|
{"poll_rq_list", 0400, .seq_ops = &ctx_poll_rq_list_seq_ops},
|
||||||
{"dispatched", 0600, ctx_dispatched_show, ctx_dispatched_write},
|
|
||||||
{"merged", 0600, ctx_merged_show, ctx_merged_write},
|
|
||||||
{"completed", 0600, ctx_completed_show, ctx_completed_write},
|
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -358,8 +358,6 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
|
|||||||
if (unlikely(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q)))
|
if (unlikely(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hctx->run++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A return of -EAGAIN is an indication that hctx->dispatch is not
|
* A return of -EAGAIN is an indication that hctx->dispatch is not
|
||||||
* empty and we must run again in order to avoid starving flushes.
|
* empty and we must run again in order to avoid starving flushes.
|
||||||
@ -415,10 +413,8 @@ static bool blk_mq_attempt_merge(struct request_queue *q,
|
|||||||
|
|
||||||
lockdep_assert_held(&ctx->lock);
|
lockdep_assert_held(&ctx->lock);
|
||||||
|
|
||||||
if (blk_bio_list_merge(q, &ctx->rq_lists[type], bio)) {
|
if (blk_bio_list_merge(q, &ctx->rq_lists[type], bio))
|
||||||
ctx->rq_merged++;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -353,7 +353,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
|
|||||||
rq->end_io = NULL;
|
rq->end_io = NULL;
|
||||||
rq->end_io_data = NULL;
|
rq->end_io_data = NULL;
|
||||||
|
|
||||||
data->ctx->rq_dispatched[op_is_sync(data->cmd_flags)]++;
|
|
||||||
refcount_set(&rq->ref, 1);
|
refcount_set(&rq->ref, 1);
|
||||||
|
|
||||||
if (!op_is_flush(data->cmd_flags)) {
|
if (!op_is_flush(data->cmd_flags)) {
|
||||||
@ -369,7 +368,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data->hctx->queued++;
|
|
||||||
return rq;
|
return rq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,7 +535,6 @@ void blk_mq_free_request(struct request *rq)
|
|||||||
{
|
{
|
||||||
struct request_queue *q = rq->q;
|
struct request_queue *q = rq->q;
|
||||||
struct elevator_queue *e = q->elevator;
|
struct elevator_queue *e = q->elevator;
|
||||||
struct blk_mq_ctx *ctx = rq->mq_ctx;
|
|
||||||
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
|
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
|
||||||
|
|
||||||
if (rq->rq_flags & RQF_ELVPRIV) {
|
if (rq->rq_flags & RQF_ELVPRIV) {
|
||||||
@ -549,7 +546,6 @@ void blk_mq_free_request(struct request *rq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->rq_completed[rq_is_sync(rq)]++;
|
|
||||||
if (rq->rq_flags & RQF_MQ_INFLIGHT)
|
if (rq->rq_flags & RQF_MQ_INFLIGHT)
|
||||||
__blk_mq_dec_active_requests(hctx);
|
__blk_mq_dec_active_requests(hctx);
|
||||||
|
|
||||||
@ -1164,14 +1160,6 @@ struct request *blk_mq_dequeue_from_ctx(struct blk_mq_hw_ctx *hctx,
|
|||||||
return data.rq;
|
return data.rq;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int queued_to_index(unsigned int queued)
|
|
||||||
{
|
|
||||||
if (!queued)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return min(BLK_MQ_MAX_DISPATCH_ORDER - 1, ilog2(queued) + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool __blk_mq_get_driver_tag(struct request *rq)
|
static bool __blk_mq_get_driver_tag(struct request *rq)
|
||||||
{
|
{
|
||||||
struct sbitmap_queue *bt = rq->mq_hctx->tags->bitmap_tags;
|
struct sbitmap_queue *bt = rq->mq_hctx->tags->bitmap_tags;
|
||||||
@ -1515,8 +1503,6 @@ out:
|
|||||||
if (!list_empty(&zone_list))
|
if (!list_empty(&zone_list))
|
||||||
list_splice_tail_init(&zone_list, list);
|
list_splice_tail_init(&zone_list, list);
|
||||||
|
|
||||||
hctx->dispatched[queued_to_index(queued)]++;
|
|
||||||
|
|
||||||
/* If we didn't flush the entire list, we could have told the driver
|
/* If we didn't flush the entire list, we could have told the driver
|
||||||
* there was more coming, but that turned out to be a lie.
|
* there was more coming, but that turned out to be a lie.
|
||||||
*/
|
*/
|
||||||
@ -4112,17 +4098,12 @@ int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
|
|||||||
if (spin && blk_mq_poll_hybrid(q, hctx, cookie))
|
if (spin && blk_mq_poll_hybrid(q, hctx, cookie))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
hctx->poll_considered++;
|
|
||||||
|
|
||||||
state = get_current_state();
|
state = get_current_state();
|
||||||
do {
|
do {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
hctx->poll_invoked++;
|
|
||||||
|
|
||||||
ret = q->mq_ops->poll(hctx);
|
ret = q->mq_ops->poll(hctx);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
hctx->poll_success++;
|
|
||||||
__set_current_state(TASK_RUNNING);
|
__set_current_state(TASK_RUNNING);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,11 +28,11 @@ struct blk_mq_ctx {
|
|||||||
RH_KABI_BROKEN_INSERT(struct blk_mq_hw_ctx *hctxs[HCTX_MAX_TYPES])
|
RH_KABI_BROKEN_INSERT(struct blk_mq_hw_ctx *hctxs[HCTX_MAX_TYPES])
|
||||||
|
|
||||||
/* incremented at dispatch time */
|
/* incremented at dispatch time */
|
||||||
unsigned long rq_dispatched[2];
|
RH_KABI_DEPRECATE(unsigned long, rq_dispatched[2])
|
||||||
unsigned long rq_merged;
|
RH_KABI_DEPRECATE(unsigned long, rq_merged)
|
||||||
|
|
||||||
/* incremented at completion time */
|
/* incremented at completion time */
|
||||||
unsigned long ____cacheline_aligned_in_smp rq_completed[2];
|
RH_KABI_DEPRECATE(unsigned long ____cacheline_aligned_in_smp, rq_completed[2])
|
||||||
|
|
||||||
struct request_queue *queue;
|
struct request_queue *queue;
|
||||||
struct blk_mq_ctxs *ctxs;
|
struct blk_mq_ctxs *ctxs;
|
||||||
|
|||||||
@ -30,7 +30,7 @@ static void seqiv_aead_encrypt_complete2(struct aead_request *req, int err)
|
|||||||
struct aead_request *subreq = aead_request_ctx(req);
|
struct aead_request *subreq = aead_request_ctx(req);
|
||||||
struct crypto_aead *geniv;
|
struct crypto_aead *geniv;
|
||||||
|
|
||||||
if (err == -EINPROGRESS)
|
if (err == -EINPROGRESS || err == -EBUSY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
|
|||||||
@ -50,9 +50,9 @@ struct blk_mq_hw_ctx {
|
|||||||
struct blk_mq_tags *sched_tags;
|
struct blk_mq_tags *sched_tags;
|
||||||
|
|
||||||
unsigned long queued;
|
unsigned long queued;
|
||||||
unsigned long run;
|
RH_KABI_DEPRECATE(unsigned long, run)
|
||||||
#define BLK_MQ_MAX_DISPATCH_ORDER 7
|
#define BLK_MQ_MAX_DISPATCH_ORDER 7
|
||||||
unsigned long dispatched[BLK_MQ_MAX_DISPATCH_ORDER];
|
RH_KABI_DEPRECATE(unsigned long, dispatched[BLK_MQ_MAX_DISPATCH_ORDER])
|
||||||
|
|
||||||
unsigned int numa_node;
|
unsigned int numa_node;
|
||||||
unsigned int queue_num;
|
unsigned int queue_num;
|
||||||
@ -63,9 +63,9 @@ struct blk_mq_hw_ctx {
|
|||||||
struct hlist_node cpuhp_dead;
|
struct hlist_node cpuhp_dead;
|
||||||
struct kobject kobj;
|
struct kobject kobj;
|
||||||
|
|
||||||
unsigned long poll_considered;
|
RH_KABI_DEPRECATE(unsigned long, poll_considered)
|
||||||
unsigned long poll_invoked;
|
RH_KABI_DEPRECATE(unsigned long, poll_invoked)
|
||||||
unsigned long poll_success;
|
RH_KABI_DEPRECATE(unsigned long, poll_success)
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEBUG_FS
|
#ifdef CONFIG_BLK_DEBUG_FS
|
||||||
struct dentry *debugfs_dir;
|
struct dentry *debugfs_dir;
|
||||||
|
|||||||
@ -4399,7 +4399,7 @@ static int add_tuning_control(struct hda_codec *codec,
|
|||||||
}
|
}
|
||||||
knew.private_value =
|
knew.private_value =
|
||||||
HDA_COMPOSE_AMP_VAL(nid, 1, 0, type);
|
HDA_COMPOSE_AMP_VAL(nid, 1, 0, type);
|
||||||
sprintf(namestr, "%s %s Volume", name, dirstr[dir]);
|
snprintf(namestr, sizeof(namestr), "%s %s Volume", name, dirstr[dir]);
|
||||||
return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
|
return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -336,20 +336,28 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
|
|||||||
|
|
||||||
len = le16_to_cpu(cluster->wLength);
|
len = le16_to_cpu(cluster->wLength);
|
||||||
c = 0;
|
c = 0;
|
||||||
p += sizeof(struct uac3_cluster_header_descriptor);
|
p += sizeof(*cluster);
|
||||||
|
len -= sizeof(*cluster);
|
||||||
|
|
||||||
while (((p - (void *)cluster) < len) && (c < channels)) {
|
while (len > 0 && (c < channels)) {
|
||||||
struct uac3_cluster_segment_descriptor *cs_desc = p;
|
struct uac3_cluster_segment_descriptor *cs_desc = p;
|
||||||
u16 cs_len;
|
u16 cs_len;
|
||||||
u8 cs_type;
|
u8 cs_type;
|
||||||
|
|
||||||
|
if (len < sizeof(*cs_desc))
|
||||||
|
break;
|
||||||
cs_len = le16_to_cpu(cs_desc->wLength);
|
cs_len = le16_to_cpu(cs_desc->wLength);
|
||||||
|
if (len < cs_len)
|
||||||
|
break;
|
||||||
cs_type = cs_desc->bSegmentType;
|
cs_type = cs_desc->bSegmentType;
|
||||||
|
|
||||||
if (cs_type == UAC3_CHANNEL_INFORMATION) {
|
if (cs_type == UAC3_CHANNEL_INFORMATION) {
|
||||||
struct uac3_cluster_information_segment_descriptor *is = p;
|
struct uac3_cluster_information_segment_descriptor *is = p;
|
||||||
unsigned char map;
|
unsigned char map;
|
||||||
|
|
||||||
|
if (cs_len < sizeof(*is))
|
||||||
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: this conversion is not complete, update it
|
* TODO: this conversion is not complete, update it
|
||||||
* after adding UAC3 values to asound.h
|
* after adding UAC3 values to asound.h
|
||||||
@ -451,6 +459,7 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
|
|||||||
chmap->map[c++] = map;
|
chmap->map[c++] = map;
|
||||||
}
|
}
|
||||||
p += cs_len;
|
p += cs_len;
|
||||||
|
len -= cs_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channels < c)
|
if (channels < c)
|
||||||
@ -871,7 +880,7 @@ snd_usb_get_audioformat_uac3(struct snd_usb_audio *chip,
|
|||||||
u64 badd_formats = 0;
|
u64 badd_formats = 0;
|
||||||
unsigned int num_channels;
|
unsigned int num_channels;
|
||||||
struct audioformat *fp;
|
struct audioformat *fp;
|
||||||
u16 cluster_id, wLength;
|
u16 cluster_id, wLength, cluster_wLength;
|
||||||
int clock = 0;
|
int clock = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@ -998,6 +1007,16 @@ snd_usb_get_audioformat_uac3(struct snd_usb_audio *chip,
|
|||||||
return ERR_PTR(-EIO);
|
return ERR_PTR(-EIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cluster_wLength = le16_to_cpu(cluster->wLength);
|
||||||
|
if (cluster_wLength < sizeof(*cluster) ||
|
||||||
|
cluster_wLength > wLength) {
|
||||||
|
dev_err(&dev->dev,
|
||||||
|
"%u:%d : invalid Cluster Descriptor size\n",
|
||||||
|
iface_no, altno);
|
||||||
|
kfree(cluster);
|
||||||
|
return ERR_PTR(-EIO);
|
||||||
|
}
|
||||||
|
|
||||||
num_channels = cluster->bNrChannels;
|
num_channels = cluster->bNrChannels;
|
||||||
chmap = convert_chmap_v3(cluster);
|
chmap = convert_chmap_v3(cluster);
|
||||||
kfree(cluster);
|
kfree(cluster);
|
||||||
|
|||||||
@ -221,6 +221,17 @@ static bool validate_uac3_feature_unit(const void *p,
|
|||||||
return d->bLength >= sizeof(*d) + 4 + 2;
|
return d->bLength >= sizeof(*d) + 4 + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool validate_uac3_power_domain_unit(const void *p,
|
||||||
|
const struct usb_desc_validator *v)
|
||||||
|
{
|
||||||
|
const struct uac3_power_domain_descriptor *d = p;
|
||||||
|
|
||||||
|
if (d->bLength < sizeof(*d))
|
||||||
|
return false;
|
||||||
|
/* baEntities[] + wPDomainDescrStr */
|
||||||
|
return d->bLength >= sizeof(*d) + d->bNrEntities + 2;
|
||||||
|
}
|
||||||
|
|
||||||
static bool validate_midi_out_jack(const void *p,
|
static bool validate_midi_out_jack(const void *p,
|
||||||
const struct usb_desc_validator *v)
|
const struct usb_desc_validator *v)
|
||||||
{
|
{
|
||||||
@ -285,6 +296,7 @@ static const struct usb_desc_validator audio_validators[] = {
|
|||||||
struct uac3_clock_multiplier_descriptor),
|
struct uac3_clock_multiplier_descriptor),
|
||||||
/* UAC_VERSION_3, UAC3_SAMPLE_RATE_CONVERTER: not implemented yet */
|
/* UAC_VERSION_3, UAC3_SAMPLE_RATE_CONVERTER: not implemented yet */
|
||||||
/* UAC_VERSION_3, UAC3_CONNECTORS: not implemented yet */
|
/* UAC_VERSION_3, UAC3_CONNECTORS: not implemented yet */
|
||||||
|
FUNC(UAC_VERSION_3, UAC3_POWER_DOMAIN, validate_uac3_power_domain_unit),
|
||||||
{ } /* terminator */
|
{ } /* terminator */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user