History

Merge 5.7-rc7 into staging-next

We need the staging/iio fixes in here as well.

Greg Kroah-Hartman committed 6 years ago

Commit c2312ff2 parents a3975de 9cb1fd0609 files · +5047 −2480Browse files

Showing the changes to include (28 of 609 files). Show all

Unified · Split

28 files
  1. include/drm/drm_modes.h +1 −1
  2. include/linux/brcmphy.h +1 −0
  3. include/linux/compiler.h +6 −0
  4. include/linux/cper.h +9 −0
  5. include/linux/efi.h +2 −0
  6. include/linux/ftrace.h +23 −0
  7. include/linux/host1x.h +3 −0
  8. include/linux/i2c-mux.h +1 −1
  9. include/linux/i2c.h +1 −1
  10. include/linux/kvm_host.h +3 −0
  11. include/linux/lsm_hook_defs.h +1 −1
  12. include/linux/memcontrol.h +2 −0
  13. include/linux/mlx5/driver.h +16 −0
  14. include/linux/ptp_clock_kernel.h +4 −4
  15. include/linux/skmsg.h +1 −0
  16. include/linux/sunrpc/gss_api.h +3 −0
  17. include/linux/sunrpc/gss_krb5.h +3 −3
  18. include/linux/sunrpc/xdr.h +1 −0
  19. include/net/act_api.h +2 −1
  20. include/net/af_rxrpc.h +1 −1
  21. include/net/ip_fib.h +0 −1
  22. include/net/netfilter/nf_conntrack.h +1 −1
  23. include/net/netfilter/nf_flow_table.h +1 −0
  24. include/net/tcp.h +13 −1
  25. include/net/udp_tunnel.h +0 −2
  26. include/sound/rawmidi.h +1 −0
  27. include/trace/events/rxrpc.h +42 −10
  28. include/uapi/linux/usb/raw_gadget.h +95 −13
