Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752912AbaAFIJv (ORCPT ); Mon, 6 Jan 2014 03:09:51 -0500 Received: from mail-bn1lp0150.outbound.protection.outlook.com ([207.46.163.150]:33731 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbaAFIJt convert rfc822-to-8bit (ORCPT ); Mon, 6 Jan 2014 03:09:49 -0500 X-Greylist: delayed 930 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 Jan 2014 03:09:49 EST From: Shaohui Xie To: "shh.xie@gmail.com" , "davem@davemloft.net" , "jg1.han@samsung.com" , "mugunthanvnm@ti.com" , "f.fainelli@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Shaohui Xie Subject: RE: [PATCH 1/6][v3] phylib: Add Clause 45 read/write functions Thread-Topic: [PATCH 1/6][v3] phylib: Add Clause 45 read/write functions Thread-Index: AQHO7NFjVOf7oVwtIUKDKGGQ7Dn5vJp3jT9g Date: Mon, 6 Jan 2014 07:54:04 +0000 Message-ID: <51bdf0e57ba941bf92b1d969631e440b@BLUPR03MB067.namprd03.prod.outlook.com> References: <1385703912-12800-1-git-send-email-shh.xie@gmail.com> In-Reply-To: <1385703912-12800-1-git-send-email-shh.xie@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [123.151.195.50] x-forefront-prvs: 0083A7F08A x-forefront-antispam-report: SFV:NSPM;SFS:(10009001)(13464003)(51704005)(189002)(199002)(377454003)(81686001)(80976001)(74662001)(81542001)(76796001)(76482001)(74876001)(47976001)(2656002)(50986001)(81342001)(81816001)(87266001)(47446002)(69226001)(31966008)(74316001)(74502001)(49866001)(76786001)(63696002)(85306002)(80022001)(65816001)(19580395003)(74366001)(76576001)(66066001)(56816005)(33646001)(83072002)(79102001)(77096001)(4396001)(53806001)(51856001)(83322001)(19580405001)(47736001)(56776001)(77982001)(54316002)(87936001)(85852003)(90146001)(74706001)(54356001)(59766001)(46102001)(24736002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB068;H:BLUPR03MB067.namprd03.prod.outlook.com;CLIP:123.151.195.50;FPR:;RD:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, All, I saw the state of this patch sets were set to "Deferred", may I know if there is any plan or request for these patches, or is there a big picture for supporting 10G PHYs? Best Regards, Shaohui Xie > -----Original Message----- > From: shh.xie@gmail.com [mailto:shh.xie@gmail.com] > Sent: Friday, November 29, 2013 1:45 PM > To: davem@davemloft.net; jg1.han@samsung.com; mugunthanvnm@ti.com; > f.fainelli@gmail.com; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org > Cc: Xie Shaohui-B21989 > Subject: [PATCH 1/6][v3] phylib: Add Clause 45 read/write functions > > From: Andy Fleming > > Need an extra parameter to read or write Clause 45 PHYs, so need a > different API with the extra parameter. > > Signed-off-by: Andy Fleming > Signed-off-by: Shaohui Xie > --- > v3 changes: add C45 check. > > include/linux/phy.h | 39 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/include/linux/phy.h b/include/linux/phy.h index > 48a4dc3..0ff2476 100644 > --- a/include/linux/phy.h > +++ b/include/linux/phy.h > @@ -498,6 +498,24 @@ static inline int phy_read(struct phy_device *phydev, > u32 regnum) } > > /** > + * phy_read_mmd - Convenience function for reading a register > + * from an MMD on a given PHY. > + * @phydev: The phy_device struct > + * @devad: The MMD to read from > + * @regnum: The register on the MMD to read > + * > + * Same rules as for phy_read(); > + */ > +static inline int phy_read_mmd(struct phy_device *phydev, int devad, > +u32 regnum) { > + if (!phydev->is_c45) > + return -EOPNOTSUPP; > + > + return mdiobus_read(phydev->bus, phydev->addr, > + MII_ADDR_C45 | (devad << 16) | (regnum & 0xffff)); } > + > +/** > * phy_write - Convenience function for writing a given PHY register > * @phydev: the phy_device struct > * @regnum: register number to write > @@ -533,6 +551,27 @@ static inline bool phy_is_internal(struct phy_device > *phydev) > return phydev->is_internal; > } > > +/** > + * phy_write_mmd - Convenience function for writing a register > + * on an MMD on a given PHY. > + * @phydev: The phy_device struct > + * @devad: The MMD to read from > + * @regnum: The register on the MMD to read > + * @val: value to write to @regnum > + * > + * Same rules as for phy_write(); > + */ > +static inline int phy_write_mmd(struct phy_device *phydev, int devad, > + u32 regnum, u16 val) > +{ > + if (!phydev->is_c45) > + return -EOPNOTSUPP; > + > + regnum = MII_ADDR_C45 | ((devad & 0x1f) << 16) | (regnum & 0xffff); > + > + return mdiobus_write(phydev->bus, phydev->addr, regnum, val); } > + > struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int > phy_id, > bool is_c45, struct phy_c45_device_ids *c45_ids); struct > phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); > -- > 1.8.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/