From: Greg Kroah-Hartman Date: Sun, 9 Feb 2020 14:59:01 +0000 (+0100) Subject: 5.5-stable patches X-Git-Tag: v4.19.103~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d35ddfe0a83f072b8e13879e22c92890365ff91f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.5-stable patches added patches: asoc-meson-axg-fifo-fix-fifo-threshold-setup.patch compat-scsi-sg-fix-v3-compat-read-write-interface.patch drm-msm-mdp4-adjust-indentation-in-mdp4_dsi_encoder_enable.patch ext2-adjust-indentation-in-ext2_fill_super.patch mtd-spi-nor-split-mt25qu512a-n25q512a-entry-into-two.patch net-smc911x-adjust-indentation-in-smc911x_phy_configure.patch net-tulip-adjust-indentation-in-dmfe-uli526x-_init_module.patch nfc-pn544-adjust-indentation-in-pn544_hci_check_presence.patch phy-qualcomm-adjust-indentation-in-read_poll_timeout.patch powerpc-44x-adjust-indentation-in-ibm4xx_denali_fixup_memsize.patch ppp-adjust-indentation-into-ppp_async_input.patch scsi-csiostor-adjust-indentation-in-csio_device_reset.patch scsi-qla2xxx-fix-the-endianness-of-the-qla82xx_get_fw_size-return-type.patch scsi-qla4xxx-adjust-indentation-in-qla4xxx_mem_free.patch scsi-ufs-recheck-bkops-level-if-bkops-is-disabled.patch --- diff --git a/queue-5.5/asoc-meson-axg-fifo-fix-fifo-threshold-setup.patch b/queue-5.5/asoc-meson-axg-fifo-fix-fifo-threshold-setup.patch new file mode 100644 index 00000000000..23dc152690a --- /dev/null +++ b/queue-5.5/asoc-meson-axg-fifo-fix-fifo-threshold-setup.patch @@ -0,0 +1,243 @@ +From 864cee90d4bd870e5d5e5a0b1a6f055f4f951350 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Wed, 18 Dec 2019 18:24:17 +0100 +Subject: ASoC: meson: axg-fifo: fix fifo threshold setup + +From: Jerome Brunet + +commit 864cee90d4bd870e5d5e5a0b1a6f055f4f951350 upstream. + +On TODDR sm1, the fifo threshold register field is slightly different +compared to the other SoCs. This leads to the fifo A being flushed to +memory every 8kB. If the period is smaller than that, several periods +are pushed to memory and notified at once. This is not ideal. + +Fix the register field update. With this, the fifos are flushed every +128B. We could still do better, like adapt the threshold depending on +the period size, but at least it consistent across the different +SoC/fifos + +Fixes: 5ac825c3d85e ("ASoC: meson: axg-toddr: add sm1 support") +Reported-by: Alden DSouza +Signed-off-by: Jerome Brunet +Link: https://lore.kernel.org/r/20191218172420.1199117-2-jbrunet@baylibre.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/meson/axg-fifo.c | 27 +++++++++++++++++++++++++-- + sound/soc/meson/axg-fifo.h | 6 ++++-- + sound/soc/meson/axg-frddr.c | 24 ++++++++++++------------ + sound/soc/meson/axg-toddr.c | 21 +++++++++------------ + 4 files changed, 50 insertions(+), 28 deletions(-) + +--- a/sound/soc/meson/axg-fifo.c ++++ b/sound/soc/meson/axg-fifo.c +@@ -113,10 +113,12 @@ int axg_fifo_pcm_hw_params(struct snd_so + { + struct snd_pcm_runtime *runtime = ss->runtime; + struct axg_fifo *fifo = axg_fifo_data(ss); ++ unsigned int burst_num, period, threshold; + dma_addr_t end_ptr; +- unsigned int burst_num; + int ret; + ++ period = params_period_bytes(params); ++ + ret = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(params)); + if (ret < 0) + return ret; +@@ -127,9 +129,25 @@ int axg_fifo_pcm_hw_params(struct snd_so + regmap_write(fifo->map, FIFO_FINISH_ADDR, end_ptr); + + /* Setup interrupt periodicity */ +- burst_num = params_period_bytes(params) / AXG_FIFO_BURST; ++ burst_num = period / AXG_FIFO_BURST; + regmap_write(fifo->map, FIFO_INT_ADDR, burst_num); + ++ /* ++ * Start the fifo request on the smallest of the following: ++ * - Half the fifo size ++ * - Half the period size ++ */ ++ threshold = min(period / 2, ++ (unsigned int)AXG_FIFO_MIN_DEPTH / 2); ++ ++ /* ++ * With the threshold in bytes, register value is: ++ * V = (threshold / burst) - 1 ++ */ ++ threshold /= AXG_FIFO_BURST; ++ regmap_field_write(fifo->field_threshold, ++ threshold ? threshold - 1 : 0); ++ + /* Enable block count irq */ + regmap_update_bits(fifo->map, FIFO_CTRL0, + CTRL0_INT_EN(FIFO_INT_COUNT_REPEAT), +@@ -352,6 +370,11 @@ int axg_fifo_probe(struct platform_devic + return fifo->irq; + } + ++ fifo->field_threshold = ++ devm_regmap_field_alloc(dev, fifo->map, data->field_threshold); ++ if (IS_ERR(fifo->field_threshold)) ++ return PTR_ERR(fifo->field_threshold); ++ + return devm_snd_soc_register_component(dev, data->component_drv, + data->dai_drv, 1); + } +--- a/sound/soc/meson/axg-fifo.h ++++ b/sound/soc/meson/axg-fifo.h +@@ -9,7 +9,9 @@ + + struct clk; + struct platform_device; ++struct reg_field; + struct regmap; ++struct regmap_field; + struct reset_control; + + struct snd_soc_component_driver; +@@ -50,8 +52,6 @@ struct snd_soc_pcm_runtime; + #define CTRL1_STATUS2_SEL_MASK GENMASK(11, 8) + #define CTRL1_STATUS2_SEL(x) ((x) << 8) + #define STATUS2_SEL_DDR_READ 0 +-#define CTRL1_THRESHOLD_MASK GENMASK(23, 16) +-#define CTRL1_THRESHOLD(x) ((x) << 16) + #define CTRL1_FRDDR_DEPTH_MASK GENMASK(31, 24) + #define CTRL1_FRDDR_DEPTH(x) ((x) << 24) + #define FIFO_START_ADDR 0x08 +@@ -67,12 +67,14 @@ struct axg_fifo { + struct regmap *map; + struct clk *pclk; + struct reset_control *arb; ++ struct regmap_field *field_threshold; + int irq; + }; + + struct axg_fifo_match_data { + const struct snd_soc_component_driver *component_drv; + struct snd_soc_dai_driver *dai_drv; ++ struct reg_field field_threshold; + }; + + int axg_fifo_pcm_open(struct snd_soc_component *component, +--- a/sound/soc/meson/axg-frddr.c ++++ b/sound/soc/meson/axg-frddr.c +@@ -50,7 +50,7 @@ static int axg_frddr_dai_startup(struct + struct snd_soc_dai *dai) + { + struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); +- unsigned int fifo_depth, fifo_threshold; ++ unsigned int fifo_depth; + int ret; + + /* Enable pclk to access registers and clock the fifo ip */ +@@ -68,11 +68,8 @@ static int axg_frddr_dai_startup(struct + * Depth and threshold are zero based. + */ + fifo_depth = AXG_FIFO_MIN_CNT - 1; +- fifo_threshold = (AXG_FIFO_MIN_CNT / 2) - 1; +- regmap_update_bits(fifo->map, FIFO_CTRL1, +- CTRL1_FRDDR_DEPTH_MASK | CTRL1_THRESHOLD_MASK, +- CTRL1_FRDDR_DEPTH(fifo_depth) | +- CTRL1_THRESHOLD(fifo_threshold)); ++ regmap_update_bits(fifo->map, FIFO_CTRL1, CTRL1_FRDDR_DEPTH_MASK, ++ CTRL1_FRDDR_DEPTH(fifo_depth)); + + return 0; + } +@@ -159,8 +156,9 @@ static const struct snd_soc_component_dr + }; + + static const struct axg_fifo_match_data axg_frddr_match_data = { +- .component_drv = &axg_frddr_component_drv, +- .dai_drv = &axg_frddr_dai_drv ++ .field_threshold = REG_FIELD(FIFO_CTRL1, 16, 23), ++ .component_drv = &axg_frddr_component_drv, ++ .dai_drv = &axg_frddr_dai_drv + }; + + static const struct snd_soc_dai_ops g12a_frddr_ops = { +@@ -283,8 +281,9 @@ static const struct snd_soc_component_dr + }; + + static const struct axg_fifo_match_data g12a_frddr_match_data = { +- .component_drv = &g12a_frddr_component_drv, +- .dai_drv = &g12a_frddr_dai_drv ++ .field_threshold = REG_FIELD(FIFO_CTRL1, 16, 23), ++ .component_drv = &g12a_frddr_component_drv, ++ .dai_drv = &g12a_frddr_dai_drv + }; + + /* On SM1, the output selection in on CTRL2 */ +@@ -353,8 +352,9 @@ static const struct snd_soc_component_dr + }; + + static const struct axg_fifo_match_data sm1_frddr_match_data = { +- .component_drv = &sm1_frddr_component_drv, +- .dai_drv = &g12a_frddr_dai_drv ++ .field_threshold = REG_FIELD(FIFO_CTRL1, 16, 23), ++ .component_drv = &sm1_frddr_component_drv, ++ .dai_drv = &g12a_frddr_dai_drv + }; + + static const struct of_device_id axg_frddr_of_match[] = { +--- a/sound/soc/meson/axg-toddr.c ++++ b/sound/soc/meson/axg-toddr.c +@@ -89,7 +89,6 @@ static int axg_toddr_dai_startup(struct + struct snd_soc_dai *dai) + { + struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); +- unsigned int fifo_threshold; + int ret; + + /* Enable pclk to access registers and clock the fifo ip */ +@@ -107,11 +106,6 @@ static int axg_toddr_dai_startup(struct + /* Apply single buffer mode to the interface */ + regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_TODDR_PP_MODE, 0); + +- /* TODDR does not have a configurable fifo depth */ +- fifo_threshold = AXG_FIFO_MIN_CNT - 1; +- regmap_update_bits(fifo->map, FIFO_CTRL1, CTRL1_THRESHOLD_MASK, +- CTRL1_THRESHOLD(fifo_threshold)); +- + return 0; + } + +@@ -191,8 +185,9 @@ static const struct snd_soc_component_dr + }; + + static const struct axg_fifo_match_data axg_toddr_match_data = { +- .component_drv = &axg_toddr_component_drv, +- .dai_drv = &axg_toddr_dai_drv ++ .field_threshold = REG_FIELD(FIFO_CTRL1, 16, 23), ++ .component_drv = &axg_toddr_component_drv, ++ .dai_drv = &axg_toddr_dai_drv + }; + + static const struct snd_soc_dai_ops g12a_toddr_ops = { +@@ -230,8 +225,9 @@ static const struct snd_soc_component_dr + }; + + static const struct axg_fifo_match_data g12a_toddr_match_data = { +- .component_drv = &g12a_toddr_component_drv, +- .dai_drv = &g12a_toddr_dai_drv ++ .field_threshold = REG_FIELD(FIFO_CTRL1, 16, 23), ++ .component_drv = &g12a_toddr_component_drv, ++ .dai_drv = &g12a_toddr_dai_drv + }; + + static const char * const sm1_toddr_sel_texts[] = { +@@ -300,8 +296,9 @@ static const struct snd_soc_component_dr + }; + + static const struct axg_fifo_match_data sm1_toddr_match_data = { +- .component_drv = &sm1_toddr_component_drv, +- .dai_drv = &g12a_toddr_dai_drv ++ .field_threshold = REG_FIELD(FIFO_CTRL1, 12, 23), ++ .component_drv = &sm1_toddr_component_drv, ++ .dai_drv = &g12a_toddr_dai_drv + }; + + static const struct of_device_id axg_toddr_of_match[] = { diff --git a/queue-5.5/compat-scsi-sg-fix-v3-compat-read-write-interface.patch b/queue-5.5/compat-scsi-sg-fix-v3-compat-read-write-interface.patch new file mode 100644 index 00000000000..974c53178a7 --- /dev/null +++ b/queue-5.5/compat-scsi-sg-fix-v3-compat-read-write-interface.patch @@ -0,0 +1,284 @@ +From 78ed001d9e7106171e0ee761cd854137dd731302 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 4 Dec 2019 09:35:00 +0100 +Subject: compat: scsi: sg: fix v3 compat read/write interface + +From: Arnd Bergmann + +commit 78ed001d9e7106171e0ee761cd854137dd731302 upstream. + +In the v5.4 merge window, a cleanup patch from Al Viro conflicted +with my rework of the compat handling for sg.c read(). Linus Torvalds +did a correct merge but pointed out that the resulting code is still +unsatisfactory. + +I later noticed that the sg_new_read() function still gets the compat +mode wrong, when the 'count' argument is large enough to pass a +compat_sg_io_hdr object, but not a nativ sg_io_hdr. + +To address both of these, move the definition of compat_sg_io_hdr +into a scsi/sg.h to make it visible to sg.c and rewrite the logic +for reading req_pack_id as well as the size check to a simpler +version that gets the expected results. + +Fixes: c35a5cfb4150 ("scsi: sg: sg_read(): simplify reading ->pack_id of userland sg_io_hdr_t") +Fixes: 98aaaec4a150 ("compat_ioctl: reimplement SG_IO handling") +Reviewed-by: Ben Hutchings +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + block/scsi_ioctl.c | 29 ------------ + drivers/scsi/sg.c | 126 ++++++++++++++++++++++++----------------------------- + include/scsi/sg.h | 30 ++++++++++++ + 3 files changed, 90 insertions(+), 95 deletions(-) + +--- a/block/scsi_ioctl.c ++++ b/block/scsi_ioctl.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + struct blk_cmd_filter { + unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; +@@ -550,34 +551,6 @@ static inline int blk_send_start_stop(st + return __blk_send_generic(q, bd_disk, GPCMD_START_STOP_UNIT, data); + } + +-#ifdef CONFIG_COMPAT +-struct compat_sg_io_hdr { +- compat_int_t interface_id; /* [i] 'S' for SCSI generic (required) */ +- compat_int_t dxfer_direction; /* [i] data transfer direction */ +- unsigned char cmd_len; /* [i] SCSI command length ( <= 16 bytes) */ +- unsigned char mx_sb_len; /* [i] max length to write to sbp */ +- unsigned short iovec_count; /* [i] 0 implies no scatter gather */ +- compat_uint_t dxfer_len; /* [i] byte count of data transfer */ +- compat_uint_t dxferp; /* [i], [*io] points to data transfer memory +- or scatter gather list */ +- compat_uptr_t cmdp; /* [i], [*i] points to command to perform */ +- compat_uptr_t sbp; /* [i], [*o] points to sense_buffer memory */ +- compat_uint_t timeout; /* [i] MAX_UINT->no timeout (unit: millisec) */ +- compat_uint_t flags; /* [i] 0 -> default, see SG_FLAG... */ +- compat_int_t pack_id; /* [i->o] unused internally (normally) */ +- compat_uptr_t usr_ptr; /* [i->o] unused internally */ +- unsigned char status; /* [o] scsi status */ +- unsigned char masked_status; /* [o] shifted, masked scsi status */ +- unsigned char msg_status; /* [o] messaging level data (optional) */ +- unsigned char sb_len_wr; /* [o] byte count actually written to sbp */ +- unsigned short host_status; /* [o] errors from host adapter */ +- unsigned short driver_status; /* [o] errors from software driver */ +- compat_int_t resid; /* [o] dxfer_len - actual_transferred */ +- compat_uint_t duration; /* [o] time taken by cmd (unit: millisec) */ +- compat_uint_t info; /* [o] auxiliary information */ +-}; +-#endif +- + int put_sg_io_hdr(const struct sg_io_hdr *hdr, void __user *argp) + { + #ifdef CONFIG_COMPAT +--- a/drivers/scsi/sg.c ++++ b/drivers/scsi/sg.c +@@ -405,6 +405,38 @@ sg_release(struct inode *inode, struct f + return 0; + } + ++static int get_sg_io_pack_id(int *pack_id, void __user *buf, size_t count) ++{ ++ struct sg_header __user *old_hdr = buf; ++ int reply_len; ++ ++ if (count >= SZ_SG_HEADER) { ++ /* negative reply_len means v3 format, otherwise v1/v2 */ ++ if (get_user(reply_len, &old_hdr->reply_len)) ++ return -EFAULT; ++ ++ if (reply_len >= 0) ++ return get_user(*pack_id, &old_hdr->pack_id); ++ ++ if (in_compat_syscall() && ++ count >= sizeof(struct compat_sg_io_hdr)) { ++ struct compat_sg_io_hdr __user *hp = buf; ++ ++ return get_user(*pack_id, &hp->pack_id); ++ } ++ ++ if (count >= sizeof(struct sg_io_hdr)) { ++ struct sg_io_hdr __user *hp = buf; ++ ++ return get_user(*pack_id, &hp->pack_id); ++ } ++ } ++ ++ /* no valid header was passed, so ignore the pack_id */ ++ *pack_id = -1; ++ return 0; ++} ++ + static ssize_t + sg_read(struct file *filp, char __user *buf, size_t count, loff_t * ppos) + { +@@ -413,8 +445,8 @@ sg_read(struct file *filp, char __user * + Sg_request *srp; + int req_pack_id = -1; + sg_io_hdr_t *hp; +- struct sg_header *old_hdr = NULL; +- int retval = 0; ++ struct sg_header *old_hdr; ++ int retval; + + /* + * This could cause a response to be stranded. Close the associated +@@ -429,79 +461,34 @@ sg_read(struct file *filp, char __user * + SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, + "sg_read: count=%d\n", (int) count)); + +- if (sfp->force_packid && (count >= SZ_SG_HEADER)) { +- old_hdr = memdup_user(buf, SZ_SG_HEADER); +- if (IS_ERR(old_hdr)) +- return PTR_ERR(old_hdr); +- if (old_hdr->reply_len < 0) { +- if (count >= SZ_SG_IO_HDR) { +- /* +- * This is stupid. +- * +- * We're copying the whole sg_io_hdr_t from user +- * space just to get the 'pack_id' field. But the +- * field is at different offsets for the compat +- * case, so we'll use "get_sg_io_hdr()" to copy +- * the whole thing and convert it. +- * +- * We could do something like just calculating the +- * offset based of 'in_compat_syscall()', but the +- * 'compat_sg_io_hdr' definition is in the wrong +- * place for that. +- */ +- sg_io_hdr_t *new_hdr; +- new_hdr = kmalloc(SZ_SG_IO_HDR, GFP_KERNEL); +- if (!new_hdr) { +- retval = -ENOMEM; +- goto free_old_hdr; +- } +- retval = get_sg_io_hdr(new_hdr, buf); +- req_pack_id = new_hdr->pack_id; +- kfree(new_hdr); +- if (retval) { +- retval = -EFAULT; +- goto free_old_hdr; +- } +- } +- } else +- req_pack_id = old_hdr->pack_id; +- } ++ if (sfp->force_packid) ++ retval = get_sg_io_pack_id(&req_pack_id, buf, count); ++ if (retval) ++ return retval; ++ + srp = sg_get_rq_mark(sfp, req_pack_id); + if (!srp) { /* now wait on packet to arrive */ +- if (atomic_read(&sdp->detaching)) { +- retval = -ENODEV; +- goto free_old_hdr; +- } +- if (filp->f_flags & O_NONBLOCK) { +- retval = -EAGAIN; +- goto free_old_hdr; +- } ++ if (atomic_read(&sdp->detaching)) ++ return -ENODEV; ++ if (filp->f_flags & O_NONBLOCK) ++ return -EAGAIN; + retval = wait_event_interruptible(sfp->read_wait, + (atomic_read(&sdp->detaching) || + (srp = sg_get_rq_mark(sfp, req_pack_id)))); +- if (atomic_read(&sdp->detaching)) { +- retval = -ENODEV; +- goto free_old_hdr; +- } +- if (retval) { ++ if (atomic_read(&sdp->detaching)) ++ return -ENODEV; ++ if (retval) + /* -ERESTARTSYS as signal hit process */ +- goto free_old_hdr; +- } +- } +- if (srp->header.interface_id != '\0') { +- retval = sg_new_read(sfp, buf, count, srp); +- goto free_old_hdr; ++ return retval; + } ++ if (srp->header.interface_id != '\0') ++ return sg_new_read(sfp, buf, count, srp); + + hp = &srp->header; +- if (old_hdr == NULL) { +- old_hdr = kmalloc(SZ_SG_HEADER, GFP_KERNEL); +- if (! old_hdr) { +- retval = -ENOMEM; +- goto free_old_hdr; +- } +- } +- memset(old_hdr, 0, SZ_SG_HEADER); ++ old_hdr = kzalloc(SZ_SG_HEADER, GFP_KERNEL); ++ if (!old_hdr) ++ return -ENOMEM; ++ + old_hdr->reply_len = (int) hp->timeout; + old_hdr->pack_len = old_hdr->reply_len; /* old, strange behaviour */ + old_hdr->pack_id = hp->pack_id; +@@ -575,7 +562,12 @@ sg_new_read(Sg_fd * sfp, char __user *bu + int err = 0, err2; + int len; + +- if (count < SZ_SG_IO_HDR) { ++ if (in_compat_syscall()) { ++ if (count < sizeof(struct compat_sg_io_hdr)) { ++ err = -EINVAL; ++ goto err_out; ++ } ++ } else if (count < SZ_SG_IO_HDR) { + err = -EINVAL; + goto err_out; + } +--- a/include/scsi/sg.h ++++ b/include/scsi/sg.h +@@ -68,6 +68,36 @@ typedef struct sg_io_hdr + unsigned int info; /* [o] auxiliary information */ + } sg_io_hdr_t; /* 64 bytes long (on i386) */ + ++#if defined(__KERNEL__) ++#include ++ ++struct compat_sg_io_hdr { ++ compat_int_t interface_id; /* [i] 'S' for SCSI generic (required) */ ++ compat_int_t dxfer_direction; /* [i] data transfer direction */ ++ unsigned char cmd_len; /* [i] SCSI command length ( <= 16 bytes) */ ++ unsigned char mx_sb_len; /* [i] max length to write to sbp */ ++ unsigned short iovec_count; /* [i] 0 implies no scatter gather */ ++ compat_uint_t dxfer_len; /* [i] byte count of data transfer */ ++ compat_uint_t dxferp; /* [i], [*io] points to data transfer memory ++ or scatter gather list */ ++ compat_uptr_t cmdp; /* [i], [*i] points to command to perform */ ++ compat_uptr_t sbp; /* [i], [*o] points to sense_buffer memory */ ++ compat_uint_t timeout; /* [i] MAX_UINT->no timeout (unit: millisec) */ ++ compat_uint_t flags; /* [i] 0 -> default, see SG_FLAG... */ ++ compat_int_t pack_id; /* [i->o] unused internally (normally) */ ++ compat_uptr_t usr_ptr; /* [i->o] unused internally */ ++ unsigned char status; /* [o] scsi status */ ++ unsigned char masked_status; /* [o] shifted, masked scsi status */ ++ unsigned char msg_status; /* [o] messaging level data (optional) */ ++ unsigned char sb_len_wr; /* [o] byte count actually written to sbp */ ++ unsigned short host_status; /* [o] errors from host adapter */ ++ unsigned short driver_status; /* [o] errors from software driver */ ++ compat_int_t resid; /* [o] dxfer_len - actual_transferred */ ++ compat_uint_t duration; /* [o] time taken by cmd (unit: millisec) */ ++ compat_uint_t info; /* [o] auxiliary information */ ++}; ++#endif ++ + #define SG_INTERFACE_ID_ORIG 'S' + + /* Use negative values to flag difference from original sg_header structure */ diff --git a/queue-5.5/drm-msm-mdp4-adjust-indentation-in-mdp4_dsi_encoder_enable.patch b/queue-5.5/drm-msm-mdp4-adjust-indentation-in-mdp4_dsi_encoder_enable.patch new file mode 100644 index 00000000000..d6113d95e81 --- /dev/null +++ b/queue-5.5/drm-msm-mdp4-adjust-indentation-in-mdp4_dsi_encoder_enable.patch @@ -0,0 +1,47 @@ +From 251e3cb1418ff3f5061ee31335e346e852b16573 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 9 Dec 2019 13:32:30 -0700 +Subject: drm: msm: mdp4: Adjust indentation in mdp4_dsi_encoder_enable + +From: Nathan Chancellor + +commit 251e3cb1418ff3f5061ee31335e346e852b16573 upstream. + +Clang warns: + +../drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c:124:3: warning: +misleading indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + mdp4_crtc_set_config(encoder->crtc, + ^ +../drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c:121:2: note: +previous statement is here + if (mdp4_dsi_encoder->enabled) + ^ + +This warning occurs because there is a space after the tab on this line. +Remove it so that the indentation is consistent with the Linux kernel +coding style and clang no longer warns. + +Fixes: 776638e73a19 ("drm/msm/dsi: Add a mdp4 encoder for DSI") +Link: https://github.com/ClangBuiltLinux/linux/issues/792 +Signed-off-by: Nathan Chancellor +Reviewed-by: Nick Desaulniers +Signed-off-by: Rob Clark +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c ++++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c +@@ -121,7 +121,7 @@ static void mdp4_dsi_encoder_enable(stru + if (mdp4_dsi_encoder->enabled) + return; + +- mdp4_crtc_set_config(encoder->crtc, ++ mdp4_crtc_set_config(encoder->crtc, + MDP4_DMA_CONFIG_PACK_ALIGN_MSB | + MDP4_DMA_CONFIG_DEFLKR_EN | + MDP4_DMA_CONFIG_DITHER_EN | diff --git a/queue-5.5/ext2-adjust-indentation-in-ext2_fill_super.patch b/queue-5.5/ext2-adjust-indentation-in-ext2_fill_super.patch new file mode 100644 index 00000000000..d21bb83d872 --- /dev/null +++ b/queue-5.5/ext2-adjust-indentation-in-ext2_fill_super.patch @@ -0,0 +1,50 @@ +From d9e9866803f7b6c3fdd35d345e97fb0b2908bbbc Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 17 Dec 2019 20:19:31 -0700 +Subject: ext2: Adjust indentation in ext2_fill_super + +From: Nathan Chancellor + +commit d9e9866803f7b6c3fdd35d345e97fb0b2908bbbc upstream. + +Clang warns: + +../fs/ext2/super.c:1076:3: warning: misleading indentation; statement is +not part of the previous 'if' [-Wmisleading-indentation] + sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) - + ^ +../fs/ext2/super.c:1074:2: note: previous statement is here + if (EXT2_BLOCKS_PER_GROUP(sb) == 0) + ^ +1 warning generated. + +This warning occurs because there is a space before the tab on this +line. Remove it so that the indentation is consistent with the Linux +kernel coding style and clang no longer warns. + +Fixes: 41f04d852e35 ("[PATCH] ext2: fix mounts at 16T") +Link: https://github.com/ClangBuiltLinux/linux/issues/827 +Link: https://lore.kernel.org/r/20191218031930.31393-1-natechancellor@gmail.com +Signed-off-by: Nathan Chancellor +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ext2/super.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/fs/ext2/super.c ++++ b/fs/ext2/super.c +@@ -1073,9 +1073,9 @@ static int ext2_fill_super(struct super_ + + if (EXT2_BLOCKS_PER_GROUP(sb) == 0) + goto cantfind_ext2; +- sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) - +- le32_to_cpu(es->s_first_data_block) - 1) +- / EXT2_BLOCKS_PER_GROUP(sb)) + 1; ++ sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) - ++ le32_to_cpu(es->s_first_data_block) - 1) ++ / EXT2_BLOCKS_PER_GROUP(sb)) + 1; + db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) / + EXT2_DESC_PER_BLOCK(sb); + sbi->s_group_desc = kmalloc_array (db_count, diff --git a/queue-5.5/mtd-spi-nor-split-mt25qu512a-n25q512a-entry-into-two.patch b/queue-5.5/mtd-spi-nor-split-mt25qu512a-n25q512a-entry-into-two.patch new file mode 100644 index 00000000000..6cb9360f494 --- /dev/null +++ b/queue-5.5/mtd-spi-nor-split-mt25qu512a-n25q512a-entry-into-two.patch @@ -0,0 +1,48 @@ +From bd8a6e31b87b39a03ab11820776363640440dbe0 Mon Sep 17 00:00:00 2001 +From: Vignesh Raghavendra +Date: Thu, 5 Dec 2019 12:29:33 +0530 +Subject: mtd: spi-nor: Split mt25qu512a (n25q512a) entry into two + +From: Vignesh Raghavendra + +commit bd8a6e31b87b39a03ab11820776363640440dbe0 upstream. + +mt25q family is different from n25q family of devices, even though manf +ID and device IDs are same. mt25q flash has bit 6 set in 5th byte of +READ ID response which can be used to distinguish it from n25q variant. +mt25q flashes support stateless 4 Byte addressing opcodes where as n25q +flashes don't. Therefore, have two separate entries for mt25qu512a and +n25q512a. + +Fixes: 9607af6f857f ("mtd: spi-nor: Rename "n25q512a" to "mt25qu512a (n25q512a)"") +Signed-off-by: Vignesh Raghavendra +Signed-off-by: Tudor Ambarus +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/spi-nor/spi-nor.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -2461,15 +2461,16 @@ static const struct flash_info spi_nor_i + { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "n25q256ax1", INFO(0x20bb19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ) }, + { "n25q512ax3", INFO(0x20ba20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) }, ++ { "mt25qu512a", INFO6(0x20bb20, 0x104400, 64 * 1024, 1024, ++ SECT_4K | USE_FSR | SPI_NOR_DUAL_READ | ++ SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, ++ { "n25q512a", INFO(0x20bb20, 0, 64 * 1024, 1024, SECT_4K | ++ SPI_NOR_QUAD_READ) }, + { "n25q00", INFO(0x20ba21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, + { "n25q00a", INFO(0x20bb21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, + { "mt25ql02g", INFO(0x20ba22, 0, 64 * 1024, 4096, + SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | + NO_CHIP_ERASE) }, +- { "mt25qu512a (n25q512a)", INFO(0x20bb20, 0, 64 * 1024, 1024, +- SECT_4K | USE_FSR | SPI_NOR_DUAL_READ | +- SPI_NOR_QUAD_READ | +- SPI_NOR_4B_OPCODES) }, + { "mt25qu02g", INFO(0x20bb22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, + + /* Micron */ diff --git a/queue-5.5/net-smc911x-adjust-indentation-in-smc911x_phy_configure.patch b/queue-5.5/net-smc911x-adjust-indentation-in-smc911x_phy_configure.patch new file mode 100644 index 00000000000..48bde1d5b78 --- /dev/null +++ b/queue-5.5/net-smc911x-adjust-indentation-in-smc911x_phy_configure.patch @@ -0,0 +1,47 @@ +From 5c61e223004b3b5c3f1dd25718e979bc17a3b12d Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 9 Dec 2019 14:50:27 -0700 +Subject: net: smc911x: Adjust indentation in smc911x_phy_configure + +From: Nathan Chancellor + +commit 5c61e223004b3b5c3f1dd25718e979bc17a3b12d upstream. + +Clang warns: + +../drivers/net/ethernet/smsc/smc911x.c:939:3: warning: misleading +indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + if (!lp->ctl_rfduplx) + ^ +../drivers/net/ethernet/smsc/smc911x.c:936:2: note: previous statement +is here + if (lp->ctl_rspeed != 100) + ^ +1 warning generated. + +This warning occurs because there is a space after the tab on this line. +Remove it so that the indentation is consistent with the Linux kernel +coding style and clang no longer warns. + +Fixes: 0a0c72c9118c ("[PATCH] RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips") +Link: https://github.com/ClangBuiltLinux/linux/issues/796 +Signed-off-by: Nathan Chancellor +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/smsc/smc911x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/smsc/smc911x.c ++++ b/drivers/net/ethernet/smsc/smc911x.c +@@ -936,7 +936,7 @@ static void smc911x_phy_configure(struct + if (lp->ctl_rspeed != 100) + my_ad_caps &= ~(ADVERTISE_100BASE4|ADVERTISE_100FULL|ADVERTISE_100HALF); + +- if (!lp->ctl_rfduplx) ++ if (!lp->ctl_rfduplx) + my_ad_caps &= ~(ADVERTISE_100FULL|ADVERTISE_10FULL); + + /* Update our Auto-Neg Advertisement Register */ diff --git a/queue-5.5/net-tulip-adjust-indentation-in-dmfe-uli526x-_init_module.patch b/queue-5.5/net-tulip-adjust-indentation-in-dmfe-uli526x-_init_module.patch new file mode 100644 index 00000000000..9d575ef2e79 --- /dev/null +++ b/queue-5.5/net-tulip-adjust-indentation-in-dmfe-uli526x-_init_module.patch @@ -0,0 +1,87 @@ +From fe06bf3d83ef0d92f35a24e03297172e92ce9ce3 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 9 Dec 2019 14:16:23 -0700 +Subject: net: tulip: Adjust indentation in {dmfe, uli526x}_init_module + +From: Nathan Chancellor + +commit fe06bf3d83ef0d92f35a24e03297172e92ce9ce3 upstream. + +Clang warns: + +../drivers/net/ethernet/dec/tulip/uli526x.c:1812:3: warning: misleading +indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + switch (mode) { + ^ +../drivers/net/ethernet/dec/tulip/uli526x.c:1809:2: note: previous +statement is here + if (cr6set) + ^ +1 warning generated. + +../drivers/net/ethernet/dec/tulip/dmfe.c:2217:3: warning: misleading +indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + switch(mode) { + ^ +../drivers/net/ethernet/dec/tulip/dmfe.c:2214:2: note: previous +statement is here + if (cr6set) + ^ +1 warning generated. + +This warning occurs because there is a space before the tab on these +lines. Remove them so that the indentation is consistent with the Linux +kernel coding style and clang no longer warns. + +While we are here, adjust the default block in dmfe_init_module to have +a proper break between the label and assignment and add a space between +the switch and opening parentheses to avoid a checkpatch warning. + +Fixes: e1c3e5014040 ("[PATCH] initialisation cleanup for ULI526x-net-driver") +Link: https://github.com/ClangBuiltLinux/linux/issues/795 +Signed-off-by: Nathan Chancellor +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/dec/tulip/dmfe.c | 7 ++++--- + drivers/net/ethernet/dec/tulip/uli526x.c | 4 ++-- + 2 files changed, 6 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/dec/tulip/dmfe.c ++++ b/drivers/net/ethernet/dec/tulip/dmfe.c +@@ -2214,15 +2214,16 @@ static int __init dmfe_init_module(void) + if (cr6set) + dmfe_cr6_user_set = cr6set; + +- switch(mode) { +- case DMFE_10MHF: ++ switch (mode) { ++ case DMFE_10MHF: + case DMFE_100MHF: + case DMFE_10MFD: + case DMFE_100MFD: + case DMFE_1M_HPNA: + dmfe_media_mode = mode; + break; +- default:dmfe_media_mode = DMFE_AUTO; ++ default: ++ dmfe_media_mode = DMFE_AUTO; + break; + } + +--- a/drivers/net/ethernet/dec/tulip/uli526x.c ++++ b/drivers/net/ethernet/dec/tulip/uli526x.c +@@ -1809,8 +1809,8 @@ static int __init uli526x_init_module(vo + if (cr6set) + uli526x_cr6_user_set = cr6set; + +- switch (mode) { +- case ULI526X_10MHF: ++ switch (mode) { ++ case ULI526X_10MHF: + case ULI526X_100MHF: + case ULI526X_10MFD: + case ULI526X_100MFD: diff --git a/queue-5.5/nfc-pn544-adjust-indentation-in-pn544_hci_check_presence.patch b/queue-5.5/nfc-pn544-adjust-indentation-in-pn544_hci_check_presence.patch new file mode 100644 index 00000000000..e16a2750413 --- /dev/null +++ b/queue-5.5/nfc-pn544-adjust-indentation-in-pn544_hci_check_presence.patch @@ -0,0 +1,45 @@ +From 5080832627b65e3772a35d1dced68c64e2b24442 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 17 Dec 2019 18:21:52 -0700 +Subject: NFC: pn544: Adjust indentation in pn544_hci_check_presence + +From: Nathan Chancellor + +commit 5080832627b65e3772a35d1dced68c64e2b24442 upstream. + +Clang warns + +../drivers/nfc/pn544/pn544.c:696:4: warning: misleading indentation; +statement is not part of the previous 'if' [-Wmisleading-indentation] + return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, + ^ +../drivers/nfc/pn544/pn544.c:692:3: note: previous statement is here + if (target->nfcid1_len != 4 && target->nfcid1_len != 7 && + ^ +1 warning generated. + +This warning occurs because there is a space after the tab on this line. +Remove it so that the indentation is consistent with the Linux kernel +coding style and clang no longer warns. + +Fixes: da052850b911 ("NFC: Add pn544 presence check for different targets") +Link: https://github.com/ClangBuiltLinux/linux/issues/814 +Signed-off-by: Nathan Chancellor +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/nfc/pn544/pn544.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nfc/pn544/pn544.c ++++ b/drivers/nfc/pn544/pn544.c +@@ -693,7 +693,7 @@ static int pn544_hci_check_presence(stru + target->nfcid1_len != 10) + return -EOPNOTSUPP; + +- return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, ++ return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, + PN544_RF_READER_CMD_ACTIVATE_NEXT, + target->nfcid1, target->nfcid1_len, NULL); + } else if (target->supported_protocols & (NFC_PROTO_JEWEL_MASK | diff --git a/queue-5.5/phy-qualcomm-adjust-indentation-in-read_poll_timeout.patch b/queue-5.5/phy-qualcomm-adjust-indentation-in-read_poll_timeout.patch new file mode 100644 index 00000000000..49079cda1d0 --- /dev/null +++ b/queue-5.5/phy-qualcomm-adjust-indentation-in-read_poll_timeout.patch @@ -0,0 +1,48 @@ +From a89806c998ee123bb9c0f18526e55afd12c0c0ab Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 17 Dec 2019 18:36:37 -0700 +Subject: phy: qualcomm: Adjust indentation in read_poll_timeout + +From: Nathan Chancellor + +commit a89806c998ee123bb9c0f18526e55afd12c0c0ab upstream. + +Clang warns: + +../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:83:4: warning: +misleading indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); + ^ +../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:80:3: note: previous +statement is here + if (readl_relaxed(addr) & mask) + ^ +1 warning generated. + +This warning occurs because there is a space after the tab on this line. +Remove it so that the indentation is consistent with the Linux kernel +coding style and clang no longer warns. + +Fixes: 1de990d8a169 ("phy: qcom: Add driver for QCOM APQ8064 SATA PHY") +Link: https://github.com/ClangBuiltLinux/linux/issues/816 +Signed-off-by: Nathan Chancellor +Reviewed-by: Bjorn Andersson +Signed-off-by: Kishon Vijay Abraham I +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c ++++ b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c +@@ -80,7 +80,7 @@ static int read_poll_timeout(void __iome + if (readl_relaxed(addr) & mask) + return 0; + +- usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); ++ usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); + } while (!time_after(jiffies, timeout)); + + return (readl_relaxed(addr) & mask) ? 0 : -ETIMEDOUT; diff --git a/queue-5.5/powerpc-44x-adjust-indentation-in-ibm4xx_denali_fixup_memsize.patch b/queue-5.5/powerpc-44x-adjust-indentation-in-ibm4xx_denali_fixup_memsize.patch new file mode 100644 index 00000000000..887f3bd7674 --- /dev/null +++ b/queue-5.5/powerpc-44x-adjust-indentation-in-ibm4xx_denali_fixup_memsize.patch @@ -0,0 +1,46 @@ +From c3aae14e5d468d18dbb5d7c0c8c7e2968cc14aad Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 9 Dec 2019 13:03:38 -0700 +Subject: powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize + +From: Nathan Chancellor + +commit c3aae14e5d468d18dbb5d7c0c8c7e2968cc14aad upstream. + +Clang warns: + +../arch/powerpc/boot/4xx.c:231:3: warning: misleading indentation; +statement is not part of the previous 'else' [-Wmisleading-indentation] + val = SDRAM0_READ(DDR0_42); + ^ +../arch/powerpc/boot/4xx.c:227:2: note: previous statement is here + else + ^ + +This is because there is a space at the beginning of this line; remove +it so that the indentation is consistent according to the Linux kernel +coding style and clang no longer warns. + +Fixes: d23f5099297c ("[POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library") +Signed-off-by: Nathan Chancellor +Reviewed-by: Nick Desaulniers +Signed-off-by: Michael Ellerman +Link: https://github.com/ClangBuiltLinux/linux/issues/780 +Link: https://lore.kernel.org/r/20191209200338.12546-1-natechancellor@gmail.com +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/boot/4xx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/boot/4xx.c ++++ b/arch/powerpc/boot/4xx.c +@@ -228,7 +228,7 @@ void ibm4xx_denali_fixup_memsize(void) + dpath = 8; /* 64 bits */ + + /* get address pins (rows) */ +- val = SDRAM0_READ(DDR0_42); ++ val = SDRAM0_READ(DDR0_42); + + row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT); + if (row > max_row) diff --git a/queue-5.5/ppp-adjust-indentation-into-ppp_async_input.patch b/queue-5.5/ppp-adjust-indentation-into-ppp_async_input.patch new file mode 100644 index 00000000000..436f6fb00cc --- /dev/null +++ b/queue-5.5/ppp-adjust-indentation-into-ppp_async_input.patch @@ -0,0 +1,61 @@ +From 08cbc75f96029d3092664213a844a5e25523aa35 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Mon, 9 Dec 2019 15:38:59 -0700 +Subject: ppp: Adjust indentation into ppp_async_input + +From: Nathan Chancellor + +commit 08cbc75f96029d3092664213a844a5e25523aa35 upstream. + +Clang warns: + +../drivers/net/ppp/ppp_async.c:877:6: warning: misleading indentation; +statement is not part of the previous 'if' [-Wmisleading-indentation] + ap->rpkt = skb; + ^ +../drivers/net/ppp/ppp_async.c:875:5: note: previous statement is here + if (!skb) + ^ +1 warning generated. + +This warning occurs because there is a space before the tab on this +line. Clean up this entire block's indentation so that it is consistent +with the Linux kernel coding style and clang no longer warns. + +Fixes: 6722e78c9005 ("[PPP]: handle misaligned accesses") +Link: https://github.com/ClangBuiltLinux/linux/issues/800 +Signed-off-by: Nathan Chancellor +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ppp/ppp_async.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/drivers/net/ppp/ppp_async.c ++++ b/drivers/net/ppp/ppp_async.c +@@ -874,15 +874,15 @@ ppp_async_input(struct asyncppp *ap, con + skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2); + if (!skb) + goto nomem; +- ap->rpkt = skb; +- } +- if (skb->len == 0) { +- /* Try to get the payload 4-byte aligned. +- * This should match the +- * PPP_ALLSTATIONS/PPP_UI/compressed tests in +- * process_input_packet, but we do not have +- * enough chars here to test buf[1] and buf[2]. +- */ ++ ap->rpkt = skb; ++ } ++ if (skb->len == 0) { ++ /* Try to get the payload 4-byte aligned. ++ * This should match the ++ * PPP_ALLSTATIONS/PPP_UI/compressed tests in ++ * process_input_packet, but we do not have ++ * enough chars here to test buf[1] and buf[2]. ++ */ + if (buf[0] != PPP_ALLSTATIONS) + skb_reserve(skb, 2 + (buf[0] & 1)); + } diff --git a/queue-5.5/scsi-csiostor-adjust-indentation-in-csio_device_reset.patch b/queue-5.5/scsi-csiostor-adjust-indentation-in-csio_device_reset.patch new file mode 100644 index 00000000000..70a9ac10bca --- /dev/null +++ b/queue-5.5/scsi-csiostor-adjust-indentation-in-csio_device_reset.patch @@ -0,0 +1,48 @@ +From a808a04c861782e31fc30e342a619c144aaee14a Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 17 Dec 2019 18:47:26 -0700 +Subject: scsi: csiostor: Adjust indentation in csio_device_reset + +From: Nathan Chancellor + +commit a808a04c861782e31fc30e342a619c144aaee14a upstream. + +Clang warns: + +../drivers/scsi/csiostor/csio_scsi.c:1386:3: warning: misleading +indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + csio_lnodes_exit(hw, 1); + ^ +../drivers/scsi/csiostor/csio_scsi.c:1382:2: note: previous statement is +here + if (*buf != '1') + ^ +1 warning generated. + +This warning occurs because there is a space after the tab on this +line. Remove it so that the indentation is consistent with the Linux +kernel coding style and clang no longer warns. + +Fixes: a3667aaed569 ("[SCSI] csiostor: Chelsio FCoE offload driver") +Link: https://github.com/ClangBuiltLinux/linux/issues/818 +Link: https://lore.kernel.org/r/20191218014726.8455-1-natechancellor@gmail.com +Signed-off-by: Nathan Chancellor +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/csiostor/csio_scsi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/csiostor/csio_scsi.c ++++ b/drivers/scsi/csiostor/csio_scsi.c +@@ -1383,7 +1383,7 @@ csio_device_reset(struct device *dev, + return -EINVAL; + + /* Delete NPIV lnodes */ +- csio_lnodes_exit(hw, 1); ++ csio_lnodes_exit(hw, 1); + + /* Block upper IOs */ + csio_lnodes_block_request(hw); diff --git a/queue-5.5/scsi-qla2xxx-fix-the-endianness-of-the-qla82xx_get_fw_size-return-type.patch b/queue-5.5/scsi-qla2xxx-fix-the-endianness-of-the-qla82xx_get_fw_size-return-type.patch new file mode 100644 index 00000000000..aaffe6dca9a --- /dev/null +++ b/queue-5.5/scsi-qla2xxx-fix-the-endianness-of-the-qla82xx_get_fw_size-return-type.patch @@ -0,0 +1,60 @@ +From 3f5f7335e5e234e340b48ecb24c2aba98a61f934 Mon Sep 17 00:00:00 2001 +From: Bart Van Assche +Date: Wed, 18 Dec 2019 16:49:05 -0800 +Subject: scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type + +From: Bart Van Assche + +commit 3f5f7335e5e234e340b48ecb24c2aba98a61f934 upstream. + +Since qla82xx_get_fw_size() returns a number in CPU-endian format, change +its return type from __le32 into u32. This patch does not change any +functionality. + +Fixes: 9c2b297572bf ("[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.") +Cc: Himanshu Madhani +Cc: Quinn Tran +Cc: Martin Wilck +Cc: Daniel Wagner +Cc: Roman Bolshakov +Link: https://lore.kernel.org/r/20191219004905.39586-1-bvanassche@acm.org +Reviewed-by: Daniel Wagner +Reviewed-by: Roman Bolshakov +Signed-off-by: Bart Van Assche +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_nx.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_nx.c ++++ b/drivers/scsi/qla2xxx/qla_nx.c +@@ -1612,8 +1612,7 @@ qla82xx_get_bootld_offset(struct qla_hw_ + return (u8 *)&ha->hablob->fw->data[offset]; + } + +-static __le32 +-qla82xx_get_fw_size(struct qla_hw_data *ha) ++static u32 qla82xx_get_fw_size(struct qla_hw_data *ha) + { + struct qla82xx_uri_data_desc *uri_desc = NULL; + +@@ -1624,7 +1623,7 @@ qla82xx_get_fw_size(struct qla_hw_data * + return cpu_to_le32(uri_desc->size); + } + +- return cpu_to_le32(*(u32 *)&ha->hablob->fw->data[FW_SIZE_OFFSET]); ++ return get_unaligned_le32(&ha->hablob->fw->data[FW_SIZE_OFFSET]); + } + + static u8 * +@@ -1816,7 +1815,7 @@ qla82xx_fw_load_from_blob(struct qla_hw_ + } + + flashaddr = FLASH_ADDR_START; +- size = (__force u32)qla82xx_get_fw_size(ha) / 8; ++ size = qla82xx_get_fw_size(ha) / 8; + ptr64 = (u64 *)qla82xx_get_fw_offs(ha); + + for (i = 0; i < size; i++) { diff --git a/queue-5.5/scsi-qla4xxx-adjust-indentation-in-qla4xxx_mem_free.patch b/queue-5.5/scsi-qla4xxx-adjust-indentation-in-qla4xxx_mem_free.patch new file mode 100644 index 00000000000..4072aa9e12a --- /dev/null +++ b/queue-5.5/scsi-qla4xxx-adjust-indentation-in-qla4xxx_mem_free.patch @@ -0,0 +1,50 @@ +From aa8679736a82386551eb9f3ea0e6ebe2c0e99104 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 17 Dec 2019 18:52:52 -0700 +Subject: scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free + +From: Nathan Chancellor + +commit aa8679736a82386551eb9f3ea0e6ebe2c0e99104 upstream. + +Clang warns: + +../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading +indentation; statement is not part of the previous 'if' +[-Wmisleading-indentation] + if (ha->fw_dump) + ^ +../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is +here + if (ha->queues) + ^ +1 warning generated. + +This warning occurs because there is a space after the tab on this +line. Remove it so that the indentation is consistent with the Linux +kernel coding style and clang no longer warns. + +Fixes: 068237c87c64 ("[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure") +Link: https://github.com/ClangBuiltLinux/linux/issues/819 +Link: https://lore.kernel.org/r/20191218015252.20890-1-natechancellor@gmail.com +Acked-by: Manish Rangankar +Reviewed-by: Nick Desaulniers +Signed-off-by: Nathan Chancellor +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla4xxx/ql4_os.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qla4xxx/ql4_os.c ++++ b/drivers/scsi/qla4xxx/ql4_os.c +@@ -4145,7 +4145,7 @@ static void qla4xxx_mem_free(struct scsi + dma_free_coherent(&ha->pdev->dev, ha->queues_len, ha->queues, + ha->queues_dma); + +- if (ha->fw_dump) ++ if (ha->fw_dump) + vfree(ha->fw_dump); + + ha->queues_len = 0; diff --git a/queue-5.5/scsi-ufs-recheck-bkops-level-if-bkops-is-disabled.patch b/queue-5.5/scsi-ufs-recheck-bkops-level-if-bkops-is-disabled.patch new file mode 100644 index 00000000000..7bf7bfdf3f0 --- /dev/null +++ b/queue-5.5/scsi-ufs-recheck-bkops-level-if-bkops-is-disabled.patch @@ -0,0 +1,55 @@ +From 24366c2afbb0539fb14eff330d4e3a5db5c0a3ef Mon Sep 17 00:00:00 2001 +From: Asutosh Das +Date: Mon, 25 Nov 2019 22:53:30 -0800 +Subject: scsi: ufs: Recheck bkops level if bkops is disabled + +From: Asutosh Das + +commit 24366c2afbb0539fb14eff330d4e3a5db5c0a3ef upstream. + +bkops level should be rechecked upon receiving an exception. Currently the +level is being cached and never updated. + +Update bkops each time the level is checked. Also do not use the cached +bkops level value if it is disabled and then enabled. + +Fixes: afdfff59a0e0 (scsi: ufs: handle non spec compliant bkops behaviour by device) +Link: https://lore.kernel.org/r/1574751214-8321-2-git-send-email-cang@qti.qualcomm.com +Reviewed-by: Bean Huo +Reviewed-by: Alim Akhtar +Tested-by: Alim Akhtar +Signed-off-by: Asutosh Das +Signed-off-by: Can Guo +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/ufs/ufshcd.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/scsi/ufs/ufshcd.c ++++ b/drivers/scsi/ufs/ufshcd.c +@@ -5053,6 +5053,7 @@ static int ufshcd_disable_auto_bkops(str + + hba->auto_bkops_enabled = false; + trace_ufshcd_auto_bkops_state(dev_name(hba->dev), "Disabled"); ++ hba->is_urgent_bkops_lvl_checked = false; + out: + return err; + } +@@ -5077,6 +5078,7 @@ static void ufshcd_force_reset_auto_bkop + hba->ee_ctrl_mask &= ~MASK_EE_URGENT_BKOPS; + ufshcd_disable_auto_bkops(hba); + } ++ hba->is_urgent_bkops_lvl_checked = false; + } + + static inline int ufshcd_get_bkops_status(struct ufs_hba *hba, u32 *status) +@@ -5123,6 +5125,7 @@ static int ufshcd_bkops_ctrl(struct ufs_ + err = ufshcd_enable_auto_bkops(hba); + else + err = ufshcd_disable_auto_bkops(hba); ++ hba->urgent_bkops_lvl = curr_status; + out: + return err; + } diff --git a/queue-5.5/series b/queue-5.5/series index b33814551af..bd8dcf0ebdb 100644 --- a/queue-5.5/series +++ b/queue-5.5/series @@ -276,3 +276,18 @@ virtio-pci-check-name-when-counting-msi-x-vectors.patch fix-up-iter-on-short-count-in-fuse_direct_io.patch broken-ping-to-ipv6-linklocal-addresses-on-debian-buster.patch percpu-separate-decrypted-varaibles-anytime-encryption-can-be-enabled.patch +asoc-meson-axg-fifo-fix-fifo-threshold-setup.patch +scsi-qla2xxx-fix-the-endianness-of-the-qla82xx_get_fw_size-return-type.patch +scsi-csiostor-adjust-indentation-in-csio_device_reset.patch +scsi-qla4xxx-adjust-indentation-in-qla4xxx_mem_free.patch +scsi-ufs-recheck-bkops-level-if-bkops-is-disabled.patch +compat-scsi-sg-fix-v3-compat-read-write-interface.patch +mtd-spi-nor-split-mt25qu512a-n25q512a-entry-into-two.patch +phy-qualcomm-adjust-indentation-in-read_poll_timeout.patch +ext2-adjust-indentation-in-ext2_fill_super.patch +powerpc-44x-adjust-indentation-in-ibm4xx_denali_fixup_memsize.patch +drm-msm-mdp4-adjust-indentation-in-mdp4_dsi_encoder_enable.patch +nfc-pn544-adjust-indentation-in-pn544_hci_check_presence.patch +ppp-adjust-indentation-into-ppp_async_input.patch +net-smc911x-adjust-indentation-in-smc911x_phy_configure.patch +net-tulip-adjust-indentation-in-dmfe-uli526x-_init_module.patch