Skip to content

Commit e2bca0e

Browse files
committed
Merge tag 'usb-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are 2 small USB driver fixes that resolve some reported regressions and one new device quirk. Specifically these are: - new quirk for Alcor Link AK9563 smartcard reader - revert of u_ether gadget change in 6.2-rc1 that caused problems - typec pin probe fix All of these have been in linux-next with no reported problems" * tag 'usb-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: core: add quirk for Alcor Link AK9563 smartcard reader usb: typec: altmodes/displayport: Fix probe pin assign check Revert "usb: gadget: u_ether: Do not make UDC parent of the net device"
2 parents dd78af9 + 303e724 commit e2bca0e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

drivers/usb/core/quirks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ static const struct usb_device_id usb_quirk_list[] = {
526526
/* DJI CineSSD */
527527
{ USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
528528

529+
/* Alcor Link AK9563 SC Reader used in 2022 Lenovo ThinkPads */
530+
{ USB_DEVICE(0x2ce3, 0x9563), .driver_info = USB_QUIRK_NO_LPM },
531+
529532
/* DELL USB GEN2 */
530533
{ USB_DEVICE(0x413c, 0xb062), .driver_info = USB_QUIRK_NO_LPM | USB_QUIRK_RESET_RESUME },
531534

drivers/usb/gadget/function/u_ether.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g,
798798
net->max_mtu = GETHER_MAX_MTU_SIZE;
799799

800800
dev->gadget = g;
801+
SET_NETDEV_DEV(net, &g->dev);
801802
SET_NETDEV_DEVTYPE(net, &gadget_type);
802803

803804
status = register_netdev(net);
@@ -872,6 +873,8 @@ int gether_register_netdev(struct net_device *net)
872873
struct usb_gadget *g;
873874
int status;
874875

876+
if (!net->dev.parent)
877+
return -EINVAL;
875878
dev = netdev_priv(net);
876879
g = dev->gadget;
877880

@@ -902,6 +905,7 @@ void gether_set_gadget(struct net_device *net, struct usb_gadget *g)
902905

903906
dev = netdev_priv(net);
904907
dev->gadget = g;
908+
SET_NETDEV_DEV(net, &g->dev);
905909
}
906910
EXPORT_SYMBOL_GPL(gether_set_gadget);
907911

drivers/usb/typec/altmodes/displayport.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,10 @@ int dp_altmode_probe(struct typec_altmode *alt)
535535
/* FIXME: Port can only be DFP_U. */
536536

537537
/* Make sure we have compatiple pin configurations */
538-
if (!(DP_CAP_DFP_D_PIN_ASSIGN(port->vdo) &
539-
DP_CAP_UFP_D_PIN_ASSIGN(alt->vdo)) &&
540-
!(DP_CAP_UFP_D_PIN_ASSIGN(port->vdo) &
541-
DP_CAP_DFP_D_PIN_ASSIGN(alt->vdo)))
538+
if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
539+
DP_CAP_PIN_ASSIGN_UFP_D(alt->vdo)) &&
540+
!(DP_CAP_PIN_ASSIGN_UFP_D(port->vdo) &
541+
DP_CAP_PIN_ASSIGN_DFP_D(alt->vdo)))
542542
return -ENODEV;
543543

544544
ret = sysfs_create_group(&alt->dev.kobj, &dp_altmode_group);

0 commit comments

Comments
 (0)