drm/sti: do not remove the drm_bridge that was never added
Subsystems (17)
Sasha Levin
maintainerPATCH 1/371 drm/sti: do not remove the drm_bridge that was never added
From: Peter Rosin <[email protected]>
[ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ]
Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken.
The more natural approach would perhaps be to add a drm_bridge_add, but there are several other bridges that never call drm_bridge_add. Just removing the drm_bridge_remove is the easier fix.
--- drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_hda.c +0 -1
@@ -721,7 +721,6 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)return 0 ; err_sysfs: -drm_bridge_remove (bridge);return -EINVAL ; }
drivers/gpu/drm/sti/sti_hdmi.c +0 -1
@@ -1314,7 +1314,6 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)return 0 ; err_sysfs: -drm_bridge_remove (bridge); hdmi->drm_connector =NULL ;return -EINVAL ; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 2/371 drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
From: Dan Carpenter <[email protected]>
[ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ]
This doesn't affect runtime because in the current code "idx" is always valid.
First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is off by one so we could end up reading one element beyond the end of the vgdev->capsets[] array.
--- drivers/gpu/drm/virtio/virtgpu_vq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +3 -2
@@ -648,11 +648,11 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, {struct virtio_gpu_get_capset *cmd_p;struct virtio_gpu_vbuffer *vbuf; -int max_size = vgdev->capsets[idx].max_size; +int max_size;struct virtio_gpu_drv_cap_cache *cache_ent;void *resp_buf; -if (idx > vgdev->num_capsets) +if (idx >= vgdev->num_capsets)return -EINVAL ;if (version > vgdev->capsets[idx].max_version)
@@ -662,6 +662,7 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev,if (!cache_ent)return -ENOMEM ; + max_size = vgdev->capsets[idx].max_size; cache_ent->caps_cache =kmalloc (max_size,GFP_KERNEL );if (!cache_ent->caps_cache) {kfree (cache_ent);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 3/371 ALSA: hda: fix unused variable warning
In reply to Sasha LevinFrom: Anders Roxell <[email protected]>
[ Upstream commit 5b03006d5c58ddd31caf542eef4d0269bcf265b3 ]
When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true.
sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’:sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable]
struct azx *chip = bus_to_azx(bus);
^~~~Create a inline function of azx_snoop.
--- sound/pci/hda/hda_controller.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/pci/hda/hda_controller.h +4 -5
@@ -176,11 +176,10 @@ struct azx {#define azx_bus (chip) (&(chip)->bus.core)#define bus_to_azx (_bus) container_of(_bus, struct azx, bus.core) -#ifdef CONFIG_X86 -#define azx_snoop (chip) ((chip)->snoop) -#else -#define azx_snoop (chip) true -#endif +static inline bool azx_snoop (struct azx *chip) +{ +return !IS_ENABLED (CONFIG_X86 ) || chip->snoop; +}/* * macros for easy use
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 4/371 apparmor: don't try to replace stale label in ptrace access check
In reply to Sasha LevinFrom: Jann Horn <[email protected]>
[ Upstream commit 1f8266ff58840d698a1e96d2274189de1bdf7969 ]
As a comment above begin_current_label_crit_section() explains, begin_current_label_crit_section() must run in sleepable context because when label_is_stale() is true, aa_replace_current_label() runs, which uses prepare_creds(), which can sleep.
Until now, the ptrace access check (which runs with a task lock held) violated this rule.
Also add a might_sleep() assertion to begin_current_label_crit_section(), because asserts are less likely to be ignored than comments.
--- security/apparmor/include/context.h | 2 ++ security/apparmor/lsm.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
security/apparmor/include/context.h +2 -0
@@ -191,6 +191,8 @@ static inline struct aa_label *begin_current_label_crit_section(void) {struct aa_label *label =aa_current_raw_label (); +might_sleep (); +if (label_is_stale (label)) { label =aa_get_newest_label (label);if (aa_replace_current_label (label) ==0 )
security/apparmor/lsm.c +2 -2
@@ -108,12 +108,12 @@ static int apparmor_ptrace_access_check(struct task_struct *child,struct aa_label *tracer, *tracee;int error; - tracer =begin_current_label_crit_section (); + tracer =__begin_current_label_crit_section (); tracee =aa_get_task_label (child); error =aa_may_ptrace (tracer, tracee, mode ==PTRACE_MODE_READ ?AA_PTRACE_READ :AA_PTRACE_TRACE );aa_put_label (tracee); -end_current_label_crit_section (tracer); +__end_current_label_crit_section (tracer);return error; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 5/371 PCI: iproc: Remove PAXC slot check to allow VF support
In reply to Sasha LevinFrom: Jitendra Bhivare <[email protected]>
[ Upstream commit 4da6b4480766e5bc9c4d7bc14bf1d0939a1a5fa7 ]
Fix previous incorrect logic that limits PAXC slot number to zero only. In order for SRIOV/VF to work, we need to allow the slot number to be greater than zero.
--- drivers/pci/host/pcie-iproc.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/pci/host/pcie-iproc.c +0 -8
@@ -573,14 +573,6 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct iproc_pcie *pcie,return (pcie->base + offset); } -/* -* PAXC is connected to an internally emulated EP within the SoC. It -* allows only one device. -*/ -if (pcie->ep_is_internal) -if (slot >0 ) -return NULL ; -return iproc_pcie_map_ep_cfg_reg (pcie, busno, slot, fn, where); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 6/371 drm/hisilicon: hibmc: Don't overwrite fb helper surface depth
In reply to Sasha LevinFrom: John Garry <[email protected]>
[ Upstream commit 0ff9f49646353ce31312411e7e7bd2281492a40e ]
Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination.
This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl"), which now causes the driver to fail to probe.
Fix by not overwriting the surface depth.
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c +0 -1
@@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,DRM_DEBUG_DRIVER ("surface width(%d), height(%d) and bpp(%d)\n" , sizes->surface_width, sizes->surface_height, sizes->surface_bpp); - sizes->surface_depth =32 ; bytes_per_pixel =DIV_ROUND_UP (sizes->surface_bpp,8 );
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 7/371 IB/rxe: replace kvfree with vfree
In reply to Sasha LevinFrom: Zhu Yanjun <[email protected]>
[ Upstream commit 721ad7e643f7002efa398838693f90284ea216d1 ]
The buf is allocated by vmalloc_user in the function rxe_queue_init. So it is better to free it by vfree.
--- drivers/infiniband/sw/rxe/rxe_cq.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_cq.c +2 -2
@@ -30,7 +30,7 @@* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +#include <linux/vmalloc.h> #include "rxe.h" #include "rxe_loc.h" #include "rxe_queue.h"
@@ -97,7 +97,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, err =do_mmap_info (rxe, udata, false, context, cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);if (err) { -kvfree (cq->queue->buf); +vfree (cq->queue->buf);kfree (cq->queue);return err; }
drivers/infiniband/sw/rxe/rxe_qp.c +3 -2
@@ -34,6 +34,7 @@#include <linux/skbuff.h> #include <linux/delay.h> #include <linux/sched.h> +#include <linux/vmalloc.h> #include "rxe.h" #include "rxe_loc.h"
@@ -255,7 +256,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, qp->sq.queue->buf_size, &qp->sq.queue->ip);if (err) { -kvfree (qp->sq.queue->buf); +vfree (qp->sq.queue->buf);kfree (qp->sq.queue);return err; }
@@ -308,7 +309,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, qp->rq.queue->buf_size, &qp->rq.queue->ip);if (err) { -kvfree (qp->rq.queue->buf); +vfree (qp->rq.queue->buf);kfree (qp->rq.queue);return err; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 8/371 IB/hfi1: Add mtu check for operational data VLs
In reply to Sasha LevinFrom: Alex Estrin <[email protected]>
[ Upstream commit eb50130964e8c1379f37c3d3bab33a411ec62e98 ]
Since Virtual Lanes BCT credits and MTU are set through separate MADs, we have to ensure both are valid, and data VLs are ready for transmission before we allow port transition to Armed state.
--- drivers/infiniband/hw/hfi1/chip.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-)
drivers/infiniband/hw/hfi1/chip.c +22 -4
@@ -10552,12 +10552,29 @@ void set_link_down_reason(struct hfi1_pportdata *ppd, u8 lcl_reason, } } -/* -* Verify if BCT for data VLs is non-zero. +/** +* data_vls_operational() - Verify if data VL BCT credits and MTU +* are both set. +* @ppd: pointer to hfi1_pportdata structure +* +* Return: true - Ok, false -otherwise. */ static inline bool data_vls_operational (struct hfi1_pportdata *ppd) { -return !!ppd->actual_vls_operational; +int i; +u64 reg; + +if (!ppd->actual_vls_operational) +return false; + +for (i =0 ; i < ppd->vls_supported; i++) { + reg =read_csr (ppd->dd,SEND_CM_CREDIT_VL + (8 * i)); +if ((reg && !ppd->dd->vld[i].mtu) || + (!reg && ppd->dd->vld[i].mtu)) +return false; + } + +return true; }/*
@@ -10662,7 +10679,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)if (!data_vls_operational (ppd)) {dd_dev_err (dd, -"%s: data VLs not operational\n" , __func__); +"%s: Invalid data VL credits or mtu\n" , + __func__); ret = -EINVAL ;break ; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 9/371 regulator: fixed: Default enable high on DT regulators
In reply to Sasha LevinFrom: Linus Walleij <[email protected]>
[ Upstream commit 28be5f15df2ee6882b0a122693159c96a28203c7 ]
commit efdfeb079cc3
("regulator: fixed: Convert to use GPIO descriptor only") switched to use gpiod_get() to look up the regulator from the gpiolib core whether that is device tree or boardfile.
This meant that we activate the code ina603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") which means the descriptors coming from the device tree already have the right inversion and open drain semantics set up from the gpiolib core.
As the fixed regulator was inspected again we got the inverted inversion and things broke.
Fix it by ignoring the config in the device tree for now: the later patches in the series will push all inversion handling over to the gpiolib core and set it up properly in the boardfiles for legacy devices, but I did not finish that for this kernel cycle.
--- drivers/regulator/fixed.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/regulator/fixed.c +8 -3
@@ -84,9 +84,14 @@ of_get_fixed_voltage_config(struct device *dev,of_property_read_u32 (np,"startup-delay-us" , &config->startup_delay); - config->enable_high =of_property_read_bool (np,"enable-active-high" ); - config->gpio_is_open_drain =of_property_read_bool (np, -"gpio-open-drain" ); +/* +* FIXME: we pulled active low/high and open drain handling into +* gpiolib so it will be handled there. Delete this in the second +* step when we also remove the custom inversion handling for all +* legacy boardfiles. +*/ + config->enable_high =1 ; + config->gpio_is_open_drain =0 ;if (of_find_property (np,"vin-supply" ,NULL )) config->input_supply ="vin" ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 10/371 ALSA: usb-audio: update quirk for B&W PX to remove microphone
In reply to Sasha LevinFrom: Nicolas Huaman <[email protected]>
[ Upstream commit c369c8db15d51fa175d2ba85928f79d16af6b562 ]
A quirk in snd-usb-audio was added to automate setting sample rate to 4800k and remove the previously exposed nonfunctional microphone for the Bowers & Wilkins PX:
commit 240a8af929c7c57dcde28682725b29cf8474e8e5
https://lore.kernel.org/patchwork/patch/919689/
However the headphones where updated shortly after that to remove the unintentional microphone functionality. I guess because of this the headphones now crash when connecting them via USB while the quirk is active. Dmesg:
snd-usb-audio: probe of 2-3:1.0 failed with error -22 usb 2-3: 2:1: cannot get min/max values for control 2 (id 2)
This patch removes the microfone and allows the headphones to connect and work out of the box. It is based on the current mainline kernel
and successfully applied an tested on my machine (4.18.10.arch1-1).
--- sound/usb/quirks-table.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
sound/usb/quirks-table.h +2 -7
@@ -3293,19 +3293,14 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), .ifnum = 0, .type = QUIRK_AUDIO_STANDARD_MIXER, }, - /* Capture */ - { - .ifnum = 1, - .type = QUIRK_IGNORE_INTERFACE, - },/* Playback */ { - .ifnum = 2, + .ifnum = 1, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S16_LE, .channels = 2, - .iface = 2, + .iface = 1, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_FILL_MAX |
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 11/371 staging: comedi: ni_mio_common: protect register write overflow
In reply to Sasha LevinFrom: "Spencer E. Olson" <[email protected]>
[ Upstream commit 1cbca5852d6c16e85a21487a15d211195aacd4a1 ]
Fixes two problems introduced as early as
commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"):
(1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are reserved. The last bit defines the output selection of the RGOUT0 pin, otherwise known as RTSI_Sub_Selection. For m-series devices, these last four bits are indeed used as the output selection of the RTSI7 pin (and the RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the RTSI_Trig_Direction register.
(2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI lines.
This patch also cleans up the ni_get_rtsi_routing command for readability.
--- .../staging/comedi/drivers/ni_mio_common.c | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/staging/comedi/drivers/ni_mio_common.c +17 -7
@@ -4991,7 +4991,10 @@ static int ni_valid_rtsi_output_source(struct comedi_device *dev,case NI_RTSI_OUTPUT_G_SRC0 :case NI_RTSI_OUTPUT_G_GATE0 :case NI_RTSI_OUTPUT_RGOUT0 : -case NI_RTSI_OUTPUT_RTSI_BRD_0 : +case NI_RTSI_OUTPUT_RTSI_BRD (0 ): +case NI_RTSI_OUTPUT_RTSI_BRD (1 ): +case NI_RTSI_OUTPUT_RTSI_BRD (2 ): +case NI_RTSI_OUTPUT_RTSI_BRD (3 ):return 1 ;case NI_RTSI_OUTPUT_RTSI_OSC :return (devpriv->is_m_series) ?1 :0 ;
@@ -5012,11 +5015,18 @@ static int ni_set_rtsi_routing(struct comedi_device *dev, devpriv->rtsi_trig_a_output_reg |=NISTC_RTSI_TRIG (chan, src);ni_stc_writew (dev, devpriv->rtsi_trig_a_output_reg,NISTC_RTSI_TRIGA_OUT_REG ); - }else if (chan <8 ) { + }else if (chan <NISTC_RTSI_TRIG_NUM_CHAN (devpriv->is_m_series)) { devpriv->rtsi_trig_b_output_reg &= ~NISTC_RTSI_TRIG_MASK (chan); devpriv->rtsi_trig_b_output_reg |=NISTC_RTSI_TRIG (chan, src);ni_stc_writew (dev, devpriv->rtsi_trig_b_output_reg,NISTC_RTSI_TRIGB_OUT_REG ); + }else if (chan !=NISTC_RTSI_TRIG_OLD_CLK_CHAN ) { +/* probably should never reach this, since the +* ni_valid_rtsi_output_source above errors out if chan is too +* high +*/ +dev_err (dev->class_dev,"%s: unknown rtsi channel\n" , __func__); +return -EINVAL ; }return 2 ; }
@@ -5032,12 +5042,12 @@ static unsigned int ni_get_rtsi_routing(struct comedi_device *dev, }else if (chan <NISTC_RTSI_TRIG_NUM_CHAN (devpriv->is_m_series)) {return NISTC_RTSI_TRIG_TO_SRC (chan, devpriv->rtsi_trig_b_output_reg); - }else { -if (chan ==NISTC_RTSI_TRIG_OLD_CLK_CHAN ) -return NI_RTSI_OUTPUT_RTSI_OSC ; -dev_err (dev->class_dev,"bug! should never get here?\n" ); -return 0 ; + }else if (chan ==NISTC_RTSI_TRIG_OLD_CLK_CHAN ) { +return NI_RTSI_OUTPUT_RTSI_OSC ; } + +dev_err (dev->class_dev,"%s: unknown rtsi channel\n" , __func__); +return -EINVAL ; } static int ni_rtsi_insn_config(struct comedi_device *dev,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 12/371 pwm: lpss: Release runtime-pm reference from the driver's remove callback
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 42885551cedb45961879d2fc3dc3c4dc545cc23e ]
For each pwm output which gets enabled through pwm_lpss_apply(), we do a pm_runtime_get_sync().
This commit adds pm_runtime_put() calls to pwm_lpss_remove() to balance these when the driver gets removed with some of the outputs still enabled.
--- drivers/pwm/pwm-lpss.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/pwm/pwm-lpss.c +6 -0
@@ -216,6 +216,12 @@ EXPORT_SYMBOL_GPL(pwm_lpss_probe);int pwm_lpss_remove (struct pwm_lpss_chip *lpwm) { +int i; + +for (i =0 ; i < lpwm->info->npwm; i++) { +if (pwm_is_enabled (&lpwm->chip.pwms[i])) +pm_runtime_put (lpwm->chip.dev); + }return pwmchip_remove (&lpwm->chip); }EXPORT_SYMBOL_GPL (pwm_lpss_remove);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 13/371 powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()
In reply to Sasha LevinFrom: Christophe Leroy <[email protected]>
[ Upstream commit fb978ca207743badfe7efd9eebe68bcbb4969f79 ]
Generic implementation fails to remove breakpoints after init when CONFIG_STRICT_KERNEL_RWX is selected:
[ 13.251285] KGDB: BP remove failed: c001c338 [ 13.259587] kgdbts: ERROR PUT: end of test buffer on 'do_fork_test' line 8 expected OK got $E14#aa [ 13.268969] KGDB: re-enter exception: ALL breakpoints killed [ 13.275099] CPU: 0 PID: 1 Comm: init Not tainted 4.18.0-g82bbb913ffd8 #860 [ 13.282836] Call Trace: [ 13.285313] [c60e1ba0] [c0080ef0] kgdb_handle_exception+0x6f4/0x720 (unreliable) [ 13.292618] [c60e1c30] [c000e97c] kgdb_handle_breakpoint+0x3c/0x98 [ 13.298709] [c60e1c40] [c000af54] program_check_exception+0x104/0x700 [ 13.305083] [c60e1c60] [c000e45c] ret_from_except_full+0x0/0x4 [ 13.310845] [c60e1d20] [c02a22ac] run_simple_test+0x2b4/0x2d4 [ 13.316532] [c60e1d30] [c0081698] put_packet+0xb8/0x158 [ 13.321694] [c60e1d60] [c00820b4] gdb_serial_stub+0x230/0xc4c [ 13.327374] [c60e1dc0] [c0080af8] kgdb_handle_exception+0x2fc/0x720 [ 13.333573] [c60e1e50] [c000e928] kgdb_singlestep+0xb4/0xcc [ 13.339068] [c60e1e70] [c000ae1c] single_step_exception+0x90/0xac [ 13.345100] [c60e1e80] [c000e45c] ret_from_except_full+0x0/0x4 [ 13.350865] [c60e1f40] [c000e11c] ret_from_syscall+0x0/0x38 [ 13.356346] Kernel panic - not syncing: Recursive entry to debugger
This patch creates powerpc specific version of kgdb_arch_set_breakpoint() and kgdb_arch_remove_breakpoint() using patch_instruction()
--- arch/powerpc/include/asm/kgdb.h | 5 +++- arch/powerpc/kernel/kgdb.c | 43 +++++++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 9 deletions(-)
arch/powerpc/include/asm/kgdb.h +4 -1
@@ -26,9 +26,12 @@#define BREAK_INSTR_SIZE 4#define BUFMAX ((NUMREGBYTES * 2) + 512)#define OUTBUFMAX ((NUMREGBYTES * 2) + 512) + +#define BREAK_INSTR 0x7d821008/* twge r2, r2 */ +static inline void arch_kgdb_breakpoint (void ) { - asm(".long 0x7d821008" );/* twge r2, r2 */ + asm(stringify_in_c(.long BREAK_INSTR)); }#define CACHE_FLUSH_IS_SAFE 1#define DBG_MAX_REG_NUM 70
arch/powerpc/kernel/kgdb.c +35 -8
64 lines not on this page · raw message
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 14/371 drm/sun4i: hdmi: Fix double flag assignation
In reply to Sasha LevinFrom: Maxime Ripard <[email protected]>
[ Upstream commit 1e0ff648940e603cab6c52cf3723017d30d78f30 ]
The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it set to true when d is 2.
Fix this.
--- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +1 -1
@@ -50,7 +50,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long rate, (rate - tmp_rate) < (rate - best_rate)) { best_rate = tmp_rate; best_m = m; - is_double = d; + is_double = (d ==2 ) ? true : false; } } }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 15/371 mlxsw: reg: QEEC: Add minimum shaper fields
In reply to Sasha LevinFrom: Petr Machata <[email protected]>
[ Upstream commit 8b931821aa04823e2e5df0ae93937baabbd23286 ]
Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable configuration of minimum shaper.
Increase the QEEC length to 0x20 as well: that's the length that the register has had for a long time now, but with the configurations that mlxsw typically exercises, the firmware tolerated 0x1C-sized packets. With mise=true however, FW rejects packets unless they have the full required length.
--- drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/reg.h +21 -1
@@ -2452,7 +2452,7 @@ static inline void mlxsw_reg_qtct_pack(char *payload, u8 local_port,* Configures the ETS elements. */ #define MLXSW_REG_QEEC_ID 0x400D -#define MLXSW_REG_QEEC_LEN 0x1C +#define MLXSW_REG_QEEC_LEN 0x20MLXSW_REG_DEFINE (qeec,MLXSW_REG_QEEC_ID ,MLXSW_REG_QEEC_LEN );
@@ -2494,6 +2494,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0x04, 0, 8);*/ MLXSW_ITEM32 (reg, qeec, next_element_index,0x08 ,0 ,8 ); +/* reg_qeec_mise +* Min shaper configuration enable. Enables configuration of the min +* shaper on this ETS element +* 0 - Disable +* 1 - Enable +* Access: RW +*/ +MLXSW_ITEM32 (reg, qeec, mise,0x0C ,31 ,1 ); +enum {MLXSW_REG_QEEC_BYTES_MODE ,MLXSW_REG_QEEC_PACKETS_MODE ,
@@ -2510,6 +2519,17 @@ enum {*/ MLXSW_ITEM32 (reg, qeec, pb,0x0C ,28 ,1 ); +/* The smallest permitted min shaper rate. */ +#define MLXSW_REG_QEEC_MIS_MIN 200000/* Kbps */ + +/* reg_qeec_min_shaper_rate +* Min shaper information rate. +* For CPU port, can only be configured for port hierarchy. +* When in bytes mode, value is specified in units of 1000bps. +* Access: RW +*/ +MLXSW_ITEM32 (reg, qeec, min_shaper_rate,0x0C ,0 ,28 ); +/* reg_qeec_mase * Max shaper configuration enable. Enables configuration of the max * shaper on this ETS element.
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 16/371 NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
In reply to Sasha LevinFrom: "Gustavo A. R. Silva" <[email protected]>
[ Upstream commit 1b7619828d0c341612f58683e73f279c37e70bbc ]
Both devm_kcalloc() and devm_kzalloc() return NULL on error. They never return error pointers.
The use of IS_ERR_OR_NULL is currently applied to the wrong context.
Fix this by replacing IS_ERR_OR_NULL with regular NULL checks.
--- drivers/ntb/hw/idt/ntb_hw_idt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ntb/hw/idt/ntb_hw_idt.c +4 -4
@@ -1105,9 +1105,9 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port, }/* Allocate memory for memory window descriptors */ - ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt, -sizeof (*ret_mws),GFP_KERNEL ); -if (IS_ERR_OR_NULL (ret_mws)) + ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt,sizeof (*ret_mws), +GFP_KERNEL ); +if (!ret_mws)return ERR_PTR (-ENOMEM );/* Copy the info of detected memory windows */
@@ -2393,7 +2393,7 @@ static struct idt_ntb_dev *idt_create_dev(struct pci_dev *pdev,/* Allocate memory for the IDT PCIe-device descriptor */ ndev =devm_kzalloc (&pdev->dev,sizeof (*ndev),GFP_KERNEL ); -if (IS_ERR_OR_NULL (ndev)) { +if (!ndev) {dev_err (&pdev->dev,"Memory allocation failed for descriptor" );return ERR_PTR (-ENOMEM ); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 17/371 pcrypt: use format specifier in kobject_add
In reply to Sasha LevinFrom: Colin Ian King <[email protected]>
[ Upstream commit b1e3874c75ab15288f573b3532e507c37e8e7656 ]
Passing string 'name' as the format specifier is potentially hazardous because name could (although very unlikely to) have a format specifier embedded in it causing issues when parsing the non-existent arguments to these. Follow best practice by using the "%s" format string for the string 'name'.
Cleans up clang warning:crypto/pcrypt.c:397:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
--- crypto/pcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/pcrypt.c +1 -1
@@ -394,7 +394,7 @@ static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name)int ret; pinst->kobj.kset = pcrypt_kset; - ret =kobject_add (&pinst->kobj,NULL , name); + ret =kobject_add (&pinst->kobj,NULL ,"%s" , name);if (!ret)kobject_uevent (&pinst->kobj,KOBJ_ADD );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 18/371 exportfs: fix 'passing zero to ERR_PTR()' warning
In reply to Sasha LevinFrom: YueHaibing <[email protected]>
[ Upstream commit 909e22e05353a783c526829427e9a8de122fba9c ]
Fix a static code checker warning:
fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR'
The error path for lookup_one_len_unlocked failure should set err to PTR_ERR.
--- fs/exportfs/expfs.c | 1 + 1 file changed, 1 insertion(+)
fs/exportfs/expfs.c +1 -0
@@ -147,6 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, tmp =lookup_one_len_unlocked (nbuf, parent,strlen (nbuf));if (IS_ERR (tmp)) {dprintk ("%s: lookup failed: %d\n" , __func__,PTR_ERR (tmp)); + err =PTR_ERR (tmp); goto out_err; }if (tmp != dentry) {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 19/371 drm/dp_mst: Skip validating ports during destruction, just ref
In reply to Sasha LevinFrom: Lyude Paul <[email protected]>
[ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ]
Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago.
Pretend we have a topology like this:
|- DP-1: mst_primary
|- DP-4: active display
|- DP-5: disconnected
|- DP-6: active hub
|- DP-7: active display
|- DP-8: disconnected
|- DP-9: disconnectedIf we unplug DP-6, the topology starting at DP-7 will be destroyed but it's payloads will live on in DP-1's VCPI allocations and thus require removal. However, this removal currently fails because drm_dp_update_payload_part1() will (rightly so) try to validate the port before accessing it, fail then abort. If we keep going, eventually we run the MST hub out of bandwidth and all new allocations will start to fail (or in my case; all new displays just start flickering a ton).
We could just teach drm_dp_update_payload_part1() not to drop the port ref in this case, but then we also need to teach drm_dp_destroy_payload_step1() to do the same thing, then hope no one ever adds anything to the that requires a validated port reference in drm_dp_destroy_connector_work(). Kind of sketchy.
So let's go with a more clever solution: any port that drm_dp_destroy_connector_work() interacts with is guaranteed to still exist in memory until we say so. While said port might not be valid we don't really care: that's the whole reason we're destroying it in the first place! So, teach drm_dp_get_validated_port_ref() to use the all mighty current_work() function to avoid attempting to validate ports from the context of mgr->destroy_connector_work. I can't see any situation where this wouldn't be safe, and this avoids having to play whack-a-mole in the future of trying to work around port validation.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +13 -2
@@ -982,9 +982,20 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_static struct drm_dp_mst_port *drm_dp_get_validated_port_ref (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port) {struct drm_dp_mst_port *rport =NULL ; +mutex_lock (&mgr->lock); -if (mgr->mst_primary) - rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, port); +/* +* Port may or may not be 'valid' but we don't care about that when +* destroying the port and we are guaranteed that the port pointer +* will be valid until we've finished +*/ +if (current_work () == &mgr->destroy_connector_work) { +kref_get (&port->kref); + rport = port; + }else if (mgr->mst_primary) { + rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, + port); + }mutex_unlock (&mgr->lock);return rport; }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 20/371 net: phy: Fix not to call phy_resume() if PHY is not attached
In reply to Sasha LevinFrom: Yoshihiro Shimoda <[email protected]>
[ Upstream commit ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a ]
This patch fixes an issue that mdio_bus_phy_resume() doesn't call phy_resume() if the PHY is not attached.
--- drivers/net/phy/phy_device.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/phy/phy_device.c +6 -5
@@ -76,7 +76,7 @@ static LIST_HEAD(phy_fixup_list);static DEFINE_MUTEX (phy_fixup_lock);#ifdef CONFIG_PM -static bool mdio_bus_phy_may_suspend (struct phy_device *phydev) +static bool mdio_bus_phy_may_suspend (struct phy_device *phydev,bool suspend) {struct device_driver *drv = phydev->mdio.dev.driver;struct phy_driver *phydrv =to_phy_driver (drv);
@@ -88,10 +88,11 @@ static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)/* PHY not attached? May suspend if the PHY has not already been * suspended as part of a prior call to phy_disconnect() -> * phy_detach() -> phy_suspend() because the parent netdev might be the -* MDIO bus driver and clock gated at this point. +* MDIO bus driver and clock gated at this point. Also may resume if +* PHY is not attached. */ if (!netdev) -return !phydev->suspended; +return suspend ? !phydev->suspended : phydev->suspended;/* Don't suspend PHY if the attached netdev parent may wakeup. * The parent may point to a PCI device, as in tg3 driver.
@@ -121,7 +122,7 @@ static int mdio_bus_phy_suspend(struct device *dev)if (phydev->attached_dev && phydev->adjust_link)phy_stop_machine (phydev); -if (!mdio_bus_phy_may_suspend (phydev)) +if (!mdio_bus_phy_may_suspend (phydev, true))return 0 ;return phy_suspend (phydev);
@@ -132,7 +133,7 @@ static int mdio_bus_phy_resume(struct device *dev)struct phy_device *phydev =to_phy_device (dev);int ret; -if (!mdio_bus_phy_may_suspend (phydev)) +if (!mdio_bus_phy_may_suspend (phydev, false)) goto no_resume; ret =phy_resume (phydev);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 21/371 IB/rxe: Fix incorrect cache cleanup in error flow
In reply to Sasha LevinFrom: Yuval Shaia <[email protected]>
[ Upstream commit 6db21d8986e14e2e86573a3b055b05296188bd2c ]
Array iterator stays at the same slot, fix it.
--- drivers/infiniband/sw/rxe/rxe_pool.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/infiniband/sw/rxe/rxe_pool.c +14 -12
@@ -112,6 +112,18 @@ static inline struct kmem_cache *pool_cache(struct rxe_pool *pool)return rxe_type_info[pool->type].cache; } +static void rxe_cache_clean (size_t cnt) +{ +int i; +struct rxe_type_info *type; + +for (i =0 ; i < cnt; i++) { + type = &rxe_type_info[i]; +kmem_cache_destroy (type->cache); + type->cache =NULL ; + } +} +int rxe_cache_init (void ) {int err;
@@ -136,24 +148,14 @@ int rxe_cache_init(void)return 0 ; err1: -while (--i >=0 ) { -kmem_cache_destroy (type->cache); - type->cache =NULL ; - } +rxe_cache_clean (i);return err; }void rxe_cache_exit (void ) { -int i; -struct rxe_type_info *type; - -for (i =0 ; i <RXE_NUM_TYPES ; i++) { - type = &rxe_type_info[i]; -kmem_cache_destroy (type->cache); - type->cache =NULL ; - } +rxe_cache_clean (RXE_NUM_TYPES ); }static int rxe_pool_init_index (struct rxe_pool *pool,u32 max,u32 min)
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 22/371 staging: bcm2835-camera: Abort probe if there is no camera
In reply to Sasha LevinFrom: Stefan Wahren <[email protected]>
[ Upstream commit 7566f39dfdc11f8a97d5810c6e6295a88f97ef91 ]
Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload.
--- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +9 -0
@@ -1849,6 +1849,12 @@ static int __init bm2835_mmal_init(void) num_cameras =get_num_cameras (instance, resolutions,MAX_BCM2835_CAMERAS ); + +if (num_cameras <1 ) { + ret = -ENODEV ; + goto cleanup_mmal; + } +if (num_cameras >MAX_BCM2835_CAMERAS ) num_cameras =MAX_BCM2835_CAMERAS ;
@@ -1948,6 +1954,9 @@ static int __init bm2835_mmal_init(void)pr_info ("%s: error %d while loading driver\n" ,BM2835_MMAL_MODULE_NAME , ret); +cleanup_mmal: +vchiq_mmal_finalise (instance); +return ret; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 23/371 switchtec: Remove immediate status check after submitting MRPC command
In reply to Sasha LevinFrom: Kelvin Cao <[email protected]>
[ Upstream commit 526180408b815aa7b96fd48bd23cdd33ef04e38e ]
After submitting a Firmware Download MRPC command, Switchtec firmware will delay Management EP BAR MemRd TLP responses by more than 10ms. This is a firmware limitation. Delayed MemRd completions are a problem for systems with a low Completion Timeout (CTO).
The current driver checks the MRPC status immediately after submitting an MRPC command, which results in a delayed MemRd completion that may cause a Completion Timeout.
Remove the immediate status check and rely on the check after receiving an interrupt or timing out.
This is only a software workaround to the READ issue and a proper fix of this should be done in firmware.
--- drivers/pci/switch/switchtec.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/pci/switch/switchtec.c +0 -4
@@ -399,10 +399,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev) stuser->data, stuser->data_len);iowrite32 (stuser->cmd, &stdev->mmio_mrpc->cmd); - stuser->status =ioread32 (&stdev->mmio_mrpc->status); -if (stuser->status !=SWITCHTEC_MRPC_STATUS_INPROGRESS ) -mrpc_complete_cmd (stdev); -schedule_delayed_work (&stdev->mrpc_timeout,msecs_to_jiffies (500 )); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 24/371 pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8 ]
The gether_gmii_mux[] array contains the REF125CK pin mark, but the gether_gmii_pins[] array lacks the corresponding pin number.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -1
@@ -1982,7 +1982,7 @@ static const unsigned int gether_gmii_pins[] = {*/ 185 ,186 ,187 ,188 ,189 ,190 ,191 ,192 ,174 ,161 ,204 ,171 ,170 ,169 ,168 ,167 ,166 ,173 ,172 ,176 ,184 ,183 ,203 , - 205, 163, 206, 207, + 205, 163, 206, 207, 158, };static const unsigned int gether_gmii_mux[] = { ET_ERXD0_MARK, ET_ERXD1_MARK, ET_ERXD2_MARK, ET_ERXD3_MARK,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 25/371 pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b ]
The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers, but the lcd0_data24_1_mux[] array lacks the corresponding pin marks.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -0
@@ -2154,6 +2154,7 @@ static const unsigned int lcd0_data24_1_mux[] = {LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK ,LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK ,LCD0_D8_MARK ,LCD0_D9_MARK ,LCD0_D10_MARK ,LCD0_D11_MARK , +LCD0_D12_MARK ,LCD0_D13_MARK ,LCD0_D14_MARK ,LCD0_D15_MARK ,LCD0_D16_MARK ,LCD0_D17_MARK ,LCD0_D18_PORT163_MARK ,LCD0_D19_PORT162_MARK ,LCD0_D20_PORT161_MARK ,LCD0_D21_PORT158_MARK , LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 26/371 pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 884fa25fb6e5e63ab970d612a628313bb68f37cc ]
The qspi_data4_b_mux[] array contains pin marks for the clock and chip select pins. The qspi_data4_b_pins[] array rightfully does not contain the corresponding pin numbers, as the control pins are provided by a separate group (qspi_ctrl_b).
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -2
@@ -3220,8 +3220,7 @@ static const unsigned int qspi_data4_b_pins[] = { RCAR_GP_PIN(6, 4), };static const unsigned int qspi_data4_b_mux[] = { -SPCLK_B_MARK ,MOSI_IO0_B_MARK ,MISO_IO1_B_MARK , -IO2_B_MARK ,IO3_B_MARK ,SSL_B_MARK , +MOSI_IO0_B_MARK ,MISO_IO1_B_MARK ,IO2_B_MARK ,IO3_B_MARK , };/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 27/371 pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 0d6256cb880166a4111bebce35790019e56b6e1b ]
The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of the color components. The vin1_b_data18_pins[] array rightfully does not include the corresponding pin numbers, as RGB18 is subset of RGB24, containing only the 6 MSB bits of each component.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 --- 1 file changed, 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +0 -3
@@ -4348,17 +4348,14 @@ static const unsigned int vin1_b_data18_pins[] = { };static const unsigned int vin1_b_data18_mux[] = {/* B */ -VI1_DATA0_B_MARK ,VI1_DATA1_B_MARK ,VI1_DATA2_B_MARK ,VI1_DATA3_B_MARK ,VI1_DATA4_B_MARK ,VI1_DATA5_B_MARK ,VI1_DATA6_B_MARK ,VI1_DATA7_B_MARK ,/* G */ -VI1_G0_B_MARK ,VI1_G1_B_MARK ,VI1_G2_B_MARK ,VI1_G3_B_MARK ,VI1_G4_B_MARK ,VI1_G5_B_MARK ,VI1_G6_B_MARK ,VI1_G7_B_MARK ,/* R */ -VI1_R0_B_MARK ,VI1_R1_B_MARK ,VI1_R2_B_MARK ,VI1_R3_B_MARK ,VI1_R4_B_MARK ,VI1_R5_B_MARK ,VI1_R6_B_MARK ,VI1_R7_B_MARK ,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 28/371 pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 124cde98f856b6206b804acbdec3b7c80f8c3427 ]
The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the tpu4_to3_pins[] array lacks the corresponding pin number.
Add the missing pin number, for non-GPIO pin F26.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +1 -0
@@ -3086,6 +3086,7 @@ static const unsigned int tpu4_to2_mux[] = { };static const unsigned int tpu4_to3_pins[] = {/* TO */ +PIN_NUMBER (6 ,26 ), };static const unsigned int tpu4_to3_mux[] = {TPU4TO3_MARK ,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 29/371 pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 6a6c195d98a1a5e70faa87f594d7564af1dd1bed ]
The Peripheral Function Select Register 9 contains 12 fields, but the variable field descriptor contains a 13th bogus field of 3 bits.
--- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +1 -1
@@ -4742,7 +4742,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { FN_AVB_MDC, FN_SSI_SDATA6_B, 0, 0, } }, { PINMUX_CFG_REG_VAR("IPSR9", 0xE6060044, 32, - 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3) { + 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3) {/* IP9_31 [1] */ 0, 0,/* IP9_30_28 [3] */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 30/371 pinctrl: sh-pfc: sh7734: Add missing IPSR11 field
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 94482af7055e1ffa211c1135256b85590ebcac99 ]
The Peripheral Function Select Register 11 contains 3 reserved bits and 15 variable-width fields, but the variable field descriptor does not contain the 3-bit field IP11[25:23].
--- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -2237,7 +2237,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { FN_LCD_DATA15_B, 0, 0, 0 } }, {PINMUX_CFG_REG_VAR ("IPSR11" ,0xFFFC0048 ,32 , - 3, 1, 2, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) { + 3, 1, 2, 3, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {/* IP11_31_29 [3] */ 0, 0, 0, 0, 0, 0, 0, 0,/* IP11_28 [1] */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 31/371 pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit e28dc3f09c9d2555a9bd982f0847988591052226 ]
While the SEL_PWM[0-3] fields in the Module Select Register 0 support 4 possible configurations per PWM pin, only the first 3 are valid.
Replace the invalid and unused configurations for SEL_PWM[0-3]_3 by dummies.
--- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +4 -4
@@ -391,10 +391,10 @@ FM(IP12_31_28) IP12_31_28 \#define MOD_SEL0_27 FM(SEL_MSIOF3_0) FM(SEL_MSIOF3_1)#define MOD_SEL0_26 FM(SEL_HSCIF3_0) FM(SEL_HSCIF3_1)#define MOD_SEL0_25 FM(SEL_SCIF4_0) FM(SEL_SCIF4_1) -#define MOD_SEL0_24_23 FM(SEL_PWM0_0) FM(SEL_PWM0_1) FM(SEL_PWM0_2) FM(SEL_PWM0_3) -#define MOD_SEL0_22_21 FM(SEL_PWM1_0) FM(SEL_PWM1_1) FM(SEL_PWM1_2) FM(SEL_PWM1_3) -#define MOD_SEL0_20_19 FM(SEL_PWM2_0) FM(SEL_PWM2_1) FM(SEL_PWM2_2) FM(SEL_PWM2_3) -#define MOD_SEL0_18_17 FM(SEL_PWM3_0) FM(SEL_PWM3_1) FM(SEL_PWM3_2) FM(SEL_PWM3_3) +#define MOD_SEL0_24_23 FM(SEL_PWM0_0) FM(SEL_PWM0_1) FM(SEL_PWM0_2) F_(0, 0) +#define MOD_SEL0_22_21 FM(SEL_PWM1_0) FM(SEL_PWM1_1) FM(SEL_PWM1_2) F_(0, 0) +#define MOD_SEL0_20_19 FM(SEL_PWM2_0) FM(SEL_PWM2_1) FM(SEL_PWM2_2) F_(0, 0) +#define MOD_SEL0_18_17 FM(SEL_PWM3_0) FM(SEL_PWM3_1) FM(SEL_PWM3_2) F_(0, 0)#define MOD_SEL0_15 FM(SEL_IRQ_0_0) FM(SEL_IRQ_0_1)#define MOD_SEL0_14 FM(SEL_IRQ_1_0) FM(SEL_IRQ_1_1)#define MOD_SEL0_13 FM(SEL_IRQ_2_0) FM(SEL_IRQ_2_1)
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 32/371 pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 9540cbdfcd861caf67a6f0e4bb7f46d41c4aad86 ]
The Port C I/O Register 0 contains 7 reserved bits, but the descriptor contains only dummy configuration values for 6 reserved bits, thus breaking the configuration of all subsequent fields in the register.
Fix this by adding the two missing configuration values.
--- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7269.c +1 -1
@@ -2119,7 +2119,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { }, { PINMUX_CFG_REG("PCIOR0", 0xfffe3852, 16, 1) { -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PC8_IN ,PC8_OUT ,PC7_IN ,PC7_OUT , PC6_IN, PC6_OUT,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 33/371 pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 4d374bacd7c9665179f9752a52d5d602c45d8190 ]
The IP10[5:3] field in Peripheral Function Select Register 10 has a width of 3 bits, i.e. it allows programming one out of 8 different configurations.
However, 9 values are provided instead of 8, overflowing into the subsequent field in the register, and thus breaking the configuration of the latter.
Fix this by dropping a bogus zero value.
--- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -2231,7 +2231,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_LCD_CL1_B ,0 ,0 ,/* IP10_5_3 [3] */ FN_SSI_WS23 ,FN_VI1_5_B ,FN_TX1_D ,FN_HSCK0_C ,FN_FALE_B , -FN_LCD_DON_B ,0 ,0 ,0 , +FN_LCD_DON_B ,0 ,0 ,/* IP10_2_0 [3] */ FN_SSI_SCK23 ,FN_VI1_4_B ,FN_RX1_D ,FN_FCLE_B , FN_LCD_DATA15_B, 0, 0, 0 }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 34/371 vxlan: changelink: Fix handling of default remotes
In reply to Sasha LevinFrom: Petr Machata <[email protected]>
[ Upstream commit ce5e098f7a10b4bf8e948c12fa350320c5c3afad ]
Default remotes are stored as FDB entries with an Ethernet address of 00:00:00:00:00:00. When a request is made to change a remote address of a VXLAN device, vxlan_changelink() first deletes the existing default remote, and then creates a new FDB entry.
This works well as long as the list of default remotes matches exactly the configuration of a VXLAN remote address. Thus when the VXLAN device has a remote of X, there should be exactly one default remote FDB entry X. If the VXLAN device has no remote address, there should be no such entry.
Besides using "ip link set", it is possible to manipulate the list of default remotes by using the "bridge fdb". It is therefore easy to break the above condition. Under such circumstances, the __vxlan_fdb_delete() call doesn't delete the FDB entry itself, but just one remote. The following vxlan_fdb_create() then creates a new FDB entry, leading to a situation where two entries exist for the address 00:00:00:00:00:00, each with a different subset of default remotes.
An even more obvious breakage rooted in the same cause can be observed when a remote address is configured for a VXLAN device that did not have one before. In that case vxlan_changelink() doesn't remove any remote, and just creates a new FDB entry for the new address:
$ ip link add name vx up type vxlan id 2000 dstport 4789 $ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent $ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent $ ip link set dev vx type vxlan remote 192.0.2.30 $ bridge fdb sh dev vx | grep 00:00:00:00:00:00 00:00:00:00:00:00 dst 192.0.2.30 self permanent <- new entry, 1 rdst 00:00:00:00:00:00 dst 192.0.2.20 self permanent <- orig. entry, 2 rdsts 00:00:00:00:00:00 dst 192.0.2.30 self permanent
To fix this, instead of calling vxlan_fdb_create() directly, defer to vxlan_fdb_update(). That has logic to handle the duplicates properly. Additionally, it also handles notifications, so drop that call from changelink as well.
--- drivers/net/vxlan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/vxlan.c +3 -4
@@ -3494,7 +3494,6 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],struct vxlan_rdst *dst = &vxlan->default_dst;struct vxlan_rdst old_dst;struct vxlan_config conf; -struct vxlan_fdb *f =NULL ;int err; err = vxlan_nl2conf(tb, data,
@@ -3520,19 +3519,19 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[], old_dst.remote_ifindex, 0);if (!vxlan_addr_any (&dst->remote_ip)) { - err =vxlan_fdb_create (vxlan, all_zeros_mac, + err =vxlan_fdb_update (vxlan, all_zeros_mac, &dst->remote_ip,NUD_REACHABLE |NUD_PERMANENT , +NLM_F_APPEND |NLM_F_CREATE , vxlan->cfg.dst_port, dst->remote_vni, dst->remote_vni, dst->remote_ifindex, -NTF_SELF , &f); +NTF_SELF );if (err) {spin_unlock_bh (&vxlan->hash_lock);return err; } -vxlan_fdb_notify (vxlan, f,first_remote_rtnl (f),RTM_NEWNEIGH ); }spin_unlock_bh (&vxlan->hash_lock); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 35/371 Input: nomadik-ske-keypad - fix a loop timeout test
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit 4d8f727b83bcd6702c2d210330872c9122d2d360 ]
The loop exits with "timeout" set to -1 not to 0.
--- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/nomadik-ske-keypad.c +1 -1
@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(struct ske_keypad *keypad)while ((readl (keypad->reg_base +SKE_RIS ) !=0x00000000 ) && timeout--)cpu_relax (); -if (!timeout) +if (timeout ==-1 )return -EINVAL ;/*
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 36/371 clk: highbank: fix refcount leak in hb_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 5eb8ba90958de1285120dae5d3a5d2b1a360b3b4 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/clk-highbank.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-highbank.c +1 -0
@@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk/* Map system registers */ srnp =of_find_compatible_node (NULL ,NULL ,"calxeda,hb-sregs" ); hb_clk->reg =of_iomap (srnp,0 ); +of_node_put (srnp);BUG_ON (!hb_clk->reg); hb_clk->reg += reg;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 37/371 clk: qoriq: fix refcount leak in clockgen_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 70af6c5b5270e8101f318c4b69cc98a726edfab9 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/clk-qoriq.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-qoriq.c +1 -0
@@ -1382,6 +1382,7 @@ static void __init clockgen_init(struct device_node *np)pr_err ("%s: Couldn't map %pOF regs\n" , __func__, guts); } +of_node_put (guts); } }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 38/371 clk: socfpga: fix refcount leak
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 7f9705beeb3759e69165e7aff588f6488ff6c1ac ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/socfpga/clk-pll-a10.c | 1 + drivers/clk/socfpga/clk-pll.c | 1 + 2 files changed, 2 insertions(+)
drivers/clk/socfpga/clk-pll-a10.c +1 -0
@@ -95,6 +95,7 @@ static struct clk * __init __socfpga_pll_init(struct device_node *node, clkmgr_np =of_find_compatible_node (NULL ,NULL ,"altr,clk-mgr" ); clk_mgr_a10_base_addr =of_iomap (clkmgr_np,0 ); +of_node_put (clkmgr_np);BUG_ON (!clk_mgr_a10_base_addr); pll_clk->hw.reg = clk_mgr_a10_base_addr + reg;
drivers/clk/socfpga/clk-pll.c +1 -0
@@ -100,6 +100,7 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node, clkmgr_np =of_find_compatible_node (NULL ,NULL ,"altr,clk-mgr" ); clk_mgr_base_addr =of_iomap (clkmgr_np,0 ); +of_node_put (clkmgr_np);BUG_ON (!clk_mgr_base_addr); pll_clk->hw.reg = clk_mgr_base_addr + reg;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 39/371 clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit cee82eb9532090cd1dc953e845d71f9b1445c84e ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/samsung/clk-exynos4.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/samsung/clk-exynos4.c +1 -0
@@ -1240,6 +1240,7 @@ static unsigned long __init exynos4_get_xom(void) xom =readl (chipid_base +8 );iounmap (chipid_base); +of_node_put (np); }return xom;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 40/371 clk: imx6q: fix refcount leak in imx6q_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit c9ec1d8fef31b5fc9e90e99f9bd685db5caa7c5e ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx6q.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6q.c +1 -0
@@ -431,6 +431,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx6q-anatop" ); anatop_base = base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np);/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */ if (clk_on_imx6q () &&imx_get_soc_revision () ==IMX_CHIP_REVISION_1_0 ) {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 41/371 clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 1731e14fb30212dd8c1e9f8fc1af061e56498c55 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx6sx.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6sx.c +1 -0
@@ -164,6 +164,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx6sx-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np); clks[IMX6SX_PLL1_BYPASS_SRC ] =imx_clk_mux ("pll1_bypass_src" , base +0x00 ,14 ,1 , pll_bypass_src_sels,ARRAY_SIZE (pll_bypass_src_sels)); clks[IMX6SX_PLL2_BYPASS_SRC ] =imx_clk_mux ("pll2_bypass_src" , base +0x30 ,14 ,1 , pll_bypass_src_sels,ARRAY_SIZE (pll_bypass_src_sels));
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 42/371 clk: imx7d: fix refcount leak in imx7d_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 5f8c183a996b76bb09748073c856e4246fd4ce95 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx7d.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx7d.c +1 -0
@@ -416,6 +416,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx7d-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np); clks[IMX7D_PLL_ARM_MAIN_SRC ] =imx_clk_mux ("pll_arm_main_src" , base +0x60 ,14 ,2 , pll_bypass_src_sel,ARRAY_SIZE (pll_bypass_src_sel)); clks[IMX7D_PLL_DRAM_MAIN_SRC ] =imx_clk_mux ("pll_dram_main_src" , base +0x70 ,14 ,2 , pll_bypass_src_sel,ARRAY_SIZE (pll_bypass_src_sel));
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 43/371 clk: vf610: fix refcount leak in vf610_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 567177024e0313e4f0dcba7ba10c0732e50e655d ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-vf610.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-vf610.c +1 -0
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,vf610-anatop" ); anatop_base =of_iomap (np,0 );BUG_ON (!anatop_base); +of_node_put (np); np = ccm_node; ccm_base =of_iomap (np,0 );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 44/371 clk: armada-370: fix refcount leak in a370_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit a3c24050bdf70c958a8d98c2823b66ea761e6a31 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/armada-370.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-370.c +3 -1
@@ -177,8 +177,10 @@ static void __init a370_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &a370_coreclks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, a370_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (a370_clk,"marvell,armada-370-core-clock" , a370_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 45/371 clk: kirkwood: fix refcount leak in kirkwood_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit e7beeab9c61591cd0e690d8733d534c3f4278ff8 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/kirkwood.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/mvebu/kirkwood.c +2 -0
@@ -333,6 +333,8 @@ static void __init kirkwood_clk_init(struct device_node *np)if (cgnp) {mvebu_clk_gating_setup (cgnp, kirkwood_gating_desc);kirkwood_clk_muxing_setup (cgnp, kirkwood_mux_desc); + +of_node_put (cgnp); } } CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 46/371 clk: armada-xp: fix refcount leak in axp_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit db20a90a4b6745dad62753f8bd2f66afdd5abc84 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/armada-xp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-xp.c +3 -1
@@ -228,7 +228,9 @@ static void __init axp_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &axp_coreclks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, axp_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (axp_clk,"marvell,armada-xp-core-clock" , axp_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 47/371 clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 9b4eedf627045ae5ddcff60a484200cdd554c413 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/mv98dx3236.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/mv98dx3236.c +3 -1
@@ -174,7 +174,9 @@ static void __init mv98dx3236_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &mv98dx3236_core_clocks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, mv98dx3236_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (mv98dx3236_clk,"marvell,mv98dx3236-core-clock" , mv98dx3236_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 48/371 clk: dove: fix refcount leak in dove_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 8d726c5128298386b907963033be93407b0c4275 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/dove.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/clk/mvebu/dove.c +6 -2
@@ -190,10 +190,14 @@ static void __init dove_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &dove_coreclks); -if (ddnp) +if (ddnp) {dove_divider_clk_init (ddnp); +of_node_put (ddnp); + } -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, dove_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (dove_clk,"marvell,dove-core-clock" , dove_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 49/371 MIPS: BCM63XX: drop unused and broken DSP platform device
In reply to Sasha LevinFrom: Jonas Gorski <[email protected]>
[ Upstream commit 682fee802843b332f9c51ffc8e062de5ff773f2e ]
Trying to register the DSP platform device results in a null pointer access:
[ 0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20 [ 0.135208] Oops[#1]: [ 0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87 ... [ 0.197117] epc : 804e305c bcm63xx_dsp_register+0x80/0xa4 [ 0.202838] ra : 804e6f20 board_register_devices+0x258/0x390
...
This happens because it tries to copy the passed platform data over the platform_device's unpopulated platform_data.
Since this code has been broken since its submission, no driver was ever submitted for it, and apparently nobody was using it, just remove it instead of trying to fix it.
--- arch/mips/bcm63xx/Makefile | 6 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 20 ------- arch/mips/bcm63xx/dev-dsp.c | 56 ------------------- .../asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 14 ----- .../include/asm/mach-bcm63xx/board_bcm963xx.h | 5 -- 5 files changed, 3 insertions(+), 98 deletions(-) delete mode 100644 arch/mips/bcm63xx/dev-dsp.c delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
arch/mips/bcm63xx/Makefile +3 -3
@@ -1,8 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \ - dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \ - dev-wdt.o dev-usb-usbd.o + setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ + dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ + dev-usb-usbd.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-y += boards/
arch/mips/bcm63xx/boards/board_bcm963xx.c +0 -20
@@ -23,7 +23,6 @@#include <bcm63xx_nvram.h> #include <bcm63xx_dev_pci.h> #include <bcm63xx_dev_enet.h> -#include <bcm63xx_dev_dsp.h> #include <bcm63xx_dev_flash.h> #include <bcm63xx_dev_hsspi.h> #include <bcm63xx_dev_pcmcia.h>
@@ -289,14 +288,6 @@ static struct board_info __initdata board_96348gw_10 = { .has_pccard = 1, .has_ehci0 = 1, - .has_dsp = 1, - .dsp = { - .gpio_rst = 6, - .gpio_int = 34, - .cs = 2, - .ext_irq = 2, - }, - .leds = { { .name = "adsl-fail",
@@ -401,14 +392,6 @@ static struct board_info __initdata board_96348gw = { .has_ohci0 = 1, - .has_dsp = 1, - .dsp = { - .gpio_rst = 6, - .gpio_int = 34, - .ext_irq = 2, - .cs = 2, - }, - .leds = { { .name = "adsl-fail",
@@ -898,9 +881,6 @@ int __init board_register_devices(void)if (board.has_usbd)bcm63xx_usbd_register (&board.usbd); -if (board.has_dsp) -bcm63xx_dsp_register (&board.dsp); -/* Generate MAC address for WLAN and register our SPROM, * do this after registering enet devices */
arch/mips/bcm63xx/dev-dsp.c deleted +0 -56
56 lines not on this page · raw message
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h deleted +0 -14
@@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __BCM63XX_DSP_H -#define __BCM63XX_DSP_H - -struct bcm63xx_dsp_platform_data { -unsigned gpio_rst; -unsigned gpio_int; -unsigned cs; -unsigned ext_irq; -}; - -int __init bcm63xx_dsp_register (const struct bcm63xx_dsp_platform_data *pd); - -#endif /* __BCM63XX_DSP_H */
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +0 -5
@@ -7,7 +7,6 @@#include <linux/leds.h> #include <bcm63xx_dev_enet.h> #include <bcm63xx_dev_usb_usbd.h> -#include <bcm63xx_dev_dsp.h> /* * flash mapping
@@ -31,7 +30,6 @@ struct board_info { unsigned int has_ohci0:1; unsigned int has_ehci0:1; unsigned int has_usbd:1; - unsigned int has_dsp:1; unsigned int has_uart0:1; unsigned int has_uart1:1;
@@ -43,9 +41,6 @@ struct board_info {/* USB config */ struct bcm63xx_usbd_platform_data usbd; -/* DSP config */ -struct bcm63xx_dsp_platform_data dsp; -/* GPIO LEDs */ struct gpio_led leds[5 ];
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 50/371 IB/usnic: Fix out of bounds index check in query pkey
In reply to Sasha LevinFrom: Gal Pressman <[email protected]>
[ Upstream commit 4959d5da5737dd804255c75b8cea0a2929ce279a ]
The pkey table size is one element, index should be tested for > 0 instead of > 1.
--- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1 -1
@@ -423,7 +423,7 @@ struct net_device *usnic_get_netdev(struct ib_device *device, u8 port_num)int usnic_ib_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >1 ) +if (index >0 )return -EINVAL ; *pkey =0xffff ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 51/371 RDMA/ocrdma: Fix out of bounds index check in query pkey
In reply to Sasha LevinFrom: Gal Pressman <[email protected]>
[ Upstream commit b188940796c7be31c1b8c25a9a0e0842c2e7a49e ]
The pkey table size is one element, index should be tested for > 0 instead of > 1.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
@@ -55,7 +55,7 @@int ocrdma_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >1 ) +if (index >0 )return -EINVAL ; *pkey =0xffff ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 52/371 RDMA/qedr: Fix out of bounds index check in query pkey
In reply to Sasha LevinFrom: Gal Pressman <[email protected]>
[ Upstream commit dbe30dae487e1a232158c24b432d45281c2805b7 ]
The pkey table size is QEDR_ROCE_PKEY_TABLE_LEN, index should be tested for >= QEDR_ROCE_PKEY_TABLE_LEN instead of > QEDR_ROCE_PKEY_TABLE_LEN.
--- drivers/infiniband/hw/qedr/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/qedr/verbs.c +1 -1
@@ -63,7 +63,7 @@ static inline int qedr_ib_copy_to_udata(struct ib_udata *udata, void *src,int qedr_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >QEDR_ROCE_PKEY_TABLE_LEN ) +if (index >=QEDR_ROCE_PKEY_TABLE_LEN )return -EINVAL ; *pkey =QEDR_ROCE_PKEY_DEFAULT ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 53/371 drm/shmob: Fix return value check in shmob_drm_probe
In reply to Sasha LevinFrom: YueHaibing <[email protected]>
[ Upstream commit 06c3bbd3c12737a50c2e981821b5585e1786e73d ]
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().
--- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/shmobile/shmob_drm_drv.c +2 -2
@@ -233,8 +233,8 @@ static int shmob_drm_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); sdev->mmio =devm_ioremap_resource (&pdev->dev, res); -if (sdev->mmio ==NULL ) -return -ENOMEM ; +if (IS_ERR (sdev->mmio)) +return PTR_ERR (sdev->mmio); ret =shmob_drm_setup_clocks (sdev, pdata->clk_source);if (ret <0 )
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 54/371 arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD
In reply to Sasha LevinFrom: Loic Poulain <[email protected]>
[ Upstream commit af61bef513ba179559e56908b8c465e587bc3890 ]
In the same way as for msm8974-hammerhead, l11 load, used for SDCARD VMMC, needs to be increased in order to prevent any voltage drop issues (due to limited current) happening with some SDCARDS or during specific operations (e.g. write).
Tested on Dragonboard-410c and DART-SD410 boards.
--- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +2 -0
@@ -458,6 +458,8 @@ l11 { regulator-min-microvolt = <1750000>; regulator-max-microvolt = <3337000>; + regulator-allow-set-load; + regulator-system-load = <200000>; }; l12 {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 55/371 spi: cadence: Correct initialisation of runtime PM
In reply to Sasha LevinFrom: Charles Keepax <[email protected]>
[ Upstream commit 734882a8bf984c2ac8a57d8ac3ee53230bd0bed8 ]
Currently the driver calls pm_runtime_put_autosuspend but without ever having done a pm_runtime_get, this causes the reference count in the pm runtime core to become -1. The bad reference count causes the core to sometimes suspend whilst an active SPI transfer is in progress.
arizona spi0.1: SPI transfer timed outspi_master spi0: failed to transfer one message from queue
The correct proceedure is to do all the initialisation that requires the hardware to be powered up before enabling the PM runtime, then enable the PM runtime having called pm_runtime_set_active to inform it that the hardware is currently powered up. The core will then power it down at it's leisure and no explicit pm_runtime_put is required.
--- drivers/spi/spi-cadence.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/spi/spi-cadence.c +4 -7
@@ -584,11 +584,6 @@ static int cdns_spi_probe(struct platform_device *pdev) goto clk_dis_apb; } -pm_runtime_use_autosuspend (&pdev->dev); -pm_runtime_set_autosuspend_delay (&pdev->dev,SPI_AUTOSUSPEND_TIMEOUT ); -pm_runtime_set_active (&pdev->dev); -pm_runtime_enable (&pdev->dev); - ret =of_property_read_u32 (pdev->dev.of_node,"num-cs" , &num_cs);if (ret <0 ) master->num_chipselect =CDNS_SPI_DEFAULT_NUM_CS ;
@@ -603,8 +598,10 @@ static int cdns_spi_probe(struct platform_device *pdev)/* SPI controller initializations */ cdns_spi_init_hw (xspi); -pm_runtime_mark_last_busy (&pdev->dev); -pm_runtime_put_autosuspend (&pdev->dev); +pm_runtime_set_active (&pdev->dev); +pm_runtime_enable (&pdev->dev); +pm_runtime_use_autosuspend (&pdev->dev); +pm_runtime_set_autosuspend_delay (&pdev->dev,SPI_AUTOSUSPEND_TIMEOUT ); irq =platform_get_irq (pdev,0 );if (irq <=0 ) {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 56/371 RDMA/iw_cxgb4: Fix the unchecked ep dereference
In reply to Sasha LevinFrom: Raju Rangoju <[email protected]>
[ Upstream commit 3352976c892301fd576a2e9ff0ac7337b2e2ca48 ]
The patch 944661dd97f4: "RDMA/iw_cxgb4: atomically lookup ep and get a reference" from May 6, 2016, leads to the following Smatch complaint:
drivers/infiniband/hw/cxgb4/cm.c:2953 terminate()
error: we previously assumed 'ep' could be null (see line 2945)
--- drivers/infiniband/hw/cxgb4/cm.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +10 -7
@@ -2923,15 +2923,18 @@ static int terminate(struct c4iw_dev *dev, struct sk_buff *skb) ep =get_ep_from_tid (dev, tid);BUG_ON (!ep); -if (ep && ep->com.qp) { -pr_warn ("TERM received tid %u qpid %u\n" , - tid, ep->com.qp->wq.sq.qid); - attrs.next_state =C4IW_QP_STATE_TERMINATE ; -c4iw_modify_qp (ep->com.qp->rhp, ep->com.qp, -C4IW_QP_ATTR_NEXT_STATE , &attrs,1 ); +if (ep) { +if (ep->com.qp) { +pr_warn ("TERM received tid %u qpid %u\n" , tid, + ep->com.qp->wq.sq.qid); + attrs.next_state =C4IW_QP_STATE_TERMINATE ; +c4iw_modify_qp (ep->com.qp->rhp, ep->com.qp, +C4IW_QP_ATTR_NEXT_STATE , &attrs,1 ); + } + +c4iw_put_ep (&ep->com); }else pr_warn ("TERM received tid %u no ep/qp\n" , tid); -c4iw_put_ep (&ep->com);return 0 ; }
Signature · 1 line
2.20.1