eth0: PHY id 0x00221619 is not supported! HELP

Garcia Jérémie GARCIAJ at
Mon May 16 18:42:51 EST 2005

FIrst of all tks a lot for your answers everybody.
Tien, in my case, I do not have and so do not use the function "mii_phy_probe(struct mii_phy *phy, int mii_id)" in the "ibm_ocp_phy.c" file.
Here is the list of call used in my process:

--> ocp_enet_probe(int curr_emac)                            [ibm_ocp_enet.c]
     --> find_phy(struct net_device *dev)                    [ibm_ocp_phy.c]
          --> check_phy(struct net_device *dev, int phnum)   [ibm_ocp_phy.c]

And here are the function detailed:

static int
ocp_enet_probe(int curr_emac)
	int ret = 1;
	int i;
	bd_t *bd;
	struct net_device *dev;
	struct ocp_enet_private *ep;
	struct ocp_dev *emac_driver;
        dev_list_t *new_dev_list;            	
	dev = init_etherdev(NULL, sizeof (struct ocp_enet_private));       
	if (dev == NULL) {
		       "ibm_ocp_enet: Could not allocate ethernet device.\n");
		return -1;

 /* create devlist instance */
 new_dev_list = (dev_list_t *)kmalloc(sizeof(struct dev_list),GFP_ATOMIC);
 if(new_dev_list == NULL)
    printk(KERN_ERR "IBM_OCP_ENET: dev_list alloc failed \n");
    return -1;
 new_dev_list->next = NULL;
 new_dev_list->dev = dev;
 if (emac_dev_list == NULL)
    emac_dev_list = new_dev_list;
    cur_dev_list = new_dev_list;
    cur_dev_list->next = new_dev_list;
    cur_dev_list = new_dev_list;

	ep = dev->priv;
	ep->emac_num = curr_emac;
	ep->mal = DCRN_MAL_BASE;
	ep->sequence_done = 0;

	emac_driver = &ep->ocpdev;
	emac_driver->type = EMAC;
	ocp_set_drvdata(emac_driver, dev);

	ep->emacp = (volatile emac_t *) __ioremap
	    (emac_driver->paddr, sizeof (emac_t), _PAGE_NO_CACHE);
	init_zmii(ZMII_AUTO, dev);
        /* Beginning of my pb         */
	if (!ep->phy) {
		return -1;
	ep->link = 1;
	ep->txchan = 0x80000000  >> curr_emac*2 ;
	ep->rxchan = 0x80000000 >> curr_emac;
	dev->irq = ocp_get_irq(EMAC,curr_emac);
	/* read the MAC Address */
	bd = (bd_t *) __res;      
	for (i = 0; i < 6; i++)
		dev->dev_addr[i] = bd->BD_EMAC_ADDR(curr_emac, i);	/* Marco to disques array */     
	/* Fill in the driver function table */
	dev->open = &ppc405_enet_open;
	dev->hard_start_xmit = &ppc405_enet_start_xmit;
	dev->stop = &ppc405_enet_close;
	dev->get_stats = &ppc405_enet_stats;
	dev->set_multicast_list = &ppc405_enet_set_multicast_list;
	dev->do_ioctl = &ocp_enet_ioctl;
	emac_dev[curr_emac] = dev;
	printk(KERN_NOTICE "Reset ethernet interfaces\n");

	/* Reset the EMAC */
	out_be32(&ep->emacp->em0mr0, EMAC_M0_SRST);

	if (in_be32(&ep->emacp->em0mr0) & EMAC_M0_SRST) {
		printk(KERN_NOTICE "%s: Cannot open interface without Link\n",
		return -1;

	return (ret);


static int check_phy(struct net_device *dev, int phnum)
	struct ocp_enet_private *fep = dev->priv;
	uint phy_reg;
	int i;

	fep->phy_addr = phnum;
	if (ocp_enet_mdio_read(dev, mk_mii_read(MII_REG_PHYIR1), &phy_reg))
		return 0;


	/* Got 2nd part of ID, now get remainder. */
	fep->phy_id = (phy_reg & 0xffff) << 16;

	if (ocp_enet_mdio_read(dev, mk_mii_read(MII_REG_PHYIR2), &phy_reg)) {
		if (phnum == MIN_PHY_ADDR)
			printk(KERN_ERR "%s: Got bad Phy Read, missing MDIO pullup?\n",
		return 0;

	fep->phy_id |= (phy_reg & 0xffff);

	for (i = 0; phy_info[i]; i++)
		if (phy_info[i]->id == (fep->phy_id >> phy_info[i]->shift))
	if (!phy_info[i]) {
		printk(KERN_ERR "%s: PHY id 0x%08x is not supported!\n",
		       dev->name, fep->phy_id);
		return 0;

	fep->phy = phy_info[i];

	printk("%s: Phy @ 0x%x, type %s (0x%08x)\n",
	       dev->name, fep->phy_addr, fep->phy->name, fep->phy_id);
	return 1;


void find_phy(struct net_device *dev)
	int i;

	for (i = next_phy_available; i <= MAX_PHY_ADDR; i++)
		if (check_phy(dev, i)){
			next_phy_available = i + 1;
	printk("%s: No PHY device found.\n", dev->name);

So, how can I apply your method Thien? Could you give me a clue (
Tks a lot cause this part of linux code is very very unknown to me...


-------- Message d'origine--------
De: Nghiem, Tien [mailto:TNghiem at]
Date: ven. 13/05/2005 20:25
À: Garcia Jérémie; linuxppc-dev at
Objet : RE: eth0: PHY id 0x00221619 is not supported! HELP
Hi Garcia,

In the ibm_ocp_phy.c file, the function mii_phy_probe(struct mii_phy *phy, int mii_id) has not found the ID of your ethernet transceiver, so you can bypass it by doing the following:

         int rc;
         u32 id;
         struct mii_phy_def* def;
         int i;
         phy->autoneg = 0;
         phy->advertising = 0;
         phy->mii_id = mii_id;
         phy->speed = 0;
         phy->duplex = 0;
         phy->pause = 0;
        /* Take PHY out of isloate mode and reset it. */
         rc = reset_one_mii_phy(phy, mii_id);
        //if (rc)
        //        return -ENODEV;
        /* Read ID and find matching entry */   
        //id = (phy_read(phy, MII_PHYSID1) << 16 | phy_read(phy, MII_PHYSID2))
                                 & 0xfffffff0;
        //for (i=0; (def = mii_phy_table[i]) != NULL; i++)
        //        if ((id & def->phy_id_mask) == def->phy_id)
        //                break;
        def = mii_phy_table[0];
        /* Should never be NULL (we have a generic entry), but... */
         if (def == NULL)
                return -ENODEV;
         phy->def = def;

         /* Setup default advertising */
         phy->advertising = def->features;
         return 0;

I don't know the PPC 405EP, but I did it for my custom board (MPC8260). It should work.


-----Original Message-----
From: linuxppc-dev-bounces at
[mailto:linuxppc-dev-bounces at]On Behalf Of Garcia Jérémie
Sent: Friday, May 13, 2005 11:15 AM
To: linuxppc-dev at
Subject: eth0: PHY id 0x00221619 is not supported! HELP

Hi everybody,
We are developping a custom board which uses a ppc405EP and on which one we'd like to load a linux hardhat.
During the boot process, we're getting error messages about the ethernet PHY. That is really annoying cause we plan to moubnt the file system via nfs. So no ethernet no NFS...
Could someone give us a tip and tell us if the messages displayed before seem to be normal cause we had to modify some part of the kernel in order to get Linux booting.
What those ethernet messages mean? Everythin seems to happen in the "ibm_ocp_enet.c" eand "ibm_ocp_phy.c" filesPlease help....
So here we go ---->>>>>>>>>

Linux/PPC load: console=ttyS0,19200 root=/dev/nfs rw ip=on
Uncompressing Linux...done.
Now booting the kernel
Linux version 2.4.20_mvl31-405ep_eval (root at (version gcc 3.3.1 (MontaVista 3.3.1- 2003-12-24)) #26 ven mai 13 5
AMCC Q80G Board
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,19200 root=/dev/nfs rw ip=on
hr_time_init: arch_to_nsec = 10485759, nsec_to_arch = 858993476
Calibrating delay loop... 199.47 BogoMIPS
Memory: 14416k available (1280k kernel code, 424k data, 64k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
OCP uart ver 1.6.2 init complete
LSP Revision 1
ikconfig 0.5 with /proc/ikconfig
Starting kswapd
Disabling the Out Of Memory Killer
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis Communications AB.
i2c-core.o: i2c core module version 2.6.2 (20011118)
i2c-dev.o: i2c /dev entries driver module version 2.6.2 (20011118)
i2c-proc.o version 2.6.2 (20011118)
pty: 256 Unix98 ptys configured
eeprom.o version 2.6.2 (20011118)
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xef600300 (irq = 0) is a 16550A
ttyS01 at 0xef600400 (irq = 1) is a 16550A
IBM gpio driver version 07.25.02
GPIO #0 at 0xc207d700
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
eth0: PHY id 0x00221619 is not supported!
eth0: PHY id 0x00221619 is not supported!
eth0: No PHY device found.
removing net dev
eth0: PHY id 0x00221619 is not supported!
eth0: PHY id 0x00221619 is not supported!
eth0: No PHY device found.
removing net dev
IBM IIC driver v2.0
ibm-iic: using compatibility value for OPB freq, fix your board specific setup
ibm-iic0: using standard (100 kHz) mode
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMPIP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
IP-Config: No network devices available.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
kmod: failed to exec /sbin/modprobe -s -k block-major-2, errno = 2
VFS: Cannot open root device "nfs" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00
 <0>Rebooting in 180 seconds..

Tks a lot for your precious help
Linuxppc-dev mailing list
Linuxppc-dev at

More information about the Linuxppc-dev mailing list