From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id C2DD65F1A for ; Tue, 25 Sep 2018 21:23:13 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B1A3F345; Tue, 25 Sep 2018 15:23:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 25 Sep 2018 15:23:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=BNA 0DbSwu1J2D9JS1ox4Vk15sIZWns12Bh1XF2G4Uss=; b=PvtYOD995h1lGWOcU2S QQqpUUHBtCTghqo1k2BLN4uH1ei/jQO+4DIBJvFI1wOmQgKRRaGjmvseCyZut5I3 ISFAy9sFlV1TlW8tELIyT1riSlI+PYRQ6sB7XExr36Gck2lcxMXr7niNes8g2lnH 9FubCeNX4NFrHIiM+fWfKlJU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=BNA0DbSwu1J2D9JS1ox4Vk15sIZWns12Bh1XF2G4U ss=; b=rHfdxsrgX2Z5pyhtGO2UoOWYqSzlXgr2z26f5ltJLjmqS433lfcae+Chb 7VcSqrq8/W3oTv1Kz5UdyYd8TjK4kNcinC/CmnYXfLBnq65XdIl4oYSVo9hotTy1 iLDAx+Xz4/EULg0VKnDltKibqvJRkDjj/wlg6JgbOdAWXA5MKiIDSkoI+MvLTD/2 b80iCryO4SOZwVLRuzjMVdxdxYa4sw9HcRvVyv1cjwuHeAmjvFGj9QJ8DykfPtuF NLlEg8kTGi5o84CsQCmqwyaVhLr0d4DekQOFtsR1tqerZRkNap6KBZhxsnxVj8A7 q6rhiggWCWtVLtyyAfY4i9LQSNnwg== X-ME-Proxy: X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 51333102D6; Tue, 25 Sep 2018 15:23:10 -0400 (EDT) From: Thomas Monjalon To: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com Cc: dev@dpdk.org Date: Tue, 25 Sep 2018 21:22:59 +0200 Message-Id: <20180925192259.12249-1-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] drivers/bus: fill driver reference after NXP probing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 19:23:14 -0000 The probing functions of NXP buses were missing to set the driver used for successfully probing a device. The NXP driver and the generic rte_driver are now set in the device structures. Signed-off-by: Thomas Monjalon --- drivers/bus/dpaa/dpaa_bus.c | 6 +++++- drivers/bus/fslmc/fslmc_bus.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 16fabd1be..49cd04dbb 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -563,8 +563,12 @@ rte_dpaa_bus_probe(void) dev->device.devargs->policy == RTE_DEV_WHITELISTED)) { ret = drv->probe(drv, dev); - if (ret) + if (ret) { DPAA_BUS_ERR("Unable to probe.\n"); + } else { + dev->driver = drv; + dev->device.driver = &drv->driver; + } } break; } diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index d2900edc5..bfe81e236 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -396,8 +396,12 @@ rte_fslmc_probe(void) dev->device.devargs->policy == RTE_DEV_WHITELISTED)) { ret = drv->probe(drv, dev); - if (ret) + if (ret) { DPAA2_BUS_ERR("Unable to probe"); + } else { + dev->driver = drv; + dev->device.driver = &drv->driver; + } } break; } -- 2.19.0