Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8644003rwb; Thu, 24 Nov 2022 02:18:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf6pQC+S6XMV9aBG3yA9dzLoeitRuJZZVhYwETrQQaIbGBTxwJ6GdDQ29c7Ga55rk5S1m2sR X-Received: by 2002:a17:902:ab8d:b0:17f:8232:257a with SMTP id f13-20020a170902ab8d00b0017f8232257amr13925887plr.138.1669285125813; Thu, 24 Nov 2022 02:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669285125; cv=none; d=google.com; s=arc-20160816; b=Fp2nBxMSEMikNQnZiLjDTk99TGlkfAHCnbGq+o+Sm3YTRDTatDM6t8Wbr4f5RdPNi0 la6/9OOl0snMDAyAVJSfYkxptWMrjeiZK5x4nncpPSvKHfox1I17miqLUgLJ6SPzFJuX WRdKHYHwZGWic4jMwan/333i2+JtY8vZeaTkfpc3NuvvIHK0k259t2OMPowBVaXO6Sol M616dq7/99KuCZ2tih0iNGM8AmVoHJfdvds9Sv2aaj7eaZQFcBpzKlTNPTiAIBZIHY8I Cmk4q+OtX/RwVXwn5mYHrJHB3QZr2RfDeTYZmpKrLYT/RaYJEIJvQ3Hj5zzvKVVCl3fa 4pFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rrpiJLnGWPrQw+sqmHpsscXqLRgXsV4H3ZrGUX3laWo=; b=ZHCkMCPmamquX87+5fET/PWRDda9HvOoPCmCfkIP0JyjG8+X6UqhzqKoqrD5omftIb XzlwWivohViWkNFHrnUjrIXX+JsM8ogi4EiJV35CUS/byX8aYHXOfEw/y9gQEma/lj4b mUFGAeMGA/VYikS34tRFk2o//7bDyDb+rcIkzfkA2MFVNJCQQ5+SyNJ2v1NWph011gIB kf8xAJrj+4oz4YjWKBYrHADrB2jlB6lSHlsnM+pNgkSyl6E8bZFwPBPklS1Xuma62skg WfdcoYIvH7M1zRC7g5z26NKOh1QAOH6tTnHYFCOAsNTLgCcYo4UIi5mi1g6TCDuklY0/ Ol6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ctr1iFw3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc3-20020a170902930300b0018930d070bdsi654978plb.72.2022.11.24.02.18.34; Thu, 24 Nov 2022 02:18:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=ctr1iFw3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229558AbiKXJIK (ORCPT + 87 others); Thu, 24 Nov 2022 04:08:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbiKXJIG (ORCPT ); Thu, 24 Nov 2022 04:08:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFAA2F3B5; Thu, 24 Nov 2022 01:08:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0A78A61F33; Thu, 24 Nov 2022 09:08:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25BDFC433D6; Thu, 24 Nov 2022 09:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669280883; bh=2WnIY4IxIYwOJ87ZP/pew3yEAv4AkAoneo9ZJ8qUM+U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ctr1iFw3IgRvtx/aaNV5Q+LEj9D1ZrOfmtmowfonhUyQX6yIYjC/GyTZmm5RcmQ9F b2BAhbktTYDWN5jj0oMd73/uSarvbr+Hv/SMn4yiZWpw9v4vdHlllmpBA9e7FnXdWv 2LnAcCXuOnpECfQ0rvV8MGg9W0rV+HCq5Bat5/4Y= Date: Thu, 24 Nov 2022 10:08:00 +0100 From: Greg KH To: Albert Wang Cc: mathias.nyman@intel.com, badhri@google.com, howardyen@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v2 3/3] usb: host: add the xhci offload hooks implementations Message-ID: References: <20221110080006.3563429-1-albertccwang@google.com> <20221110080006.3563429-4-albertccwang@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org On Thu, Nov 24, 2022 at 02:47:22PM +0800, Albert Wang wrote: > > > +/* > > > + * This is the driver call to co-processor for offload operations. > > > + */ > > > +int offload_driver_call(enum usb_offload_msg msg, void *ptr) > > > +{ > > > + enum usb_offload_msg offload_msg; > > > + void *argptr; > > > + > > > + offload_msg = msg; > > > + argptr = ptr; > > > > Don't just silence compiler warnings for no reason. > > > > Again, this does not actually do anything at all. So how can we accept > > this code? > > > > This is the driver call to our co-processor which is a specific > hardware, so I don't submit it > and make it silent here. "specific hardware" is what Linux is all about! Please submit your actual drivers for this hardware, otherwise there is no way we can even review properly this type of code, let alone accept it. You all know this in great detail, I've been saying this for many years now. It is very frustrating on my end to constantly have to reject this type of change all the time. What would you do if you were on the reviewer's side? Would you accept this type of submission after constantly saying "I will only accept this if you do X" and you get another patch that does NOT do "X"? > We define and use those hook apis in the common xhci driver to offload > some memory > manipulation to a co-processor. So these apis will be executed to > allocate or free memory, > like dcbaa, transfer ring, in the co-processor memory space when > offlooffload_driver_callad enabled. The file, > xhci-offload-impl.c, shows how we use those xHCI hook apis for the > offload implementation. > > Here is the flow diagram: > xHCI common driver xHCI offload implement driver > co-processor driver > hooks > offload_driver_call() > ---------------------------- > ---------------------------------------- > -------------------------------------------------------------- > offload_init usb_audio_offload_init > offload_cleanup usb_audio_offload_cleanup > is_offload_enabled is_offload_enabled > alloc_dcbaa alloc_dcbaa > offload_driver_call(SET_DCBAA_PTR, &dcbaa_ptr); > > offload_driver_call(SETUP_DONE, NULL); > free_dcbaa free_dcbaa > alloc_transfer_ring alloc_transfer_ring > offload_driver_call(SET_ISOC_TR_INFO, &tr_info); > free_transfer_ring free_transfer_ring > usb_offload_skip_urb offload_skip_urb This does not make any sense, sorry. Perhaps your lines got wrapped incorrectly? thanks, greg k-h