From patchwork Tue Mar 26 15:07:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13604384 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE7CB763E2 for ; Tue, 26 Mar 2024 15:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466218; cv=none; b=k2HDGShha9JM5xlKdkPM/pF3QT5l1YWNmKxAHtH719atBRy7Cxzs314qpTfWCf10Exex2Otl1hY0F8c8u9aN59M7JlUiJU8cS+6Yjk3gofJaBUlja33ffoyiEyzh6mf5EyI5xzSpGo38qpRlCbO9C1KtkLgS+rpL7JCT2g9+Myo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466218; c=relaxed/simple; bh=25ja3x1kQAuuG/+Mw5q9lfNzi/huiNF/DdwRwMOVgBE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gmhgH9c2w2ARm6ai3boqTZvTBN6w0KDJjTq/IsMseldceqTz2zVkNRvOP6EDp2auwpXWxsoIGWTZCIRQ/XHQfmDAOwzFQ768UkJ6AwnEBfGFV4jlkPyVe+uPuo9BBKoLjo+eXNbkolVXxuJcpkZXt43BSGDh+AgOdixskktBRd8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZsIHJmz8; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZsIHJmz8" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6ea9a605ca7so1772756b3a.0 for ; Tue, 26 Mar 2024 08:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711466216; x=1712071016; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IrHyqXf79MEy0OV9vghuoVFTPea/Hzd4//h2fdHZj2M=; b=ZsIHJmz8OAvr27o1gxTKPMxKf/cBHAjFShiv44kHZALaP9+yjGneietaYmn9g3ZPWL X7wdyj529N7cehdeF7Hnau2avrcrtlBswDqFEwVVnvv6LJO7tQ5kgeqKfgAcOgayNZvZ +OCQvTaMknWJb3yOxTrK8sU36GL/Vw8yfgYNFY3qu0X75yRx+qbkR+VPVO2SbOe5cGPO vI8qE18HT/BOUzw2HXXfjPm2uI9ROS8pg0wj6QVmSTuZnVlnJ956jlpt7TZNpcVT1YLo tQW6xqaUKVZAmHEA+wesXS+71bDrF2WptBruQHJX4vkzuKb6lIR39lB7aJpR47Q+viMT WfAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711466216; x=1712071016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IrHyqXf79MEy0OV9vghuoVFTPea/Hzd4//h2fdHZj2M=; b=KBlU3yl3OSdUzEtJ6arwDzcW3Uc0xJ3Hv0Yj6uSJ1gid2htKSxX1E3rWLOEpMjq4UT gSUNOLfSwoJ0LmyvKnc7iqp013bB2D1mFUasesDLt/zY6kUOGzeqN9BG6nO3gyp46q0f labGOpZH8BWCD9VdJsLWAnN4PXYR4nk/+vz4nzPFohPCRfwkLdjFVExzzs/WJGgM76Z5 jeUigzi3PTKhplHKTMkahKMgwZpiu+3diFt5sI26xh6RfSn0DVPPUQoQaEbKjnTO2OPX XvUOwTr/T4UuqUfZo1v4FWfcdyyKn0rzZ7E0BZHACuIwiL2amSq9BTI4HG+ZiashuX5/ p5/A== X-Forwarded-Encrypted: i=1; AJvYcCVIXDnuRXenKNpB6Kg/HlAmkMmVxbFGAsjz/5ZoTFeAg54nthlOESNPbncnKRt7ebRGuiGA6d1Q8co7yTpON2y8jGCmKhEBYuhm X-Gm-Message-State: AOJu0YxpA5HYiQPSt7zIrSVvpq/VnV60sFgbM/xbB7buGBgyqsxDrlsn XHH5LbnFkykeRo6vNVlILVjl8y5Z9j2f7/O3icD3zdtihQf15cQroRBDoQon X-Google-Smtp-Source: AGHT+IF5RB7tglZLk02DcDBiYyt7SXYW2G3U7LCVpuaKtqHEKpftqhfwmu+RmA8fTJvF12TDdMzwlQ== X-Received: by 2002:a05:6a20:840b:b0:1a3:a85c:44a5 with SMTP id c11-20020a056a20840b00b001a3a85c44a5mr2297204pzd.31.1711466215759; Tue, 26 Mar 2024 08:16:55 -0700 (PDT) Received: from petra.lan ([2607:fa18:9ffd::c91]) by smtp.gmail.com with ESMTPSA id s3-20020aa78283000000b006e631af9cefsm6073126pfm.62.2024.03.26.08.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:16:55 -0700 (PDT) From: Alex Henrie To: linux-parport@lists.infradead.org, linux-usb@vger.kernel.org, sudipm.mukherjee@gmail.com, johan@kernel.org, daniel@gimpelevich.san-francisco.ca.us, hkzlabnet@gmail.com, reboots@g-cipher.net, mike@trausch.us, gregkh@linuxfoundation.org Cc: Alex Henrie Subject: [PATCH v2 1/4] usb: misc: uss720: point pp->dev to usbdev->dev Date: Tue, 26 Mar 2024 09:07:08 -0600 Message-ID: <20240326150723.99939-2-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326150723.99939-1-alexhenrie24@gmail.com> References: <20240312055350.205878-4-alexhenrie24@gmail.com> <20240326150723.99939-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This avoids a "fix this legacy no-device port driver" warning from parport_announce_port in drivers/parport/share.c. The parport driver now requires a pointer to the device struct. Signed-off-by: Alex Henrie Acked-by: Sudip Mukherjee --- drivers/usb/misc/uss720.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index b00d92db5dfd..1c940608deb5 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -720,6 +720,7 @@ static int uss720_probe(struct usb_interface *intf, priv->pp = pp; pp->private_data = priv; pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_ECP | PARPORT_MODE_COMPAT; + pp->dev = &usbdev->dev; /* set the USS720 control register to manual mode, no ECP compression, enable all ints */ set_1284_register(pp, 7, 0x00, GFP_KERNEL); From patchwork Tue Mar 26 15:07:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13604385 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B16C13C809 for ; Tue, 26 Mar 2024 15:16:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466218; cv=none; b=ZoeAaemU3WNQK5kneigHfAxQf3hNzghRD/2J1AvxOqUttVwG1cyDw6rVwKnozku8KkwQilrQrN2vqU4/6k5d4mQ3303iCRFaIWSWmF6MiQ+o+0B6GLQ5i2tZsPLO7msjMYmfIRsH5nS47zJtqB6PulnqzbOETQaSwQk/0PV+dio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466218; c=relaxed/simple; bh=fjTS6gtlllNalP0QOGaKGn3S/Z8yvGZ7I+FGF9k5M5s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=deirOv8IwQ+97nI6qnY2eZHNQIMZSBeNB74yLPeb86lGtaRRLKTvLBqnrgX58/xPvBhH968HvpnsNjACSQm4TaY+YbUXzv8OxglhSx+UEZN6NJsdPOiGefBe8pGpinPQqk/WyHoAaAdxkAzsN5fTBIDyarihhVnFy/e+5FzqpcE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SdhUEsSl; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SdhUEsSl" Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6e74aa08d15so3836623b3a.1 for ; Tue, 26 Mar 2024 08:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711466217; x=1712071017; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uum5vz08f/AeAkxK591s+92guLMsYWdqso+gZlXAqK0=; b=SdhUEsSlWbd3zsqEFK3VVwXyDeuN7o+FSnan/MFiPKnfEhUOMfQ2z1vSAuyPY3acw7 ULm3xb6omWzN26qWUWGcdZb2Wb4OGMHjtnLj2grmfrnB92BFNCYwNupheyQ72tR9wQEC 18ukpa/d7QWtO2QUgYUGX6bRrvGdSFjlQlLxCn3EkkRSOw/xJIOBEI1PM1OoW3ZAU1XN mA9QDjVKvGrnw9ixyAw8IzmGVjw2OefI5u+y6j5Xr/3Xtsc9jjgH7ZuclmLEtyMjRFC1 je7kM+eiHtJKI6JrSuqA3jWT5tc3CAi/kCGwRKFPk9Lqs3Fi3D5U+Wf4ax8w+gVbB8IW dsWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711466217; x=1712071017; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uum5vz08f/AeAkxK591s+92guLMsYWdqso+gZlXAqK0=; b=rxxArjYn2qht0jFji5Su+QhQYuEvefgsr6sO5qddyJAxUms5dUSG2rTirmAqk7VeRa K4JppJ9v1p2lbAnDRIbWjpPJn5MT1THlTIlOKl4x+hOBt+ZwyJp6yZTwxa3t4z3qBEq7 RPCUTnC+aXM6q/HcJ9pEFWsBUZXDvrgO5+8I6l4rM8SycPgfQJEeCQg83IMbTGM6Jlqr l6GTl1sTepyccEhJaW7f98xSAuFl9kSwmbPMXcxCCJCfwY11LsO/hc03IrKoAf5HbBep WMjrVj3XvuJln0tdezt/7F/ebAPx8leAqwexBAoWx/jm0XlF50/7KJCfhfP1bMr5GTUg VJgw== X-Forwarded-Encrypted: i=1; AJvYcCVmgefQYnWlDW2lrHI1/FAk9Fzo7834JGNyoJUcjs3ZgatH5jQ7bZPsOrDQQAkLTmHRQpWBJWGo7izHNc4CY4RtWgRKUqEJBsdd X-Gm-Message-State: AOJu0YzWkPNyjnhG+osDTdixj4EMqM5vLPu6TH0mZQCBycuEq+L6kKsW r2bz9ERGmSFt49CiMsJ8MW6qlxaqpvBJBbf2qcBIJtjbPm6j2C/d X-Google-Smtp-Source: AGHT+IGdeqkd37VnZ2ziWiWIOxHtW7ouo53G2cVQNLtllhZFpFA6y7Ihhlzz9pzoOa6iULl2dGu58A== X-Received: by 2002:a05:6a20:7005:b0:1a3:7e88:2262 with SMTP id h5-20020a056a20700500b001a37e882262mr10483304pza.34.1711466216982; Tue, 26 Mar 2024 08:16:56 -0700 (PDT) Received: from petra.lan ([2607:fa18:9ffd::c91]) by smtp.gmail.com with ESMTPSA id s3-20020aa78283000000b006e631af9cefsm6073126pfm.62.2024.03.26.08.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:16:56 -0700 (PDT) From: Alex Henrie To: linux-parport@lists.infradead.org, linux-usb@vger.kernel.org, sudipm.mukherjee@gmail.com, johan@kernel.org, daniel@gimpelevich.san-francisco.ca.us, hkzlabnet@gmail.com, reboots@g-cipher.net, mike@trausch.us, gregkh@linuxfoundation.org Cc: Alex Henrie Subject: [PATCH v2 2/4] usb: misc: uss720: document the names of the compatible devices Date: Tue, 26 Mar 2024 09:07:09 -0600 Message-ID: <20240326150723.99939-3-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326150723.99939-1-alexhenrie24@gmail.com> References: <20240312055350.205878-4-alexhenrie24@gmail.com> <20240326150723.99939-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Information about 04b8:0002 and 05ab:0002 is from commit e3cb7bde9a6a ("USB: misc: uss720: more vendor/product ID's", 2018-03-20). The rest are from . Signed-off-by: Alex Henrie --- drivers/usb/misc/uss720.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 1c940608deb5..32caf3ca300f 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -767,14 +767,14 @@ static void uss720_disconnect(struct usb_interface *intf) /* table of cables that work through this driver */ static const struct usb_device_id uss720_table[] = { - { USB_DEVICE(0x047e, 0x1001) }, - { USB_DEVICE(0x04b8, 0x0002) }, - { USB_DEVICE(0x04b8, 0x0003) }, + { USB_DEVICE(0x047e, 0x1001) }, /* Infowave 901-0030 */ + { USB_DEVICE(0x04b8, 0x0002) }, /* Epson CAEUL0002 ISD-103 */ + { USB_DEVICE(0x04b8, 0x0003) }, /* Epson ISD-101 */ { USB_DEVICE(0x050d, 0x0002) }, - { USB_DEVICE(0x050d, 0x1202) }, + { USB_DEVICE(0x050d, 0x1202) }, /* Belkin F5U120-PC */ { USB_DEVICE(0x0557, 0x2001) }, - { USB_DEVICE(0x05ab, 0x0002) }, - { USB_DEVICE(0x06c6, 0x0100) }, + { USB_DEVICE(0x05ab, 0x0002) }, /* Belkin F5U002 ISD-101 */ + { USB_DEVICE(0x06c6, 0x0100) }, /* Infowave ISD-103 */ { USB_DEVICE(0x0729, 0x1284) }, { USB_DEVICE(0x1293, 0x0002) }, { } /* Terminating entry */ From patchwork Tue Mar 26 15:07:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13604386 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C96AA13C81C for ; Tue, 26 Mar 2024 15:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466220; cv=none; b=gK5DXt44r3USXz32+c+OHdX/THCcTX7bQCAS89BrXHAcqCykUlDiH9ok8yXFbIMBsEe/HPzvlk39bt2OQ2Apgg9C4BJarh7u7c9ec13rZ0klPd8qRcjnqNuRTBkOytbxIo0PdmF4ynnQ9PpSfEzCSwBOmfd8lpTC9qcoK48ekew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466220; c=relaxed/simple; bh=PxvX2wcX2JiqOJih/m2mFt5MSYx228b9tQN4NLazxW8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jYYF5ZoGZ3SdA6GjA/5QOATB9DpO37t7C8dWxtgrvjjYQQBiwfAYcy1XoLr9635ZRLD/37pIM9b8hlomfYILG/8tcgx2YQIeH3P1WhwhwYejlAbJ/8hV5dAPHqSjVEKUO0s0dpbShoq/EFPkTW75xrQjihmIZFy+yCt6Jjv8V4A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HtQwjYix; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HtQwjYix" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6e6b54a28d0so3739961b3a.2 for ; Tue, 26 Mar 2024 08:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711466218; x=1712071018; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HogMHtwYFBoxl6J9fl1rX7TCztC2DxlcdxXdBKoLCps=; b=HtQwjYixAr2et1G8479SymabXvmtB/FpRzNKqHmAScwvDX/9L/swbt7e4gxDuFehW1 DNZA03f2E+tNhoEE9vMzlckemg6eMLDCVTjDw3b3ssNK+2/BjNm3kXOmx8pqfPgqP08D 7A2yx/5aMVNHCgCMNTSZ3HdvbGlF/OmcgrGVuQrBfZtyKFmFt08m+AALVm4N1NG8pkRN VasVt8560XiSAog1wg3zXnfp1TgocSrhj3JVrn/oUwRDi1xWYHuiFKfE9ZXKeqJ1G2IE WUsqFB+xCoZiVns3aarCCEe25mtfZjHm42p5S7oCsyoKA677bOF3oF0gl4V6Mbjs0bYg ZMbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711466218; x=1712071018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HogMHtwYFBoxl6J9fl1rX7TCztC2DxlcdxXdBKoLCps=; b=mkwgJaKscKpWmYdnNExem64qSpeIvyhqLxeRjtUV7okW11CTHGekfDxweMb9do471b Wx6PkCC/m3pwUMlEX6yDklhM/usq7tHc/ulAvUq+GbdGPKEgD74DQXNnyV0BUfRyP0xN 9sDKso5rfxGtaIQxjUgoBrP+ldUSWkHki7mzA6UolkNuwrOannem2x60XMbpAtdH2bhS tEuqIeVWvKE+oXFs8wwenx6nnIPSHhWukltKz7AT3kQ3LdsLTgg5f3HB376mXq11peAc R1CDw842K/8gEGHpgchCDg0/BafKeOBB8b1P9pifuxFkuKY57rq7c4UF9ANiYjsyX+qo Pw7g== X-Forwarded-Encrypted: i=1; AJvYcCW06QZUpXLXOPUYGmX0cfkwHTEj1RPRIkXE5xALRAPCQjorbV50eTJ6RfQys5r90FLKZtUZoM9n/HEsAlQ9lvC82VPmwg3FUUHa X-Gm-Message-State: AOJu0YxHs0LtfHp7qV0pu/adrtHITxGSMH/DcT6W20tmsTd4AfdPv+F5 OAs3vFPluNnouaI8HJSp5WOGAauoz7a3XVCaahgHO+yAsYhfe/GX X-Google-Smtp-Source: AGHT+IHemcKzOybWEdq/HnSzpDE6ZypDFN1UyrM63rOS/QF+hHG5TZAnDkzeG/Pwcc7xA843slYhng== X-Received: by 2002:a05:6a20:734f:b0:1a3:c4f4:5bb3 with SMTP id v15-20020a056a20734f00b001a3c4f45bb3mr7933649pzc.4.1711466217955; Tue, 26 Mar 2024 08:16:57 -0700 (PDT) Received: from petra.lan ([2607:fa18:9ffd::c91]) by smtp.gmail.com with ESMTPSA id s3-20020aa78283000000b006e631af9cefsm6073126pfm.62.2024.03.26.08.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:16:57 -0700 (PDT) From: Alex Henrie To: linux-parport@lists.infradead.org, linux-usb@vger.kernel.org, sudipm.mukherjee@gmail.com, johan@kernel.org, daniel@gimpelevich.san-francisco.ca.us, hkzlabnet@gmail.com, reboots@g-cipher.net, mike@trausch.us, gregkh@linuxfoundation.org Cc: Alex Henrie Subject: [PATCH v2 3/4] usb: misc: uss720: add support for another variant of the Belkin F5U002 Date: Tue, 26 Mar 2024 09:07:10 -0600 Message-ID: <20240326150723.99939-4-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326150723.99939-1-alexhenrie24@gmail.com> References: <20240312055350.205878-4-alexhenrie24@gmail.com> <20240326150723.99939-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This device is a gray USB parallel port adapter with "F5U002" imprinted on the plastic and a sticker that says both "F5U002" and "P80453-A". It's identified in lsusb as "05ab:1001 In-System Design BAYI Printer Class Support". It's subtly different from the other gray cable I have that has "F5U002 Rev 2" and "P80453-B" on its sticker and device ID 050d:0002. The uss720 driver appears to work flawlessly with this device, although the device evidently does not support ECP. Signed-off-by: Alex Henrie --- drivers/usb/misc/uss720.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 32caf3ca300f..5423da08a467 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -693,7 +693,7 @@ static int uss720_probe(struct usb_interface *intf, interface = intf->cur_altsetting; - if (interface->desc.bNumEndpoints < 3) { + if (interface->desc.bNumEndpoints < 2) { usb_put_dev(usbdev); return -ENODEV; } @@ -719,7 +719,9 @@ static int uss720_probe(struct usb_interface *intf, priv->pp = pp; pp->private_data = priv; - pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_ECP | PARPORT_MODE_COMPAT; + pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_COMPAT; + if (interface->desc.bNumEndpoints >= 3) + pp->modes |= PARPORT_MODE_ECP; pp->dev = &usbdev->dev; /* set the USS720 control register to manual mode, no ECP compression, enable all ints */ @@ -774,6 +776,7 @@ static const struct usb_device_id uss720_table[] = { { USB_DEVICE(0x050d, 0x1202) }, /* Belkin F5U120-PC */ { USB_DEVICE(0x0557, 0x2001) }, { USB_DEVICE(0x05ab, 0x0002) }, /* Belkin F5U002 ISD-101 */ + { USB_DEVICE(0x05ab, 0x1001) }, /* Belkin F5U002 P80453-A */ { USB_DEVICE(0x06c6, 0x0100) }, /* Infowave ISD-103 */ { USB_DEVICE(0x0729, 0x1284) }, { USB_DEVICE(0x1293, 0x0002) }, From patchwork Tue Mar 26 15:07:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13604387 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B963913C82C for ; Tue, 26 Mar 2024 15:16:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466221; cv=none; b=A8tHUrAM5ATb1fZOfgh1RxrdP01InltHWRI91ZXitTDZYH1PCnWS0+QGGZV00KS2KKyRpLI2hncWLl69OuvA4vZEeZBTZXGNJ6k4wmjV5pET7yfL/Z50WSHHTnwY/qmCMiS65H582CEnGLKjU63A/gIt7LO59kzu6uzkkZzZdEM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711466221; c=relaxed/simple; bh=Uh39Uy50cW3MqKqA/GjWgxY94ppKdYJhtHJ/8QqFF9w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OTQSuvvIn3GbSM5ABopPkn8YQF7F8Hkv8huuIncoHzhVZXvgyKUzTUwZ5BXf9gDFDEihWqXyPnPRh5ixMQMN9kNRBQ48uRqo9aZJfWclE1G8DiR4L1QJCgwucmREdpHAuwAtXIh+hZmQWwFpFa7ePGmSe3dIF6hxXrPcL13PAE8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B008m7Vw; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B008m7Vw" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6ea8ee55812so3287017b3a.0 for ; Tue, 26 Mar 2024 08:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711466219; x=1712071019; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tymugleP+KMPqfQ6HdBlFr9cfdnMUYoOvvq4liDig9M=; b=B008m7VwtVOsuZUU35YOtxedUVJ1l8p/6CrHb97Oy2Ub20yY+DYB504ImWwlGeimjr 9D4hFeNXPqw2ePEZqB/uH3CP/I0Gt9lXn6Kj7CBRlvdaT5XUbF8n6FsW+nSMoXO3uxAW Ys/xQvSenshpMIBiGtHIGcabwGWdNRRjd01IHW+i0yrwBK+4j1tdKg9FGdD1l/ZyH4Dq qiUGl528V6hIiFlYurg75pE+C1hfu+lM9ij+FJD6uPTJGUc68B2lkAakNQI77vYzwgPn UPJibblUYb+IV+/OGfnKi+qdDTZEj4G5baZkMGQ4TDKT/Kchg5qPSaeX3l7ttDXQ3Urc IBbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711466219; x=1712071019; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tymugleP+KMPqfQ6HdBlFr9cfdnMUYoOvvq4liDig9M=; b=IXvr5Hwma7gLRfb2VJkI/sJQk5eistH7T8UO59piaEFEOVh7hT/nDogtNiUYazouGI eQ1FbeZM+ZJhKurlH6NPb7/b1+izJmg8zWU0jA3IzB81UwznagpIzqX0luxbR86M7iE6 z6zUwrGiE2ibPmQYaZgbTorrlt7E9ouEcRhzPjE3dioOUs6j+2NcdSuJias8AbTSWcE+ uK5oFmfO7LIQ+bA3o90wbjdyOxu0BvIUVQr2Sw3Lyn2UWENIjpKXaJVxbs+2Kxk+elWh MbiGA9IdBLfyilOjEPcv20ohHOmgGWDI3PQ+c3Fo/x6Fe3bCuFnKxsUeB+YmU8qekO0M 13ww== X-Forwarded-Encrypted: i=1; AJvYcCXhTlhCMvepNlKH/mkm2DAdbOGUnca5ZMW8/w89mt4Lc8NgW4QbdgQE32CGYh/QyLCW1Fk67Wyp7k074t6M0juU8eZJRtxBwR+Q X-Gm-Message-State: AOJu0Yw2bAQoBmAHOy709gLGMJwD1MUxZPNEx0x/ov3MCjoTWzyMUQrF BtCE4fVm6vnWlyvKvSJvZz31vUI/AHFFp0d8o1vPAXLgYZ/63Ev6 X-Google-Smtp-Source: AGHT+IE/sR+6HsVDGhaf2JujhiyAKYBElqjSIk4Dznzsk+TOS+oozp9kHrr35TB3i22mXH3jKEvmdg== X-Received: by 2002:a05:6a20:6f90:b0:1a3:d60c:d84d with SMTP id gv16-20020a056a206f9000b001a3d60cd84dmr2784725pzb.23.1711466219099; Tue, 26 Mar 2024 08:16:59 -0700 (PDT) Received: from petra.lan ([2607:fa18:9ffd::c91]) by smtp.gmail.com with ESMTPSA id s3-20020aa78283000000b006e631af9cefsm6073126pfm.62.2024.03.26.08.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:16:58 -0700 (PDT) From: Alex Henrie To: linux-parport@lists.infradead.org, linux-usb@vger.kernel.org, sudipm.mukherjee@gmail.com, johan@kernel.org, daniel@gimpelevich.san-francisco.ca.us, hkzlabnet@gmail.com, reboots@g-cipher.net, mike@trausch.us, gregkh@linuxfoundation.org Cc: Alex Henrie Subject: [PATCH v2 4/4] usb: misc: uss720: check for incompatible versions of the Belkin F5U002 Date: Tue, 26 Mar 2024 09:07:11 -0600 Message-ID: <20240326150723.99939-5-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326150723.99939-1-alexhenrie24@gmail.com> References: <20240312055350.205878-4-alexhenrie24@gmail.com> <20240326150723.99939-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The incompatible device in my possession has a sticker that says "F5U002 Rev 2" and "P80453-B", and lsusb identifies it as "050d:0002 Belkin Components IEEE-1284 Controller". There is a bug report from 2007 from Michael Trausch who was seeing the exact same errors that I saw in 2024 trying to use this cable. Link: https://lore.kernel.org/all/46DE5830.9060401@trausch.us/ Signed-off-by: Alex Henrie --- drivers/usb/misc/uss720.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 5423da08a467..b26c1d382d59 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -677,7 +677,7 @@ static int uss720_probe(struct usb_interface *intf, struct parport_uss720_private *priv; struct parport *pp; unsigned char reg; - int i; + int ret; dev_dbg(&intf->dev, "probe: vendor id 0x%x, device id 0x%x\n", le16_to_cpu(usbdev->descriptor.idVendor), @@ -688,8 +688,8 @@ static int uss720_probe(struct usb_interface *intf, usb_put_dev(usbdev); return -ENODEV; } - i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2); - dev_dbg(&intf->dev, "set interface result %d\n", i); + ret = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2); + dev_dbg(&intf->dev, "set interface result %d\n", ret); interface = intf->cur_altsetting; @@ -728,12 +728,18 @@ static int uss720_probe(struct usb_interface *intf, set_1284_register(pp, 7, 0x00, GFP_KERNEL); set_1284_register(pp, 6, 0x30, GFP_KERNEL); /* PS/2 mode */ set_1284_register(pp, 2, 0x0c, GFP_KERNEL); - /* debugging */ - get_1284_register(pp, 0, ®, GFP_KERNEL); + + /* The Belkin F5U002 Rev 2 P80453-B USB parallel port adapter shares the + * device ID 050d:0002 with some other device that works with this + * driver, but it itself does not. Detect and handle the bad cable + * here. */ + ret = get_1284_register(pp, 0, ®, GFP_KERNEL); dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg); + if (ret < 0) + return ret; - i = usb_find_last_int_in_endpoint(interface, &epd); - if (!i) { + ret = usb_find_last_int_in_endpoint(interface, &epd); + if (!ret) { dev_dbg(&intf->dev, "epaddr %d interval %d\n", epd->bEndpointAddress, epd->bInterval); }