From nobody Wed Mar 23 02:06:34 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 57FEC1A3CFEF; Wed, 23 Mar 2022 02:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KNWtf1xM8z4hwt; Wed, 23 Mar 2022 02:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648001194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L/Uxif/FMMJWVPTWRVvNp5K1HoexBhHKRMuXXmIkptg=; b=sqj1BkYPcrv8gUE0G1eOyR8OMiQe06NkBzzZNxvedBad7dpsQdW5VvE3U4PquPJK4TOuX6 oRX+guJGrpz+Oh3gvq/sEcSNrEooNSE906ZLBQkgTv+NIv/wxKyLK0ezkNJwFT3noMFkSD qZfuiYDleD82LBgpwDajTAaHN8M6Dm7V31NikKoMcvnz2cS+20mdl2DGiReiTMsmUwiMNf Shaws4OIhUzxKbnn2p+HsSnbWb5/qnVpQlr1cbhX+EUEVgllrEoROkBIJORXZGwJDXNvNg wS/wriDF5rShK0FOGN4ZQAnFuzOtWkCtiJqnkma+06as/3JEGKTtbmVXLsxuvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22B781ABEB; Wed, 23 Mar 2022 02:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22N26YP4079540; Wed, 23 Mar 2022 02:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22N26YVG079539; Wed, 23 Mar 2022 02:06:34 GMT (envelope-from git) Date: Wed, 23 Mar 2022 02:06:34 GMT Message-Id: <202203230206.22N26YVG079539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Greg Lehey Subject: git: 31e076d70b5f - main - Add devices and quirks for some Olympus cameras. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grog X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31e076d70b5fc06e9cd9ecfe19296d4fe6a8a5a5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648001194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L/Uxif/FMMJWVPTWRVvNp5K1HoexBhHKRMuXXmIkptg=; b=ueKtMVti7AGrU06n5ZBFt3bT5Dwceo1Ahhj9A9TsuqP/vcmzi+TjiBUpGq8rAenlY7HcE1 MF63n5fh3XLIgbCcnAtxe2UD6jo5MqAaiZDCmWH2NUpyOWR4mvfGBv5YPekD3B9r10Jm58 Hp/URciLiE1nLOyCR4A9DGW+QOoxy9W1+lAcxI/KKKrdRVLzuc/Q7xQ6d1ptPANuDybDv+ eSB7WBEGY5AZWODn9vZyLEIk9bmxvAZtNsWqsL3SymSSvDDIpo/rrwjqep26ukfNoNtKYC IOhucIAgz8fkeVMKowIFqEVq7vCeVXWi4n74YQZCp39pSq4hKGNZXnjsti9VLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648001194; a=rsa-sha256; cv=none; b=LQSKFqPyCZECaVOx5fUGDAe7ZxsIP3qmg6Rkcle1AoPW7tCdzY3mrkCWSE5/Wuxf1Bfo+6 XNsNpf30r8W2hmL4NEBxUxus5lje/PkyM3sasIbu5S+kPkyIrG1eqdJjSmM1hZNMg2XFW3 LwDNd0BM7OM+HnraMeMAsy1Ksi0rJTajEJlYY+b8ZeMz2rmos9d8R6wwSju4QxZVKCd5pf jKYHEtBFEto3yrITcqmctOT9aM+w6eFEL3zpzcyBX0x5T/C4ZIoePOy9/4FGrLZH7aYM7R uvi/hcdUmLJKU4PRQPoWBP5o7ad/zPxqLRsF8M167tuhqXWMx6mEV7g/SwGJ8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grog: URL: https://cgit.FreeBSD.org/src/commit/?id=31e076d70b5fc06e9cd9ecfe19296d4fe6a8a5a5 commit 31e076d70b5fc06e9cd9ecfe19296d4fe6a8a5a5 Author: Greg Lehey AuthorDate: 2022-03-23 01:40:28 +0000 Commit: Greg Lehey CommitDate: 2022-03-23 01:40:28 +0000 Add devices and quirks for some Olympus cameras. Reviewed by: hps@ Fixes: Problems attaching Olympus cameras. MFC after: 2 weeks --- sys/dev/usb/quirk/usb_quirk.c | 35 ++++++++++++++++++++++++++++++++++- sys/dev/usb/usbdevs | 14 ++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index cab6f1b7c074..d86ca5643515 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -353,6 +353,39 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(OLYMPUS, C1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_WRONG_CSWSIG), USB_QUIRK(OLYMPUS, C700, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), + /* Selected Olympus DSLR and EVIL models. See ../usbdevs for more + * details. + * + * Not all quirks apply to all models. The commented-out entries are + * correct for that model. + */ + USB_QUIRK(OLYMPUS, E_1, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + UQ_MSC_NO_SYNC_CACHE), + /* + * Product code 0x118. + * USB_QUIRK(OLYMPUS, E_300, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + * UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + * UQ_MSC_NO_SYNC_CACHE), + * USB_QUIRK(OLYMPUS, E_30, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + * UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + * UQ_MSC_NO_SYNC_CACHE), */ + USB_QUIRK(OLYMPUS, E_330, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP), + USB_QUIRK(OLYMPUS, E_PM1, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP), + /* Product code 0x12e. + * USB_QUIRK(OLYMPUS, E_PM2, 0x0000, 0xffff, 0), + * USB_QUIRK(OLYMPUS, E_M1MarkII, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + * UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + * UQ_MSC_NO_SYNC_CACHE), + * USB_QUIRK(OLYMPUS, E_M5MarkIII, 0x0000, 0xffff, 0), + */ + USB_QUIRK(OLYMPUS, E_M1, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_PREVENT_ALLOW, + UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_START_STOP), USB_QUIRK(ONSPEC, SDS_HOTFIND_D, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ONSPEC, CFMS_RW, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI), @@ -1042,7 +1075,7 @@ usb_quirk_init(void *arg) { char envkey[sizeof(USB_QUIRK_ENVROOT) + 2]; /* 2 digits max, 0 to 99 */ int i; - + /* initialize mutex */ mtx_init(&usb_quirk_mtx, "USB quirk", NULL, MTX_DEF); diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 01c25d7c0962..3b7ea2b9c1b4 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3535,6 +3535,20 @@ product OLIMEX ARM_USB_OCD_H 0x002b FTDI compatible adapter /* Olympus products */ product OLYMPUS C1 0x0102 C-1 Digital Camera product OLYMPUS C700 0x0105 C-700 Ultra Zoom +/* Current Olympus DSLRs and EVIL cameras reuse the same product code and + * bcdDevice for multiple models. This may result in problems with newer + * cameras. */ +/* Olympus DSLRs */ +product OLYMPUS E_1 0x0102 +product OLYMPUS E_300 0x0118 +product OLYMPUS E_330 0x0118 +product OLYMPUS E_30 0x0118 +/* Olympus EVIL cameras */ +product OLYMPUS E_PM1 0x012c +product OLYMPUS E_PM2 0x012e +product OLYMPUS E_M1 0x012e +product OLYMPUS E_M1MarkII 0x012e +product OLYMPUS E_M5MarkIII 0x012e /* OmniVision Technologies, Inc. products */ product OMNIVISION OV511 0x0511 OV511 Camera