include/drm/drm_modes.h+1−1
@@ -48,7 +48,7 @@ struct videomode; · 47 unmodified lines
4848 * @MODE_HSYNC: hsync out of range
4949 * @MODE_VSYNC: vsync out of range
5050 * @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
5252 * @MODE_BAD_WIDTH: requires an unsupported linepitch
5353 * @MODE_NOMODE: no mode with a matching name
5454 * @MODE_NO_INTERLACE: interlaced mode not supported
include/linux/brcmphy.h+1−0
@@ -245,6 +245,7 @@ · 244 unmodified lines
245245 #define BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN (1 << 0)
246246 #define BCM54810_SHD_CLK_CTL 0x3
247247 #define BCM54810_SHD_CLK_CTL_GTXCLK_EN (1 << 9)
248+#define BCM54810_SHD_SCR3_TRDDAPD 0x0100
248249
249250 /* BCM54612E Registers */
250251 #define BCM54612E_EXP_SPARE0 (MII_BCM54XX_EXP_SEL_ETC + 0x34)
include/linux/compiler.h+6−0
@@ -356,4 +356,10 @@ static inline void *offset_to_ptr(const int *off) · 355 unmodified lines
356356 /* &a[0] degrades to a pointer: a different type from an array */
357357 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
358358
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+
359365 #endif /* __LINUX_COMPILER_H */
include/linux/cper.h+9−0
@@ -521,6 +521,15 @@ struct cper_sec_pcie { · 520 unmodified lines
521521 u8 aer_info[96];
522522 };
523523
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+
524533 /* Reset to default packing */
525534 #pragma pack()
526535
include/linux/efi.h+2−0
@@ -1245,4 +1245,6 @@ struct linux_efi_memreserve { · 1244 unmodified lines
12451245
12461246 void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size);
12471247
1248+char *efi_systab_show_arch(char *str);
1249+
12481250 #endif /* _LINUX_EFI_H */
include/linux/ftrace.h+23−0
@@ -210,6 +210,29 @@ struct ftrace_ops { · 209 unmodified lines
210210 #endif
211211 };
212212
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+
213236 /*
214237 * Type of the current tracing.
215238 */
include/linux/host1x.h+3−0
@@ -17,9 +17,12 @@ enum host1x_class { · 16 unmodified lines
1717 HOST1X_CLASS_GR3D = 0x60,
1818 };
1919
20+struct host1x;
2021 struct host1x_client;
2122 struct iommu_group;
2223
24+u64 host1x_get_dma_mask(struct host1x *host1x);
25+
2326 /**
2427 * struct host1x_client_ops - host1x client operations
2528 * @init: host1x client initialization code
include/linux/i2c-mux.h+1−1
@@ -29,7 +29,7 @@ struct i2c_mux_core { · 28 unmodified lines
2929
3030 int num_adapters;
3131 int max_adapters;
32− struct i2c_adapter *adapter[0];
32+ struct i2c_adapter *adapter[];
3333 };
3434
3535 struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent,
include/linux/i2c.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * i2c.h - definitions for the Linux i2c bus interface
44 * 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>
66 *
77 * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
88 * Frodo Looijaard <frodol@dds.nl>
include/linux/kvm_host.h+3−0
@@ -813,8 +813,11 @@ void kvm_flush_remote_tlbs(struct kvm *kvm); · 812 unmodified lines
813813 void kvm_reload_remote_mmus(struct kvm *kvm);
814814
815815 bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
816+ struct kvm_vcpu *except,
816817 unsigned long *vcpu_bitmap, cpumask_var_t tmp);
817818 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);
818821 bool kvm_make_cpus_request_mask(struct kvm *kvm, unsigned int req,
819822 unsigned long *vcpu_bitmap);
820823
include/linux/lsm_hook_defs.h+1−1
@@ -243,7 +243,7 @@ LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, char *name, · 242 unmodified lines
243243 char **value)
244244 LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size)
245245 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,
247247 u32 *seclen)
248248 LSM_HOOK(int, 0, secctx_to_secid, const char *secdata, u32 seclen, u32 *secid)
249249 LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen)
include/linux/memcontrol.h+2−0
@@ -783,6 +783,8 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg, · 782 unmodified lines
783783 atomic_long_inc(&memcg->memory_events[event]);
784784 cgroup_file_notify(&memcg->events_file);
785785
786+ if (!cgroup_subsys_on_dfl(memory_cgrp_subsys))
787+ break;
786788 if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_LOCAL_EVENTS)
787789 break;
788790 } while ((memcg = parent_mem_cgroup(memcg)) &&
include/linux/mlx5/driver.h+16−0
@@ -213,6 +213,12 @@ enum mlx5_port_status { · 212 unmodified lines
213213 MLX5_PORT_DOWN = 2,
214214 };
215215
216+enum mlx5_cmdif_state {
217+ MLX5_CMDIF_STATE_UNINITIALIZED,
218+ MLX5_CMDIF_STATE_UP,
219+ MLX5_CMDIF_STATE_DOWN,
220+};
221+
216222 struct mlx5_cmd_first {
217223 __be32 data[4];
218224 };
@@ -258,6 +264,7 @@ struct mlx5_cmd_stats { · 39 unmodified lines
258264 struct mlx5_cmd {
259265 struct mlx5_nb nb;
260266
267+ enum mlx5_cmdif_state state;
261268 void *cmd_alloc_buf;
262269 dma_addr_t alloc_dma;
263270 int alloc_size;
@@ -284,6 +291,7 @@ struct mlx5_cmd { · 20 unmodified lines
284291 struct semaphore sem;
285292 struct semaphore pages_sem;
286293 int mode;
294+ u16 allowed_opcode;
287295 struct mlx5_cmd_work_ent *ent_arr[MLX5_MAX_COMMANDS];
288296 struct dma_pool *pool;
289297 struct mlx5_cmd_debug dbg;
@@ -743,6 +751,7 @@ struct mlx5_cmd_work_ent { · 453 unmodified lines
743751 struct delayed_work cb_timeout_work;
744752 void *context;
745753 int idx;
754+ struct completion handling;
746755 struct completion done;
747756 struct mlx5_cmd *cmd;
748757 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
874883 return min_t(u32, last_frag_stride_idx - fbc->strides_offset, fbc->sz_m1);
875884 }
876885
886+enum {
887+ CMD_ALLOWED_OPCODE_ALL,
888+};
889+
877890 int mlx5_cmd_init(struct mlx5_core_dev *dev);
878891 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);
879894 void mlx5_cmd_use_events(struct mlx5_core_dev *dev);
880895 void mlx5_cmd_use_polling(struct mlx5_core_dev *dev);
896+void mlx5_cmd_allowed_opcode(struct mlx5_core_dev *dev, u16 opcode);
881897
882898 struct mlx5_async_ctx {
883899 struct mlx5_core_dev *dev;
include/linux/ptp_clock_kernel.h+4−4
@@ -105,10 +105,10 @@ struct ptp_system_timestamp { · 104 unmodified lines
105105 * parameter func: the desired function to use.
106106 * parameter chan: the function channel index to use.
107107 *
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.
112112 *
113113 * Drivers should embed their ptp_clock_info within a private
114114 * structure, obtaining a reference to it using container_of().
include/linux/skmsg.h+1−0
@@ -187,6 +187,7 @@ static inline void sk_msg_xfer(struct sk_msg *dst, struct sk_msg *src, · 186 unmodified lines
187187 dst->sg.data[which] = src->sg.data[which];
188188 dst->sg.data[which].length = size;
189189 dst->sg.size += size;
190+ src->sg.size -= size;
190191 src->sg.data[which].length -= size;
191192 src->sg.data[which].offset += size;
192193 }
include/linux/sunrpc/gss_api.h+3−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 struct gss_ctx {
2222 struct gss_api_mech *mech_type;
2323 void *internal_ctx_id;
24+ unsigned int slack, align;
2425 };
2526
2627 #define GSS_C_NO_BUFFER ((struct xdr_netobj) 0)
@@ -66,6 +67,7 @@ u32 gss_wrap( · 39 unmodified lines
6667 u32 gss_unwrap(
6768 struct gss_ctx *ctx_id,
6869 int offset,
70+ int len,
6971 struct xdr_buf *inbuf);
7072 u32 gss_delete_sec_context(
7173 struct gss_ctx **ctx_id);
@@ -126,6 +128,7 @@ struct gss_api_ops { · 54 unmodified lines
126128 u32 (*gss_unwrap)(
127129 struct gss_ctx *ctx_id,
128130 int offset,
131+ int len,
129132 struct xdr_buf *buf);
130133 void (*gss_delete_sec_context)(
131134 void *internal_ctx_id);
include/linux/sunrpc/gss_krb5.h+3−3
@@ -83,7 +83,7 @@ struct gss_krb5_enctype { · 82 unmodified lines
8383 u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset,
8484 struct xdr_buf *buf,
8585 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,
8787 struct xdr_buf *buf, u32 *headskip,
8888 u32 *tailskip); /* v2 decryption function */
8989 };
@@ -255,7 +255,7 @@ gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset, · 165 unmodified lines
255255 struct xdr_buf *outbuf, struct page **pages);
256256
257257 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,
259259 struct xdr_buf *buf);
260260
261261
@@ -312,7 +312,7 @@ gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, · 50 unmodified lines
312312 struct page **pages);
313313
314314 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,
316316 struct xdr_buf *buf, u32 *plainoffset,
317317 u32 *plainlen);
318318
include/linux/sunrpc/xdr.h+1−0
@@ -184,6 +184,7 @@ xdr_adjust_iovec(struct kvec *iov, __be32 *p) · 183 unmodified lines
184184 extern void xdr_shift_buf(struct xdr_buf *, size_t);
185185 extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *);
186186 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);
187188 extern int read_bytes_from_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
188189 extern int write_bytes_to_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
189190
include/net/act_api.h+2−1
@@ -75,7 +75,8 @@ static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm) · 74 unmodified lines
7575 {
7676 dtm->install = jiffies_to_clock_t(jiffies - stm->install);
7777 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;
7980 dtm->expires = jiffies_to_clock_t(stm->expires);
8081 }
8182
include/net/af_rxrpc.h+1−1
@@ -59,7 +59,7 @@ bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *, · 58 unmodified lines
5959 void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
6060 void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
6161 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 *);
6363 int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
6464 rxrpc_user_attach_call_t, unsigned long, gfp_t,
6565 unsigned int);
include/net/ip_fib.h+0−1
@@ -257,7 +257,6 @@ struct fib_dump_filter { · 256 unmodified lines
257257 u32 table_id;
258258 /* filter_set is an optimization that an entry is set */
259259 bool filter_set;
260− bool dump_all_families;
261260 bool dump_routes;
262261 bool dump_exceptions;
263262 unsigned char protocol;
include/net/netfilter/nf_conntrack.h+1−1
@@ -87,7 +87,7 @@ struct nf_conn { · 86 unmodified lines
8787 struct hlist_node nat_bysource;
8888 #endif
8989 /* all members below initialized via memset */
90− u8 __nfct_init_offset[0];
90+ struct { } __nfct_init_offset;
9191
9292 /* If we were expected by an expectation, this will be it */
9393 struct nf_conn *master;
include/net/netfilter/nf_flow_table.h+1−0
@@ -127,6 +127,7 @@ enum nf_flow_flags { · 126 unmodified lines
127127 NF_FLOW_HW_DYING,
128128 NF_FLOW_HW_DEAD,
129129 NF_FLOW_HW_REFRESH,
130+ NF_FLOW_HW_PENDING,
130131 };
131132
132133 enum flow_offload_type {
include/net/tcp.h+13−1
@@ -1376,7 +1376,6 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) · 1375 unmodified lines
13761376 rx_opt->num_sacks = 0;
13771377 }
13781378
1379−u32 tcp_default_init_rwnd(u32 mss);
13801379 void tcp_cwnd_restart(struct sock *sk, s32 delta);
13811380
13821381 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
14211420 return tcp_win_from_space(sk, READ_ONCE(sk->sk_rcvbuf));
14221421 }
14231422
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+
14241436 extern void tcp_openreq_init_rwin(struct request_sock *req,
14251437 const struct sock *sk_listener,
14261438 const struct dst_entry *dst);
include/net/udp_tunnel.h+0−2
@@ -143,14 +143,12 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb · 142 unmodified lines
143143 __be16 df, __be16 src_port, __be16 dst_port,
144144 bool xnet, bool nocheck);
145145
146−#if IS_ENABLED(CONFIG_IPV6)
147146 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
148147 struct sk_buff *skb,
149148 struct net_device *dev, struct in6_addr *saddr,
150149 struct in6_addr *daddr,
151150 __u8 prio, __u8 ttl, __be32 label,
152151 __be16 src_port, __be16 dst_port, bool nocheck);
153−#endif
154152
155153 void udp_tunnel_sock_release(struct socket *sock);
156154
include/sound/rawmidi.h+1−0
@@ -61,6 +61,7 @@ struct snd_rawmidi_runtime { · 60 unmodified lines
6161 size_t avail_min; /* min avail for wakeup */
6262 size_t avail; /* max used buffer for wakeup */
6363 size_t xruns; /* over/underruns counter */
64+ int buffer_ref; /* buffer reference count */
6465 /* misc */
6566 spinlock_t lock;
6667 wait_queue_head_t sleep;
include/trace/events/rxrpc.h+42−10
@@ -1112,18 +1112,17 @@ TRACE_EVENT(rxrpc_rtt_tx, · 1111 unmodified lines
11121112 TRACE_EVENT(rxrpc_rtt_rx,
11131113 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
11141114 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1115− s64 rtt, u8 nr, s64 avg),
1115+ u32 rtt, u32 rto),
11161116
1117− TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg),
1117+ TP_ARGS(call, why, send_serial, resp_serial, rtt, rto),
11181118
11191119 TP_STRUCT__entry(
11201120 __field(unsigned int, call )
11211121 __field(enum rxrpc_rtt_rx_trace, why )
1122− __field(u8, nr )
11231122 __field(rxrpc_serial_t, send_serial )
11241123 __field(rxrpc_serial_t, resp_serial )
1125− __field(s64, rtt )
1126− __field(u64, avg )
1124+ __field(u32, rtt )
1125+ __field(u32, rto )
11271126 ),
11281127
11291128 TP_fast_assign(
@@ -1132,18 +1131,16 @@ TRACE_EVENT(rxrpc_rtt_rx, · 2 unmodified lines
11321131 __entry->send_serial = send_serial;
11331132 __entry->resp_serial = resp_serial;
11341133 __entry->rtt = rtt;
1135− __entry->nr = nr;
1136− __entry->avg = avg;
1134+ __entry->rto = rto;
11371135 ),
11381136
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",
11401138 __entry->call,
11411139 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
11421140 __entry->send_serial,
11431141 __entry->resp_serial,
11441142 __entry->rtt,
1145− __entry->nr,
1146− __entry->avg)
1143+ __entry->rto)
11471144 );
11481145
11491146 TRACE_EVENT(rxrpc_timer,
@@ -1544,6 +1541,41 @@ TRACE_EVENT(rxrpc_notify_socket, · 394 unmodified lines
15441541 __entry->serial)
15451542 );
15461543
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+
15471579 #endif /* _TRACE_RXRPC_H */
15481580
15491581 /* This part must be outside protection */
include/uapi/linux/usb/raw_gadget.h+95−13
@@ -93,6 +93,64 @@ struct usb_raw_ep_io { · 92 unmodified lines
9393 __u8 data[0];
9494 };
9595
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+
96154 /*
97155 * Initializes a Raw Gadget instance.
98156 * Accepts a pointer to the usb_raw_init struct as an argument.
@@ -115,37 +173,38 @@ struct usb_raw_ep_io { · 16 unmodified lines
115173 #define USB_RAW_IOCTL_EVENT_FETCH _IOR('U', 2, struct usb_raw_event)
116174
117175 /*
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.
121179 * 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
123181 * failure.
124182 */
125183 #define USB_RAW_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_raw_ep_io)
126184 #define USB_RAW_IOCTL_EP0_READ _IOWR('U', 4, struct usb_raw_ep_io)
127185
128186 /*
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.
132190 * Returns enabled endpoint handle on success or negative error code on failure.
133191 */
134192 #define USB_RAW_IOCTL_EP_ENABLE _IOW('U', 5, struct usb_endpoint_descriptor)
135193
136−/* Disables specified endpoint.
194+/*
195+ * Disables specified endpoint.
137196 * Accepts endpoint handle as an argument.
138197 * Returns 0 on success or negative error code on failure.
139198 */
140199 #define USB_RAW_IOCTL_EP_DISABLE _IOW('U', 6, __u32)
141200
142201 /*
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.
147206 * 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
149208 * failure.
150209 */
151210 #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
164223 */
165224 #define USB_RAW_IOCTL_VBUS_DRAW _IOW('U', 10, __u32)
166225
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+
167249 #endif /* _UAPI__LINUX_USB_RAW_GADGET_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t