No subject

Tue Feb 12 16:15:20 EST 2008

xenet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
    struct mii_ioctl_data *data =3D (struct mii_ioctl_data *)

    case SIOCGMIIREG:   /* Read GMII PHY register. */
        ret =3D XTemac_PhyRead(&lp->Emac, data->phy_id,
                       data->reg_num, &data->val_out);

from linux/mii.h

/* This structure is used in all SIOCxMIIxxx ioctl calls */
struct mii_ioctl_data {
	__u16		phy_id;
	__u16		reg_num;
	__u16		val_in;
	__u16		val_out;

from linux/if.h

struct ifreq=20
		char	ifrn_name[IFNAMSIZ];		/* if name, e.g.
"en0" */
	} ifr_ifrn;
	union {
		struct	sockaddr ifru_addr;
		struct	sockaddr ifru_dstaddr;
		struct	sockaddr ifru_broadaddr;
		struct	sockaddr ifru_netmask;
		struct  sockaddr ifru_hwaddr;
		short	ifru_flags;
		int	ifru_ivalue;
		int	ifru_mtu;
		struct  ifmap ifru_map;
		char	ifru_slave[IFNAMSIZ];	/* Just fits the size */
		char	ifru_newname[IFNAMSIZ];
		void __user *	ifru_data;
		struct	if_settings ifru_settings;
	} ifr_ifru;

-----Original Message-----
From: at
[ at] On
Behalf Of khollan
Sent: Thursday, March 06, 2008 1:44 PM
To: linuxppc-embedded at
Subject: Re: Xilinx Temac link detect

I figure I could write a C program to talk to the ioctl in the TEMAC
and read the PHY register.  Does anyone have example code for talking to
network ioctl's?


View this message in context:
Sent from the linuxppc-embedded mailing list archive at

Linuxppc-embedded mailing list
Linuxppc-embedded at

More information about the Linuxppc-embedded mailing list