mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Woody Wu <narkewoody@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: The ethernet driver doesn't get probed
Date: Mon, 26 Nov 2012 06:59:36 +0000 (UTC)	[thread overview]
Message-ID: <slrnkb64p3.2k6.narkewoody@zuhnb712.local.com> (raw)

Hi, List

I enabled an ax88796 Ethernet driver in the kernel configuration menu.
Kernel version is 3.4.19. The arch is ARM and the system type is
Samsung S3C2410.

In my debugging, I found the probe function of the driver did not get
invoked.

This driver is declared as platform_driver

static struct platform_driver axdrv = {
	.driver	= {
		.name		= "ax88796",
		.owner		= THIS_MODULE,
	},
	.probe		= ax_probe,
	.remove		= ax_remove,
	.suspend	= ax_suspend,
	.resume		= ax_resume,
};

module_platform_driver(axdrv);

So, its driver init function actually goes through
platform_driver_register() and then driver_register(), which eventually
call driver_attach() trying to attach the driver to the "platform" bus.
But, on the platform bus, there is no any device that can match the
ax88796 driver, hence the driver failed in attaching.

I discovered the full list of devices found on the platform bus:

    s3c2410-ohci,
    s3c2410-lcd,
    s3c2410-wdt,
    s3c2410-i2c,
    s3c24xx-iis,
    s3c2410-nand,
    s3c24xx_led,
    s3c2410-uart,

You see, in the list, there is no a device looks like ax88796. All these
already existed devices on the platform bus are build-in peripherals on
the SoC of s3c2410, they are compiled into the code by enabling some
kernel configuration options.

My question is, in terms of Linux driver technology, how to enable a
non-PCI and not on-chip device driver? I think the ax_probe function
must be called somehow, is this thinking right? If yes, I think before
the driver get initialized, the corresponding device has to appear on
the bus, but now it seems not.

Thanks in advance.

-- 
woody
I can't go back to yesterday - because I was a different person then.


             reply	other threads:[~2012-11-26  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26  6:59 Woody Wu [this message]
2012-11-26  7:47 ` Belisko Marek
2012-11-26  7:50   ` Li, Zhen-Hua
2012-11-26  9:06     ` Woody Wu
2012-11-26  9:12       ` Li, Zhen-Hua
2012-11-26  9:00   ` Woody Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnkb64p3.2k6.narkewoody@zuhnb712.local.com \
    --to=narkewoody@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®