Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion drivers/phy/apple/atc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5125,10 +5125,17 @@ int apple_atc_dp_tunnel_open(struct phy *phy)
{
struct apple_atcphy *atcphy;

if (!phy || phy->ops != &apple_atc_dp_phy_ops)
if (!phy)
return -EINVAL;
/*
* Everything but t600x has nothing to open, whichever driver provides
* the PHY: T6050's tunnel clocks belong to atc-t6050-dp.c, whose PHY
* this driver does not know, and start from the link rate alone.
*/
if (!apple_atc_tunnel_is_t600x())
return -EOPNOTSUPP;
if (phy->ops != &apple_atc_dp_phy_ops)
return -EINVAL;
atcphy = phy_get_drvdata(phy);
guard(mutex)(&atcphy->lock);
if (atcphy->mode != APPLE_ATCPHY_MODE_USB4 && atcphy->mode != APPLE_ATCPHY_MODE_TBT)
Expand Down
Loading