Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp173706ybx; Wed, 6 Nov 2019 15:09:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyOj8HYAA6D9bla6ATfzS/8YT64k+4Ex/axQQnFDZJnz6pxtVxDGwZlTaMJXe1n/KPEKaLJ X-Received: by 2002:a17:906:1e02:: with SMTP id g2mr168543ejj.6.1573081750423; Wed, 06 Nov 2019 15:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573081750; cv=none; d=google.com; s=arc-20160816; b=iHktC8eSHHu25oWvFkStjgWcDeqDZT6LUqFWtj4hWyiOLpn22Lmfj/QhYUOYKP2Bmm KXgBMOtE/zJPVj6sniC4rOHERNbkoReLwbNkLjyriEwBUyRzqHkgjLfKXGBVNoqL/ChE t+F/zfOU/mpQGHg2HoEZtOKFhKR29HAebhE7kwXJ7XXYHMeamvG7ShPIDbWX/0iN5Ajz 4PXW9L5VF02w84Thz0i0Nlggvc/cJHKs65HcKRxtTb4qh+NwlFW+fMIK9aBzON4MUJR6 S5uNQdt6No2HZgoXuGyyp2XL+0QaFgdl8YkRyIXiHTy7xB3B2BWiKeIwPnHcePU/PmDY Rrdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=95XhoZugvCbJ1xJolEFAVKQ1p0Gkg/QHi8Sw4Nb9JUU=; b=igtutEExSCZB9tsdii/c6LTIMdcvwoUy9QdibLgM6MYyRKH+uby+PAgrZDuCbhNpcs 2ZFNKKRmESq63fkfkB6n8iy32FIexSeUNM3lcsPTfDshjzwTWVL67KWWcaPFMo/3bRao B8HDK7i5PfnUiwcq1DTz8zPwIWPIfEAa3qAkuUAIVEP4L5lRiGt5JX3Of9HBei86quab jr3CF2zX7yoLkodIF4EnkgfGD5DNY+zWY6VbYezlzIUPpCvSRY23VheZLpJZlAD7u7aw DUnAu3mVIqF5G864Qju8yA21sZMvasymjPGkGBR6/h87Bjq1iahS7L0LWyv6NHOpassG rzxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dTcraDs9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si259110ejh.275.2019.11.06.15.08.44; Wed, 06 Nov 2019 15:09:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dTcraDs9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726004AbfKFXFR (ORCPT + 99 others); Wed, 6 Nov 2019 18:05:17 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41750 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727196AbfKFXFR (ORCPT ); Wed, 6 Nov 2019 18:05:17 -0500 Received: by mail-pf1-f195.google.com with SMTP id p26so308684pfq.8; Wed, 06 Nov 2019 15:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=95XhoZugvCbJ1xJolEFAVKQ1p0Gkg/QHi8Sw4Nb9JUU=; b=dTcraDs9Cb9V7yUZrxzBw+VAgi/PsrVEU8E5WlU733RfVD9WLAayJRB69vEzq6BE+Z xLXywT9D2BG6cP9vYfYYiWat8mQvCZn8P15evlPrxot12RtuyWsHPU6aaXXzIVBCHa8E jyzfLFkqkFqfKzrDJ51Hrc6DsJ14P8XQX/f0Ztf17XPh01Ny3Ik3HauOvK13denp7VSW dhSXcvUkVIIGZE62T6NPRGvy/Pe2383eEcn0te7Hye9KRghq0NuSfu3mnZjoslRv3CYT ebKadQx8Abn0snAlgk8LSDxrv05I14XjqD7sIwsbl02AJxks0NGaMJ6b2r/iMcLBbicp myWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=95XhoZugvCbJ1xJolEFAVKQ1p0Gkg/QHi8Sw4Nb9JUU=; b=Gcs9AtydITfNLz5MQJeQAzt7qq8frgFP+aJGmN39sqGhoO7YHB/ZpUDO/veQWlP80b 6ccIkYM7UBo40QoNiPVMwUwdnmKlgGYAo5jAOM3uEQl1/jupF24GY5dwUO1ZhrudD9dj RWj2qmnedxoGVbXRduCB0GK2g4rLPszUTDZVLM17QQP1ciXgQpOMdBT3f+h9IY7asYdB kAmBzjb61gW8f2QEPVslMC9Z9BT9swhOO5Njocct/Hv8M/uOVCUJly0U3uIMyy1ryoxN wHW62BxxdpHKJc3d296UvVDejKzaBKbN/Lqv1Erw2V0BAGSb+0d5VKB4o5Ov1+VaKwaR +R/w== X-Gm-Message-State: APjAAAXdVteTati7qHM9rTw3m/Cku/RNr0pMrP8FduVy9NirLAXwDYA7 goY0ZEsBnECytKm+NVdVYYJ0pDX3 X-Received: by 2002:a63:ed4a:: with SMTP id m10mr391126pgk.255.1573081516638; Wed, 06 Nov 2019 15:05:16 -0800 (PST) Received: from aw-bldr-10.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 70sm32538pfw.160.2019.11.06.15.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 15:05:16 -0800 (PST) From: Jeffrey Hugo To: agross@kernel.org, bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrey Hugo Subject: [PATCH] soc: qcom: qmi: Return EPROBE_DEFER if no address family Date: Wed, 6 Nov 2019 15:05:11 -0800 Message-Id: <20191106230511.1290-1-jeffrey.l.hugo@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a client comes up early in the boot process (perhaps was a built-in driver), qmi_handle_init() will likely fail with a EAFNOSUPPORT since the underlying ipc router hasn't init'd and registered the address family. This should not be a fatal error since chances are, the router will come up later, so recode the error to EPROBE_DEFER so that clients will retry later. Signed-off-by: Jeffrey Hugo --- drivers/soc/qcom/qmi_interface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/qmi_interface.c b/drivers/soc/qcom/qmi_interface.c index f9e309f0acd3..1a03eaa38c46 100644 --- a/drivers/soc/qcom/qmi_interface.c +++ b/drivers/soc/qcom/qmi_interface.c @@ -655,8 +655,12 @@ int qmi_handle_init(struct qmi_handle *qmi, size_t recv_buf_size, qmi->sock = qmi_sock_create(qmi, &qmi->sq); if (IS_ERR(qmi->sock)) { - pr_err("failed to create QMI socket\n"); - ret = PTR_ERR(qmi->sock); + if (PTR_ERR(qmi->sock) == -EAFNOSUPPORT) { + ret = -EPROBE_DEFER; + } else { + pr_err("failed to create QMI socket\n"); + ret = PTR_ERR(qmi->sock); + } goto err_destroy_wq; } -- 2.17.1