We need the staging/iio fixes in here as well.
Showing the changes to include (28 of 609 files). Show all
Unified · Split
| @@ -48,7 +48,7 @@ struct videomode; · 47 unmodified lines | ||
| 48 | 48 | * @MODE_HSYNC: hsync out of range |
| 49 | 49 | * @MODE_VSYNC: vsync out of range |
| 50 | 50 | * @MODE_H_ILLEGAL: mode has illegal horizontal timings |
| 51 | − * @MODE_V_ILLEGAL: mode has illegal horizontal timings | |
| 51 | + * @MODE_V_ILLEGAL: mode has illegal vertical timings | |
| 52 | 52 | * @MODE_BAD_WIDTH: requires an unsupported linepitch |
| 53 | 53 | * @MODE_NOMODE: no mode with a matching name |
| 54 | 54 | * @MODE_NO_INTERLACE: interlaced mode not supported |
| @@ -245,6 +245,7 @@ · 244 unmodified lines | ||
| 245 | 245 | #define BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN (1 << 0) |
| 246 | 246 | #define BCM54810_SHD_CLK_CTL 0x3 |
| 247 | 247 | #define BCM54810_SHD_CLK_CTL_GTXCLK_EN (1 << 9) |
| 248 | +#define BCM54810_SHD_SCR3_TRDDAPD 0x0100 | |
| 248 | 249 | |
| 249 | 250 | /* BCM54612E Registers */ |
| 250 | 251 | #define BCM54612E_EXP_SPARE0 (MII_BCM54XX_EXP_SEL_ETC + 0x34) |
| @@ -356,4 +356,10 @@ static inline void *offset_to_ptr(const int *off) · 355 unmodified lines | ||
| 356 | 356 | /* &a[0] degrades to a pointer: a different type from an array */ |
| 357 | 357 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) |
| 358 | 358 | |
| 359 | +/* | |
| 360 | + * This is needed in functions which generate the stack canary, see | |
| 361 | + * arch/x86/kernel/smpboot.c::start_secondary() for an example. | |
| 362 | + */ | |
| 363 | +#define prevent_tail_call_optimization() mb() | |
| 364 | + | |
| 359 | 365 | #endif /* __LINUX_COMPILER_H */ |
| @@ -521,6 +521,15 @@ struct cper_sec_pcie { · 520 unmodified lines | ||
| 521 | 521 | u8 aer_info[96]; |
| 522 | 522 | }; |
| 523 | 523 | |
| 524 | +/* Firmware Error Record Reference, UEFI v2.7 sec N.2.10 */ | |
| 525 | +struct cper_sec_fw_err_rec_ref { | |
| 526 | + u8 record_type; | |
| 527 | + u8 revision; | |
| 528 | + u8 reserved[6]; | |
| 529 | + u64 record_identifier; | |
| 530 | + guid_t record_identifier_guid; | |
| 531 | +}; | |
| 532 | + | |
| 524 | 533 | /* Reset to default packing */ |
| 525 | 534 | #pragma pack() |
| 526 | 535 | |
| @@ -1245,4 +1245,6 @@ struct linux_efi_memreserve { · 1244 unmodified lines | ||
| 1245 | 1245 | |
| 1246 | 1246 | void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size); |
| 1247 | 1247 | |
| 1248 | +char *efi_systab_show_arch(char *str); | |
| 1249 | + | |
| 1248 | 1250 | #endif /* _LINUX_EFI_H */ |
| @@ -210,6 +210,29 @@ struct ftrace_ops { · 209 unmodified lines | ||
| 210 | 210 | #endif |
| 211 | 211 | }; |
| 212 | 212 | |
| 213 | +extern struct ftrace_ops __rcu *ftrace_ops_list; | |
| 214 | +extern struct ftrace_ops ftrace_list_end; | |
| 215 | + | |
| 216 | +/* | |
| 217 | + * Traverse the ftrace_global_list, invoking all entries. The reason that we | |
| 218 | + * can use rcu_dereference_raw_check() is that elements removed from this list | |
| 219 | + * are simply leaked, so there is no need to interact with a grace-period | |
| 220 | + * mechanism. The rcu_dereference_raw_check() calls are needed to handle | |
| 221 | + * concurrent insertions into the ftrace_global_list. | |
| 222 | + * | |
| 223 | + * Silly Alpha and silly pointer-speculation compiler optimizations! | |
| 224 | + */ | |
| 225 | +#define do_for_each_ftrace_op(op, list) \ | |
| 226 | + op = rcu_dereference_raw_check(list); \ | |
| 227 | + do | |
| 228 | + | |
| 229 | +/* | |
| 230 | + * Optimized for just a single item in the list (as that is the normal case). | |
| 231 | + */ | |
| 232 | +#define while_for_each_ftrace_op(op) \ | |
| 233 | + while (likely(op = rcu_dereference_raw_check((op)->next)) && \ | |
| 234 | + unlikely((op) != &ftrace_list_end)) | |
| 235 | + | |
| 213 | 236 | /* |
| 214 | 237 | * Type of the current tracing. |
| 215 | 238 | */ |
| @@ -17,9 +17,12 @@ enum host1x_class { · 16 unmodified lines | ||
| 17 | 17 | HOST1X_CLASS_GR3D = 0x60, |
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | +struct host1x; | |
| 20 | 21 | struct host1x_client; |
| 21 | 22 | struct iommu_group; |
| 22 | 23 | |
| 24 | +u64 host1x_get_dma_mask(struct host1x *host1x); | |
| 25 | + | |
| 23 | 26 | /** |
| 24 | 27 | * struct host1x_client_ops - host1x client operations |
| 25 | 28 | * @init: host1x client initialization code |
| @@ -29,7 +29,7 @@ struct i2c_mux_core { · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | int num_adapters; |
| 31 | 31 | int max_adapters; |
| 32 | − struct i2c_adapter *adapter[0]; | |
| 32 | + struct i2c_adapter *adapter[]; | |
| 33 | 33 | }; |
| 34 | 34 | |
| 35 | 35 | struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | /* |
| 3 | 3 | * i2c.h - definitions for the Linux i2c bus interface |
| 4 | 4 | * Copyright (C) 1995-2000 Simon G. Vogl |
| 5 | − * Copyright (C) 2013-2019 Wolfram Sang <wsa@the-dreams.de> | |
| 5 | + * Copyright (C) 2013-2019 Wolfram Sang <wsa@kernel.org> | |
| 6 | 6 | * |
| 7 | 7 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and |
| 8 | 8 | * Frodo Looijaard <frodol@dds.nl> |
| @@ -813,8 +813,11 @@ void kvm_flush_remote_tlbs(struct kvm *kvm); · 812 unmodified lines | ||
| 813 | 813 | void kvm_reload_remote_mmus(struct kvm *kvm); |
| 814 | 814 | |
| 815 | 815 | bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req, |
| 816 | + struct kvm_vcpu *except, | |
| 816 | 817 | unsigned long *vcpu_bitmap, cpumask_var_t tmp); |
| 817 | 818 | bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req); |
| 819 | +bool kvm_make_all_cpus_request_except(struct kvm *kvm, unsigned int req, | |
| 820 | + struct kvm_vcpu *except); | |
| 818 | 821 | bool kvm_make_cpus_request_mask(struct kvm *kvm, unsigned int req, |
| 819 | 822 | unsigned long *vcpu_bitmap); |
| 820 | 823 | |
| @@ -243,7 +243,7 @@ LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, char *name, · 242 unmodified lines | ||
| 243 | 243 | char **value) |
| 244 | 244 | LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size) |
| 245 | 245 | LSM_HOOK(int, 0, ismaclabel, const char *name) |
| 246 | −LSM_HOOK(int, 0, secid_to_secctx, u32 secid, char **secdata, | |
| 246 | +LSM_HOOK(int, -EOPNOTSUPP, secid_to_secctx, u32 secid, char **secdata, | |
| 247 | 247 | u32 *seclen) |
| 248 | 248 | LSM_HOOK(int, 0, secctx_to_secid, const char *secdata, u32 seclen, u32 *secid) |
| 249 | 249 | LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen) |
| @@ -783,6 +783,8 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg, · 782 unmodified lines | ||
| 783 | 783 | atomic_long_inc(&memcg->memory_events[event]); |
| 784 | 784 | cgroup_file_notify(&memcg->events_file); |
| 785 | 785 | |
| 786 | + if (!cgroup_subsys_on_dfl(memory_cgrp_subsys)) | |
| 787 | + break; | |
| 786 | 788 | if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_LOCAL_EVENTS) |
| 787 | 789 | break; |
| 788 | 790 | } while ((memcg = parent_mem_cgroup(memcg)) && |
| @@ -213,6 +213,12 @@ enum mlx5_port_status { · 212 unmodified lines | ||
| 213 | 213 | MLX5_PORT_DOWN = 2, |
| 214 | 214 | }; |
| 215 | 215 | |
| 216 | +enum mlx5_cmdif_state { | |
| 217 | + MLX5_CMDIF_STATE_UNINITIALIZED, | |
| 218 | + MLX5_CMDIF_STATE_UP, | |
| 219 | + MLX5_CMDIF_STATE_DOWN, | |
| 220 | +}; | |
| 221 | + | |
| 216 | 222 | struct mlx5_cmd_first { |
| 217 | 223 | __be32 data[4]; |
| 218 | 224 | }; |
| @@ -258,6 +264,7 @@ struct mlx5_cmd_stats { · 39 unmodified lines | ||
| 258 | 264 | struct mlx5_cmd { |
| 259 | 265 | struct mlx5_nb nb; |
| 260 | 266 | |
| 267 | + enum mlx5_cmdif_state state; | |
| 261 | 268 | void *cmd_alloc_buf; |
| 262 | 269 | dma_addr_t alloc_dma; |
| 263 | 270 | int alloc_size; |
| @@ -284,6 +291,7 @@ struct mlx5_cmd { · 20 unmodified lines | ||
| 284 | 291 | struct semaphore sem; |
| 285 | 292 | struct semaphore pages_sem; |
| 286 | 293 | int mode; |
| 294 | + u16 allowed_opcode; | |
| 287 | 295 | struct mlx5_cmd_work_ent *ent_arr[MLX5_MAX_COMMANDS]; |
| 288 | 296 | struct dma_pool *pool; |
| 289 | 297 | struct mlx5_cmd_debug dbg; |
| @@ -743,6 +751,7 @@ struct mlx5_cmd_work_ent { · 453 unmodified lines | ||
| 743 | 751 | struct delayed_work cb_timeout_work; |
| 744 | 752 | void *context; |
| 745 | 753 | int idx; |
| 754 | + struct completion handling; | |
| 746 | 755 | struct completion done; |
| 747 | 756 | struct mlx5_cmd *cmd; |
| 748 | 757 | struct work_struct work; |
| @@ -874,10 +883,17 @@ mlx5_frag_buf_get_idx_last_contig_stride(struct mlx5_frag_buf_ctrl *fbc, u32 ix) · 125 unmodified lines | ||
| 874 | 883 | return min_t(u32, last_frag_stride_idx - fbc->strides_offset, fbc->sz_m1); |
| 875 | 884 | } |
| 876 | 885 | |
| 886 | +enum { | |
| 887 | + CMD_ALLOWED_OPCODE_ALL, | |
| 888 | +}; | |
| 889 | + | |
| 877 | 890 | int mlx5_cmd_init(struct mlx5_core_dev *dev); |
| 878 | 891 | void mlx5_cmd_cleanup(struct mlx5_core_dev *dev); |
| 892 | +void mlx5_cmd_set_state(struct mlx5_core_dev *dev, | |
| 893 | + enum mlx5_cmdif_state cmdif_state); | |
| 879 | 894 | void mlx5_cmd_use_events(struct mlx5_core_dev *dev); |
| 880 | 895 | void mlx5_cmd_use_polling(struct mlx5_core_dev *dev); |
| 896 | +void mlx5_cmd_allowed_opcode(struct mlx5_core_dev *dev, u16 opcode); | |
| 881 | 897 | |
| 882 | 898 | struct mlx5_async_ctx { |
| 883 | 899 | struct mlx5_core_dev *dev; |
| @@ -105,10 +105,10 @@ struct ptp_system_timestamp { · 104 unmodified lines | ||
| 105 | 105 | * parameter func: the desired function to use. |
| 106 | 106 | * parameter chan: the function channel index to use. |
| 107 | 107 | * |
| 108 | − * @do_work: Request driver to perform auxiliary (periodic) operations | |
| 109 | − * Driver should return delay of the next auxiliary work scheduling | |
| 110 | − * time (>=0) or negative value in case further scheduling | |
| 111 | − * is not required. | |
| 108 | + * @do_aux_work: Request driver to perform auxiliary (periodic) operations | |
| 109 | + * Driver should return delay of the next auxiliary work | |
| 110 | + * scheduling time (>=0) or negative value in case further | |
| 111 | + * scheduling is not required. | |
| 112 | 112 | * |
| 113 | 113 | * Drivers should embed their ptp_clock_info within a private |
| 114 | 114 | * structure, obtaining a reference to it using container_of(). |
| @@ -187,6 +187,7 @@ static inline void sk_msg_xfer(struct sk_msg *dst, struct sk_msg *src, · 186 unmodified lines | ||
| 187 | 187 | dst->sg.data[which] = src->sg.data[which]; |
| 188 | 188 | dst->sg.data[which].length = size; |
| 189 | 189 | dst->sg.size += size; |
| 190 | + src->sg.size -= size; | |
| 190 | 191 | src->sg.data[which].length -= size; |
| 191 | 192 | src->sg.data[which].offset += size; |
| 192 | 193 | } |
| @@ -21,6 +21,7 @@ · 20 unmodified lines | ||
| 21 | 21 | struct gss_ctx { |
| 22 | 22 | struct gss_api_mech *mech_type; |
| 23 | 23 | void *internal_ctx_id; |
| 24 | + unsigned int slack, align; | |
| 24 | 25 | }; |
| 25 | 26 | |
| 26 | 27 | #define GSS_C_NO_BUFFER ((struct xdr_netobj) 0) |
| @@ -66,6 +67,7 @@ u32 gss_wrap( · 39 unmodified lines | ||
| 66 | 67 | u32 gss_unwrap( |
| 67 | 68 | struct gss_ctx *ctx_id, |
| 68 | 69 | int offset, |
| 70 | + int len, | |
| 69 | 71 | struct xdr_buf *inbuf); |
| 70 | 72 | u32 gss_delete_sec_context( |
| 71 | 73 | struct gss_ctx **ctx_id); |
| @@ -126,6 +128,7 @@ struct gss_api_ops { · 54 unmodified lines | ||
| 126 | 128 | u32 (*gss_unwrap)( |
| 127 | 129 | struct gss_ctx *ctx_id, |
| 128 | 130 | int offset, |
| 131 | + int len, | |
| 129 | 132 | struct xdr_buf *buf); |
| 130 | 133 | void (*gss_delete_sec_context)( |
| 131 | 134 | void *internal_ctx_id); |
| @@ -83,7 +83,7 @@ struct gss_krb5_enctype { · 82 unmodified lines | ||
| 83 | 83 | u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset, |
| 84 | 84 | struct xdr_buf *buf, |
| 85 | 85 | struct page **pages); /* v2 encryption function */ |
| 86 | − u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, | |
| 86 | + u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, u32 len, | |
| 87 | 87 | struct xdr_buf *buf, u32 *headskip, |
| 88 | 88 | u32 *tailskip); /* v2 decryption function */ |
| 89 | 89 | }; |
| @@ -255,7 +255,7 @@ gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset, · 165 unmodified lines | ||
| 255 | 255 | struct xdr_buf *outbuf, struct page **pages); |
| 256 | 256 | |
| 257 | 257 | u32 |
| 258 | −gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset, | |
| 258 | +gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset, int len, | |
| 259 | 259 | struct xdr_buf *buf); |
| 260 | 260 | |
| 261 | 261 | |
| @@ -312,7 +312,7 @@ gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, · 50 unmodified lines | ||
| 312 | 312 | struct page **pages); |
| 313 | 313 | |
| 314 | 314 | u32 |
| 315 | −gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, | |
| 315 | +gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len, | |
| 316 | 316 | struct xdr_buf *buf, u32 *plainoffset, |
| 317 | 317 | u32 *plainlen); |
| 318 | 318 | |
| @@ -184,6 +184,7 @@ xdr_adjust_iovec(struct kvec *iov, __be32 *p) · 183 unmodified lines | ||
| 184 | 184 | extern void xdr_shift_buf(struct xdr_buf *, size_t); |
| 185 | 185 | extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *); |
| 186 | 186 | extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, unsigned int, unsigned int); |
| 187 | +extern void xdr_buf_trim(struct xdr_buf *, unsigned int); | |
| 187 | 188 | extern int read_bytes_from_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int); |
| 188 | 189 | extern int write_bytes_to_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int); |
| 189 | 190 | |
| @@ -75,7 +75,8 @@ static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm) · 74 unmodified lines | ||
| 75 | 75 | { |
| 76 | 76 | dtm->install = jiffies_to_clock_t(jiffies - stm->install); |
| 77 | 77 | dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse); |
| 78 | − dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse); | |
| 78 | + dtm->firstuse = stm->firstuse ? | |
| 79 | + jiffies_to_clock_t(jiffies - stm->firstuse) : 0; | |
| 79 | 80 | dtm->expires = jiffies_to_clock_t(stm->expires); |
| 80 | 81 | } |
| 81 | 82 | |
| @@ -59,7 +59,7 @@ bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *, · 58 unmodified lines | ||
| 59 | 59 | void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *); |
| 60 | 60 | void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *, |
| 61 | 61 | struct sockaddr_rxrpc *); |
| 62 | −u64 rxrpc_kernel_get_rtt(struct socket *, struct rxrpc_call *); | |
| 62 | +u32 rxrpc_kernel_get_srtt(struct socket *, struct rxrpc_call *); | |
| 63 | 63 | int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t, |
| 64 | 64 | rxrpc_user_attach_call_t, unsigned long, gfp_t, |
| 65 | 65 | unsigned int); |
| @@ -257,7 +257,6 @@ struct fib_dump_filter { · 256 unmodified lines | ||
| 257 | 257 | u32 table_id; |
| 258 | 258 | /* filter_set is an optimization that an entry is set */ |
| 259 | 259 | bool filter_set; |
| 260 | − bool dump_all_families; | |
| 261 | 260 | bool dump_routes; |
| 262 | 261 | bool dump_exceptions; |
| 263 | 262 | unsigned char protocol; |
| @@ -87,7 +87,7 @@ struct nf_conn { · 86 unmodified lines | ||
| 87 | 87 | struct hlist_node nat_bysource; |
| 88 | 88 | #endif |
| 89 | 89 | /* all members below initialized via memset */ |
| 90 | − u8 __nfct_init_offset[0]; | |
| 90 | + struct { } __nfct_init_offset; | |
| 91 | 91 | |
| 92 | 92 | /* If we were expected by an expectation, this will be it */ |
| 93 | 93 | struct nf_conn *master; |
| @@ -127,6 +127,7 @@ enum nf_flow_flags { · 126 unmodified lines | ||
| 127 | 127 | NF_FLOW_HW_DYING, |
| 128 | 128 | NF_FLOW_HW_DEAD, |
| 129 | 129 | NF_FLOW_HW_REFRESH, |
| 130 | + NF_FLOW_HW_PENDING, | |
| 130 | 131 | }; |
| 131 | 132 | |
| 132 | 133 | enum flow_offload_type { |
| @@ -1376,7 +1376,6 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) · 1375 unmodified lines | ||
| 1376 | 1376 | rx_opt->num_sacks = 0; |
| 1377 | 1377 | } |
| 1378 | 1378 | |
| 1379 | −u32 tcp_default_init_rwnd(u32 mss); | |
| 1380 | 1379 | void tcp_cwnd_restart(struct sock *sk, s32 delta); |
| 1381 | 1380 | |
| 1382 | 1381 | static inline void tcp_slow_start_after_idle_check(struct sock *sk) |
| @@ -1421,6 +1420,19 @@ static inline int tcp_full_space(const struct sock *sk) · 38 unmodified lines | ||
| 1421 | 1420 | return tcp_win_from_space(sk, READ_ONCE(sk->sk_rcvbuf)); |
| 1422 | 1421 | } |
| 1423 | 1422 | |
| 1423 | +/* We provision sk_rcvbuf around 200% of sk_rcvlowat. | |
| 1424 | + * If 87.5 % (7/8) of the space has been consumed, we want to override | |
| 1425 | + * SO_RCVLOWAT constraint, since we are receiving skbs with too small | |
| 1426 | + * len/truesize ratio. | |
| 1427 | + */ | |
| 1428 | +static inline bool tcp_rmem_pressure(const struct sock *sk) | |
| 1429 | +{ | |
| 1430 | + int rcvbuf = READ_ONCE(sk->sk_rcvbuf); | |
| 1431 | + int threshold = rcvbuf - (rcvbuf >> 3); | |
| 1432 | + | |
| 1433 | + return atomic_read(&sk->sk_rmem_alloc) > threshold; | |
| 1434 | +} | |
| 1435 | + | |
| 1424 | 1436 | extern void tcp_openreq_init_rwin(struct request_sock *req, |
| 1425 | 1437 | const struct sock *sk_listener, |
| 1426 | 1438 | const struct dst_entry *dst); |
| @@ -143,14 +143,12 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb · 142 unmodified lines | ||
| 143 | 143 | __be16 df, __be16 src_port, __be16 dst_port, |
| 144 | 144 | bool xnet, bool nocheck); |
| 145 | 145 | |
| 146 | −#if IS_ENABLED(CONFIG_IPV6) | |
| 147 | 146 | int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, |
| 148 | 147 | struct sk_buff *skb, |
| 149 | 148 | struct net_device *dev, struct in6_addr *saddr, |
| 150 | 149 | struct in6_addr *daddr, |
| 151 | 150 | __u8 prio, __u8 ttl, __be32 label, |
| 152 | 151 | __be16 src_port, __be16 dst_port, bool nocheck); |
| 153 | −#endif | |
| 154 | 152 | |
| 155 | 153 | void udp_tunnel_sock_release(struct socket *sock); |
| 156 | 154 | |
| @@ -61,6 +61,7 @@ struct snd_rawmidi_runtime { · 60 unmodified lines | ||
| 61 | 61 | size_t avail_min; /* min avail for wakeup */ |
| 62 | 62 | size_t avail; /* max used buffer for wakeup */ |
| 63 | 63 | size_t xruns; /* over/underruns counter */ |
| 64 | + int buffer_ref; /* buffer reference count */ | |
| 64 | 65 | /* misc */ |
| 65 | 66 | spinlock_t lock; |
| 66 | 67 | wait_queue_head_t sleep; |
| @@ -1112,18 +1112,17 @@ TRACE_EVENT(rxrpc_rtt_tx, · 1111 unmodified lines | ||
| 1112 | 1112 | TRACE_EVENT(rxrpc_rtt_rx, |
| 1113 | 1113 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, |
| 1114 | 1114 | rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, |
| 1115 | − s64 rtt, u8 nr, s64 avg), | |
| 1115 | + u32 rtt, u32 rto), | |
| 1116 | 1116 | |
| 1117 | − TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), | |
| 1117 | + TP_ARGS(call, why, send_serial, resp_serial, rtt, rto), | |
| 1118 | 1118 | |
| 1119 | 1119 | TP_STRUCT__entry( |
| 1120 | 1120 | __field(unsigned int, call ) |
| 1121 | 1121 | __field(enum rxrpc_rtt_rx_trace, why ) |
| 1122 | − __field(u8, nr ) | |
| 1123 | 1122 | __field(rxrpc_serial_t, send_serial ) |
| 1124 | 1123 | __field(rxrpc_serial_t, resp_serial ) |
| 1125 | − __field(s64, rtt ) | |
| 1126 | − __field(u64, avg ) | |
| 1124 | + __field(u32, rtt ) | |
| 1125 | + __field(u32, rto ) | |
| 1127 | 1126 | ), |
| 1128 | 1127 | |
| 1129 | 1128 | TP_fast_assign( |
| @@ -1132,18 +1131,16 @@ TRACE_EVENT(rxrpc_rtt_rx, · 2 unmodified lines | ||
| 1132 | 1131 | __entry->send_serial = send_serial; |
| 1133 | 1132 | __entry->resp_serial = resp_serial; |
| 1134 | 1133 | __entry->rtt = rtt; |
| 1135 | − __entry->nr = nr; | |
| 1136 | − __entry->avg = avg; | |
| 1134 | + __entry->rto = rto; | |
| 1137 | 1135 | ), |
| 1138 | 1136 | |
| 1139 | − TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", | |
| 1137 | + TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%u rto=%u", | |
| 1140 | 1138 | __entry->call, |
| 1141 | 1139 | __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), |
| 1142 | 1140 | __entry->send_serial, |
| 1143 | 1141 | __entry->resp_serial, |
| 1144 | 1142 | __entry->rtt, |
| 1145 | − __entry->nr, | |
| 1146 | − __entry->avg) | |
| 1143 | + __entry->rto) | |
| 1147 | 1144 | ); |
| 1148 | 1145 | |
| 1149 | 1146 | TRACE_EVENT(rxrpc_timer, |
| @@ -1544,6 +1541,41 @@ TRACE_EVENT(rxrpc_notify_socket, · 394 unmodified lines | ||
| 1544 | 1541 | __entry->serial) |
| 1545 | 1542 | ); |
| 1546 | 1543 | |
| 1544 | +TRACE_EVENT(rxrpc_rx_discard_ack, | |
| 1545 | + TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, | |
| 1546 | + rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first, | |
| 1547 | + rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev), | |
| 1548 | + | |
| 1549 | + TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first, | |
| 1550 | + prev_pkt, call_ackr_prev), | |
| 1551 | + | |
| 1552 | + TP_STRUCT__entry( | |
| 1553 | + __field(unsigned int, debug_id ) | |
| 1554 | + __field(rxrpc_serial_t, serial ) | |
| 1555 | + __field(rxrpc_seq_t, first_soft_ack) | |
| 1556 | + __field(rxrpc_seq_t, call_ackr_first) | |
| 1557 | + __field(rxrpc_seq_t, prev_pkt) | |
| 1558 | + __field(rxrpc_seq_t, call_ackr_prev) | |
| 1559 | + ), | |
| 1560 | + | |
| 1561 | + TP_fast_assign( | |
| 1562 | + __entry->debug_id = debug_id; | |
| 1563 | + __entry->serial = serial; | |
| 1564 | + __entry->first_soft_ack = first_soft_ack; | |
| 1565 | + __entry->call_ackr_first = call_ackr_first; | |
| 1566 | + __entry->prev_pkt = prev_pkt; | |
| 1567 | + __entry->call_ackr_prev = call_ackr_prev; | |
| 1568 | + ), | |
| 1569 | + | |
| 1570 | + TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x", | |
| 1571 | + __entry->debug_id, | |
| 1572 | + __entry->serial, | |
| 1573 | + __entry->first_soft_ack, | |
| 1574 | + __entry->call_ackr_first, | |
| 1575 | + __entry->prev_pkt, | |
| 1576 | + __entry->call_ackr_prev) | |
| 1577 | + ); | |
| 1578 | + | |
| 1547 | 1579 | #endif /* _TRACE_RXRPC_H */ |
| 1548 | 1580 | |
| 1549 | 1581 | /* This part must be outside protection */ |
| @@ -93,6 +93,64 @@ struct usb_raw_ep_io { · 92 unmodified lines | ||
| 93 | 93 | __u8 data[0]; |
| 94 | 94 | }; |
| 95 | 95 | |
| 96 | +/* Maximum number of non-control endpoints in struct usb_raw_eps_info. */ | |
| 97 | +#define USB_RAW_EPS_NUM_MAX 30 | |
| 98 | + | |
| 99 | +/* Maximum length of UDC endpoint name in struct usb_raw_ep_info. */ | |
| 100 | +#define USB_RAW_EP_NAME_MAX 16 | |
| 101 | + | |
| 102 | +/* Used as addr in struct usb_raw_ep_info if endpoint accepts any address. */ | |
| 103 | +#define USB_RAW_EP_ADDR_ANY 0xff | |
| 104 | + | |
| 105 | +/* | |
| 106 | + * struct usb_raw_ep_caps - exposes endpoint capabilities from struct usb_ep | |
| 107 | + * (technically from its member struct usb_ep_caps). | |
| 108 | + */ | |
| 109 | +struct usb_raw_ep_caps { | |
| 110 | + __u32 type_control : 1; | |
| 111 | + __u32 type_iso : 1; | |
| 112 | + __u32 type_bulk : 1; | |
| 113 | + __u32 type_int : 1; | |
| 114 | + __u32 dir_in : 1; | |
| 115 | + __u32 dir_out : 1; | |
| 116 | +}; | |
| 117 | + | |
| 118 | +/* | |
| 119 | + * struct usb_raw_ep_limits - exposes endpoint limits from struct usb_ep. | |
| 120 | + * @maxpacket_limit: Maximum packet size value supported by this endpoint. | |
| 121 | + * @max_streams: maximum number of streams supported by this endpoint | |
| 122 | + * (actual number is 2^n). | |
| 123 | + * @reserved: Empty, reserved for potential future extensions. | |
| 124 | + */ | |
| 125 | +struct usb_raw_ep_limits { | |
| 126 | + __u16 maxpacket_limit; | |
| 127 | + __u16 max_streams; | |
| 128 | + __u32 reserved; | |
| 129 | +}; | |
| 130 | + | |
| 131 | +/* | |
| 132 | + * struct usb_raw_ep_info - stores information about a gadget endpoint. | |
| 133 | + * @name: Name of the endpoint as it is defined in the UDC driver. | |
| 134 | + * @addr: Address of the endpoint that must be specified in the endpoint | |
| 135 | + * descriptor passed to USB_RAW_IOCTL_EP_ENABLE ioctl. | |
| 136 | + * @caps: Endpoint capabilities. | |
| 137 | + * @limits: Endpoint limits. | |
| 138 | + */ | |
| 139 | +struct usb_raw_ep_info { | |
| 140 | + __u8 name[USB_RAW_EP_NAME_MAX]; | |
| 141 | + __u32 addr; | |
| 142 | + struct usb_raw_ep_caps caps; | |
| 143 | + struct usb_raw_ep_limits limits; | |
| 144 | +}; | |
| 145 | + | |
| 146 | +/* | |
| 147 | + * struct usb_raw_eps_info - argument for USB_RAW_IOCTL_EPS_INFO ioctl. | |
| 148 | + * eps: Structures that store information about non-control endpoints. | |
| 149 | + */ | |
| 150 | +struct usb_raw_eps_info { | |
| 151 | + struct usb_raw_ep_info eps[USB_RAW_EPS_NUM_MAX]; | |
| 152 | +}; | |
| 153 | + | |
| 96 | 154 | /* |
| 97 | 155 | * Initializes a Raw Gadget instance. |
| 98 | 156 | * Accepts a pointer to the usb_raw_init struct as an argument. |
| @@ -115,37 +173,38 @@ struct usb_raw_ep_io { · 16 unmodified lines | ||
| 115 | 173 | #define USB_RAW_IOCTL_EVENT_FETCH _IOR('U', 2, struct usb_raw_event) |
| 116 | 174 | |
| 117 | 175 | /* |
| 118 | − * Queues an IN (OUT for READ) urb as a response to the last control request | |
| 119 | − * received on endpoint 0, provided that was an IN (OUT for READ) request and | |
| 120 | − * waits until the urb is completed. Copies received data to user for READ. | |
| 176 | + * Queues an IN (OUT for READ) request as a response to the last setup request | |
| 177 | + * received on endpoint 0 (provided that was an IN (OUT for READ) request), and | |
| 178 | + * waits until the request is completed. Copies received data to user for READ. | |
| 121 | 179 | * Accepts a pointer to the usb_raw_ep_io struct as an argument. |
| 122 | − * Returns length of trasferred data on success or negative error code on | |
| 180 | + * Returns length of transferred data on success or negative error code on | |
| 123 | 181 | * failure. |
| 124 | 182 | */ |
| 125 | 183 | #define USB_RAW_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_raw_ep_io) |
| 126 | 184 | #define USB_RAW_IOCTL_EP0_READ _IOWR('U', 4, struct usb_raw_ep_io) |
| 127 | 185 | |
| 128 | 186 | /* |
| 129 | − * Finds an endpoint that supports the transfer type specified in the | |
| 130 | − * descriptor and enables it. | |
| 131 | − * Accepts a pointer to the usb_endpoint_descriptor struct as an argument. | |
| 187 | + * Finds an endpoint that satisfies the parameters specified in the provided | |
| 188 | + * descriptors (address, transfer type, etc.) and enables it. | |
| 189 | + * Accepts a pointer to the usb_raw_ep_descs struct as an argument. | |
| 132 | 190 | * Returns enabled endpoint handle on success or negative error code on failure. |
| 133 | 191 | */ |
| 134 | 192 | #define USB_RAW_IOCTL_EP_ENABLE _IOW('U', 5, struct usb_endpoint_descriptor) |
| 135 | 193 | |
| 136 | −/* Disables specified endpoint. | |
| 194 | +/* | |
| 195 | + * Disables specified endpoint. | |
| 137 | 196 | * Accepts endpoint handle as an argument. |
| 138 | 197 | * Returns 0 on success or negative error code on failure. |
| 139 | 198 | */ |
| 140 | 199 | #define USB_RAW_IOCTL_EP_DISABLE _IOW('U', 6, __u32) |
| 141 | 200 | |
| 142 | 201 | /* |
| 143 | − * Queues an IN (OUT for READ) urb as a response to the last control request | |
| 144 | − * received on endpoint usb_raw_ep_io.ep, provided that was an IN (OUT for READ) | |
| 145 | − * request and waits until the urb is completed. Copies received data to user | |
| 146 | − * for READ. | |
| 202 | + * Queues an IN (OUT for READ) request as a response to the last setup request | |
| 203 | + * received on endpoint usb_raw_ep_io.ep (provided that was an IN (OUT for READ) | |
| 204 | + * request), and waits until the request is completed. Copies received data to | |
| 205 | + * user for READ. | |
| 147 | 206 | * Accepts a pointer to the usb_raw_ep_io struct as an argument. |
| 148 | − * Returns length of trasferred data on success or negative error code on | |
| 207 | + * Returns length of transferred data on success or negative error code on | |
| 149 | 208 | * failure. |
| 150 | 209 | */ |
| 151 | 210 | #define USB_RAW_IOCTL_EP_WRITE _IOW('U', 7, struct usb_raw_ep_io) |
| @@ -164,4 +223,27 @@ struct usb_raw_ep_io { · 12 unmodified lines | ||
| 164 | 223 | */ |
| 165 | 224 | #define USB_RAW_IOCTL_VBUS_DRAW _IOW('U', 10, __u32) |
| 166 | 225 | |
| 226 | +/* | |
| 227 | + * Fills in the usb_raw_eps_info structure with information about non-control | |
| 228 | + * endpoints available for the currently connected UDC. | |
| 229 | + * Returns the number of available endpoints on success or negative error code | |
| 230 | + * on failure. | |
| 231 | + */ | |
| 232 | +#define USB_RAW_IOCTL_EPS_INFO _IOR('U', 11, struct usb_raw_eps_info) | |
| 233 | + | |
| 234 | +/* | |
| 235 | + * Stalls a pending control request on endpoint 0. | |
| 236 | + * Returns 0 on success or negative error code on failure. | |
| 237 | + */ | |
| 238 | +#define USB_RAW_IOCTL_EP0_STALL _IO('U', 12) | |
| 239 | + | |
| 240 | +/* | |
| 241 | + * Sets or clears halt or wedge status of the endpoint. | |
| 242 | + * Accepts endpoint handle as an argument. | |
| 243 | + * Returns 0 on success or negative error code on failure. | |
| 244 | + */ | |
| 245 | +#define USB_RAW_IOCTL_EP_SET_HALT _IOW('U', 13, __u32) | |
| 246 | +#define USB_RAW_IOCTL_EP_CLEAR_HALT _IOW('U', 14, __u32) | |
| 247 | +#define USB_RAW_IOCTL_EP_SET_WEDGE _IOW('U', 15, __u32) | |
| 248 | + | |
| 167 | 249 | #endif /* _UAPI__LINUX_USB_RAW_GADGET_H */ |