> > > +static int i2c_mii_read_rollball(struct mii_bus *bus, int phy_id, int > > > reg) > > > +{ > > > + u8 buf[4], res[6]; > > > + int bus_addr, ret; > > > + u16 val; > > > + > > > + if (!(reg & MII_ADDR_C45)) > > > + return -EOPNOTSUPP; > > > + > > > + bus_addr = i2c_mii_phy_addr(phy_id); > > > + if (bus_addr != ROLLBALL_PHY_I2C_ADDR) > > > + return 0xffff; > > > + > > > + buf[0] = ROLLBALL_DATA_ADDR; > > > + buf[1] = (reg >> 16) & 0x1f; > > > + buf[2] = (reg >> 8) & 0xff; > > > + buf[3] = reg & 0xff; > > > > This looks odd. There are only 32 registers for C22 transactions, so > > it fits in one byte. You can set buf[1] and buf[2] to zero. > > C22 is not supported by this protocol.
Duh! Sorry for the noise. Andrew