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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 07605C5ACD6 for ; Wed, 18 Mar 2020 16:56:33 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 C0CA320724 for ; Wed, 18 Mar 2020 16:56:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0CA320724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1jEbyy-0005p6-VE; Wed, 18 Mar 2020 12:55:52 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) (envelope-from ) id 1jEbyx-0005p0-3j for kernelnewbies@kernelnewbies.org; Wed, 18 Mar 2020 12:55:51 -0400 Received: by mail-wr1-f68.google.com with SMTP id f3so24370231wrw.7 for ; Wed, 18 Mar 2020 09:55:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=epYzlJQv+tzfcP3ejMQqiQb662OoTHWV53zL1XW0Ajc=; b=UwDjhk+RoV/hAkb3PnxrlfAEEfw9as+kCp/JAQn8L69+xs7EpeY4wmN2cL4KOwJNKc 2kSIABegydz5VT4snNDvYE1v8KXMov99NlI2nUX1g6zDS45m48JtdoEoKXD77PUmF8oA LZ2eNJUVRh6h/XGqTkrRWeigl7ZuaFBWleQmL9Ixnqd77H+S5rxmbKWbtIixkA4LS2xi BcNVivFF/OnD686eEpLqpJLPenptoCVWTio9NyVNmTE4pSaNW/6J8R5kQkD/TxrRpan9 Jsk0V4Y6tApdKdMO3wxVuLlLIKVWGqRd5ruhXWj6sM9N4c6oVXS8TL7B7dcyVpQz2BwZ QeAw== X-Gm-Message-State: ANhLgQ01s4fZWyrld+OQJNDHaelBENlN3OR9tof3djoA4lq6C1d0/2bV AkgCc+vHGcl23Q46OqvTLrO5rItLYww= X-Google-Smtp-Source: ADFU+vsgzhPHFgb8CDMNA28mggiu4mdhtM8NHkBVEMIEXg3I+DzN5cNeS1U3Tj3zA8mqzkw95vSKeg== X-Received: by 2002:adf:e502:: with SMTP id j2mr6482046wrm.259.1584550547005; Wed, 18 Mar 2020 09:55:47 -0700 (PDT) Received: from [192.168.86.215] ([82.7.199.117]) by smtp.gmail.com with ESMTPSA id j11sm2736804wrt.14.2020.03.18.09.55.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 09:55:46 -0700 (PDT) Subject: Re: request_firmware in DMA region To: Greg KH References: <06892b25-65bb-0379-da42-cbae5cbfce38@linux.com> <20200318144631.GB2860387@kroah.com> From: Lucas Tanure Message-ID: <52f381bd-d2cf-c109-6258-c73b06d4b113@linux.com> Date: Wed, 18 Mar 2020 16:55:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200318144631.GB2860387@kroah.com> Content-Language: en-US Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kernelnewbies-bounces@kernelnewbies.org On 2020-03-18 14:46, Greg KH wrote: > On Wed, Mar 18, 2020 at 02:29:24PM +0000, Lucas Tanure wrote: >> Hi, >> >> I'm sending firmware to usb device with this code: >> But it`s falling because the request firmware call didn't put my firmware in >> a DMA capable area. That's my guess. >> >> So how to request firmware in DMA capable area? > kmalloc your buffer used for USB transfers. Thanks, worked. > > Do you have a pointer to your driver anywhere? The code you show below > isn't in any kernel source that I can see. I`m working to get permission for that. Quick question: Why my usb driver doesn't unload after I disconnected it ? This driver is meant to load a new firmware into the board only. And after the bootloader finished the download the board with show it self with a different vendor and product id. All the firmware download in done in probe, so there is no need for this driver after that. Can my driver unload it self ? > > thanks, > > greg k-h Thanks! Lucas _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies