From 937f3aec5babcad441987c84d8b8b95c5ea40f3f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 11 Oct 2012 20:17:32 +0200 Subject: [PATCH] Don't try calling SIOCETHTOOL on UDS. Signed-off-by: Miroslav Lichvar --- port.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/port.c b/port.c index 77a5212..fe7ece4 100644 --- a/port.c +++ b/port.c @@ -1670,7 +1670,9 @@ struct port *port_open(int phc_index, memset(p, 0, sizeof(*p)); - if (sk_interface_phc(interface->name, &checked_phc_index)) + if (interface->transport == TRANS_UDS) + ; /* UDS cannot have a PHC. */ + else if (sk_interface_phc(interface->name, &checked_phc_index)) pr_warning("port %d: get_ts_info not supported", number); else if (phc_index >= 0 && phc_index != checked_phc_index) { pr_err("port %d: PHC device mismatch", number);