Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1187918ybf; Thu, 27 Feb 2020 06:31:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwQ4Ok9A3ORJdrMP5Mzs0QvS3InP5bxIMcfmBwdg/hcCV+tncLJZoWncCtVgfR2LjtJwSSm X-Received: by 2002:a9d:7305:: with SMTP id e5mr3497609otk.64.1582813915874; Thu, 27 Feb 2020 06:31:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582813915; cv=none; d=google.com; s=arc-20160816; b=H9E5UfS9s04PyLtj63ediBThQ/UNB3XR5PpqjcSOR4vp5QWPfi4j/WxUYbxe2rGR0S SLuEfnt+DLD8lQFRhRWZgqlFLQEF7o0pY/9pRWafXJsT6nf18rb2C2cWccTXn7nq/jaD KB54OaLi4OOXCZN/85h9g9t1/xpt1kBDggjCI1yA1V7QVGjdBEkf9EpPGSZPEaZuLqzi M0bl+xdPVNPZLpmK7jVZRIH8P5T/9EUsjsrVuPlNWJzEwmgWoNRzo6upsDH84NBt3T5E HOKBkBE5NWeCCqiEXzYBPuetRwnq7KKpXY9bVG0bOe3FI3oXUlYk/zhCq1NVdsaIXMcV eThQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZJfFfQ+9Vd0bXbDLPJRJgWW7oNO9hDttfhz8sHwJHGo=; b=Vi/EP5L2hexWmbmG+Q0LW/jEi/JvIF6ykwaNFlOdF4l2O2/YEwl34t0rretHH8Y6zU rwpm8VZ8e4UbkIVV/+A9RelPXztzZp95S9rwKymxl5vHSC7MAro/Ai970kMmtDp6kX/M TEPv+8IucP//k1U0DrBwZ2EemXTaYs3Jo4+vC9BfW9BH0ET94yVADFSrIVl987ePZMLs JrO7kQ7F84C/DUNhEJyeG3WuAbNHxrYk9H01dDOg1KboAbzKxHpR7kd2YsaQp+s3U5e7 5T9Gl9CX8fW0jID30BL4cXkijWBIR9cbOVseHXIjxh2Extc4hSc4c+MTjgbkzOnIDRin ueuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mxqKzLvF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si1785055otd.219.2020.02.27.06.31.43; Thu, 27 Feb 2020 06:31:55 -0800 (PST) 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=@kernel.org header.s=default header.b=mxqKzLvF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387436AbgB0ODb (ORCPT + 99 others); Thu, 27 Feb 2020 09:03:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:38700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732799AbgB0OD0 (ORCPT ); Thu, 27 Feb 2020 09:03:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB0CE20801; Thu, 27 Feb 2020 14:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812206; bh=1dC5urKLyx4Ej4vdN5+smR7Shc9uKC5GxkQhNUtbpes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mxqKzLvFbWyWfN6nmXEkPZ6PM9Q/fcy7J/AnjUuchWi/zDU5b+rYJopSb+QeSZxdr ibIesk0celX4KN/5hvMQvNPIflxL9mXygQ0guy0e2XjkntzA9SjLO7thIk/dApWrMX VcVaeWYgr0QJS2jBaZT2Y0NX6LTfDvF8z5VlVvBw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Jung Subject: [PATCH 4.19 09/97] USB: misc: iowarrior: add support for 2 OEMed devices Date: Thu, 27 Feb 2020 14:36:17 +0100 Message-Id: <20200227132216.103161673@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132214.553656188@linuxfoundation.org> References: <20200227132214.553656188@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman commit 461d8deb26a7d70254bc0391feb4fd8a95e674e8 upstream. Add support for two OEM devices that are identical to existing IO-Warrior devices, except for the USB device id. Cc: Christoph Jung Cc: stable Link: https://lore.kernel.org/r/20200212040422.2991-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/iowarrior.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c @@ -34,6 +34,10 @@ /* full speed iowarrior */ #define USB_DEVICE_ID_CODEMERCS_IOW56 0x1503 +/* OEMed devices */ +#define USB_DEVICE_ID_CODEMERCS_IOW24SAG 0x158a +#define USB_DEVICE_ID_CODEMERCS_IOW56AM 0x158b + /* Get a minor range for your devices from the usb maintainer */ #ifdef CONFIG_USB_DYNAMIC_MINORS #define IOWARRIOR_MINOR_BASE 0 @@ -137,6 +141,8 @@ static const struct usb_device_id iowarr {USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOWPV1)}, {USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOWPV2)}, {USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW56)}, + {USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24SAG)}, + {USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW56AM)}, {} /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, iowarrior_ids); @@ -361,6 +367,7 @@ static ssize_t iowarrior_write(struct fi } switch (dev->product_id) { case USB_DEVICE_ID_CODEMERCS_IOW24: + case USB_DEVICE_ID_CODEMERCS_IOW24SAG: case USB_DEVICE_ID_CODEMERCS_IOWPV1: case USB_DEVICE_ID_CODEMERCS_IOWPV2: case USB_DEVICE_ID_CODEMERCS_IOW40: @@ -375,6 +382,7 @@ static ssize_t iowarrior_write(struct fi goto exit; break; case USB_DEVICE_ID_CODEMERCS_IOW56: + case USB_DEVICE_ID_CODEMERCS_IOW56AM: /* The IOW56 uses asynchronous IO and more urbs */ if (atomic_read(&dev->write_busy) == MAX_WRITES_IN_FLIGHT) { /* Wait until we are below the limit for submitted urbs */ @@ -499,6 +507,7 @@ static long iowarrior_ioctl(struct file switch (cmd) { case IOW_WRITE: if (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW24 || + dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW24SAG || dev->product_id == USB_DEVICE_ID_CODEMERCS_IOWPV1 || dev->product_id == USB_DEVICE_ID_CODEMERCS_IOWPV2 || dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW40) { @@ -782,7 +791,8 @@ static int iowarrior_probe(struct usb_in goto error; } - if (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56) { + if ((dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56) || + (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56AM)) { res = usb_find_last_int_out_endpoint(iface_desc, &dev->int_out_endpoint); if (res) { @@ -795,7 +805,8 @@ static int iowarrior_probe(struct usb_in /* we have to check the report_size often, so remember it in the endianness suitable for our machine */ dev->report_size = usb_endpoint_maxp(dev->int_in_endpoint); if ((dev->interface->cur_altsetting->desc.bInterfaceNumber == 0) && - (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56)) + ((dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56) || + (dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56AM))) /* IOWarrior56 has wMaxPacketSize different from report size */ dev->report_size = 7;