Re: howto determine network device unit number? device.hints?

On Thu, Jan 15, 2009 at 08:07:35PM +0200, Yony Yossef wrote:
Eygene Ryabinkin wrote:
I wanted to stress only one point: simple 'kldunload <driver>' and
'kldload <driver>' makes devices to flip for Yony's case.
This means
that unless some PCI hotplug stuff is here (which I don't
believe to
be present, because no physical cards are touched and there is
actually a small amount of PCI hotplug support in FreeBSD), no
physical PCI devices get added or removed from the PCI
child tree. It
looks like that something goes wrong during the PCI tree reprobe on
the driver module loading.

BTW: Thanks for looking further at the software layer first.

VIM is a wee bit easier to use than a bus analyzer.

Most motherboards don't support PCI geographical addressing,
so... I wager it's the network driver code which may be the
source of the problem, based on your analysis!

If this code just doing a blind bump of an instance count and
using that as a "unit number"... well, that's OK and expected
for software virtual devices, but is counter-intuitive for
something like hardware.

But I don't have any mtnic source, so this is pure
speculation on my part.

Correct me if I am wrong, but pci_driver_added from /sys/pci/pci.c
will invoke device_get_children() to get the list of the attached
devices, and for PCI case the list should be static.

Yup, that's right.

I guess that when Yony will enable verbose boot and will show us
kernel messages from two successive kldunload/kldload sequences, we
will get some additional information about what's going on.

Hopefully he will chime in...

[bms does some google searching *before* he thinks about
throwing his toys out of the pram at the Orignal.Poster.]

ding :-) [a light bulb above bms' head]

So... Yony. you're writing a driver.
Maybe there's a bug in it?
That's cool, dude.
Hope it's a nice card and you plan on sharing the sweets with
the rest of the class. ;-)

But seriously, please mention that you are writing a driver
in general questions you might ask about the whole system,
otherwise, FreeBSD volunteers will run around going "Is core
code broken?" and that's not so good for community stress
levels as a whole.

with lemonade,

Sorry for risking the whole community with a massive heart attack Bruce :)
Yes, I am writing a driver and yes, it still has a bug or two I guess..
About sharing it with the rest of the class, that's something I wanted
to ask you guys: what's the procedure for a 10GigE driver to apply
for the FreeBSD kernel?

Pretty much just get it working, make sure it's licensed under a BSD,
MIT, or ISC license (ideally, others are possible, but require more
approval), and then find someone to review and commit it or sponsor the
maintainer for a commit bit.

Mellanox has started porting it's products to FreeBSD about a year
ago, hoping to see our 10GigE and InfiniBand drivers inbox next year.


-- Brooks

freebsd-net@xxxxxxxxxxx mailing list
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"

Attachment: pgpQJ3v32d3mu.pgp
Description: PGP signature

Relevant Pages

  • Re: PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out"
    ... 2.6.23-rc1 I have trouble with my network connection. ... # Bus options (PCI, PCMCIA, EISA, MCA, ISA) ... # PCCARD support ... # Generic Driver Options ...
  • IDE:PORTS ALREADY IN USE | USB: irq 11: nobody cared! | loop pcmcia_core.ko which needs pcmcia_core.
    ... VP_IDE: IDE controller at PCI slot 0000:00:11.1 ... USB no longer working. ... irq 11: nobody cared! ... 15 nodes reported by PnP BIOS; 15 recorded by driver ...
  • only a single core (out of 8) initialized
    ... this is 2.6.30-rc7 with a patch added to debug a nv sata driver incompatibility with the Intel SSDs on a tyan motherboard ... kernel direct mapping tables up to d7fd0000 @ 10000-16000 ... Allocating PCI resources starting at f1000000 ... CPU: L2 Cache: 1024K ...
  • 2.6.15-rc5-mm2 does not boot on AMD64 with sata_sil
    ... Using ACPI for IRQ routing ... Uniform CD-ROM driver Revision: 3.20 ... Using ACPI for SMP configuration information Allocating PCI resources starting at e2000000 Checking aperture... ... Real Time Clock Driver v1.12 hw_random: AMD768 system management I/O registers at 0x8000. ...
  • kernel error
    ... but USB mouse is detected ... card driver dont work correctly) ... Failure registering Root Plug module with the kernel ... PCI: MCFG area at f0000000 reserved in E820 ...