Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5698417rwp; Mon, 17 Jul 2023 08:11:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlEY12bUM0DDex0Q8p1M/kK56waA9PiWBUAll2OziWbjLxdXYmaMAfRf8q0TIOk4s7jxQji3 X-Received: by 2002:a17:902:d483:b0:1ba:fe6a:3845 with SMTP id c3-20020a170902d48300b001bafe6a3845mr14020480plg.11.1689606670993; Mon, 17 Jul 2023 08:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689606670; cv=none; d=google.com; s=arc-20160816; b=BqALAmbr29WOHPyZDm58VqPnlMrcbT2vmvxParpiPSFceCk01W5phBusiiUPeWKCCH tuH/7H3QYo5Fvr6EVqpwiWzdQMNI7urid7z+EAC+37iDpDb1G/Ow9inhyxzZ7WFrSOxu HQ8Gfg4GZpnAvMRjrRJy1KUZpC+jO94DsJgKrN7STdX9pC/CZZ9Hx5aVIKUo3lKwl8Ja eEGUVN/rtQU7jKbtIEWARTpezh5SRAbY6ww36IY9RfLAQfGJdWRZCMVb9BAP0JSqjbEv elecKTtx1TSwUj66hSetY0mBaUx2mpQAntGnr88OtcfuCj6uZEOWlXtv+kPuOPxe5Bc5 x1iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:subject:cc:to:from :message-id:date:dkim-signature:dkim-signature; bh=eWzOtnXm2Hy4S1jCmff80w4hY3eg/amZQU7YSqRKHes=; fh=rOmIYE9I//Pe7PdK2kg2GBagWnMWryXVhBDyRVkD9VQ=; b=iR9nZSKPpFFyIQNR1g+xZ8S/xXFrsfojaHOVInNBR8h3gsZpogJ3hEkbyZYyI/7fkY xvwYjY6f4oW6DZmA/GD7R/boApqUTQLTxnz4wNvPlsCDbLuaLdtVA5KsRHAKhlHTjIDZ WKwQKGwfPlJGCZ6gTQtGwem5KGvHirO3aB1xdFyav8seGybtoBHXwMqoO++/s+NYVkd1 oOCd+d6slYuhLVpVVy5NXWE9HeXtjaBnun8gTsPjEDUWBAKyZfUdywOAydpIKpX4FC8+ r0HXiGUSs73npi5uK5CXX5VQqF6NBSQjo7JTP/Q9LMRYlF0A456lizVrAJem2Fv2gT/n dHmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=1ApxgJ0S; dkim=neutral (no key) header.i=@suse.de header.b=2KP0Z9jw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a170903300100b001b665d8d63asi1282pla.356.2023.07.17.08.10.58; Mon, 17 Jul 2023 08:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=1ApxgJ0S; dkim=neutral (no key) header.i=@suse.de header.b=2KP0Z9jw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbjGQPCh (ORCPT + 58 others); Mon, 17 Jul 2023 11:02:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjGQPCg (ORCPT ); Mon, 17 Jul 2023 11:02:36 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15C91E7F for ; Mon, 17 Jul 2023 08:02:35 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CAED31FDAC; Mon, 17 Jul 2023 15:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689606153; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=eWzOtnXm2Hy4S1jCmff80w4hY3eg/amZQU7YSqRKHes=; b=1ApxgJ0SuQiQO0cupArPashIuQ+Ml/XKTWkrRLUdbETBpNrZFgjtBAXcNMl7qVVKQ59t+Z 82ApgS+bkPtswSVA31ssNn/ebE+QkQz+x/Gq46Fo6sevdRtgVoX0qqnEEGOUj6r3/XcFF1 1N2I3JXhJxhIxpnf733/SPdZW/T/4Lk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689606153; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=eWzOtnXm2Hy4S1jCmff80w4hY3eg/amZQU7YSqRKHes=; b=2KP0Z9jwQT4q/M1v9P0fBQq1xv163rR+V1lSMtH4pDqxNSG7xAmjZpwJp4/+nnHNOoCD5i Aog4/521Oc6KyNBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B034713276; Mon, 17 Jul 2023 15:02:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 10AeKglYtWTBAgAAMHmgww (envelope-from ); Mon, 17 Jul 2023 15:02:33 +0000 Date: Mon, 17 Jul 2023 17:02:33 +0200 Message-ID: <87zg3uvawm.wl-tiwai@suse.de> From: Takashi Iwai To: Ping-Ke Shih Cc: linux-wireless@vger.kernel.org Subject: rtw89 driver and compressed firmware files User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, while debugging a reported rtw89 issue https://bugzilla.suse.com/show_bug.cgi?id=1212808 we noticed that rtw89 driver didn't load the firmware properly. And, this turned out that it's because the driver uses request_partial_firmware_into_buf() function with the combination of compressed firmware files (that are standard on some distros like openSUSE). It's a known limitation of the request_partial_firmware_into_buf() API function itself; it won't load compressed files, because otherwise it'd have to read the full data. That said, the use of request_partial_*() should be only for very limited use cases, and this doesn't look fitting well for rtw89. (And, as usual, the information is missing in the documentation :-< The API document should state it clearly; I'm going to submit a patch to add the information.) There was already a workaround for CONFIG_SECURIY_LOADPIN_ENFORCE for a similar problem, but such a fallback is required in general for all cases, as it seems. I can cook a hackish patch for the fallback, but I wonder whether it still makes sense to keep the use of that API function. rtw89 is the only driver except for bcm-vk (where the API was introduced just for this driver), after all... thanks, Takashi