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=-5.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 142ADC433ED for ; Thu, 8 Apr 2021 16:42:38 +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 7CB23610D1 for ; Thu, 8 Apr 2021 16:42:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CB23610D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUXjo-0003K1-Ff for qemu-devel@archiver.kernel.org; Thu, 08 Apr 2021 12:42:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUXiS-0001cp-Rt for qemu-devel@nongnu.org; Thu, 08 Apr 2021 12:41:13 -0400 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:46053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUXiR-0006ap-5g for qemu-devel@nongnu.org; Thu, 08 Apr 2021 12:41:12 -0400 Received: by mail-oi1-x231.google.com with SMTP id d12so2775651oiw.12 for ; Thu, 08 Apr 2021 09:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oorlvMH2ipqKkpkC4AVpSh4uJmQmYsEIDxsPy8I3OfI=; b=HsZTuYGJnQgCaTs3YO0fvzcpFK6wL1dLcwogdgliSwMLKj67Fc5iHeQFEvPOpZAzuC TgdI+kmcdW2avKOuNjJ1d+PDyTNhB20IuZwLrPYgAby7Of+iUxIc6U6xHZn2MwLQoXHE y/DDU0CXMqEDn+jl+U42Irtka4I7Fz6bRlNiv3TnPwg5su+poVM58cSJV8BCKkJwkq4Q S1QkbgqHhG+OBZNw60vHNSbeVmvohMduyUxqMDnh2Mx1zImukkIZ5/+BtIhB66TgYDNG qrerUcKFiMEWqzDSkB2hd0qngA9iC+yG2uonSk7u0lYQsxgmmhpqSMfV3ry87ysvWIlN gY4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oorlvMH2ipqKkpkC4AVpSh4uJmQmYsEIDxsPy8I3OfI=; b=MydcGf6xGuqVF8JJxw0hgxNvBUvhJ/JrFxjmnXJ7qPWwOZ68YJBRKw9krKtolW9c7u lDO4JTR5cmn8yH6OrpmKApV+HRSxz875BtepacWeoffNZ4z206Pu5DtbSf6vaVpX8ynB IF3gDCELPWdq9mzeC+MRLUufUGvq1gQe6zwShnqlm1OJVtPIqWFztuRT4vMnxEXGl/rL oej2mwPIsXj22lk0gUdMA8rFOSK6BcKoqXQb1pnhpsVd54V7PQJiZDCU2NyhETzN8/2Y lOdwA0wXSvkElFwo76XcWLavS3t0xPSCRN+7+XUkzCkXJoF2RYMbjFwhtg0gI0M5DP/i BRXw== X-Gm-Message-State: AOAM531CtVRH4wuevXJZnFYwwhuwcFwaYLbEJX0X0LCCRf6DJFV77rRn GeL3eH6+iBfw/52+/9L7W2rGK/ZNO5bDc14M5IM= X-Google-Smtp-Source: ABdhPJxYYcXzSwsAkSuooEl8oBpBaj8eD67kskaFKXuJr4FaWH6MK5N9Cwz4hlqkII9qpfmcs76ysdTFfk+KK/mbmi0= X-Received: by 2002:aca:5d82:: with SMTP id r124mr6812877oib.59.1617900069059; Thu, 08 Apr 2021 09:41:09 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20210408110523.eh3i7djynv54cqi2@sirius.home.kraxel.org> From: Howard Spoelstra Date: Thu, 8 Apr 2021 18:40:58 +0200 Message-ID: Subject: Re: Mac OS real USB device support issue To: Gerd Hoffmann Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=hsp.cat7@gmail.com; helo=mail-oi1-x231.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: Programmingkid , QEMU devel list Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, Apr 8, 2021 at 1:05 PM Gerd Hoffmann wrote: > > Hi, > > > > Those might be a good place to start. IOKit provides the drivers and > > > also the io registry which is probably where you can get if a driver > > > is bound to a device and which one is it. How to dissociate the > > > driver from the device though I don't know. > > > https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/DeviceRemoval/DeviceRemoval.html > > > According to this article a driver has a stop() and detach() method > > that is called by the IOKit to remove a device. I'm thinking QEMU can > > be the one that calls these methods for a certain device. > > libusb should do that. Interfaces exist already (see > libusb_detach_kernel_driver & friends) because we have the very same > problem on linux. > > take care, > Gerd > As far as I understand the patches here https://github.com/libusb/libusb/issues/906 they are internal to libusb, so we would need to build a libusb for use with e.g., brew to build a macOS executable. Or wait for them to be finalised to get included in libusb and then included in brew and then .... Best, Howard