Re: ifmap for ifconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 15 Jan 2003, D Qi wrote:

> It will be nice if I can reconfigure the network device driver after it 
> being loaded.

The "MII" ioctl calls allow this.  You can set
   the autonegotiation advertised capabilities
   force the speed and duplex
     (note that not all drivers correctly implement this: the driver
      must look at the data written to the control register)
    
My drivers also implement related ioctl()
   set the message level (generic)
   set driver-specific parameters for some NICs
      (multicast_filter_limit, rx_copybreak, multicast filter limit)

> I found that ifconfig can pass some information to the 
> driver through (*set_config). Is it ok to use it? Also what is the 
> member ifmap.port for? Is this the thing I can use for PHY selection?

That interface was implemented about a decade ago, and should have been
deleted long ago.  Its implementation was flawed from the start,
although the basic idea was OK for the time: ISA wasn't there were
almost no transceiver options and no transceiver management information
was available.

The MII management interface isn't perfect (1), but it's a very widely
used standard.

(1) The MII management registers do not directly consider 10base2 and AUI,
    but those can be cleanly added as extensions.  The issue is that
    they didn't define bits for Gb speed in the (available!) extension
    registers #7-15.  Any new Linux interface should consider 10Gb
    transceiver management, and odd/variable-speed wireless interfaces.

-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Scyld Beowulf cluster system
Annapolis MD 21403			410-990-9993

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux