arm64: dts: qcom: c630: disable crypto due to serror
Subsystems (9)
Sasha Levin
maintainerPATCH 1/13 arm64: dts: qcom: c630: disable crypto due to serror
From: Steev Klimaszewski <[email protected]>
[ Upstream commit 382e3e0eb6a83f1cf73d4dfa3448ade1ed721f22 ]
Disable the crypto block due to it causing an SError in qce_start() on the C630, which happens upon every boot when cryptomanager tests are enabled.
--- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +5 -0
@@ -804,3 +804,8 @@ &wifi { qcom,snoc-host-cap-8bit-quirk; }; + +&crypto { + /* FIXME: qce_start triggers an SError */ + status= "disable"; +};
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 2/13 HID: logitech-dj: add new lightspeed receiver id
From: Lucas Zampieri <[email protected]>
[ Upstream commit 25666e8ccd952627899b09b68f7c9b68cfeaf028 ]
As of logitech lightspeed receiver fw version 04.02.B0009, HIDPP_PARAM_DEVICE_INFO is being reported as 0x11.
With patch "HID: logitech-dj: add support for the new lightspeed receiver iteration", the mouse starts to error out with:
logitech-djreceiver: unusable device of type UNKNOWN (0x011) connected on slot 1
and becomes unusable.
This has been noticed on a Logitech G Pro X Superlight fw MPM 25.01.B0018.
--- drivers/hid/hid-logitech-dj.c | 1 + 1 file changed, 1 insertion(+)
drivers/hid/hid-logitech-dj.c +1 -0
@@ -1068,6 +1068,7 @@ static void logi_hidpp_recv_queue_notif(struct hid_device *hdev, workitem.reports_supported |=STD_KEYBOARD ;break ;case 0x0f : +case 0x11 : device_type ="eQUAD Lightspeed 1.2" ;logi_hidpp_dev_conn_notif_equad (hdev, hidpp_report, &workitem); workitem.reports_supported |=STD_KEYBOARD ;
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 3/13 HID: Add support for open wheel and no attachment to T300
In reply to Sasha LevinFrom: Michael Hübner <[email protected]>
[ Upstream commit 0a5a587501b54e8c6d86960b047d4491fd40dcf2 ]
Different add ons to the wheel base report different models. Having no wheel mounted to the base and using the open wheel attachment is added here.
--- drivers/hid/hid-thrustmaster.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hid/hid-thrustmaster.c +2 -0
@@ -64,7 +64,9 @@ struct tm_wheel_info {*/ static const struct tm_wheel_info tm_wheels_infos[] = { {0x0306 ,0x0006 ,"Thrustmaster T150RS" }, + {0x0200 ,0x0005 ,"Thrustmaster T300RS (Missing Attachment)" }, {0x0206 ,0x0005 ,"Thrustmaster T300RS" }, + {0x0209 ,0x0005 ,"Thrustmaster T300RS (Open Wheel Attachment)" }, {0x0204 ,0x0005 ,"Thrustmaster T300 Ferrari Alcantara Edition" }, {0x0002 ,0x0002 ,"Thrustmaster T500RS" }//{0x0407, 0x0001, "Thrustmaster TMX"}
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 4/13 xfrm: fix tunnel model fragmentation behavior
In reply to Sasha LevinFrom: Lina Wang <[email protected]>
[ Upstream commit 4ff2980b6bd2aa6b4ded3ce3b7c0ccfab29980af ]
in tunnel mode, if outer interface(ipv4) is less, it is easily to let inner IPV6 mtu be less than 1280. If so, a Packet Too Big ICMPV6 message is received. When send again, packets are fragmentized with 1280, they are still rejected with ICMPV6(Packet Too Big) by xfrmi_xmit2().
According to RFC4213 Section3.2.2:
if (IPv4 path MTU - 20) is less than 1280
if packet is larger than 1280 bytes
Send ICMPv6 "packet too big" with MTU=1280 Drop packet
else
Encapsulate but do not set the Don't Fragment flag in the IPv4 header. The resulting IPv4 packet might be fragmented by the IPv4 layer on the encapsulator or by some router along the IPv4 path.
endif
else
if packet is larger than (IPv4 path MTU - 20)
Send ICMPv6 "packet too big" with
MTU = (IPv4 path MTU - 20).
Drop packet.
else
Encapsulate and set the Don't Fragment flag in the IPv4 header.
endif
endif
Packets should be fragmentized with ipv4 outer interface, so change it.
After it is fragemtized with ipv4, there will be double fragmenation. No.48 & No.51 are ipv6 fragment packets, No.48 is double fragmentized, then tunneled with IPv4(No.49& No.50), which obey spec. And received peer cannot decrypt it rightly.
48 2002::10 2002::11 1296(length) IPv6 fragment (off=0 more=y ident=0xa20da5bc nxt=50) 49 0x0000 (0) 2002::10 2002::11 1304 IPv6 fragment (off=0 more=y ident=0x7448042c nxt=44) 50 0x0000 (0) 2002::10 2002::11 200 ESP (SPI=0x00035000) 51 2002::10 2002::11 180 Echo (ping) request 52 0x56dc 2002::10 2002::11 248 IPv6 fragment (off=1232 more=n ident=0xa20da5bc nxt=50)
xfrm6_noneed_fragment has fixed above issues. Finally, it acted like below:
1 0x6206 192.168.1.138 192.168.1.1 1316 Fragmented IP protocol (proto=Encap Security Payload 50, off=0, ID=6206) [Reassembled in #2] 2 0x6206 2002::10 2002::11 88 IPv6 fragment (off=0 more=y ident=0x1f440778 nxt=50) 3 0x0000 2002::10 2002::11 248 ICMPv6 Echo (ping) request
--- net/ipv6/xfrm6_output.c | 16 ++++++++++++++++ net/xfrm/xfrm_interface.c | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-)
net/ipv6/xfrm6_output.c +16 -0
@@ -45,6 +45,19 @@ static int __xfrm6_output_finish(struct net *net, struct sock *sk, struct sk_bufreturn xfrm_output (sk, skb); } +static int xfrm6_noneed_fragment (struct sk_buff *skb) +{ +struct frag_hdr *fh; +u8 prevhdr =ipv6_hdr (skb)->nexthdr; + +if (prevhdr !=NEXTHDR_FRAGMENT ) +return 0 ; + fh = (struct frag_hdr *)(skb->data +sizeof (struct ipv6hdr )); +if (fh->nexthdr ==NEXTHDR_ESP || fh->nexthdr ==NEXTHDR_AUTH ) +return 1 ; +return 0 ; +} +static int __xfrm6_output (struct net *net,struct sock *sk,struct sk_buff *skb) {struct dst_entry *dst =skb_dst (skb);
@@ -73,6 +86,9 @@ static int __xfrm6_output(struct net *net, struct sock *sk, struct sk_buff *skb)xfrm6_local_rxpmtu (skb, mtu);kfree_skb (skb);return -EMSGSIZE ; + }else if (toobig &&xfrm6_noneed_fragment (skb)) { + skb->ignore_df =1 ; + goto skip_frag; }else if (!skb->ignore_df && toobig && skb->sk) {xfrm_local_error (skb, mtu);kfree_skb (skb);
net/xfrm/xfrm_interface.c +4 -1
@@ -304,7 +304,10 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)if (mtu <IPV6_MIN_MTU ) mtu =IPV6_MIN_MTU ; -icmpv6_ndo_send (skb,ICMPV6_PKT_TOOBIG ,0 , mtu); +if (skb->len >1280 ) +icmpv6_ndo_send (skb,ICMPV6_PKT_TOOBIG ,0 , mtu); +else + goto xmit; }else {if (!(ip_hdr (skb)->frag_off &htons (IP_DF ))) goto xmit;
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 5/13 ARM: mstar: Select HAVE_ARM_ARCH_TIMER
In reply to Sasha LevinFrom: Daniel Palmer <[email protected]>
[ Upstream commit ea49432d184a6a09f84461604b7711a4e9f5ec9c ]
The mstar SoCs have an arch timer but HAVE_ARM_ARCH_TIMER wasn't selected. If MSC313E_TIMER isn't selected then the kernel gets stuck at boot because there are no timers available.
--- arch/arm/mach-mstar/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-mstar/Kconfig +1 -0
@@ -3,6 +3,7 @@ menuconfig ARCH_MSTARV7 depends on ARCH_MULTI_V7 select ARM_GIC select ARM_HEAVY_MB + select HAVE_ARM_ARCH_TIMER select MST_IRQ select MSTAR_MSC313_MPLL help
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 6/13 virtio_console: break out of buf poll on remove
In reply to Sasha LevinFrom: "Michael S. Tsirkin" <[email protected]>
[ Upstream commit 0e7174b9d5877130fec41fb4a16e0c2ee4958d44 ]
A common pattern for device reset is currently:vdev->config->reset(vdev);
.. cleanup ..
reset prevents new interrupts from arriving and waits for interrupt handlers to finish.
However if - as is common - the handler queues a work request which is flushed during the cleanup stage, we have code adding buffers / trying to get buffers while device is reset. Not good.
This was reproduced by running
modprobe virtio_console
modprobe -r virtio_console
in a loop.
Fix this up by calling virtio_break_device + flush before reset.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1786239
--- drivers/char/virtio_console.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/char/virtio_console.c +7 -0
@@ -1957,6 +1957,13 @@ static void virtcons_remove(struct virtio_device *vdev)list_del (&portdev->list);spin_unlock_irq (&pdrvdata_lock); +/* Device is going away, exit any polling for buffers */ +virtio_break_device (vdev); +if (use_multiport (portdev)) +flush_work (&portdev->control_work); +else +flush_work (&portdev->config_work); +/* Disable interrupts for vqs */ vdev->config->reset (vdev);/* Finish up work that's lined up */
Signature · 6 lines
2.34.1 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Sasha Levin
maintainerPATCH 7/13 vdpa/mlx5: should verify CTRL_VQ feature exists for MQ
In reply to Sasha LevinFrom: Si-Wei Liu <[email protected]>
[ Upstream commit 30c22f3816ffef8aa21a000e93c4ee1402a6ea65 ]
Per VIRTIO v1.1 specification, section 5.1.3.1 Feature bit requirements:
"VIRTIO_NET_F_MQ Requires VIRTIO_NET_F_CTRL_VQ".
There's assumption in the mlx5_vdpa multiqueue code that MQ must come together with CTRL_VQ. However, there's nowhere in the upper layer to guarantee this assumption would hold. Were there an untrusted driver sending down MQ without CTRL_VQ, it would compromise various spots for e.g. is_index_valid() and is_ctrl_vq_idx(). Although this doesn't end up with immediate panic or security loophole as of today's code, the chance for this to be taken advantage of due to future code change is not zero.
Harden the crispy assumption by failing the set_driver_features() call when seeing (MQ && !CTRL_VQ). For that end, verify_min_features() is renamed to verify_driver_features() to reflect the fact that it now does more than just validate the minimum features. verify_driver_features() is now used to accommodate various checks against the driver features for set_driver_features().
--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +16 -2
@@ -1900,11 +1900,25 @@ static u64 mlx5_vdpa_get_features(struct vdpa_device *vdev)return ndev->mvdev.mlx_features; } -static int verify_min_features (struct mlx5_vdpa_dev *mvdev,u64 features) +static int verify_driver_features (struct mlx5_vdpa_dev *mvdev,u64 features) { +/* Minimum features to expect */ if (!(features &BIT_ULL (VIRTIO_F_ACCESS_PLATFORM )))return -EOPNOTSUPP ; +/* Double check features combination sent down by the driver. +* Fail invalid features due to absence of the depended feature. +* +* Per VIRTIO v1.1 specification, section 5.1.3.1 Feature bit +* requirements: "VIRTIO_NET_F_MQ Requires VIRTIO_NET_F_CTRL_VQ". +* By failing the invalid features sent down by untrusted drivers, +* we're assured the assumption made upon is_index_valid() and +* is_ctrl_vq_idx() will not be compromised. +*/ +if ((features & (BIT_ULL (VIRTIO_NET_F_MQ ) |BIT_ULL (VIRTIO_NET_F_CTRL_VQ ))) == +BIT_ULL (VIRTIO_NET_F_MQ )) +return -EINVAL ; +return 0 ; }
@@ -1980,7 +1994,7 @@ static int mlx5_vdpa_set_features(struct vdpa_device *vdev, u64 features)print_features (mvdev, features, true); - err =verify_min_features (mvdev, features); + err =verify_driver_features (mvdev, features);if (err)return err;
Signature · 6 lines
2.34.1 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Sasha Levin
maintainerPATCH 8/13 Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
In reply to Sasha LevinFrom: Kai Lueke <[email protected]>
[ Upstream commit a3d9001b4e287fc043e5539d03d71a32ab114bcb ]
This reverts commit 68ac0f3810e76a853b5f7b90601a05c3048b8b54 because ID 0 was meant to be used for configuring the policy/state without matching for a specific interface (e.g., Cilium is affected, see
https://github.com/cilium/cilium/pull/18789 and
https://github.com/cilium/cilium/pull/19019).
--- net/xfrm/xfrm_user.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-)
net/xfrm/xfrm_user.c +3 -18
@@ -629,13 +629,8 @@ static struct xfrm_state *xfrm_state_construct(struct net *net,xfrm_smark_init (attrs, &x->props.smark); -if (attrs[XFRMA_IF_ID ]) { +if (attrs[XFRMA_IF_ID ]) x->if_id =nla_get_u32 (attrs[XFRMA_IF_ID ]); -if (!x->if_id) { - err = -EINVAL ; - goto error; - } - } err =__xfrm_init_state (x, false, attrs[XFRMA_OFFLOAD_DEV ]);if (err)
@@ -1431,13 +1426,8 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, mark =xfrm_mark_get (attrs, &m); -if (attrs[XFRMA_IF_ID ]) { +if (attrs[XFRMA_IF_ID ]) if_id =nla_get_u32 (attrs[XFRMA_IF_ID ]); -if (!if_id) { - err = -EINVAL ; - goto out_noput; - } - }if (p->info.seq) { x =xfrm_find_acq_byseq (net, mark, p->info.seq);
@@ -1750,13 +1740,8 @@ static struct xfrm_policy *xfrm_policy_construct(struct net *net, struct xfrm_usxfrm_mark_get (attrs, &xp->mark); -if (attrs[XFRMA_IF_ID ]) { +if (attrs[XFRMA_IF_ID ]) xp->if_id =nla_get_u32 (attrs[XFRMA_IF_ID ]); -if (!xp->if_id) { - err = -EINVAL ; - goto error; - } - }return xp; error:
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 9/13 tools/virtio: fix virtio_test execution
In reply to Sasha LevinFrom: Stefano Garzarella <[email protected]>
[ Upstream commit 32f1b53fe8f03d962423ba81f8e92af5839814da ]
virtio_test hangs on __vring_new_virtqueue() because vqs_list_lock is not initialized.
Let's initialize it in vdev_info_init().
--- tools/virtio/virtio_test.c | 1 + 1 file changed, 1 insertion(+)
tools/virtio/virtio_test.c +1 -0
@@ -130,6 +130,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features)memset (dev,0 ,sizeof *dev); dev->vdev.features = features;INIT_LIST_HEAD (&dev->vdev.vqs); +spin_lock_init (&dev->vdev.vqs_list_lock); dev->buf_size =1024 ; dev->buf =malloc (dev->buf_size);assert (dev->buf);
Signature · 6 lines
2.34.1 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Sasha Levin
maintainerPATCH 10/13 ethernet: sun: Free the coherent when failing in probing
In reply to Sasha LevinFrom: Zheyu Ma <[email protected]>
[ Upstream commit bb77bd31c281f70ec77c9c4f584950a779e05cf8 ]
When the driver fails to register net device, it should free the DMA region first, and then do other cleanup.
--- drivers/net/ethernet/sun/sunhme.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/sun/sunhme.c +5 -1
@@ -3146,7 +3146,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,if (err) {printk (KERN_ERR "happymeal(PCI): Cannot register net device, " "aborting.\n" ); - goto err_out_iounmap; + goto err_out_free_coherent; }pci_set_drvdata (pdev, hp);
@@ -3179,6 +3179,10 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,return 0 ; +err_out_free_coherent: +dma_free_coherent (hp->dma_dev,PAGE_SIZE , + hp->happy_block, hp->hblock_dvma); + err_out_iounmap:iounmap (hp->gregs);
Signature · 1 line
2.34.1
Sasha Levin
maintainerPATCH 11/13 gpio: Revert regression in sysfs-gpio (gpiolib.c)
In reply to Sasha LevinFrom: Marcelo Roberto Jimenez <[email protected]>
[ Upstream commit fc328a7d1fcce263db0b046917a66f3aa6e68719 ]
Some GPIO lines have stopped working after the patch
commit 2ab73c6d8323f ("gpio: Support GPIO controllers without pin-ranges")
And this has supposedly been fixed in the following patches commit 89ad556b7f96a ("gpio: Avoid using pin ranges with !PINCTRL") commit 6dbbf84603961 ("gpiolib: Don't free if pin ranges are not defined")
But an erratic behavior where some GPIO lines work while others do not work has been introduced.
This patch reverts those changes so that the sysfs-gpio interface works properly again.
--- drivers/gpio/gpiolib.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpio/gpiolib.c +0 -10
@@ -1665,11 +1665,6 @@ static inline void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gc)*/ int gpiochip_generic_request (struct gpio_chip *gc,unsigned int offset) { -#ifdef CONFIG_PINCTRL -if (list_empty (&gc->gpiodev->pin_ranges)) -return 0 ; -#endif -return pinctrl_gpio_request (gc->gpiodev->base + offset); }EXPORT_SYMBOL_GPL (gpiochip_generic_request);
@@ -1681,11 +1676,6 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_request);*/ void gpiochip_generic_free (struct gpio_chip *gc,unsigned int offset) { -#ifdef CONFIG_PINCTRL -if (list_empty (&gc->gpiodev->pin_ranges)) -return ; -#endif -pinctrl_gpio_free (gc->gpiodev->base + offset); }EXPORT_SYMBOL_GPL (gpiochip_generic_free);
Signature · 1 line
2.34.1
Re: [PATCH AUTOSEL 5.16 11/13] gpio: Revert regression in sysfs-gpio (gpiolib.c)
Quoted 14 lines · Sasha Levin
From: Marcelo Roberto Jimenez <[email protected]>
[ Upstream commit
fc328a7d1fcce263db0b046917a66f3aa6e68719]Some GPIO lines have stopped working after the patch
commit2ab73c6d8323f("gpio: Support GPIO controllers without pin-ranges")And this has supposedly been fixed in the following patches commit
89ad556b7f96a("gpio: Avoid using pin ranges with !PINCTRL") commit6dbbf84603961("gpiolib: Don't free if pin ranges are not defined")But an erratic behavior where some GPIO lines work while others do not work has been introduced.
Quoted 6 lines
This patch reverts those changes so that the sysfs-gpio interface works properly again.
Signed-off-by Marcelo Roberto Jimenez <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>Signed-off-by Sasha Levin <[email protected]>
I think you should not apply this for stable, because we will revert the revert.
Yours,
Linus Walleij
Sasha Levin
maintainerPATCH 12/13 spi: Fix invalid sgs value
In reply to Sasha LevinFrom: Biju Das <[email protected]>
[ Upstream commit 1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d ]
max_seg_size is unsigned int and it can have a value up to 2^32 (for eg:-RZ_DMAC driver sets dma_set_max_seg_size as U32_MAX) When this value is used in min_t() as an integer type, it becomes -1 and the value of sgs becomes 0.
Fix this issue by replacing the 'int' data type with 'unsigned int' in min_t().
--- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi.c +2 -2
@@ -1021,10 +1021,10 @@ int spi_map_buf(struct spi_controller *ctlr, struct device *dev,int i, ret;if (vmalloced_buf || kmap_buf) { - desc_len =min_t (int, max_seg_size,PAGE_SIZE ); + desc_len = min_t(unsigned int, max_seg_size, PAGE_SIZE); sgs =DIV_ROUND_UP (len +offset_in_page (buf), desc_len); }else if (virt_addr_valid (buf)) { - desc_len =min_t (int, max_seg_size, ctlr->max_dma_len); + desc_len = min_t(unsigned int, max_seg_size, ctlr->max_dma_len); sgs =DIV_ROUND_UP (len, desc_len); }else {return -EINVAL ;
Signature · 1 line
2.34.1
Re: [PATCH AUTOSEL 5.16 12/13] spi: Fix invalid sgs value
Hi Sasha,
Quoted 3 lines · Sasha Levin
From: Biju Das <[email protected]>
[ Upstream commit
1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d]
This commit is not 100% correct, cfr.
https://lore.kernel.org/lkml/CAHk-=wiZnS6n1ROQg3FHd=bcVTHi-sKutKT+toiViQEH47ZACg@mail.gmail.com
Please postpone backporting until the issue has been resolved.
Quoted 26 lines
max_seg_sizeis unsigned int and it can have a value up to 2^32 (for eg:-RZ_DMAC driver setsdma_set_max_seg_sizeasU32_MAX) When this value is used inmin_t()as an integer type, it becomes -1 and the value of sgs becomes 0.Fix this issue by replacing the 'int' data type with 'unsigned int' in
min_t().Signed-off-by Biju Das <[email protected]>Reviewed-by Lad Prabhakar <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Mark Brown <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/spi/spi.c +0
-0@@ -1021,10 +1021,10 @@ int spi_map_buf(struct spi_controller *ctlr, struct device *dev,int i, ret;
drivers/spi/spi.c int spi_map_buf(struct spi_controller *ctlr, struct device *dev, · line 1030
Quoted 10 lines
drivers/spi/spi.c +2
-2if (vmalloced_buf || kmap_buf) { - desc_len =min_t (int, max_seg_size,PAGE_SIZE ); + desc_len = min_t(unsigned int, max_seg_size, PAGE_SIZE); sgs =DIV_ROUND_UP (len +offset_in_page (buf), desc_len); }else if (virt_addr_valid (buf)) { - desc_len =min_t (int, max_seg_size, ctlr->max_dma_len); + desc_len = min_t(unsigned int, max_seg_size, ctlr->max_dma_len); sgs =DIV_ROUND_UP (len, desc_len); }else {return -EINVAL ;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Sasha Levin
maintainerRe: [PATCH AUTOSEL 5.16 12/13] spi: Fix invalid sgs value
Quoted 10 lines · Geert Uytterhoeven
Hi Sasha,
Quoted 3 lines · Sasha Levin
From: Biju Das <[email protected]>
[ Upstream commit
1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d]This commit is not 100% correct, cfr.
https://lore.kernel.org/lkml/CAHk-=wiZnS6n1ROQg3FHd=bcVTHi-sKutKT+toiViQEH47ZACg@mail.gmail.com
Please postpone backporting until the issue has been resolved.
Will check back in a week, thanks!
Signature · 2 lines
Thanks, Sasha
Sasha Levin
maintainerPATCH 13/13 net:mcf8390: Use platform_get_irq() to get the interrupt
In reply to Sasha LevinFrom: "Minghao Chi (CGEL ZTE)" <[email protected]>
[ Upstream commit 2a760554dcba450d3ad61b32375b50ed6d59a87c ]
It is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ) for requesting IRQ's resources any more, as they can be not ready yet in case of DT-booting.
platform_get_irq() instead is a recommended way for getting IRQ even if it was not retrieved earlier.
It also makes code simpler because we're getting "int" value right away and no conversion from resource to int is required.
--- drivers/net/ethernet/8390/mcf8390.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/ethernet/8390/mcf8390.c +5 -5
@@ -405,12 +405,12 @@ static int mcf8390_init(struct net_device *dev)static int mcf8390_probe (struct platform_device *pdev) {struct net_device *dev; -struct resource *mem, *irq; +struct resource *mem;resource_size_t msize; -int ret; +int ret, irq; - irq =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); -if (irq ==NULL ) { + irq =platform_get_irq (pdev,0 ); +if (irq <0 ) {dev_err (&pdev->dev,"no IRQ specified?\n" );return -ENXIO ; }
@@ -433,7 +433,7 @@ static int mcf8390_probe(struct platform_device *pdev)SET_NETDEV_DEV (dev, &pdev->dev);platform_set_drvdata (pdev, dev); - dev->irq = irq->start; + dev->irq = irq; dev->base_addr = mem->start; ret =mcf8390_init (dev);
Signature · 1 line
2.34.1