From 816f13a822e04867465a9edb3f76c1c7c9629356 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 23 Jun 2019 20:33:20 -0400 Subject: [PATCH] fixes for 4.9 Signed-off-by: Sasha Levin --- ...x-build-warnings-with-config_kprobes.patch | 108 ++++++++++++++++++ ...hdlcd-allow-a-bit-of-clock-tolerance.patch | 39 +++++++ ...-treat-parameters-as-paged-if-on-mul.patch | 100 ++++++++++++++++ ...reeze_work-work_struct-is-canceled-o.patch | 38 ++++++ ...avt-correct-ibv_devinfo-max_mr-value.patch | 66 +++++++++++ .../ib-rdmavt-fix-alloc_qpn-warn_on.patch | 57 +++++++++ ...remove-set-but-not-used-variable-epc.patch | 43 +++++++ ...x-avoid-error-message-on-remove-from.patch | 48 ++++++++ ...iatek-use-hw_feature-to-judge-if-hwl.patch | 70 ++++++++++++ ...iatek-use-net_ip_align-to-judge-if-h.patch | 43 +++++++ ...loopback-test-failed-at-copper-ports.patch | 45 ++++++++ ...rflow-in-the-number-of-namespace-lis.patch | 37 ++++++ ...ler-warnings-in-float-emulation-code.patch | 53 +++++++++ ...m-leak-in-parport_register_dev_model.patch | 67 +++++++++++ ...an-attribute-in-bridge_hostnotify-ud.patch | 51 +++++++++ ...ck.pl-fix-arm64-wrong-or-unknown-arc.patch | 42 +++++++ ...hat-space-was-properly-alloced-in-co.patch | 42 +++++++ queue-4.9/series | 18 +++ ...pdated-event-period-in-response-to-p.patch | 44 +++++++ 19 files changed, 1011 insertions(+) create mode 100644 queue-4.9/arc-fix-build-warnings-with-config_kprobes.patch create mode 100644 queue-4.9/drm-arm-hdlcd-allow-a-bit-of-clock-tolerance.patch create mode 100644 queue-4.9/hwmon-pmbus-core-treat-parameters-as-paged-if-on-mul.patch create mode 100644 queue-4.9/ib-hfi1-insure-freeze_work-work_struct-is-canceled-o.patch create mode 100644 queue-4.9/ib-qib-hfi1-rdmavt-correct-ibv_devinfo-max_mr-value.patch create mode 100644 queue-4.9/ib-rdmavt-fix-alloc_qpn-warn_on.patch create mode 100644 queue-4.9/mips-uprobes-remove-set-but-not-used-variable-epc.patch create mode 100644 queue-4.9/net-dsa-mv88e6xxx-avoid-error-message-on-remove-from.patch create mode 100644 queue-4.9/net-ethernet-mediatek-use-hw_feature-to-judge-if-hwl.patch create mode 100644 queue-4.9/net-ethernet-mediatek-use-net_ip_align-to-judge-if-h.patch create mode 100644 queue-4.9/net-hns-fix-loopback-test-failed-at-copper-ports.patch create mode 100644 queue-4.9/nvme-fix-u32-overflow-in-the-number-of-namespace-lis.patch create mode 100644 queue-4.9/parisc-fix-compiler-warnings-in-float-emulation-code.patch create mode 100644 queue-4.9/parport-fix-mem-leak-in-parport_register_dev_model.patch create mode 100644 queue-4.9/s390-qeth-fix-vlan-attribute-in-bridge_hostnotify-ud.patch create mode 100644 queue-4.9/scripts-checkstack.pl-fix-arm64-wrong-or-unknown-arc.patch create mode 100644 queue-4.9/scsi-ufs-check-that-space-was-properly-alloced-in-co.patch create mode 100644 queue-4.9/sparc-perf-fix-updated-event-period-in-response-to-p.patch diff --git a/queue-4.9/arc-fix-build-warnings-with-config_kprobes.patch b/queue-4.9/arc-fix-build-warnings-with-config_kprobes.patch new file mode 100644 index 0000000000..81e92a5d4f --- /dev/null +++ b/queue-4.9/arc-fix-build-warnings-with-config_kprobes.patch @@ -0,0 +1,108 @@ +From 18c41f4131019e2eb4d61d8bff1b6b328e9654a7 Mon Sep 17 00:00:00 2001 +From: Vineet Gupta +Date: Tue, 7 May 2019 10:45:24 -0700 +Subject: ARC: fix build warnings with !CONFIG_KPROBES + +[ Upstream commit 4c6fabda1ad1dec6d274c098ef0a91809c74f2e3 ] + +| CC lib/nmi_backtrace.o +| In file included from ../include/linux/kprobes.h:43:0, +| from ../lib/nmi_backtrace.c:17: +| ../arch/arc/include/asm/kprobes.h:57:13: warning: 'trap_is_kprobe' defined but not used [-Wunused-function] +| static void trap_is_kprobe(unsigned long address, struct pt_regs *regs) +| ^~~~~~~~~~~~~~ + +The warning started with 7d134b2ce6 ("kprobes: move kprobe declarations +to asm-generic/kprobes.h") which started including +unconditionally into exposing a stub function for +!CONFIG_KPROBES to rest of world. Fix that by making the stub a macro + +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +--- + arch/arc/include/asm/cmpxchg.h | 14 ++++++++++---- + arch/arc/mm/tlb.c | 13 ++++++++----- + 2 files changed, 18 insertions(+), 9 deletions(-) + +diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h +index d819de1c5d10..3ea4112c8302 100644 +--- a/arch/arc/include/asm/cmpxchg.h ++++ b/arch/arc/include/asm/cmpxchg.h +@@ -92,8 +92,11 @@ __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) + + #endif /* CONFIG_ARC_HAS_LLSC */ + +-#define cmpxchg(ptr, o, n) ((typeof(*(ptr)))__cmpxchg((ptr), \ +- (unsigned long)(o), (unsigned long)(n))) ++#define cmpxchg(ptr, o, n) ({ \ ++ (typeof(*(ptr)))__cmpxchg((ptr), \ ++ (unsigned long)(o), \ ++ (unsigned long)(n)); \ ++}) + + /* + * atomic_cmpxchg is same as cmpxchg +@@ -198,8 +201,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, + return __xchg_bad_pointer(); + } + +-#define xchg(ptr, with) ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), \ +- sizeof(*(ptr)))) ++#define xchg(ptr, with) ({ \ ++ (typeof(*(ptr)))__xchg((unsigned long)(with), \ ++ (ptr), \ ++ sizeof(*(ptr))); \ ++}) + + #endif /* CONFIG_ARC_PLAT_EZNPS */ + +diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c +index a4dc881da277..3c88ccbe01af 100644 +--- a/arch/arc/mm/tlb.c ++++ b/arch/arc/mm/tlb.c +@@ -890,9 +890,11 @@ void do_tlb_overlap_fault(unsigned long cause, unsigned long address, + struct pt_regs *regs) + { + struct cpuinfo_arc_mmu *mmu = &cpuinfo_arc700[smp_processor_id()].mmu; +- unsigned int pd0[mmu->ways]; + unsigned long flags; +- int set; ++ int set, n_ways = mmu->ways; ++ ++ n_ways = min(n_ways, 4); ++ BUG_ON(mmu->ways > 4); + + local_irq_save(flags); + +@@ -900,9 +902,10 @@ void do_tlb_overlap_fault(unsigned long cause, unsigned long address, + for (set = 0; set < mmu->sets; set++) { + + int is_valid, way; ++ unsigned int pd0[4]; + + /* read out all the ways of current set */ +- for (way = 0, is_valid = 0; way < mmu->ways; way++) { ++ for (way = 0, is_valid = 0; way < n_ways; way++) { + write_aux_reg(ARC_REG_TLBINDEX, + SET_WAY_TO_IDX(mmu, set, way)); + write_aux_reg(ARC_REG_TLBCOMMAND, TLBRead); +@@ -916,14 +919,14 @@ void do_tlb_overlap_fault(unsigned long cause, unsigned long address, + continue; + + /* Scan the set for duplicate ways: needs a nested loop */ +- for (way = 0; way < mmu->ways - 1; way++) { ++ for (way = 0; way < n_ways - 1; way++) { + + int n; + + if (!pd0[way]) + continue; + +- for (n = way + 1; n < mmu->ways; n++) { ++ for (n = way + 1; n < n_ways; n++) { + if (pd0[way] != pd0[n]) + continue; + +-- +2.20.1 + diff --git a/queue-4.9/drm-arm-hdlcd-allow-a-bit-of-clock-tolerance.patch b/queue-4.9/drm-arm-hdlcd-allow-a-bit-of-clock-tolerance.patch new file mode 100644 index 0000000000..249f83f9cc --- /dev/null +++ b/queue-4.9/drm-arm-hdlcd-allow-a-bit-of-clock-tolerance.patch @@ -0,0 +1,39 @@ +From e5eeea18ba4b8384a33211bdbf0f404962e8cb69 Mon Sep 17 00:00:00 2001 +From: Robin Murphy +Date: Fri, 17 May 2019 17:37:22 +0100 +Subject: drm/arm/hdlcd: Allow a bit of clock tolerance + +[ Upstream commit 1c810739097fdeb31b393b67a0a1e3d7ffdd9f63 ] + +On the Arm Juno platform, the HDLCD pixel clock is constrained to 250KHz +resolution in order to avoid the tiny System Control Processor spending +aeons trying to calculate exact PLL coefficients. This means that modes +like my oddball 1600x1200 with 130.89MHz clock get rejected since the +rate cannot be matched exactly. In practice, though, this mode works +quite happily with the clock at 131MHz, so let's relax the check to +allow a little bit of slop. + +Signed-off-by: Robin Murphy +Signed-off-by: Liviu Dudau +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/arm/hdlcd_crtc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c +index 28341b32067f..84dea276175b 100644 +--- a/drivers/gpu/drm/arm/hdlcd_crtc.c ++++ b/drivers/gpu/drm/arm/hdlcd_crtc.c +@@ -170,7 +170,8 @@ static int hdlcd_crtc_atomic_check(struct drm_crtc *crtc, + long rate, clk_rate = mode->clock * 1000; + + rate = clk_round_rate(hdlcd->clk, clk_rate); +- if (rate != clk_rate) { ++ /* 0.1% seems a close enough tolerance for the TDA19988 on Juno */ ++ if (abs(rate - clk_rate) * 1000 > clk_rate) { + /* clock required by mode not supported by hardware */ + return -EINVAL; + } +-- +2.20.1 + diff --git a/queue-4.9/hwmon-pmbus-core-treat-parameters-as-paged-if-on-mul.patch b/queue-4.9/hwmon-pmbus-core-treat-parameters-as-paged-if-on-mul.patch new file mode 100644 index 0000000000..0f6c86c268 --- /dev/null +++ b/queue-4.9/hwmon-pmbus-core-treat-parameters-as-paged-if-on-mul.patch @@ -0,0 +1,100 @@ +From b3b99bbb09d59e99e2a22fc1b5dbbd09870e34f2 Mon Sep 17 00:00:00 2001 +From: Robert Hancock +Date: Wed, 5 Jun 2019 13:49:00 -0600 +Subject: hwmon: (pmbus/core) Treat parameters as paged if on multiple pages + +[ Upstream commit 4a60570dce658e3f8885bbcf852430b99f65aca5 ] + +Some chips have attributes which exist on more than one page but the +attribute is not presently marked as paged. This causes the attributes +to be generated with the same label, which makes it impossible for +userspace to tell them apart. + +Marking all such attributes as paged would result in the page suffix +being added regardless of whether they were present on more than one +page or not, which might break existing setups. Therefore, we add a +second check which treats the attribute as paged, even if not marked as +such, if it is present on multiple pages. + +Fixes: b4ce237b7f7d ("hwmon: (pmbus) Introduce infrastructure to detect sensors and limit registers") +Signed-off-by: Robert Hancock +Signed-off-by: Guenter Roeck +Signed-off-by: Sasha Levin +--- + drivers/hwmon/pmbus/pmbus_core.c | 34 ++++++++++++++++++++++++++++---- + 1 file changed, 30 insertions(+), 4 deletions(-) + +diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c +index c00bad02761a..0d75bc7b5065 100644 +--- a/drivers/hwmon/pmbus/pmbus_core.c ++++ b/drivers/hwmon/pmbus/pmbus_core.c +@@ -1028,14 +1028,15 @@ static int pmbus_add_sensor_attrs_one(struct i2c_client *client, + const struct pmbus_driver_info *info, + const char *name, + int index, int page, +- const struct pmbus_sensor_attr *attr) ++ const struct pmbus_sensor_attr *attr, ++ bool paged) + { + struct pmbus_sensor *base; + int ret; + + if (attr->label) { + ret = pmbus_add_label(data, name, index, attr->label, +- attr->paged ? page + 1 : 0); ++ paged ? page + 1 : 0); + if (ret) + return ret; + } +@@ -1067,6 +1068,30 @@ static int pmbus_add_sensor_attrs_one(struct i2c_client *client, + return 0; + } + ++static bool pmbus_sensor_is_paged(const struct pmbus_driver_info *info, ++ const struct pmbus_sensor_attr *attr) ++{ ++ int p; ++ ++ if (attr->paged) ++ return true; ++ ++ /* ++ * Some attributes may be present on more than one page despite ++ * not being marked with the paged attribute. If that is the case, ++ * then treat the sensor as being paged and add the page suffix to the ++ * attribute name. ++ * We don't just add the paged attribute to all such attributes, in ++ * order to maintain the un-suffixed labels in the case where the ++ * attribute is only on page 0. ++ */ ++ for (p = 1; p < info->pages; p++) { ++ if (info->func[p] & attr->func) ++ return true; ++ } ++ return false; ++} ++ + static int pmbus_add_sensor_attrs(struct i2c_client *client, + struct pmbus_data *data, + const char *name, +@@ -1080,14 +1105,15 @@ static int pmbus_add_sensor_attrs(struct i2c_client *client, + index = 1; + for (i = 0; i < nattrs; i++) { + int page, pages; ++ bool paged = pmbus_sensor_is_paged(info, attrs); + +- pages = attrs->paged ? info->pages : 1; ++ pages = paged ? info->pages : 1; + for (page = 0; page < pages; page++) { + if (!(info->func[page] & attrs->func)) + continue; + ret = pmbus_add_sensor_attrs_one(client, data, info, + name, index, page, +- attrs); ++ attrs, paged); + if (ret) + return ret; + index++; +-- +2.20.1 + diff --git a/queue-4.9/ib-hfi1-insure-freeze_work-work_struct-is-canceled-o.patch b/queue-4.9/ib-hfi1-insure-freeze_work-work_struct-is-canceled-o.patch new file mode 100644 index 0000000000..973239cd9c --- /dev/null +++ b/queue-4.9/ib-hfi1-insure-freeze_work-work_struct-is-canceled-o.patch @@ -0,0 +1,38 @@ +From 9cc432b7c38381f0a650991b193eb7e0c64b917a Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Fri, 24 May 2019 11:44:45 -0400 +Subject: IB/hfi1: Insure freeze_work work_struct is canceled on shutdown + +[ Upstream commit 6d517353c70bb0818b691ca003afdcb5ee5ea44e ] + +By code inspection, the freeze_work is never canceled. + +Fix by adding a cancel_work_sync in the shutdown path to insure it is no +longer running. + +Fixes: 7724105686e7 ("IB/hfi1: add driver files") +Reviewed-by: Michael J. Ruhl +Reviewed-by: Dennis Dalessandro +Signed-off-by: Mike Marciniszyn +Signed-off-by: Dennis Dalessandro +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/hw/hfi1/chip.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c +index d30b3b908621..85db856047a9 100644 +--- a/drivers/infiniband/hw/hfi1/chip.c ++++ b/drivers/infiniband/hw/hfi1/chip.c +@@ -9620,6 +9620,7 @@ void hfi1_quiet_serdes(struct hfi1_pportdata *ppd) + + /* disable the port */ + clear_rcvctrl(dd, RCV_CTRL_RCV_PORT_ENABLE_SMASK); ++ cancel_work_sync(&ppd->freeze_work); + } + + static inline int init_cpu_counters(struct hfi1_devdata *dd) +-- +2.20.1 + diff --git a/queue-4.9/ib-qib-hfi1-rdmavt-correct-ibv_devinfo-max_mr-value.patch b/queue-4.9/ib-qib-hfi1-rdmavt-correct-ibv_devinfo-max_mr-value.patch new file mode 100644 index 0000000000..d066846169 --- /dev/null +++ b/queue-4.9/ib-qib-hfi1-rdmavt-correct-ibv_devinfo-max_mr-value.patch @@ -0,0 +1,66 @@ +From b5bd5260bfb75ca0c96aaa1742a7244bcd8b81d3 Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Fri, 24 May 2019 11:44:51 -0400 +Subject: IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value + +[ Upstream commit 35164f5259a47ea756fa1deb3e463ac2a4f10dc9 ] + +The command 'ibv_devinfo -v' reports 0 for max_mr. + +Fix by assigning the query values after the mr lkey_table has been built +rather than early on in the driver. + +Fixes: 7b1e2099adc8 ("IB/rdmavt: Move memory registration into rdmavt") +Reviewed-by: Josh Collier +Signed-off-by: Mike Marciniszyn +Signed-off-by: Dennis Dalessandro +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/hw/hfi1/verbs.c | 2 -- + drivers/infiniband/hw/qib/qib_verbs.c | 2 -- + drivers/infiniband/sw/rdmavt/mr.c | 2 ++ + 3 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c +index d9c71750e22d..15054a0cbf6d 100644 +--- a/drivers/infiniband/hw/hfi1/verbs.c ++++ b/drivers/infiniband/hw/hfi1/verbs.c +@@ -1344,8 +1344,6 @@ static void hfi1_fill_device_attr(struct hfi1_devdata *dd) + rdi->dparms.props.max_cq = hfi1_max_cqs; + rdi->dparms.props.max_ah = hfi1_max_ahs; + rdi->dparms.props.max_cqe = hfi1_max_cqes; +- rdi->dparms.props.max_mr = rdi->lkey_table.max; +- rdi->dparms.props.max_fmr = rdi->lkey_table.max; + rdi->dparms.props.max_map_per_fmr = 32767; + rdi->dparms.props.max_pd = hfi1_max_pds; + rdi->dparms.props.max_qp_rd_atom = HFI1_MAX_RDMA_ATOMIC; +diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c +index 954f15064514..d6e183775e24 100644 +--- a/drivers/infiniband/hw/qib/qib_verbs.c ++++ b/drivers/infiniband/hw/qib/qib_verbs.c +@@ -1568,8 +1568,6 @@ static void qib_fill_device_attr(struct qib_devdata *dd) + rdi->dparms.props.max_cq = ib_qib_max_cqs; + rdi->dparms.props.max_cqe = ib_qib_max_cqes; + rdi->dparms.props.max_ah = ib_qib_max_ahs; +- rdi->dparms.props.max_mr = rdi->lkey_table.max; +- rdi->dparms.props.max_fmr = rdi->lkey_table.max; + rdi->dparms.props.max_map_per_fmr = 32767; + rdi->dparms.props.max_qp_rd_atom = QIB_MAX_RDMA_ATOMIC; + rdi->dparms.props.max_qp_init_rd_atom = 255; +diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c +index 49d55a0322f6..dbd4c0d268e9 100644 +--- a/drivers/infiniband/sw/rdmavt/mr.c ++++ b/drivers/infiniband/sw/rdmavt/mr.c +@@ -94,6 +94,8 @@ int rvt_driver_mr_init(struct rvt_dev_info *rdi) + for (i = 0; i < rdi->lkey_table.max; i++) + RCU_INIT_POINTER(rdi->lkey_table.table[i], NULL); + ++ rdi->dparms.props.max_mr = rdi->lkey_table.max; ++ rdi->dparms.props.max_fmr = rdi->lkey_table.max; + return 0; + } + +-- +2.20.1 + diff --git a/queue-4.9/ib-rdmavt-fix-alloc_qpn-warn_on.patch b/queue-4.9/ib-rdmavt-fix-alloc_qpn-warn_on.patch new file mode 100644 index 0000000000..abdfbd2573 --- /dev/null +++ b/queue-4.9/ib-rdmavt-fix-alloc_qpn-warn_on.patch @@ -0,0 +1,57 @@ +From bd540c33748c19ce043cf18d3c52efd6d532fcc2 Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Fri, 24 May 2019 11:44:38 -0400 +Subject: IB/rdmavt: Fix alloc_qpn() WARN_ON() + +[ Upstream commit 2abae62a26a265129b364d8c1ef3be55e2c01309 ] + +The qpn allocation logic has a WARN_ON() that intends to detect the use of +an index that will introduce bits in the lower order bits of the QOS bits +in the QPN. + +Unfortunately, it has the following bugs: +- it misfires when wrapping QPN allocation for non-QOS +- it doesn't correctly detect low order QOS bits (despite the comment) + +The WARN_ON() should not be applied to non-QOS (qos_shift == 1). + +Additionally, it SHOULD test the qpn bits per the table below: + +2 data VLs: [qp7, qp6, qp5, qp4, qp3, qp2, qp1] ^ + [ 0, 0, 0, 0, 0, 0, sc0], qp bit 1 always 0* +3-4 data VLs: [qp7, qp6, qp5, qp4, qp3, qp2, qp1] ^ + [ 0, 0, 0, 0, 0, sc1, sc0], qp bits [21] always 0 +5-8 data VLs: [qp7, qp6, qp5, qp4, qp3, qp2, qp1] ^ + [ 0, 0, 0, 0, sc2, sc1, sc0] qp bits [321] always 0 + +Fix by qualifying the warning for qos_shift > 1 and producing the correct +mask to insure the above bits are zero without generating a superfluous +warning. + +Fixes: 501edc42446e ("IB/rdmavt: Correct warning during QPN allocation") +Reviewed-by: Kaike Wan +Signed-off-by: Mike Marciniszyn +Signed-off-by: Dennis Dalessandro +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/sw/rdmavt/qp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c +index 6500c3b5a89c..8b330b53d636 100644 +--- a/drivers/infiniband/sw/rdmavt/qp.c ++++ b/drivers/infiniband/sw/rdmavt/qp.c +@@ -370,7 +370,8 @@ static int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, + offset = qpt->incr | ((offset & 1) ^ 1); + } + /* there can be no set bits in low-order QoS bits */ +- WARN_ON(offset & (BIT(rdi->dparms.qos_shift) - 1)); ++ WARN_ON(rdi->dparms.qos_shift > 1 && ++ offset & ((BIT(rdi->dparms.qos_shift - 1) - 1) << 1)); + qpn = mk_qpn(qpt, map, offset); + } + +-- +2.20.1 + diff --git a/queue-4.9/mips-uprobes-remove-set-but-not-used-variable-epc.patch b/queue-4.9/mips-uprobes-remove-set-but-not-used-variable-epc.patch new file mode 100644 index 0000000000..6d2539aa3f --- /dev/null +++ b/queue-4.9/mips-uprobes-remove-set-but-not-used-variable-epc.patch @@ -0,0 +1,43 @@ +From 09da233b388f34ac598cc1b3e3bc83889e6243ac Mon Sep 17 00:00:00 2001 +From: YueHaibing +Date: Sat, 25 May 2019 20:20:24 +0800 +Subject: MIPS: uprobes: remove set but not used variable 'epc' + +[ Upstream commit f532beeeff0c0a3586cc15538bc52d249eb19e7c ] + +Fixes gcc '-Wunused-but-set-variable' warning: + +arch/mips/kernel/uprobes.c: In function 'arch_uprobe_pre_xol': +arch/mips/kernel/uprobes.c:115:17: warning: variable 'epc' set but not used [-Wunused-but-set-variable] + +It's never used since introduction in +commit 40e084a506eb ("MIPS: Add uprobes support.") + +Signed-off-by: YueHaibing +Signed-off-by: Paul Burton +Cc: +Cc: +Cc: +Cc: +Signed-off-by: Sasha Levin +--- + arch/mips/kernel/uprobes.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c +index dbb917403131..ec951dde0999 100644 +--- a/arch/mips/kernel/uprobes.c ++++ b/arch/mips/kernel/uprobes.c +@@ -111,9 +111,6 @@ int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs) + */ + aup->resume_epc = regs->cp0_epc + 4; + if (insn_has_delay_slot((union mips_instruction) aup->insn[0])) { +- unsigned long epc; +- +- epc = regs->cp0_epc; + __compute_return_epc_for_insn(regs, + (union mips_instruction) aup->insn[0]); + aup->resume_epc = regs->cp0_epc; +-- +2.20.1 + diff --git a/queue-4.9/net-dsa-mv88e6xxx-avoid-error-message-on-remove-from.patch b/queue-4.9/net-dsa-mv88e6xxx-avoid-error-message-on-remove-from.patch new file mode 100644 index 0000000000..2d54f2a042 --- /dev/null +++ b/queue-4.9/net-dsa-mv88e6xxx-avoid-error-message-on-remove-from.patch @@ -0,0 +1,48 @@ +From e4a06a1a0b97527fba0b67dc6b4f148d58e3aaf8 Mon Sep 17 00:00:00 2001 +From: Nikita Yushchenko +Date: Fri, 31 May 2019 10:35:14 +0300 +Subject: net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 + +[ Upstream commit 62394708f3e01c9f2be6be74eb6305bae1ed924f ] + +When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error +message is logged: + +failed to kill vid 0081/0 for device eth_cu_1000_4 + +This is caused by call from __vlan_vid_del() with vin set to zero, over +call chain this results into _mv88e6xxx_port_vlan_del() called with +vid=0, and mv88e6xxx_vtu_get() called from there returns -EINVAL. + +On symmetric path moving port up, call goes through +mv88e6xxx_port_vlan_prepare() that calls mv88e6xxx_port_check_hw_vlan() +that returns -EOPNOTSUPP for zero vid. + +This patch changes mv88e6xxx_vtu_get() to also return -EOPNOTSUPP for +zero vid, then this error code is explicitly cleared in +dsa_slave_vlan_rx_kill_vid() and error message is no longer logged. + +Signed-off-by: Nikita Yushchenko +Reviewed-by: Vivien Didelot +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/dsa/mv88e6xxx/chip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c +index dc510069d37b..2edd193c96ab 100644 +--- a/drivers/net/dsa/mv88e6xxx/chip.c ++++ b/drivers/net/dsa/mv88e6xxx/chip.c +@@ -1742,7 +1742,7 @@ static int _mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid, + int err; + + if (!vid) +- return -EINVAL; ++ return -EOPNOTSUPP; + + err = _mv88e6xxx_vtu_vid_write(chip, vid - 1); + if (err) +-- +2.20.1 + diff --git a/queue-4.9/net-ethernet-mediatek-use-hw_feature-to-judge-if-hwl.patch b/queue-4.9/net-ethernet-mediatek-use-hw_feature-to-judge-if-hwl.patch new file mode 100644 index 0000000000..80e40c741e --- /dev/null +++ b/queue-4.9/net-ethernet-mediatek-use-hw_feature-to-judge-if-hwl.patch @@ -0,0 +1,70 @@ +From 01aaef64c03c2b344d998c2475e933a357176c64 Mon Sep 17 00:00:00 2001 +From: Sean Wang +Date: Sat, 1 Jun 2019 08:16:26 +0800 +Subject: net: ethernet: mediatek: Use hw_feature to judge if HWLRO is + supported + +[ Upstream commit 9e4f56f1a7f3287718d0083b5cb85298dc05a5fd ] + +Should hw_feature as hardware capability flags to check if hardware LRO +got support. + +Signed-off-by: Mark Lee +Signed-off-by: Sean Wang +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index 20de37a414fe..03b599109619 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -2175,13 +2175,13 @@ static int mtk_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, + + switch (cmd->cmd) { + case ETHTOOL_GRXRINGS: +- if (dev->features & NETIF_F_LRO) { ++ if (dev->hw_features & NETIF_F_LRO) { + cmd->data = MTK_MAX_RX_RING_NUM; + ret = 0; + } + break; + case ETHTOOL_GRXCLSRLCNT: +- if (dev->features & NETIF_F_LRO) { ++ if (dev->hw_features & NETIF_F_LRO) { + struct mtk_mac *mac = netdev_priv(dev); + + cmd->rule_cnt = mac->hwlro_ip_cnt; +@@ -2189,11 +2189,11 @@ static int mtk_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, + } + break; + case ETHTOOL_GRXCLSRULE: +- if (dev->features & NETIF_F_LRO) ++ if (dev->hw_features & NETIF_F_LRO) + ret = mtk_hwlro_get_fdir_entry(dev, cmd); + break; + case ETHTOOL_GRXCLSRLALL: +- if (dev->features & NETIF_F_LRO) ++ if (dev->hw_features & NETIF_F_LRO) + ret = mtk_hwlro_get_fdir_all(dev, cmd, + rule_locs); + break; +@@ -2210,11 +2210,11 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) + + switch (cmd->cmd) { + case ETHTOOL_SRXCLSRLINS: +- if (dev->features & NETIF_F_LRO) ++ if (dev->hw_features & NETIF_F_LRO) + ret = mtk_hwlro_add_ipaddr(dev, cmd); + break; + case ETHTOOL_SRXCLSRLDEL: +- if (dev->features & NETIF_F_LRO) ++ if (dev->hw_features & NETIF_F_LRO) + ret = mtk_hwlro_del_ipaddr(dev, cmd); + break; + default: +-- +2.20.1 + diff --git a/queue-4.9/net-ethernet-mediatek-use-net_ip_align-to-judge-if-h.patch b/queue-4.9/net-ethernet-mediatek-use-net_ip_align-to-judge-if-h.patch new file mode 100644 index 0000000000..fd4f2c2866 --- /dev/null +++ b/queue-4.9/net-ethernet-mediatek-use-net_ip_align-to-judge-if-h.patch @@ -0,0 +1,43 @@ +From 5f679c04dc571fc89f7a41813d83efdcd5ae3529 Mon Sep 17 00:00:00 2001 +From: Sean Wang +Date: Sat, 1 Jun 2019 08:16:27 +0800 +Subject: net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW + RX_2BYTE_OFFSET is enabled + +[ Upstream commit 880c2d4b2fdfd580ebcd6bb7240a8027a1d34751 ] + +Should only enable HW RX_2BYTE_OFFSET function in the case NET_IP_ALIGN +equals to 2. + +Signed-off-by: Mark Lee +Signed-off-by: Sean Wang +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index 03b599109619..d10c8a8156bc 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1700,6 +1700,7 @@ static void mtk_poll_controller(struct net_device *dev) + + static int mtk_start_dma(struct mtk_eth *eth) + { ++ u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0; + int err; + + err = mtk_dma_init(eth); +@@ -1714,7 +1715,7 @@ static int mtk_start_dma(struct mtk_eth *eth) + MTK_QDMA_GLO_CFG); + + mtk_w32(eth, +- MTK_RX_DMA_EN | MTK_RX_2B_OFFSET | ++ MTK_RX_DMA_EN | rx_2b_offset | + MTK_RX_BT_32DWORDS | MTK_MULTI_EN, + MTK_PDMA_GLO_CFG); + +-- +2.20.1 + diff --git a/queue-4.9/net-hns-fix-loopback-test-failed-at-copper-ports.patch b/queue-4.9/net-hns-fix-loopback-test-failed-at-copper-ports.patch new file mode 100644 index 0000000000..cd9d7c5511 --- /dev/null +++ b/queue-4.9/net-hns-fix-loopback-test-failed-at-copper-ports.patch @@ -0,0 +1,45 @@ +From 1e3d696a935f648a5b22368fe1d662426857f11d Mon Sep 17 00:00:00 2001 +From: Yonglong Liu +Date: Fri, 31 May 2019 16:59:50 +0800 +Subject: net: hns: Fix loopback test failed at copper ports + +[ Upstream commit 2e1f164861e500f4e068a9d909bbd3fcc7841483 ] + +When doing a loopback test at copper ports, the serdes loopback +and the phy loopback will fail, because of the adjust link had +not finished, and phy not ready. + +Adds sleep between adjust link and test process to fix it. + +Signed-off-by: Yonglong Liu +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +index 4cd163390dcc..f38848c4f69d 100644 +--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c ++++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +@@ -367,6 +367,7 @@ static int __lb_setup(struct net_device *ndev, + static int __lb_up(struct net_device *ndev, + enum hnae_loop loop_mode) + { ++#define NIC_LB_TEST_WAIT_PHY_LINK_TIME 300 + struct hns_nic_priv *priv = netdev_priv(ndev); + struct hnae_handle *h = priv->ae_handle; + int speed, duplex; +@@ -393,6 +394,9 @@ static int __lb_up(struct net_device *ndev, + + h->dev->ops->adjust_link(h, speed, duplex); + ++ /* wait adjust link done and phy ready */ ++ msleep(NIC_LB_TEST_WAIT_PHY_LINK_TIME); ++ + return 0; + } + +-- +2.20.1 + diff --git a/queue-4.9/nvme-fix-u32-overflow-in-the-number-of-namespace-lis.patch b/queue-4.9/nvme-fix-u32-overflow-in-the-number-of-namespace-lis.patch new file mode 100644 index 0000000000..df57753277 --- /dev/null +++ b/queue-4.9/nvme-fix-u32-overflow-in-the-number-of-namespace-lis.patch @@ -0,0 +1,37 @@ +From 5d3171d6ac936ced1dcb240537697d3b882b8bd6 Mon Sep 17 00:00:00 2001 +From: Jaesoo Lee +Date: Mon, 3 Jun 2019 16:42:28 -0700 +Subject: nvme: Fix u32 overflow in the number of namespace list calculation + +[ Upstream commit c8e8c77b3bdbade6e26e8e76595f141ede12b692 ] + +The Number of Namespaces (nn) field in the identify controller data structure is +defined as u32 and the maximum allowed value in NVMe specification is +0xFFFFFFFEUL. This change fixes the possible overflow of the DIV_ROUND_UP() +operation used in nvme_scan_ns_list() by casting the nn to u64. + +Signed-off-by: Jaesoo Lee +Reviewed-by: Christoph Hellwig +Signed-off-by: Sagi Grimberg +Signed-off-by: Sasha Levin +--- + drivers/nvme/host/core.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c +index 979c6ecc6446..8705bfe7bb73 100644 +--- a/drivers/nvme/host/core.c ++++ b/drivers/nvme/host/core.c +@@ -1765,7 +1765,8 @@ static int nvme_scan_ns_list(struct nvme_ctrl *ctrl, unsigned nn) + { + struct nvme_ns *ns; + __le32 *ns_list; +- unsigned i, j, nsid, prev = 0, num_lists = DIV_ROUND_UP(nn, 1024); ++ unsigned i, j, nsid, prev = 0; ++ unsigned num_lists = DIV_ROUND_UP_ULL((u64)nn, 1024); + int ret = 0; + + ns_list = kzalloc(0x1000, GFP_KERNEL); +-- +2.20.1 + diff --git a/queue-4.9/parisc-fix-compiler-warnings-in-float-emulation-code.patch b/queue-4.9/parisc-fix-compiler-warnings-in-float-emulation-code.patch new file mode 100644 index 0000000000..33d3edd83c --- /dev/null +++ b/queue-4.9/parisc-fix-compiler-warnings-in-float-emulation-code.patch @@ -0,0 +1,53 @@ +From 20821ae5661678cf3164d60202606a89f528c59c Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Fri, 24 May 2019 23:16:25 +0200 +Subject: parisc: Fix compiler warnings in float emulation code +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[ Upstream commit 6b98d9134e14f5ef4bcf64b27eedf484ed19a1ec ] + +Avoid such compiler warnings: +arch/parisc/math-emu/cnv_float.h:71:27: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] + ((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) || Dintp2(dint_valueB)) +arch/parisc/math-emu/fcnvxf.c:257:6: note: in expansion of macro ‘Dint_isinexact_to_sgl’ + if (Dint_isinexact_to_sgl(srcp1,srcp2)) { + +Signed-off-by: Helge Deller +Signed-off-by: Sasha Levin +--- + arch/parisc/math-emu/cnv_float.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/parisc/math-emu/cnv_float.h b/arch/parisc/math-emu/cnv_float.h +index 933423fa5144..b0db61188a61 100644 +--- a/arch/parisc/math-emu/cnv_float.h ++++ b/arch/parisc/math-emu/cnv_float.h +@@ -60,19 +60,19 @@ + ((exponent < (SGL_P - 1)) ? \ + (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : FALSE) + +-#define Int_isinexact_to_sgl(int_value) (int_value << 33 - SGL_EXP_LENGTH) ++#define Int_isinexact_to_sgl(int_value) ((int_value << 33 - SGL_EXP_LENGTH) != 0) + + #define Sgl_roundnearest_from_int(int_value,sgl_value) \ + if (int_value & 1<<(SGL_EXP_LENGTH - 2)) /* round bit */ \ +- if ((int_value << 34 - SGL_EXP_LENGTH) || Slow(sgl_value)) \ ++ if (((int_value << 34 - SGL_EXP_LENGTH) != 0) || Slow(sgl_value)) \ + Sall(sgl_value)++ + + #define Dint_isinexact_to_sgl(dint_valueA,dint_valueB) \ +- ((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) || Dintp2(dint_valueB)) ++ (((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) != 0) || Dintp2(dint_valueB)) + + #define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value) \ + if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2)) \ +- if ((Dintp1(dint_valueA) << 34 - SGL_EXP_LENGTH) || \ ++ if (((Dintp1(dint_valueA) << 34 - SGL_EXP_LENGTH) != 0) || \ + Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++ + + #define Dint_isinexact_to_dbl(dint_value) \ +-- +2.20.1 + diff --git a/queue-4.9/parport-fix-mem-leak-in-parport_register_dev_model.patch b/queue-4.9/parport-fix-mem-leak-in-parport_register_dev_model.patch new file mode 100644 index 0000000000..be3ed05df6 --- /dev/null +++ b/queue-4.9/parport-fix-mem-leak-in-parport_register_dev_model.patch @@ -0,0 +1,67 @@ +From 6d6c81471727b8d8d38dc8205dc7ab12c7f7e27b Mon Sep 17 00:00:00 2001 +From: YueHaibing +Date: Tue, 14 May 2019 23:24:37 +0800 +Subject: parport: Fix mem leak in parport_register_dev_model + +[ Upstream commit 1c7ebeabc9e5ee12e42075a597de40fdb9059530 ] + +BUG: memory leak +unreferenced object 0xffff8881df48cda0 (size 16): + comm "syz-executor.0", pid 5077, jiffies 4295994670 (age 22.280s) + hex dump (first 16 bytes): + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + backtrace: + [<00000000d2d0d5fe>] parport_register_dev_model+0x141/0x6e0 [parport] + [<00000000782f6dab>] 0xffffffffc15d1196 + [<00000000d2ca6ae4>] platform_drv_probe+0x7e/0x100 + [<00000000628c2a94>] really_probe+0x342/0x4d0 + [<000000006874f5da>] driver_probe_device+0x8c/0x170 + [<00000000424de37a>] __device_attach_driver+0xda/0x100 + [<000000002acab09a>] bus_for_each_drv+0xfe/0x170 + [<000000003d9e5f31>] __device_attach+0x190/0x230 + [<0000000035d32f80>] bus_probe_device+0x123/0x140 + [<00000000a05ba627>] device_add+0x7cc/0xce0 + [<000000003f7560bf>] platform_device_add+0x230/0x3c0 + [<000000002a0be07d>] 0xffffffffc15d0949 + [<000000007361d8d2>] port_check+0x3b/0x50 [parport] + [<000000004d67200f>] bus_for_each_dev+0x115/0x180 + [<000000003ccfd11c>] __parport_register_driver+0x1f0/0x210 [parport] + [<00000000987f06fc>] 0xffffffffc15d803e + +After commit 4e5a74f1db8d ("parport: Revert "parport: fix +memory leak""), free_pardevice do not free par_dev->state, +we should free it in error path of parport_register_dev_model +before return. + +Reported-by: Hulk Robot +Fixes: 4e5a74f1db8d ("parport: Revert "parport: fix memory leak"") +Signed-off-by: YueHaibing +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/parport/share.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/parport/share.c b/drivers/parport/share.c +index 4399de34054a..daa2eb3050df 100644 +--- a/drivers/parport/share.c ++++ b/drivers/parport/share.c +@@ -895,6 +895,7 @@ parport_register_dev_model(struct parport *port, const char *name, + par_dev->devmodel = true; + ret = device_register(&par_dev->dev); + if (ret) { ++ kfree(par_dev->state); + put_device(&par_dev->dev); + goto err_put_port; + } +@@ -912,6 +913,7 @@ parport_register_dev_model(struct parport *port, const char *name, + spin_unlock(&port->physport->pardevice_lock); + pr_debug("%s: cannot grant exclusive access for device %s\n", + port->name, name); ++ kfree(par_dev->state); + device_unregister(&par_dev->dev); + goto err_put_port; + } +-- +2.20.1 + diff --git a/queue-4.9/s390-qeth-fix-vlan-attribute-in-bridge_hostnotify-ud.patch b/queue-4.9/s390-qeth-fix-vlan-attribute-in-bridge_hostnotify-ud.patch new file mode 100644 index 0000000000..7a4a77cb74 --- /dev/null +++ b/queue-4.9/s390-qeth-fix-vlan-attribute-in-bridge_hostnotify-ud.patch @@ -0,0 +1,51 @@ +From 813bb9c0d282bdcca2a6bbf87932f71a0432c9e9 Mon Sep 17 00:00:00 2001 +From: Alexandra Winter +Date: Wed, 5 Jun 2019 13:48:50 +0200 +Subject: s390/qeth: fix VLAN attribute in bridge_hostnotify udev event + +[ Upstream commit 335726195e460cb6b3f795b695bfd31f0ea70ef0 ] + +Enabling sysfs attribute bridge_hostnotify triggers a series of udev events +for the MAC addresses of all currently connected peers. In case no VLAN is +set for a peer, the device reports the corresponding MAC addresses with +VLAN ID 4096. This currently results in attribute VLAN=4096 for all +non-VLAN interfaces in the initial series of events after host-notify is +enabled. + +Instead, no VLAN attribute should be reported in the udev event for +non-VLAN interfaces. + +Only the initial events face this issue. For dynamic changes that are +reported later, the device uses a validity flag. + +This also changes the code so that it now sets the VLAN attribute for +MAC addresses with VID 0. On Linux, no qeth interface will ever be +registered with VID 0: Linux kernel registers VID 0 on all network +interfaces initially, but qeth will drop .ndo_vlan_rx_add_vid for VID 0. +Peers with other OSs could register MACs with VID 0. + +Fixes: 9f48b9db9a22 ("qeth: bridgeport support - address notifications") +Signed-off-by: Alexandra Winter +Signed-off-by: Julian Wiedmann +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/s390/net/qeth_l2_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c +index 58404e69aa4b..6ba4e921d2fd 100644 +--- a/drivers/s390/net/qeth_l2_main.c ++++ b/drivers/s390/net/qeth_l2_main.c +@@ -2124,7 +2124,7 @@ static void qeth_bridgeport_an_set_cb(void *priv, + + l2entry = (struct qdio_brinfo_entry_l2 *)entry; + code = IPA_ADDR_CHANGE_CODE_MACADDR; +- if (l2entry->addr_lnid.lnid) ++ if (l2entry->addr_lnid.lnid < VLAN_N_VID) + code |= IPA_ADDR_CHANGE_CODE_VLANID; + qeth_bridge_emit_host_event(card, anev_reg_unreg, code, + (struct net_if_token *)&l2entry->nit, +-- +2.20.1 + diff --git a/queue-4.9/scripts-checkstack.pl-fix-arm64-wrong-or-unknown-arc.patch b/queue-4.9/scripts-checkstack.pl-fix-arm64-wrong-or-unknown-arc.patch new file mode 100644 index 0000000000..c739eb8e54 --- /dev/null +++ b/queue-4.9/scripts-checkstack.pl-fix-arm64-wrong-or-unknown-arc.patch @@ -0,0 +1,42 @@ +From 4746c813b2ae88aae65d9bf940f0a59f3f408e78 Mon Sep 17 00:00:00 2001 +From: "George G. Davis" +Date: Mon, 3 Jun 2019 10:30:39 -0400 +Subject: scripts/checkstack.pl: Fix arm64 wrong or unknown architecture + +[ Upstream commit 4f45d62a52297b10ded963412a158685647ecdec ] + +The following error occurs for the `make ARCH=arm64 checkstack` case: + +aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \ +perl ./scripts/checkstack.pl arm64 +wrong or unknown architecture "arm64" + +As suggested by Masahiro Yamada, fix the above error using regular +expressions in the same way it was fixed for the `ARCH=x86` case via +commit fda9f9903be6 ("scripts/checkstack.pl: automatically handle +32-bit and 64-bit mode for ARCH=x86"). + +Suggested-by: Masahiro Yamada +Signed-off-by: George G. Davis +Signed-off-by: Masahiro Yamada +Signed-off-by: Sasha Levin +--- + scripts/checkstack.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl +index 12a6940741fe..b8f616545277 100755 +--- a/scripts/checkstack.pl ++++ b/scripts/checkstack.pl +@@ -45,7 +45,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre); + $x = "[0-9a-f]"; # hex character + $xs = "[0-9a-f ]"; # hex character or space + $funcre = qr/^$x* <(.*)>:$/; +- if ($arch eq 'aarch64') { ++ if ($arch =~ '^(aarch|arm)64$') { + #ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]! + $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o; + } elsif ($arch eq 'arm') { +-- +2.20.1 + diff --git a/queue-4.9/scsi-ufs-check-that-space-was-properly-alloced-in-co.patch b/queue-4.9/scsi-ufs-check-that-space-was-properly-alloced-in-co.patch new file mode 100644 index 0000000000..63742b0f73 --- /dev/null +++ b/queue-4.9/scsi-ufs-check-that-space-was-properly-alloced-in-co.patch @@ -0,0 +1,42 @@ +From 1bf5082972f64375300ad1ebccac39b612cf0694 Mon Sep 17 00:00:00 2001 +From: Avri Altman +Date: Tue, 21 May 2019 11:24:22 +0300 +Subject: scsi: ufs: Check that space was properly alloced in + copy_query_response + +[ Upstream commit 1c90836f70f9a8ef7b7ad9e1fdd8961903e6ced6 ] + +struct ufs_dev_cmd is the main container that supports device management +commands. In the case of a read descriptor request, we assume that the +proper space was allocated in dev_cmd to hold the returning descriptor. + +This is no longer true, as there are flows that doesn't use dev_cmd for +device management requests, and was wrong in the first place. + +Fixes: d44a5f98bb49 (ufs: query descriptor API) +Signed-off-by: Avri Altman +Reviewed-by: Alim Akhtar +Acked-by: Bean Huo +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + drivers/scsi/ufs/ufshcd.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c +index 0fe4f8e8c8c9..a9c172692f21 100644 +--- a/drivers/scsi/ufs/ufshcd.c ++++ b/drivers/scsi/ufs/ufshcd.c +@@ -941,7 +941,8 @@ int ufshcd_copy_query_response(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) + memcpy(&query_res->upiu_res, &lrbp->ucd_rsp_ptr->qr, QUERY_OSF_SIZE); + + /* Get the descriptor */ +- if (lrbp->ucd_rsp_ptr->qr.opcode == UPIU_QUERY_OPCODE_READ_DESC) { ++ if (hba->dev_cmd.query.descriptor && ++ lrbp->ucd_rsp_ptr->qr.opcode == UPIU_QUERY_OPCODE_READ_DESC) { + u8 *descp = (u8 *)lrbp->ucd_rsp_ptr + + GENERAL_UPIU_REQUEST_SIZE; + u16 resp_len; +-- +2.20.1 + diff --git a/queue-4.9/series b/queue-4.9/series index beb679c86d..47eeb1081c 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -5,3 +5,21 @@ usb-chipidea-udc-workaround-for-endpoint-conflict-issue.patch ib-hfi1-silence-txreq-allocation-warnings.patch input-uinput-add-compat-ioctl-number-translation-for-ui_-_ff_upload.patch apparmor-enforce-nullbyte-at-end-of-tag-string.patch +arc-fix-build-warnings-with-config_kprobes.patch +parport-fix-mem-leak-in-parport_register_dev_model.patch +parisc-fix-compiler-warnings-in-float-emulation-code.patch +ib-rdmavt-fix-alloc_qpn-warn_on.patch +ib-hfi1-insure-freeze_work-work_struct-is-canceled-o.patch +ib-qib-hfi1-rdmavt-correct-ibv_devinfo-max_mr-value.patch +mips-uprobes-remove-set-but-not-used-variable-epc.patch +net-dsa-mv88e6xxx-avoid-error-message-on-remove-from.patch +net-hns-fix-loopback-test-failed-at-copper-ports.patch +sparc-perf-fix-updated-event-period-in-response-to-p.patch +net-ethernet-mediatek-use-hw_feature-to-judge-if-hwl.patch +net-ethernet-mediatek-use-net_ip_align-to-judge-if-h.patch +drm-arm-hdlcd-allow-a-bit-of-clock-tolerance.patch +scripts-checkstack.pl-fix-arm64-wrong-or-unknown-arc.patch +scsi-ufs-check-that-space-was-properly-alloced-in-co.patch +s390-qeth-fix-vlan-attribute-in-bridge_hostnotify-ud.patch +hwmon-pmbus-core-treat-parameters-as-paged-if-on-mul.patch +nvme-fix-u32-overflow-in-the-number-of-namespace-lis.patch diff --git a/queue-4.9/sparc-perf-fix-updated-event-period-in-response-to-p.patch b/queue-4.9/sparc-perf-fix-updated-event-period-in-response-to-p.patch new file mode 100644 index 0000000000..1f96abcd6a --- /dev/null +++ b/queue-4.9/sparc-perf-fix-updated-event-period-in-response-to-p.patch @@ -0,0 +1,44 @@ +From acda9fdcd53e9fa1432b36626464210d4f5e29b8 Mon Sep 17 00:00:00 2001 +From: Young Xiao <92siuyang@gmail.com> +Date: Wed, 29 May 2019 10:21:48 +0800 +Subject: sparc: perf: fix updated event period in response to + PERF_EVENT_IOC_PERIOD + +[ Upstream commit 56cd0aefa475079e9613085b14a0f05037518fed ] + +The PERF_EVENT_IOC_PERIOD ioctl command can be used to change the +sample period of a running perf_event. Consequently, when calculating +the next event period, the new period will only be considered after the +previous one has overflowed. + +This patch changes the calculation of the remaining event ticks so that +they are offset if the period has changed. + +See commit 3581fe0ef37c ("ARM: 7556/1: perf: fix updated event period in +response to PERF_EVENT_IOC_PERIOD") for details. + +Signed-off-by: Young Xiao <92siuyang@gmail.com> +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + arch/sparc/kernel/perf_event.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c +index 71e7f77f6776..84a80cd004eb 100644 +--- a/arch/sparc/kernel/perf_event.c ++++ b/arch/sparc/kernel/perf_event.c +@@ -889,6 +889,10 @@ static int sparc_perf_event_set_period(struct perf_event *event, + s64 period = hwc->sample_period; + int ret = 0; + ++ /* The period may have been changed by PERF_EVENT_IOC_PERIOD */ ++ if (unlikely(period != hwc->last_period)) ++ left = period - (hwc->last_period - left); ++ + if (unlikely(left <= -period)) { + left = period; + local64_set(&hwc->period_left, left); +-- +2.20.1 + -- 2.39.5