Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FDF2EB64DC for ; Mon, 17 Jul 2023 15:02:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbjGQPCh (ORCPT ); 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 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