From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17D4AC433B4 for ; Fri, 9 Apr 2021 08:08:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 927E3611AB for ; Fri, 9 Apr 2021 08:08:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 927E3611AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kraxel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUmC8-0000Gj-Jn for qemu-devel@archiver.kernel.org; Fri, 09 Apr 2021 04:08:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUmBZ-0008HP-71 for qemu-devel@nongnu.org; Fri, 09 Apr 2021 04:08:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:24342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUmBW-0006TO-Oo for qemu-devel@nongnu.org; Fri, 09 Apr 2021 04:08:12 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-510-A_s4pkQQPviDeXncQPSpEA-1; Fri, 09 Apr 2021 04:08:07 -0400 X-MC-Unique: A_s4pkQQPviDeXncQPSpEA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B25141882FD2; Fri, 9 Apr 2021 08:08:06 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-165.ams2.redhat.com [10.36.114.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 676615D71D; Fri, 9 Apr 2021 08:08:06 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A008918000AB; Fri, 9 Apr 2021 10:08:04 +0200 (CEST) Date: Fri, 9 Apr 2021 10:08:04 +0200 From: Gerd Hoffmann To: Programmingkid Subject: Re: Mac OS real USB device support issue Message-ID: <20210409080804.vs2r546gy3ntdmgr@sirius.home.kraxel.org> References: <967C172F-B708-40A2-862E-9948F0844133@gmail.com> <725920c9-c990-d35a-4958-4df0c45c62@eik.bme.hu> <0429B873-DD42-4769-BCDF-25A7720D9C44@gmail.com> <20210408110523.eh3i7djynv54cqi2@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Howard Spoelstra , QEMU devel list Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi, > The questions that come to mind are: > - Does libusb_detach_kernel_driver() work on Mac OS? > - Is libusb_detach_kernel_driver() called on Mac OS in QEMU? > > The only mention of this function in QEMU comes from host-libusb.c. > > After some tests I found out the function > host-libusb.c:usb_host_detach_kernel() is being called on Mac OS 11.1. > It never reaches the libusb_detach_kernel_driver() function. It stops > at the continue statement. Yep. Most likely libusb_kernel_driver_active() returns 0 because the kernel driver management functions are not implemented for macos. take care, Gerd