kernel/common/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
----------------------------------------------------------------------------
4265/**
4266 * stmmac_dvr_probe
4267 * @device: device pointer
4268 * @plat_dat: platform data pointer
4269 * @res: stmmac resource pointer
4270 * Description: this is the main probe function used to
4271 * call the alloc_etherdev, allocate the priv structure.
4272 * Return:
4273 * returns 0 on success, otherwise errno.
4274 */
4275int stmmac_dvr_probe(struct device *device,
4276 struct plat_stmmacenet_data *plat_dat,
4277 struct stmmac_resources *res)
4278{
4279 struct net_device *ndev = NULL;
4280 struct stmmac_priv *priv;
4281 u32 queue, maxq;
4282 int ret = 0;
4283
4284 ndev = alloc_etherdev_mqs(sizeof(struct stmmac_priv),
4285 MTL_MAX_TX_QUEUES,
4286 MTL_MAX_RX_QUEUES);
4287 if (!ndev)
4288 return -ENOMEM;
4289
4290 SET_NETDEV_DEV(ndev, device);
4
stmmac_dvr_probe解析
于 2024-04-07 15:55:44 首次发布