Message ID | 1394712342-15778-19-Taiwan-albertk@realtek.com |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
Hello. On 8/20/2014 12:58 PM, Hayes Wang wrote: > The functions are used to update the firmware. Move the actions into > the firmware files. > Signed-off-by: Hayes Wang <hayeswang@realtek.com> > --- > drivers/net/usb/r8152.c | 24 ------------------------ > 1 file changed, 24 deletions(-) > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index 33dcc97..937d132 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c [...] > @@ -2248,7 +2226,6 @@ static void r8152b_hw_phy_cfg(struct r8152 *tp) > > r8152b_disable_aldps(tp); > > - rtl_clear_bp(tp); > Why leave 2 empty lines? One is enough. > r8152b_enable_aldps(tp); > set_bit(PHY_RESET, &tp->flags); > @@ -2404,7 +2381,6 @@ static void r8153_hw_phy_cfg(struct r8152 *tp) > r8152_mdio_write(tp, MII_BMCR, data); > } > > - r8153_clear_bp(tp); > Ditto. > if (tp->version == RTL_VER_03) { > data = ocp_reg_read(tp, OCP_EEE_CFG); > WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
: Sergei Shtylyov [mailto:sergei.shtylyov@cogentembedded.com] > Sent: Wednesday, August 20, 2014 8:01 PM > To: Hayes Wang; netdev@vger.kernel.org > Cc: nic_swsd; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org > Subject: Re: [PATCH net-next 3/4] r8152: remove clear_bp function [...] > > r8152b_disable_aldps(tp); > > > > - rtl_clear_bp(tp); > > > > Why leave 2 empty lines? One is enough. The next patch would use another fucntion at the same location. I skip removing the empty line and re-adding it again. Is that better to do so? I would resend the patches if the answer is yes. Best Regards, Hayes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/21/2014 06:12 AM, Hayes Wang wrote: > [...] >>> r8152b_disable_aldps(tp); >>> >>> - rtl_clear_bp(tp); >>> >> Why leave 2 empty lines? One is enough. > The next patch would use another fucntion at the > same location. I skip removing the empty line and > re-adding it again. Is that better to do so? I would > resend the patches if the answer is yes. Sorry, I haven't looked at your next patch, too big for me. :-) > Best Regards, > Hayes WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov [mailto:sergei.shtylyov@cogentembedded.com] [...] > >> Why leave 2 empty lines? One is enough. > > > The next patch would use another fucntion at the > > same location. I skip removing the empty line and > > re-adding it again. Is that better to do so? I would > > resend the patches if the answer is yes. > > Sorry, I haven't looked at your next patch, too big for me. :-) It's my mistake. I would avoid it next time. Thanks for your notice. Best Regards, Hayes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 33dcc97..937d132 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -2189,28 +2189,6 @@ static void rtl_phy_reset(struct r8152 *tp) } } -static void rtl_clear_bp(struct r8152 *tp) -{ - ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_0, 0); - ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_2, 0); - ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_4, 0); - ocp_write_dword(tp, MCU_TYPE_PLA, PLA_BP_6, 0); - ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_0, 0); - ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_2, 0); - ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_4, 0); - ocp_write_dword(tp, MCU_TYPE_USB, USB_BP_6, 0); - mdelay(3); - ocp_write_word(tp, MCU_TYPE_PLA, PLA_BP_BA, 0); - ocp_write_word(tp, MCU_TYPE_USB, USB_BP_BA, 0); -} - -static void r8153_clear_bp(struct r8152 *tp) -{ - ocp_write_byte(tp, MCU_TYPE_PLA, PLA_BP_EN, 0); - ocp_write_byte(tp, MCU_TYPE_USB, USB_BP_EN, 0); - rtl_clear_bp(tp); -} - static void r8153_teredo_off(struct r8152 *tp) { u32 ocp_data; @@ -2248,7 +2226,6 @@ static void r8152b_hw_phy_cfg(struct r8152 *tp) r8152b_disable_aldps(tp); - rtl_clear_bp(tp); r8152b_enable_aldps(tp); set_bit(PHY_RESET, &tp->flags); @@ -2404,7 +2381,6 @@ static void r8153_hw_phy_cfg(struct r8152 *tp) r8152_mdio_write(tp, MII_BMCR, data); } - r8153_clear_bp(tp); if (tp->version == RTL_VER_03) { data = ocp_reg_read(tp, OCP_EEE_CFG);
The functions are used to update the firmware. Move the actions into the firmware files. Signed-off-by: Hayes Wang <hayeswang@realtek.com> --- drivers/net/usb/r8152.c | 24 ------------------------ 1 file changed, 24 deletions(-)