Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5843210imm; Mon, 23 Jul 2018 07:03:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf333M3YN6ab6zRlI4IjN2zsMhCcqBKnaWjvLFDmZjOgC1ZOxrKa5YPYNLjbY2UReuLeki/ X-Received: by 2002:a17:902:a5:: with SMTP id a34-v6mr13269789pla.60.1532354621176; Mon, 23 Jul 2018 07:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532354621; cv=none; d=google.com; s=arc-20160816; b=Z3THxYvK1l4UyD5baiA+3mIUNQY5V8Yu8pkb5jVVD83RrVCqeRVU2JFFN+A/zj4Wug TT0/7BD26VbysW7jpWvHS6qaBZmBero4Nlsqzf9JpyBDOGpgUKXuQwvI/Pj/2yQmB1c7 6zkci9fXCao0/GCtMTt7GRbmLIJLO3OkH0Z8O5Wc7lxVqpa+ucS8lmmPKnjljpH9s4Gu Etb9s3vqLq2dryhWIQqwInzxJNF/fm5bkTnwoNG5lq+hZUOsvL020U2LeTMEFmIMbdMO xFtzoKhzX09CltokgxbB/2E7Qnaimx0rIHj/3s1BtMdvVRAhGpZiDtJNAxXnEXEyR01C bIsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=RuY+J0ywTOfTfenYrSZTZk7BFYeQMS8+A6ZswvghFL4=; b=bFWgF0/MMLzzJ0HoLb6GMFg+hm9l2lN1eSQtL6Rfe5scUSRj4I1v+CcHkSKoh9i8Vc 8ZbhisR4sYGnJZKXJRsmJFgngYV7EQs8LIo28JUrlg0h5Yp/JOOeYm+MIYUwdf4oxaWw //tuNzzhb2W7+eQzNSyNk2yPsAOf8bhifP2QA5XixqZoR9r3ApJHPi0+9w1B5RRLh7Ub 4Gse0Zxtji/KCqkeyqCp8ULBvYN9XcYZN5feL3UWkqHtD0g3w2tQQUJrl0O6DtJfMkLO bQyisEM/FAbbzOHz9QuwnDYRgjinHT/2KglU6E70yL0EGZDl+ZAoBJjaCx/ry51UWb/Y yIuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tjymxdgo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5-v6si10277023pln.414.2018.07.23.07.03.26; Mon, 23 Jul 2018 07:03:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tjymxdgo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388297AbeGWPDw (ORCPT + 99 others); Mon, 23 Jul 2018 11:03:52 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39324 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387999AbeGWPDw (ORCPT ); Mon, 23 Jul 2018 11:03:52 -0400 Received: by mail-wr1-f66.google.com with SMTP id h10-v6so836552wre.6; Mon, 23 Jul 2018 07:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RuY+J0ywTOfTfenYrSZTZk7BFYeQMS8+A6ZswvghFL4=; b=TjymxdgoZ5nMTTw0mPa9EKsZRi80OqE2Ba6VARETaidSn11rp/YQmcHbcPHRlw/E73 F4xVPK3w+QMHZ7d3tjd0i3a4LYkrqfe/4ecQrw0w1w1S7NRZtrj5IxFGwto/ef62Q0Yl /tMDBxX9plo+/+1MCdWrv/7FwbYkLTMgZjMyTs7Y1krKPOTjgaHpv4Z5yaQfIq2TdYAA 5dv38ijX/ubDSo7kqjNww5h2q++RSdQozU33iffO5TM/kfrt4LxnzlVXXyUCQo4LjMZW 5ly1Hf0bE7x8fJDzhWnxVZqcB6o0alPhTX0JoinCdVltOMZ+X+KN6aFEYCdBmOoKrUSy 58oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RuY+J0ywTOfTfenYrSZTZk7BFYeQMS8+A6ZswvghFL4=; b=SnfrxiK4Uek7IkTtVLuphqnZjqYZrUqDDXkGB3EC9/dnNn0etvHpL4OKTCmGn/wUl/ qtrun2BeZiRhsSfiqNpSjPJm8zTQ8bzXnzWjk5c5jmxgpX78LidaX0wYfr06y3XYPXgE oWLa7ke2uQmTfDnExArG2xoY8j3Me+73kydm5ED5pabL0qqoDnZvWbtYhznjiwQgwZcX TQSLKyFL1MVdv5R/4haH+qXn6hde8lwkbV6blciwEF62Z4E3mf+Yfrayoywvtl7X89eI rXX8eDaHL0We8uEaDNKJfHGmpcjlxuz19ITjtQoUX1Lf+AWnJu5J3YS9jQ7ihj61xp6o qtzg== X-Gm-Message-State: AOUpUlHitvkZHMhui/XXPe5UBcuY7ZR+svkGhaXfDBmNaznbC9+xp1zB NO9O4AG5SWif+QstNrh2W1I= X-Received: by 2002:adf:bf10:: with SMTP id p16-v6mr8400323wrh.235.1532354546887; Mon, 23 Jul 2018 07:02:26 -0700 (PDT) Received: from localhost.localdomain (static-css-cqn-143221.business.bouyguestelecom.com. [176.149.143.221]) by smtp.gmail.com with ESMTPSA id r16-v6sm4085961wru.59.2018.07.23.07.02.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 07:02:26 -0700 (PDT) From: Romain Izard To: Johan Hovold , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Romain Izard , stable Subject: [PATCH] option: Do not try to bind to ADB interfaces Date: Mon, 23 Jul 2018 16:02:20 +0200 Message-Id: <20180723140220.7166-1-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some modems now use the Android Debug Bridge to provide a debugging interface, and some phones can also export serial ports managed by the "option" driver. The ADB daemon running in userspace tries to use USB interfaces with bDeviceClass=0xFF, bDeviceSubClass=0x42, bDeviceProtocol=1 Prevent the option driver from binding to those interfaces, as they will not be serial ports. This can fix issues like: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781256 Signed-off-by: Romain Izard Cc: stable --- drivers/usb/serial/option.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 664e61f16b6a..f98943a57ff0 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1987,6 +1987,12 @@ static int option_probe(struct usb_serial *serial, if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE) return -ENODEV; + /* Do not bind Android Debug Bridge interfaces */ + if (iface_desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC && + iface_desc->bInterfaceSubClass == 0x42 && + iface_desc->bInterfaceProtocol == 1) + return -ENODEV; + /* * Don't bind reserved interfaces (like network ones) which often have * the same class/subclass/protocol as the serial interfaces. Look at -- 2.17.1