Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753821AbaFXWkE (ORCPT ); Tue, 24 Jun 2014 18:40:04 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:45556 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753282AbaFXWj7 (ORCPT ); Tue, 24 Jun 2014 18:39:59 -0400 From: "Luis R. Rodriguez" To: tiwai@suse.de, chunkeey@googlemail.com, leedom@chelsio.com, cocci@systeme.lip6.fr Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, "Luis R. Rodriguez" , Philip Oswald , Santosh Rastapur , Jeffrey Cheung , David Chang , Hariprasad Shenai Subject: [PATCH 2/3] cxgb4: make configuration load use request_firmware_direct() Date: Tue, 24 Jun 2014 15:39:42 -0700 Message-Id: <1403649583-12707-3-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1403649583-12707-1-git-send-email-mcgrof@do-not-panic.com> References: <1403649583-12707-1-git-send-email-mcgrof@do-not-panic.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Luis R. Rodriguez" cxgb4 uses request_firmware() 3 times, one for firmware, one for optional configuration files and another for ethtools flash. Since the configuration update is optional on devices that don't have a configuration file update it means we'd wait unnecessarily for the extra udev timeout, which by default is 60 seconds. Avoid this extra delay. This was found with the following SmPL patch. @ firmware_not_critical @ expression cf; expression config_file; expression dev; int ret; identifier l; statement S; @@ - ret = request_firmware(&cf, config_file, dev); + ret = request_firmware_direct(&cf, config_file, dev); if (ret < 0) { ... when != goto l; when != return ret; when any } else { ... release_firmware(cf); ... } Cc: Philip Oswald Cc: Santosh Rastapur Cc: Jeffrey Cheung Cc: David Chang Cc: Casey Leedom Cc: Hariprasad Shenai Cc: Takashi Iwai Cc: cocci@systeme.lip6.fr Signed-off-by: Luis R. Rodriguez --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 02a0ebf..bd57177 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -4999,7 +4999,7 @@ static int adap_init0_config(struct adapter *adapter, int reset) goto bye; } - ret = request_firmware(&cf, fw_config_file, adapter->pdev_dev); + ret = request_firmware_direct(&cf, fw_config_file, adapter->pdev_dev); if (ret < 0) { config_name = "On FLASH"; mtype = FW_MEMTYPE_CF_FLASH; -- 2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/