We want the driver core fixes in here and this resolves a merge issue with drivers/base/dd.c
Showing the changes to include/linux (16 of 461 files). Show all
Unified · Split
| @@ -65,6 +65,7 @@ struct amba_device { · 64 unmodified lines | ||
| 65 | 65 | struct device dev; |
| 66 | 66 | struct resource res; |
| 67 | 67 | struct clk *pclk; |
| 68 | + struct device_dma_parameters dma_parms; | |
| 68 | 69 | unsigned int periphid; |
| 69 | 70 | unsigned int cid; |
| 70 | 71 | struct amba_cs_uci_id uci; |
| @@ -219,6 +219,7 @@ struct backing_dev_info { · 218 unmodified lines | ||
| 219 | 219 | wait_queue_head_t wb_waitq; |
| 220 | 220 | |
| 221 | 221 | struct device *dev; |
| 222 | + char dev_name[64]; | |
| 222 | 223 | struct device *owner; |
| 223 | 224 | |
| 224 | 225 | struct timer_list laptop_mode_wb_timer; |
| @@ -505,13 +505,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) · 504 unmodified lines | ||
| 505 | 505 | (1 << WB_async_congested)); |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | −extern const char *bdi_unknown_name; | |
| 509 | − | |
| 510 | −static inline const char *bdi_dev_name(struct backing_dev_info *bdi) | |
| 511 | −{ | |
| 512 | − if (!bdi || !bdi->dev) | |
| 513 | − return bdi_unknown_name; | |
| 514 | − return dev_name(bdi->dev); | |
| 515 | −} | |
| 508 | +const char *bdi_dev_name(struct backing_dev_info *bdi); | |
| 516 | 509 | |
| 517 | 510 | #endif /* _LINUX_BACKING_DEV_H */ |
| @@ -329,13 +329,12 @@ struct dma_buf { · 328 unmodified lines | ||
| 329 | 329 | |
| 330 | 330 | /** |
| 331 | 331 | * struct dma_buf_attach_ops - importer operations for an attachment |
| 332 | − * @move_notify: [optional] notification that the DMA-buf is moving | |
| 333 | 332 | * |
| 334 | 333 | * Attachment operations implemented by the importer. |
| 335 | 334 | */ |
| 336 | 335 | struct dma_buf_attach_ops { |
| 337 | 336 | /** |
| 338 | − * @move_notify | |
| 337 | + * @move_notify: [optional] notification that the DMA-buf is moving | |
| 339 | 338 | * |
| 340 | 339 | * If this callback is provided the framework can avoid pinning the |
| 341 | 340 | * backing store while mappings exists. |
| @@ -83,9 +83,9 @@ enum dma_transfer_direction { · 82 unmodified lines | ||
| 83 | 83 | /** |
| 84 | 84 | * Interleaved Transfer Request |
| 85 | 85 | * ---------------------------- |
| 86 | − * A chunk is collection of contiguous bytes to be transfered. | |
| 86 | + * A chunk is collection of contiguous bytes to be transferred. | |
| 87 | 87 | * The gap(in bytes) between two chunks is called inter-chunk-gap(ICG). |
| 88 | − * ICGs may or maynot change between chunks. | |
| 88 | + * ICGs may or may not change between chunks. | |
| 89 | 89 | * A FRAME is the smallest series of contiguous {chunk,icg} pairs, |
| 90 | 90 | * that when repeated an integral number of times, specifies the transfer. |
| 91 | 91 | * A transfer template is specification of a Frame, the number of times |
| @@ -341,13 +341,11 @@ struct dma_chan { · 249 unmodified lines | ||
| 341 | 341 | * @chan: driver channel device |
| 342 | 342 | * @device: sysfs device |
| 343 | 343 | * @dev_id: parent dma_device dev_id |
| 344 | − * @idr_ref: reference count to gate release of dma_device dev_id | |
| 345 | 344 | */ |
| 346 | 345 | struct dma_chan_dev { |
| 347 | 346 | struct dma_chan *chan; |
| 348 | 347 | struct device device; |
| 349 | 348 | int dev_id; |
| 350 | − atomic_t *idr_ref; | |
| 351 | 349 | }; |
| 352 | 350 | |
| 353 | 351 | /** |
| @@ -835,6 +833,8 @@ struct dma_device { · 481 unmodified lines | ||
| 835 | 833 | int dev_id; |
| 836 | 834 | struct device *dev; |
| 837 | 835 | struct module *owner; |
| 836 | + struct ida chan_ida; | |
| 837 | + struct mutex chan_mutex; /* to protect chan_ida */ | |
| 838 | 838 | |
| 839 | 839 | u32 src_addr_widths; |
| 840 | 840 | u32 dst_addr_widths; |
| @@ -1069,7 +1069,7 @@ static inline int dmaengine_terminate_all(struct dma_chan *chan) · 228 unmodified lines | ||
| 1069 | 1069 | * dmaengine_synchronize() needs to be called before it is safe to free |
| 1070 | 1070 | * any memory that is accessed by previously submitted descriptors or before |
| 1071 | 1071 | * freeing any resources accessed from within the completion callback of any |
| 1072 | − * perviously submitted descriptors. | |
| 1072 | + * previously submitted descriptors. | |
| 1073 | 1073 | * |
| 1074 | 1074 | * This function can be called from atomic context as well as from within a |
| 1075 | 1075 | * complete callback of a descriptor submitted on the same channel. |
| @@ -1091,7 +1091,7 @@ static inline int dmaengine_terminate_async(struct dma_chan *chan) · 15 unmodified lines | ||
| 1091 | 1091 | * |
| 1092 | 1092 | * Synchronizes to the DMA channel termination to the current context. When this |
| 1093 | 1093 | * function returns it is guaranteed that all transfers for previously issued |
| 1094 | − * descriptors have stopped and and it is safe to free the memory assoicated | |
| 1094 | + * descriptors have stopped and it is safe to free the memory associated | |
| 1095 | 1095 | * with them. Furthermore it is guaranteed that all complete callback functions |
| 1096 | 1096 | * for a previously submitted descriptor have finished running and it is safe to |
| 1097 | 1097 | * free resources accessed from within the complete callbacks. |
| @@ -983,7 +983,7 @@ struct file_handle { · 982 unmodified lines | ||
| 983 | 983 | __u32 handle_bytes; |
| 984 | 984 | int handle_type; |
| 985 | 985 | /* file identifier */ |
| 986 | − unsigned char f_handle[0]; | |
| 986 | + unsigned char f_handle[]; | |
| 987 | 987 | }; |
| 988 | 988 | |
| 989 | 989 | static inline struct file *get_file(struct file *f) |
| @@ -55,7 +55,7 @@ LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm) · 54 unmodified lines | ||
| 55 | 55 | LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm) |
| 56 | 56 | LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc, |
| 57 | 57 | struct fs_context *src_sc) |
| 58 | −LSM_HOOK(int, 0, fs_context_parse_param, struct fs_context *fc, | |
| 58 | +LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc, | |
| 59 | 59 | struct fs_parameter *param) |
| 60 | 60 | LSM_HOOK(int, 0, sb_alloc_security, struct super_block *sb) |
| 61 | 61 | LSM_HOOK(void, LSM_RET_VOID, sb_free_security, struct super_block *sb) |
| @@ -53,9 +53,9 @@ enum mhi_callback { · 52 unmodified lines | ||
| 53 | 53 | * @MHI_CHAIN: Linked transfer |
| 54 | 54 | */ |
| 55 | 55 | enum mhi_flags { |
| 56 | − MHI_EOB, | |
| 57 | − MHI_EOT, | |
| 58 | − MHI_CHAIN, | |
| 56 | + MHI_EOB = BIT(0), | |
| 57 | + MHI_EOT = BIT(1), | |
| 58 | + MHI_CHAIN = BIT(2), | |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | 61 | /** |
| @@ -335,14 +335,15 @@ struct mhi_controller_config { · 273 unmodified lines | ||
| 335 | 335 | * @syserr_worker: System error worker |
| 336 | 336 | * @state_event: State change event |
| 337 | 337 | * @status_cb: CB function to notify power states of the device (required) |
| 338 | − * @link_status: CB function to query link status of the device (required) | |
| 339 | 338 | * @wake_get: CB function to assert device wake (optional) |
| 340 | 339 | * @wake_put: CB function to de-assert device wake (optional) |
| 341 | 340 | * @wake_toggle: CB function to assert and de-assert device wake (optional) |
| 342 | 341 | * @runtime_get: CB function to controller runtime resume (required) |
| 343 | − * @runtimet_put: CB function to decrement pm usage (required) | |
| 342 | + * @runtime_put: CB function to decrement pm usage (required) | |
| 344 | 343 | * @map_single: CB function to create TRE buffer |
| 345 | 344 | * @unmap_single: CB function to destroy TRE buffer |
| 345 | + * @read_reg: Read a MHI register via the physical link (required) | |
| 346 | + * @write_reg: Write a MHI register via the physical link (required) | |
| 346 | 347 | * @buffer_len: Bounce buffer length |
| 347 | 348 | * @bounce_buf: Use of bounce buffer |
| 348 | 349 | * @fbc_download: MHI host needs to do complete image transfer (optional) |
| @@ -417,7 +418,6 @@ struct mhi_controller { · 68 unmodified lines | ||
| 417 | 418 | |
| 418 | 419 | void (*status_cb)(struct mhi_controller *mhi_cntrl, |
| 419 | 420 | enum mhi_callback cb); |
| 420 | − int (*link_status)(struct mhi_controller *mhi_cntrl); | |
| 421 | 421 | void (*wake_get)(struct mhi_controller *mhi_cntrl, bool override); |
| 422 | 422 | void (*wake_put)(struct mhi_controller *mhi_cntrl, bool override); |
| 423 | 423 | void (*wake_toggle)(struct mhi_controller *mhi_cntrl); |
| @@ -427,6 +427,10 @@ struct mhi_controller { · 3 unmodified lines | ||
| 427 | 427 | struct mhi_buf_info *buf); |
| 428 | 428 | void (*unmap_single)(struct mhi_controller *mhi_cntrl, |
| 429 | 429 | struct mhi_buf_info *buf); |
| 430 | + int (*read_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr, | |
| 431 | + u32 *out); | |
| 432 | + void (*write_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr, | |
| 433 | + u32 val); | |
| 430 | 434 | |
| 431 | 435 | size_t buffer_len; |
| 432 | 436 | bool bounce_buf; |
| @@ -1317,11 +1317,13 @@ struct nfs41_impl_id { · 1316 unmodified lines | ||
| 1317 | 1317 | struct nfstime4 date; |
| 1318 | 1318 | }; |
| 1319 | 1319 | |
| 1320 | +#define MAX_BIND_CONN_TO_SESSION_RETRIES 3 | |
| 1320 | 1321 | struct nfs41_bind_conn_to_session_args { |
| 1321 | 1322 | struct nfs_client *client; |
| 1322 | 1323 | struct nfs4_sessionid sessionid; |
| 1323 | 1324 | u32 dir; |
| 1324 | 1325 | bool use_conn_in_rdma_mode; |
| 1326 | + int retries; | |
| 1325 | 1327 | }; |
| 1326 | 1328 | |
| 1327 | 1329 | struct nfs41_bind_conn_to_session_res { |
| @@ -185,6 +185,7 @@ int cros_ec_sensorhub_register_push_data(struct cros_ec_sensorhub *sensorhub, · 184 unmodified lines | ||
| 185 | 185 | void cros_ec_sensorhub_unregister_push_data(struct cros_ec_sensorhub *sensorhub, |
| 186 | 186 | u8 sensor_num); |
| 187 | 187 | |
| 188 | +int cros_ec_sensorhub_ring_allocate(struct cros_ec_sensorhub *sensorhub); | |
| 188 | 189 | int cros_ec_sensorhub_ring_add(struct cros_ec_sensorhub *sensorhub); |
| 189 | 190 | void cros_ec_sensorhub_ring_remove(void *arg); |
| 190 | 191 | int cros_ec_sensorhub_ring_fifo_enable(struct cros_ec_sensorhub *sensorhub, |
| @@ -25,6 +25,7 @@ struct platform_device { · 24 unmodified lines | ||
| 25 | 25 | bool id_auto; |
| 26 | 26 | struct device dev; |
| 27 | 27 | u64 platform_dma_mask; |
| 28 | + struct device_dma_parameters dma_parms; | |
| 28 | 29 | u32 num_resources; |
| 29 | 30 | struct resource *resource; |
| 30 | 31 | |
| @@ -71,7 +71,13 @@ struct rpc_clnt { · 70 unmodified lines | ||
| 71 | 71 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 72 | 72 | struct dentry *cl_debugfs; /* debugfs directory */ |
| 73 | 73 | #endif |
| 74 | − struct rpc_xprt_iter cl_xpi; | |
| 74 | + /* cl_work is only needed after cl_xpi is no longer used, | |
| 75 | + * and that are of similar size | |
| 76 | + */ | |
| 77 | + union { | |
| 78 | + struct rpc_xprt_iter cl_xpi; | |
| 79 | + struct work_struct cl_work; | |
| 80 | + }; | |
| 75 | 81 | const struct cred *cl_cred; |
| 76 | 82 | }; |
| 77 | 83 | |
| @@ -236,4 +242,9 @@ static inline int rpc_reply_expected(struct rpc_task *task) · 158 unmodified lines | ||
| 236 | 242 | (task->tk_msg.rpc_proc->p_decode != NULL); |
| 237 | 243 | } |
| 238 | 244 | |
| 245 | +static inline void rpc_task_close_connection(struct rpc_task *task) | |
| 246 | +{ | |
| 247 | + if (task->tk_xprt) | |
| 248 | + xprt_force_disconnect(task->tk_xprt); | |
| 249 | +} | |
| 239 | 250 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
| @@ -78,47 +78,6 @@ struct tcp_sack_block { · 77 unmodified lines | ||
| 78 | 78 | #define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */ |
| 79 | 79 | #define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/ |
| 80 | 80 | |
| 81 | −#if IS_ENABLED(CONFIG_MPTCP) | |
| 82 | −struct mptcp_options_received { | |
| 83 | − u64 sndr_key; | |
| 84 | − u64 rcvr_key; | |
| 85 | − u64 data_ack; | |
| 86 | − u64 data_seq; | |
| 87 | − u32 subflow_seq; | |
| 88 | − u16 data_len; | |
| 89 | − u16 mp_capable : 1, | |
| 90 | − mp_join : 1, | |
| 91 | − dss : 1, | |
| 92 | − add_addr : 1, | |
| 93 | − rm_addr : 1, | |
| 94 | − family : 4, | |
| 95 | − echo : 1, | |
| 96 | − backup : 1; | |
| 97 | − u32 token; | |
| 98 | − u32 nonce; | |
| 99 | − u64 thmac; | |
| 100 | − u8 hmac[20]; | |
| 101 | − u8 join_id; | |
| 102 | − u8 use_map:1, | |
| 103 | − dsn64:1, | |
| 104 | − data_fin:1, | |
| 105 | − use_ack:1, | |
| 106 | − ack64:1, | |
| 107 | − mpc_map:1, | |
| 108 | − __unused:2; | |
| 109 | − u8 addr_id; | |
| 110 | − u8 rm_id; | |
| 111 | − union { | |
| 112 | − struct in_addr addr; | |
| 113 | −#if IS_ENABLED(CONFIG_MPTCP_IPV6) | |
| 114 | − struct in6_addr addr6; | |
| 115 | −#endif | |
| 116 | − }; | |
| 117 | − u64 ahmac; | |
| 118 | − u16 port; | |
| 119 | −}; | |
| 120 | −#endif | |
| 121 | − | |
| 122 | 81 | struct tcp_options_received { |
| 123 | 82 | /* PAWS/RTTM data */ |
| 124 | 83 | int ts_recent_stamp;/* Time we stored ts_recent (for aging) */ |
| @@ -136,9 +95,6 @@ struct tcp_options_received { · 11 unmodified lines | ||
| 136 | 95 | u8 num_sacks; /* Number of SACK blocks */ |
| 137 | 96 | u16 user_mss; /* mss requested by user in ioctl */ |
| 138 | 97 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ |
| 139 | −#if IS_ENABLED(CONFIG_MPTCP) | |
| 140 | − struct mptcp_options_received mptcp; | |
| 141 | −#endif | |
| 142 | 98 | }; |
| 143 | 99 | |
| 144 | 100 | static inline void tcp_clear_options(struct tcp_options_received *rx_opt) |
| @@ -148,13 +104,6 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt) · 3 unmodified lines | ||
| 148 | 104 | #if IS_ENABLED(CONFIG_SMC) |
| 149 | 105 | rx_opt->smc_ok = 0; |
| 150 | 106 | #endif |
| 151 | −#if IS_ENABLED(CONFIG_MPTCP) | |
| 152 | − rx_opt->mptcp.mp_capable = 0; | |
| 153 | − rx_opt->mptcp.mp_join = 0; | |
| 154 | − rx_opt->mptcp.add_addr = 0; | |
| 155 | − rx_opt->mptcp.rm_addr = 0; | |
| 156 | − rx_opt->mptcp.dss = 0; | |
| 157 | −#endif | |
| 158 | 107 | } |
| 159 | 108 | |
| 160 | 109 | /* This is the max number of SACKS that we'll generate and process. It's safe |
| @@ -66,7 +66,7 @@ struct tty_buffer { · 65 unmodified lines | ||
| 66 | 66 | int read; |
| 67 | 67 | int flags; |
| 68 | 68 | /* Data points here */ |
| 69 | − unsigned long data[0]; | |
| 69 | + unsigned long data[]; | |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | 72 | /* Values for .flags field of tty_buffer */ |
| @@ -3,6 +3,8 @@ · 2 unmodified lines | ||
| 3 | 3 | #define _LINUX_VIRTIO_NET_H |
| 4 | 4 | |
| 5 | 5 | #include <linux/if_vlan.h> |
| 6 | +#include <uapi/linux/tcp.h> | |
| 7 | +#include <uapi/linux/udp.h> | |
| 6 | 8 | #include <uapi/linux/virtio_net.h> |
| 7 | 9 | |
| 8 | 10 | static inline int virtio_net_hdr_set_proto(struct sk_buff *skb, |
| @@ -28,17 +30,25 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 19 unmodified lines | ||
| 28 | 30 | bool little_endian) |
| 29 | 31 | { |
| 30 | 32 | unsigned int gso_type = 0; |
| 33 | + unsigned int thlen = 0; | |
| 34 | + unsigned int ip_proto; | |
| 31 | 35 | |
| 32 | 36 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { |
| 33 | 37 | switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { |
| 34 | 38 | case VIRTIO_NET_HDR_GSO_TCPV4: |
| 35 | 39 | gso_type = SKB_GSO_TCPV4; |
| 40 | + ip_proto = IPPROTO_TCP; | |
| 41 | + thlen = sizeof(struct tcphdr); | |
| 36 | 42 | break; |
| 37 | 43 | case VIRTIO_NET_HDR_GSO_TCPV6: |
| 38 | 44 | gso_type = SKB_GSO_TCPV6; |
| 45 | + ip_proto = IPPROTO_TCP; | |
| 46 | + thlen = sizeof(struct tcphdr); | |
| 39 | 47 | break; |
| 40 | 48 | case VIRTIO_NET_HDR_GSO_UDP: |
| 41 | 49 | gso_type = SKB_GSO_UDP; |
| 50 | + ip_proto = IPPROTO_UDP; | |
| 51 | + thlen = sizeof(struct udphdr); | |
| 42 | 52 | break; |
| 43 | 53 | default: |
| 44 | 54 | return -EINVAL; |
| @@ -57,16 +67,22 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 12 unmodified lines | ||
| 57 | 67 | |
| 58 | 68 | if (!skb_partial_csum_set(skb, start, off)) |
| 59 | 69 | return -EINVAL; |
| 70 | + | |
| 71 | + if (skb_transport_offset(skb) + thlen > skb_headlen(skb)) | |
| 72 | + return -EINVAL; | |
| 60 | 73 | } else { |
| 61 | 74 | /* gso packets without NEEDS_CSUM do not set transport_offset. |
| 62 | 75 | * probe and drop if does not match one of the above types. |
| 63 | 76 | */ |
| 64 | 77 | if (gso_type && skb->network_header) { |
| 78 | + struct flow_keys_basic keys; | |
| 79 | + | |
| 65 | 80 | if (!skb->protocol) |
| 66 | 81 | virtio_net_hdr_set_proto(skb, hdr); |
| 67 | 82 | retry: |
| 68 | − skb_probe_transport_header(skb); | |
| 69 | − if (!skb_transport_header_was_set(skb)) { | |
| 83 | + if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys, | |
| 84 | + NULL, 0, 0, 0, | |
| 85 | + 0)) { | |
| 70 | 86 | /* UFO does not specify ipv4 or 6: try both */ |
| 71 | 87 | if (gso_type & SKB_GSO_UDP && |
| 72 | 88 | skb->protocol == htons(ETH_P_IP)) { |
| @@ -75,6 +91,12 @@ retry: · 2 unmodified lines | ||
| 75 | 91 | } |
| 76 | 92 | return -EINVAL; |
| 77 | 93 | } |
| 94 | + | |
| 95 | + if (keys.control.thoff + thlen > skb_headlen(skb) || | |
| 96 | + keys.basic.ip_proto != ip_proto) | |
| 97 | + return -EINVAL; | |
| 98 | + | |
| 99 | + skb_set_transport_header(skb, keys.control.thoff); | |
| 78 | 100 | } |
| 79 | 101 | } |
| 80 | 102 | |
| @@ -48,6 +48,7 @@ struct virtio_vsock_pkt { · 47 unmodified lines | ||
| 48 | 48 | u32 len; |
| 49 | 49 | u32 off; |
| 50 | 50 | bool reply; |
| 51 | + bool tap_delivered; | |
| 51 | 52 | }; |
| 52 | 53 | |
| 53 | 54 | struct virtio_vsock_pkt_info { |