Re: [PATCH net-next 1/2] net: hns3: fix a bug when getting phy address from NCL_config file

2017-11-08 Thread Andrew Lunn
On Thu, Nov 09, 2017 at 10:02:37AM +0800, lipeng (Y) wrote: > > > On 2017/11/8 22:30, Andrew Lunn wrote: > >On Wed, Nov 08, 2017 at 03:52:22PM +0800, Lipeng wrote: > >>From: Fuyun Liang > >> > >>Driver gets phy address from NCL_config file and uses the phy address > >>to initialize phydev. There

Re: [PATCH net-next 1/2] net: hns3: fix a bug when getting phy address from NCL_config file

2017-11-08 Thread lipeng (Y)
On 2017/11/8 22:30, Andrew Lunn wrote: On Wed, Nov 08, 2017 at 03:52:22PM +0800, Lipeng wrote: From: Fuyun Liang Driver gets phy address from NCL_config file and uses the phy address to initialize phydev. There are 5 bits for phy address. And C22 phy address has 5 bits. So 0-31 are all valid

RE: [PATCH net-next 1/2] net: hns3: fix a bug when getting phy address from NCL_config file

2017-11-08 Thread Salil Mehta
; Subject: Re: [PATCH net-next 1/2] net: hns3: fix a bug when getting phy > address from NCL_config file > > On Wed, Nov 08, 2017 at 03:52:22PM +0800, Lipeng wrote: > > From: Fuyun Liang > > > > Driver gets phy address from NCL_config file and uses the phy address &g

Re: [PATCH net-next 1/2] net: hns3: fix a bug when getting phy address from NCL_config file

2017-11-08 Thread Andrew Lunn
On Wed, Nov 08, 2017 at 03:52:22PM +0800, Lipeng wrote: > From: Fuyun Liang > > Driver gets phy address from NCL_config file and uses the phy address > to initialize phydev. There are 5 bits for phy address. And C22 phy > address has 5 bits. So 0-31 are all valid address for phy. If there > is no

[PATCH net-next 1/2] net: hns3: fix a bug when getting phy address from NCL_config file

2017-11-07 Thread Lipeng
From: Fuyun Liang Driver gets phy address from NCL_config file and uses the phy address to initialize phydev. There are 5 bits for phy address. And C22 phy address has 5 bits. So 0-31 are all valid address for phy. If there is no phy, it will crash. Because driver always get a valid phy address.