ARC: HSDK: wireup perf irq
Subsystems (9)
Sasha Levin
maintainerPATCH 1/26 ARC: HSDK: wireup perf irq
From: Vineet Gupta <[email protected]>
[ Upstream commit fe81d927b78c4f0557836661d32e41ebc957b024 ]
Newer version of HSDK aka HSDK-4xD (with dual issue HS48x4 CPU) wired up the perf interrupt, so enable that in DT.
This is OK for old HSDK where this irq is ignored because pct irq is not wired up in hardware.
--- arch/arc/boot/dts/hsdk.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arc/boot/dts/hsdk.dts +2 -0
@@ -83,6 +83,8 @@ idu_intc: idu-interrupt-controller { arcpct: pct { compatible = "snps,archs-pct"; + interrupt-parent = <&cpu_intc>; + interrupts = <20>; }; /* TIMER0 with interrupt for clockevent */
Signature · 7 lines
2.25.1 _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Sasha Levin
maintainerPATCH 2/26 dmaengine: acpi: Put the CSRT table after using it
From: Hanjun Guo <[email protected]>
[ Upstream commit 7eb48dd094de5fe0e216b550e73aa85257903973 ]
The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping, put the CSRT table buf after using it.
--- drivers/dma/acpi-dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/acpi-dma.c +3 -1
@@ -131,11 +131,13 @@ static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma)if (ret <0 ) {dev_warn (&adev->dev,"error in parsing resource group\n" ); -return ; +break ; } grp = (struct acpi_csrt_group *)((void *)grp + grp->length); } + +acpi_put_table ((struct acpi_table_header *)csrt); }/**
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 3/26 netfilter: conntrack: allow sctp hearbeat after connection re-use
In reply to Sasha LevinFrom: Florian Westphal <[email protected]>
[ Upstream commit cc5453a5b7e90c39f713091a7ebc53c1f87d1700 ]
If an sctp connection gets re-used, heartbeats are flagged as invalid because their vtag doesn't match.
Handle this in a similar way as TCP conntrack when it suspects that the endpoints and conntrack are out-of-sync.
When a HEARTBEAT request fails its vtag validation, flag this in the conntrack state and accept the packet.
When a HEARTBEAT_ACK is received with an invalid vtag in the reverse direction after we allowed such a HEARTBEAT through, assume we are out-of-sync and re-set the vtag info.
v2: remove left-over snippet from an older incarnation that moved
new_state/old_state assignments, thats not needed so keep that as-is.
--- include/linux/netfilter/nf_conntrack_sctp.h | 2 ++ net/netfilter/nf_conntrack_proto_sctp.c | 39 ++++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-)
include/linux/netfilter/nf_conntrack_sctp.h +2 -0
@@ -9,6 +9,8 @@ struct ip_ct_sctp {enum sctp_conntrack state;__be32 vtag[IP_CT_DIR_MAX ]; +u8 last_dir; + u8 flags; };#endif /* _NF_CONNTRACK_SCTP_H */
net/netfilter/nf_conntrack_proto_sctp.c +35 -4
@@ -65,6 +65,8 @@ static const unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] = { [SCTP_CONNTRACK_HEARTBEAT_ACKED] = 210 SECS, }; +#define SCTP_FLAG_HEARTBEAT_VTAG_FAILED 1 +#define sNO SCTP_CONNTRACK_NONE#define sCL SCTP_CONNTRACK_CLOSED#define sCW SCTP_CONNTRACK_COOKIE_WAIT
@@ -288,6 +290,7 @@ static int sctp_packet(struct nf_conn *ct,u_int32_t offset, count;unsigned int *timeouts;unsigned long map[256 /sizeof (unsigned long )] = {0 }; +bool ignore = false; sh =skb_header_pointer (skb, dataoff,sizeof (_sctph), &_sctph);if (sh ==NULL )
@@ -332,15 +335,39 @@ static int sctp_packet(struct nf_conn *ct,/* Sec 8.5.1 (D) */ if (sh->vtag != ct->proto.sctp.vtag[dir]) goto out_unlock; - }else if (sch->type ==SCTP_CID_HEARTBEAT || - sch->type ==SCTP_CID_HEARTBEAT_ACK ) { + }else if (sch->type ==SCTP_CID_HEARTBEAT ) { +if (ct->proto.sctp.vtag[dir] ==0 ) { +pr_debug ("Setting %d vtag %x for dir %d\n" , sch->type, sh->vtag, dir); + ct->proto.sctp.vtag[dir] = sh->vtag; + }else if (sh->vtag != ct->proto.sctp.vtag[dir]) { +if (test_bit (SCTP_CID_DATA , map) || ignore) + goto out_unlock; + + ct->proto.sctp.flags |=SCTP_FLAG_HEARTBEAT_VTAG_FAILED ; + ct->proto.sctp.last_dir = dir; + ignore = true; +continue ; + }else if (ct->proto.sctp.flags &SCTP_FLAG_HEARTBEAT_VTAG_FAILED ) { + ct->proto.sctp.flags &= ~SCTP_FLAG_HEARTBEAT_VTAG_FAILED ; + } + }else if (sch->type ==SCTP_CID_HEARTBEAT_ACK ) {if (ct->proto.sctp.vtag[dir] ==0 ) {pr_debug ("Setting vtag %x for dir %d\n" , sh->vtag, dir); ct->proto.sctp.vtag[dir] = sh->vtag; }else if (sh->vtag != ct->proto.sctp.vtag[dir]) { -pr_debug ("Verification tag check failed\n" ); - goto out_unlock; +if (test_bit (SCTP_CID_DATA , map) || ignore) + goto out_unlock; + +if ((ct->proto.sctp.flags &SCTP_FLAG_HEARTBEAT_VTAG_FAILED ) ==0 || + ct->proto.sctp.last_dir == dir) + goto out_unlock; + + ct->proto.sctp.flags &= ~SCTP_FLAG_HEARTBEAT_VTAG_FAILED ; + ct->proto.sctp.vtag[dir] = sh->vtag; + ct->proto.sctp.vtag[!dir] =0 ; + }else if (ct->proto.sctp.flags &SCTP_FLAG_HEARTBEAT_VTAG_FAILED ) { + ct->proto.sctp.flags &= ~SCTP_FLAG_HEARTBEAT_VTAG_FAILED ; } }
@@ -375,6 +402,10 @@ static int sctp_packet(struct nf_conn *ct, }spin_unlock_bh (&ct->lock); +/* allow but do not refresh timeout */ +if (ignore) +return NF_ACCEPT ; + timeouts =nf_ct_timeout_lookup (ct);if (!timeouts) timeouts =sctp_pernet (nf_ct_net (ct))->timeouts;
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 4/26 drivers/net/wan/lapbether: Added needed_tailroom
In reply to Sasha LevinFrom: Xie He <[email protected]>
[ Upstream commit 1ee39c1448c4e0d480c5b390e2db1987561fb5c2 ]
The underlying Ethernet device may request necessary tailroom to be allocated by setting needed_tailroom. This driver should also set needed_tailroom to request the tailroom needed by the underlying Ethernet device to be allocated.
--- drivers/net/wan/lapbether.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wan/lapbether.c +1 -0
@@ -343,6 +343,7 @@ static int lapbeth_new_device(struct net_device *dev)*/ ndev->needed_headroom =-1 +3 +2 + dev->hard_header_len + dev->needed_headroom; + ndev->needed_tailroom = dev->needed_tailroom; lapbeth =netdev_priv (ndev); lapbeth->axdev = ndev;
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 5/26 NFC: st95hf: Fix memleak in st95hf_in_send_cmd
In reply to Sasha LevinFrom: Dinghao Liu <[email protected]>
[ Upstream commit f97c04c316d8fea16dca449fdfbe101fbdfee6a2 ]
When down_killable() fails, skb_resp should be freed just like when st95hf_spi_send() fails.
--- drivers/nfc/st95hf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/st95hf/core.c +1 -1
@@ -981,7 +981,7 @@ static int st95hf_in_send_cmd(struct nfc_digital_dev *ddev, rc =down_killable (&stcontext->exchange_lock);if (rc) {WARN (1 ,"Semaphore is not found up in st95hf_in_send_cmd\n" ); -return rc; + goto free_skb_resp; } rc = st95hf_spi_send(&stcontext->spicontext, skb->data,
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 6/26 firestream: Fix memleak in fs_open
In reply to Sasha LevinFrom: Dinghao Liu <[email protected]>
[ Upstream commit 15ac5cdafb9202424206dc5bd376437a358963f9 ]
When make_rate() fails, vcc should be freed just like other error paths in fs_open().
--- drivers/atm/firestream.c | 1 + 1 file changed, 1 insertion(+)
drivers/atm/firestream.c +1 -0
@@ -1013,6 +1013,7 @@ static int fs_open(struct atm_vcc *atm_vcc) error =make_rate (pcr, r, &tmc0,NULL );if (error) {kfree (tc); +kfree (vcc);return error; } }
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 7/26 ALSA: hda: Fix 2 channel swapping for Tegra
In reply to Sasha LevinFrom: Mohan Kumar <[email protected]>
[ Upstream commit 216116eae43963c662eb84729507bad95214ca6b ]
The Tegra HDA codec HW implementation has an issue related to not swapping the 2 channel Audio Sample Packet(ASP) channel mapping. Whatever the FL and FR mapping specified the left channel always comes out of left speaker and right channel on right speaker. So add condition to disallow the swapping of FL,FR during the playback.
--- sound/pci/hda/patch_hdmi.c | 5 +++++ 1 file changed, 5 insertions(+)
sound/pci/hda/patch_hdmi.c +5 -0
@@ -3430,6 +3430,7 @@ static int tegra_hdmi_build_pcms(struct hda_codec *codec)static int patch_tegra_hdmi (struct hda_codec *codec) { +struct hdmi_spec *spec;int err; err =patch_generic_hdmi (codec);
@@ -3437,6 +3438,10 @@ static int patch_tegra_hdmi(struct hda_codec *codec)return err; codec->patch_ops.build_pcms = tegra_hdmi_build_pcms; + spec = codec->spec; + spec->chmap.ops.chmap_cea_alloc_validate_get_type = + nvhdmi_chmap_cea_alloc_validate_get_type; + spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate;return 0 ; }
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 8/26 drivers/net/wan/lapbether: Set network_header before transmitting
In reply to Sasha LevinFrom: Xie He <[email protected]>
[ Upstream commit 91244d108441013b7367b3b4dcc6869998676473 ]
Set the skb's network_header before it is passed to the underlying Ethernet device for transmission.
This patch fixes the following issue:
When we use this driver with AF_PACKET sockets, there would be error messages of:
protocol 0805 is buggy, dev (Ethernet interface name)
printed in the system "dmesg" log.
This is because skbs passed down to the Ethernet device for transmission don't have their network_header properly set, and the dev_queue_xmit_nit function in net/core/dev.c complains about this.
Reason of setting the network_header to this place (at the end of the Ethernet header, and at the beginning of the Ethernet payload):
Because when this driver receives an skb from the Ethernet device, the network_header is also set at this place.
--- drivers/net/wan/lapbether.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wan/lapbether.c +2 -0
@@ -213,6 +213,8 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb) skb->dev = dev = lapbeth->ethdev; +skb_reset_network_header (skb); +dev_hard_header (skb, dev,ETH_P_DEC , bcast_addr,NULL ,0 );dev_queue_xmit (skb);
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 9/26 cfg80211: regulatory: reject invalid hints
In reply to Sasha LevinFrom: Johannes Berg <[email protected]>
[ Upstream commit 47caf685a6854593348f216e0b489b71c10cbe03 ]
Reject invalid hints early in order to not cause a kernel WARN later if they're restored to or similar.
--- net/wireless/reg.c | 3 +++ 1 file changed, 3 insertions(+)
net/wireless/reg.c +3 -0
@@ -2936,6 +2936,9 @@ int regulatory_hint_user(const char *alpha2,if (WARN_ON (!alpha2))return -EINVAL ; +if (!is_world_regdom (alpha2) && !is_an_alpha2 (alpha2)) +return -EINVAL ; + request =kzalloc (sizeof (struct regulatory_request ),GFP_KERNEL );if (!request)return -ENOMEM ;
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 10/26 net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()
In reply to Sasha LevinFrom: Himadri Pandya <[email protected]>
[ Upstream commit a092b7233f0e000cc6f2c71a49e2ecc6f917a5fc ]
The buffer size is 2 Bytes and we expect to receive the same amount of data. But sometimes we receive less data and run into uninit-was-stored issue upon read. Hence modify the error check on the return value to match with the buffer size as a prevention.
Reported-and-tested by: [email protected]
--- drivers/net/usb/asix_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/asix_common.c +1 -1
@@ -309,7 +309,7 @@ int asix_read_phy_addr(struct usbnet *dev, int internal)netdev_dbg (dev->net,"asix_get_phy_addr()\n" ); -if (ret <0 ) { +if (ret <2 ) {netdev_err (dev->net,"Error reading PHYID register: %02x\n" , ret); goto out; }
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 11/26 xfs: initialize the shortform attr header padding entry
In reply to Sasha LevinFrom: "Darrick J. Wong" <[email protected]>
[ Upstream commit 125eac243806e021f33a1fdea3687eccbb9f7636 ]
Don't leak kernel memory contents into the shortform attr fork.
--- fs/xfs/libxfs/xfs_attr_leaf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/libxfs/xfs_attr_leaf.c +2 -2
@@ -551,8 +551,8 @@ xfs_attr_shortform_create(xfs_da_args_t *args)ASSERT (ifp->if_flags &XFS_IFINLINE ); }xfs_idata_realloc (dp,sizeof (*hdr),XFS_ATTR_FORK ); - hdr = (xfs_attr_sf_hdr_t *)ifp->if_u1.if_data; - hdr->count =0 ; + hdr = (struct xfs_attr_sf_hdr *)ifp->if_u1.if_data; +memset (hdr,0 ,sizeof (*hdr)); hdr->totsize =cpu_to_be16 (sizeof (*hdr));xfs_trans_log_inode (args->trans, dp,XFS_ILOG_CORE |XFS_ILOG_ADATA ); }
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 12/26 irqchip/eznps: Fix build error for !ARC700 builds
In reply to Sasha LevinFrom: Vineet Gupta <[email protected]>
[ Upstream commit 89d29997f103d08264b0685796b420d911658b96 ]
eznps driver is supposed to be platform independent however it ends up including stuff from inside arch/arc headers leading to rand config build errors.
The quick hack to fix this (proper fix is too much chrun for non active user-base) is to add following to nps platform agnostic header.
- copy AUX_IENABLE from arch/arc header
- move CTOP_AUX_IACK from arch/arc/plat-eznps/*/**
--- arch/arc/plat-eznps/include/plat/ctop.h | 1 - include/soc/nps/common.h | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arc/plat-eznps/include/plat/ctop.h +0 -1
@@ -43,7 +43,6 @@#define CTOP_AUX_DPC (CTOP_AUX_BASE + 0x02C)#define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030)#define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080) -#define CTOP_AUX_IACK (CTOP_AUX_BASE + 0x088)#define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C)#define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300)
include/soc/nps/common.h +6 -0
@@ -45,6 +45,12 @@#define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST 0x5B60#define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM 0x00010422 +#ifndef AUX_IENABLE +#define AUX_IENABLE 0x40c +#endif + +#define CTOP_AUX_IACK (0xFFFFF800 + 0x088) +#ifndef __ASSEMBLY__/* In order to increase compilation test coverage */
Signature · 7 lines
2.25.1 _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Sasha Levin
maintainerPATCH 13/26 nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance
In reply to Sasha LevinFrom: Sagi Grimberg <[email protected]>
[ Upstream commit d7144f5c4cf4de95fdc3422943cf51c06aeaf7a7 ]
NVME_CTRL_NEW should never see any I/O, because in order to start initialization it has to transition to NVME_CTRL_CONNECTING and from there it will never return to this state.
--- drivers/nvme/host/fabrics.c | 1 - 1 file changed, 1 deletion(-)
drivers/nvme/host/fabrics.c +0 -1
@@ -577,7 +577,6 @@ bool __nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,* which is require to set the queue live in the appropinquate states. */ switch (ctrl->state) { -case NVME_CTRL_NEW :case NVME_CTRL_CONNECTING :if (req->cmd->common.opcode == nvme_fabrics_command && req->cmd->fabrics.fctype == nvme_fabrics_type_connect)
Signature · 7 lines
2.25.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Sasha Levin
maintainerPATCH 14/26 nvme: have nvme_wait_freeze_timeout return if it timed out
In reply to Sasha LevinFrom: Sagi Grimberg <[email protected]>
[ Upstream commit 7cf0d7c0f3c3b0203aaf81c1bc884924d8fdb9bd ]
Users can detect if the wait has completed or not and take appropriate actions based on this information (e.g. weather to continue initialization or rather fail and schedule another initialization attempt).
--- drivers/nvme/host/core.c | 3 ++- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/nvme/host/core.c +2 -1
@@ -3726,7 +3726,7 @@ void nvme_unfreeze(struct nvme_ctrl *ctrl) }EXPORT_SYMBOL_GPL (nvme_unfreeze); -void nvme_wait_freeze_timeout (struct nvme_ctrl *ctrl,long timeout) +int nvme_wait_freeze_timeout (struct nvme_ctrl *ctrl,long timeout) {struct nvme_ns *ns;
@@ -3737,6 +3737,7 @@ void nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout)break ; }up_read (&ctrl->namespaces_rwsem); +return timeout; }EXPORT_SYMBOL_GPL (nvme_wait_freeze_timeout);
drivers/nvme/host/nvme.h +1 -1
@@ -438,7 +438,7 @@ void nvme_start_queues(struct nvme_ctrl *ctrl);void nvme_kill_queues (struct nvme_ctrl *ctrl);void nvme_unfreeze (struct nvme_ctrl *ctrl);void nvme_wait_freeze (struct nvme_ctrl *ctrl); -void nvme_wait_freeze_timeout (struct nvme_ctrl *ctrl,long timeout); +int nvme_wait_freeze_timeout (struct nvme_ctrl *ctrl,long timeout);void nvme_start_freeze (struct nvme_ctrl *ctrl);#define NVME_QID_ANY -1
Signature · 7 lines
2.25.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Sasha Levin
maintainerPATCH 15/26 nvme-rdma: serialize controller teardown sequences
In reply to Sasha LevinFrom: Sagi Grimberg <[email protected]>
[ Upstream commit 5110f40241d08334375eb0495f174b1d2c07657e ]
In the timeout handler we may need to complete a request because the request that timed out may be an I/O that is a part of a serial sequence of controller teardown or initialization. In order to complete the request, we need to fence any other context that may compete with us and complete the request that is timing out.
In this case, we could have a potential double completion in case a hard-irq or a different competing context triggered error recovery and is running inflight request cancellation concurrently with the timeout handler.
Protect using a ctrl teardown_lock to serialize contexts that may complete a cancelled request due to error recovery or a reset.
--- drivers/nvme/host/rdma.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/nvme/host/rdma.c +6 -0
@@ -118,6 +118,7 @@ struct nvme_rdma_ctrl {struct sockaddr_storage src_addr;struct nvme_ctrl ctrl; +struct mutex teardown_lock;bool use_inline_data; };
@@ -880,6 +881,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)static void nvme_rdma_teardown_admin_queue (struct nvme_rdma_ctrl *ctrl,bool remove) { +mutex_lock (&ctrl->teardown_lock);blk_mq_quiesce_queue (ctrl->ctrl.admin_q);nvme_rdma_stop_queue (&ctrl->queues[0 ]);if (ctrl->ctrl.admin_tagset)
@@ -887,11 +889,13 @@ static void nvme_rdma_teardown_admin_queue(struct nvme_rdma_ctrl *ctrl, nvme_cancel_request, &ctrl->ctrl);blk_mq_unquiesce_queue (ctrl->ctrl.admin_q);nvme_rdma_destroy_admin_queue (ctrl, remove); +mutex_unlock (&ctrl->teardown_lock); }static void nvme_rdma_teardown_io_queues (struct nvme_rdma_ctrl *ctrl,bool remove) { +mutex_lock (&ctrl->teardown_lock);if (ctrl->ctrl.queue_count >1 ) {nvme_stop_queues (&ctrl->ctrl);nvme_rdma_stop_io_queues (ctrl);
@@ -902,6 +906,7 @@ static void nvme_rdma_teardown_io_queues(struct nvme_rdma_ctrl *ctrl,nvme_start_queues (&ctrl->ctrl);nvme_rdma_destroy_io_queues (ctrl, remove); } +mutex_unlock (&ctrl->teardown_lock); }static void nvme_rdma_stop_ctrl (struct nvme_ctrl *nctrl)
@@ -1955,6 +1960,7 @@ static struct nvme_ctrl *nvme_rdma_create_ctrl(struct device *dev,return ERR_PTR (-ENOMEM ); ctrl->ctrl.opts = opts;INIT_LIST_HEAD (&ctrl->list); +mutex_init (&ctrl->teardown_lock);if (opts->mask &NVMF_OPT_TRSVCID ) port = opts->trsvcid;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Sasha Levin
maintainerPATCH 16/26 HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for all Saitek X52 devices
In reply to Sasha LevinFrom: Nirenjan Krishnan <[email protected]>
[ Upstream commit 77df710ba633dfb6c65c65cf99ea9e084a1c9933 ]
The Saitek X52 family of joysticks has a pair of axes that were originally (by the Windows driver) used as mouse pointer controls. The corresponding usage page is the Game Controls page, which is not recognized by the generic HID driver, and therefore, both axes get mapped to ABS_MISC. The quirk makes the second axis get mapped to ABS_MISC+1, and therefore made available separately.
One Saitek X52 device is already fixed. This patch fixes the other two known devices with VID/PID 06a3:0255 and 06a3:0762.
--- drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-quirks.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +2 -0
@@ -985,6 +985,8 @@#define USB_DEVICE_ID_SAITEK_RAT9 0x0cfa#define USB_DEVICE_ID_SAITEK_MMO7 0x0cd0#define USB_DEVICE_ID_SAITEK_X52 0x075c +#define USB_DEVICE_ID_SAITEK_X52_2 0x0255 +#define USB_DEVICE_ID_SAITEK_X52_PRO 0x0762#define USB_VENDOR_ID_SAMSUNG 0x0419#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001
drivers/hid/hid-quirks.c +2 -0
@@ -147,6 +147,8 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_RETROUSB, USB_DEVICE_ID_RETROUSB_SNES_RETROPORT), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD), HID_QUIRK_BADPAD }, { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, + { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_2), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, + { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_PRO), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB), HID_QUIRK_NOGET },
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 17/26 drivers/net/wan/hdlc_cisco: Add hard_header_len
In reply to Sasha LevinFrom: Xie He <[email protected]>
[ Upstream commit 1a545ebe380bf4c1433e3c136e35a77764fda5ad ]
This driver didn't set hard_header_len. This patch sets hard_header_len for it according to its header_ops->create function.
This driver's header_ops->create function (cisco_hard_header) creates a header of (struct hdlc_header), so hard_header_len should be set to sizeof(struct hdlc_header).
--- drivers/net/wan/hdlc_cisco.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wan/hdlc_cisco.c +1 -0
@@ -374,6 +374,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)memcpy (&state (hdlc)->settings, &new_settings, size);spin_lock_init (&state (hdlc)->lock); dev->header_ops = &cisco_header_ops; + dev->hard_header_len =sizeof (struct hdlc_header ); dev->type =ARPHRD_CISCO ;call_netdevice_notifiers (NETDEV_POST_TYPE_CHANGE , dev);netif_dormant_on (dev);
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 18/26 HID: elan: Fix memleak in elan_input_configured
In reply to Sasha LevinFrom: Dinghao Liu <[email protected]>
[ Upstream commit b7429ea53d6c0936a0f10a5d64164f0aea440143 ]
When input_mt_init_slots() fails, input should be freed to prevent memleak. When input_register_device() fails, we should call input_mt_destroy_slots() to free memory allocated by input_mt_init_slots().
--- drivers/hid/hid-elan.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hid/hid-elan.c +2 -0
@@ -192,6 +192,7 @@ static int elan_input_configured(struct hid_device *hdev, struct hid_input *hi) ret =input_mt_init_slots (input,ELAN_MAX_FINGERS ,INPUT_MT_POINTER );if (ret) {hid_err (hdev,"Failed to init elan MT slots: %d\n" , ret); +input_free_device (input);return ret; }
@@ -202,6 +203,7 @@ static int elan_input_configured(struct hid_device *hdev, struct hid_input *hi)if (ret) {hid_err (hdev,"Failed to register elan input device: %d\n" , ret); +input_mt_destroy_slots (input);input_free_device (input);return ret; }
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 19/26 ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id
In reply to Sasha LevinFrom: Evgeniy Didin <[email protected]>
[ Upstream commit 26907eb605fbc3ba9dbf888f21d9d8d04471271d ]
HSDK board has Micrel KSZ9031, recent commitbcf3440c6dd ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") caused a breakdown of Ethernet.
Using 'phy-mode = "rgmii"' is not correct because accodring RGMII specification it is necessary to have delay on RX (PHY to MAX) which is not generated in case of "rgmii".
Using "rgmii-id" adds necessary delay and solves the issue.
Also adding name of PHY placed on HSDK board.
--- arch/arc/boot/dts/hsdk.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arc/boot/dts/hsdk.dts +2 -2
@@ -175,7 +175,7 @@ gmac: ethernet@8000 { reg = <0x8000 0x2000>; interrupts = <10>; interrupt-names = "macirq"; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; snps,pbl = <32>; snps,multicast-filter-bins = <256>; clocks = <&gmacclk>;
@@ -193,7 +193,7 @@ mdio { #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; - phy0: ethernet-phy@0 { + phy0: ethernet-phy@0 { /* Micrel KSZ9031 */ reg = <0>; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 20/26 cpufreq: intel_pstate: Refuse to turn off with HWP enabled
In reply to Sasha LevinFrom: "Rafael J. Wysocki" <[email protected]>
[ Upstream commit 43298db3009f06fe5c69e1ca8b6cfc2565772fa1 ]
After commit f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled") it is possible to change the driver status to "off" via sysfs with HWP enabled, which effectively causes the driver to unregister itself, but HWP remains active and it forces the minimum performance, so even if another cpufreq driver is loaded, it will not be able to control the CPU frequency.
For this reason, make the driver refuse to change the status to "off" with HWP enabled.
--- drivers/cpufreq/intel_pstate.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/cpufreq/intel_pstate.c +9 -3
@@ -2325,9 +2325,15 @@ static int intel_pstate_update_status(const char *buf, size_t size) {int ret; -if (size ==3 && !strncmp (buf,"off" , size)) -return intel_pstate_driver ? -intel_pstate_unregister_driver () : -EINVAL ; +if (size ==3 && !strncmp (buf,"off" , size)) { +if (!intel_pstate_driver) +return -EINVAL ; + +if (hwp_active) +return -EBUSY ; + +return intel_pstate_unregister_driver (); + }if (size ==6 && !strncmp (buf,"active" , size)) {if (intel_pstate_driver) {
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 21/26 cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled
In reply to Sasha LevinFrom: Francisco Jerez <[email protected]>
[ Upstream commit eacc9c5a927e474c173a5d53dd7fb8e306511768 ]
This fixes the behavior of the scaling_max_freq and scaling_min_freq sysfs files in systems which had turbo disabled by the BIOS.
Caleb noticed that the HWP is programmed to operate in the wrong P-state range on his system when the CPUFREQ policy min/max frequency is set via sysfs. This seems to be because in his system intel_pstate_get_hwp_max() is returning the maximum turbo P-state even though turbo was disabled by the BIOS, which causes intel_pstate to scale kHz frequencies incorrectly e.g. setting the maximum turbo frequency whenever the maximum guaranteed frequency is requested via sysfs.
--- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/intel_pstate.c +1 -1
@@ -712,7 +712,7 @@ static void intel_pstate_get_hwp_max(unsigned int cpu, int *phy_max,rdmsrl_on_cpu (cpu,MSR_HWP_CAPABILITIES , &cap);WRITE_ONCE (all_cpu_data[cpu]->hwp_cap_cached, cap); -if (global.no_turbo) +if (global.no_turbo || global.turbo_disabled) *current_max =HWP_GUARANTEED_PERF (cap);else *current_max =HWP_HIGHEST_PERF (cap);
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 22/26 net: usb: dm9601: Add USB ID of Keenetic Plus DSL
In reply to Sasha LevinFrom: Kamil Lorenc <[email protected]>
[ Upstream commit a609d0259183a841621f252e067f40f8cc25d6f6 ]
Keenetic Plus DSL is a xDSL modem that uses dm9620 as its USB interface.
--- drivers/net/usb/dm9601.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/usb/dm9601.c +4 -0
@@ -625,6 +625,10 @@ static const struct usb_device_id products[] = { USB_DEVICE(0x0a46, 0x1269), /* DM9621A USB to Fast Ethernet Adapter */ .driver_info = (unsigned long)&dm9601_info, }, + { + USB_DEVICE(0x0586, 0x3427), /* ZyXEL Keenetic Plus DSL xDSL modem */ + .driver_info = (unsigned long)&dm9601_info, + }, {}, // END };
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 23/26 ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled
In reply to Sasha LevinFrom: Rander Wang <[email protected]>
[ Upstream commit 13774d81f38538c5fa2924bdcdfa509155480fa6 ]
In snd_hdac_device_init pm_runtime_set_active is called to increase child_count in parent device. But when it is failed to build connection with GPU for one case that integrated graphic gpu is disabled, snd_hdac_ext_bus_device_exit will be invoked to clean up a HD-audio extended codec base device. At this time the child_count of parent is not decreased, which makes parent device can't get suspended.
This patch calls pm_runtime_set_suspended to decrease child_count in parent device in snd_hdac_device_exit to match with snd_hdac_device_init. pm_runtime_set_suspended can make sure that it will not decrease child_count if the device is already suspended.
--- sound/hda/hdac_device.c | 2 ++ 1 file changed, 2 insertions(+)
sound/hda/hdac_device.c +2 -0
@@ -124,6 +124,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_init);void snd_hdac_device_exit (struct hdac_device *codec) {pm_runtime_put_noidle (&codec->dev); +/* keep balance of runtime PM child_count in parent device */ +pm_runtime_set_suspended (&codec->dev);snd_hdac_bus_remove_device (codec->bus, codec);kfree (codec->vendor_name);kfree (codec->chip_name);
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 24/26 drm/amdgpu: Fix bug in reporting voltage for CIK
In reply to Sasha LevinFrom: Sandeep Raghuraman <[email protected]>
[ Upstream commit d98299885c9ea140c1108545186593deba36c4ac ]
On my R9 390, the voltage was reported as a constant 1000 mV. This was due to a bug in smu7_hwmgr.c, in the smu7_read_sensor() function, where some magic constants were used in a condition, to determine whether the voltage should be read from PLANE2_VID or PLANE1_VID. The VDDC mask was incorrectly used, instead of the VDDGFX mask.
This patch changes the code to use the correct defined constants (and apply the correct bitshift), thus resulting in correct voltage reporting.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -1
@@ -3566,7 +3566,8 @@ static int smu7_read_sensor(struct pp_hwmgr *hwmgr, int idx,case AMDGPU_PP_SENSOR_GPU_POWER :return smu7_get_gpu_power (hwmgr, (uint32_t *)value);case AMDGPU_PP_SENSOR_VDDGFX : -if ((data->vr_config &0xff ) ==0x2 ) +if ((data->vr_config &VRCONF_VDDGFX_MASK ) == + (VR_SVI2_PLANE_2 <<VRCONF_VDDGFX_SHIFT )) val_vid =PHM_READ_INDIRECT_FIELD (hwmgr->device,CGS_IND_REG__SMC ,PWR_SVI2_STATUS ,PLANE2_VID );else
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sasha Levin
maintainerPATCH 25/26 iommu/amd: Do not use IOMMUv2 functionality when SME is active
In reply to Sasha LevinFrom: Joerg Roedel <[email protected]>
[ Upstream commit 2822e582501b65707089b097e773e6fd70774841 ]
When memory encryption is active the device is likely not in a direct mapped domain. Forbid using IOMMUv2 functionality for now until finer grained checks for this have been implemented.
--- drivers/iommu/amd_iommu_v2.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/iommu/amd_iommu_v2.c +7 -0
@@ -776,6 +776,13 @@ int amd_iommu_init_device(struct pci_dev *pdev, int pasids)might_sleep (); +/* +* When memory encryption is active the device is likely not in a +* direct-mapped domain. Forbid using IOMMUv2 functionality for now. +*/ +if (mem_encrypt_active ()) +return -ENODEV ; +if (!amd_iommu_v2_supported ())return -ENODEV ;
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Sasha Levin
maintainerPATCH 26/26 gcov: Disable gcov build with GCC 10
In reply to Sasha LevinFrom: Leon Romanovsky <[email protected]>
[ Upstream commit cfc905f158eaa099d6258031614d11869e7ef71c ]
GCOV built with GCC 10 doesn't initialize n_function variable. This produces different kernel panics as was seen by Colin in Ubuntu and me in FC 32.
As a workaround, let's disable GCOV build for broken GCC 10 version.
--- kernel/gcov/Kconfig | 1 + 1 file changed, 1 insertion(+)
kernel/gcov/Kconfig +1 -0
@@ -3,6 +3,7 @@ menu "GCOV-based kernel profiling" config GCOV_KERNEL bool "Enable gcov-based kernel profiling" depends on DEBUG_FS + depends on !CC_IS_GCC || GCC_VERSION < 100000 select CONSTRUCTORS if !UML default n ---help---
Signature · 1 line
2.25.1