Message ID | 201306190207.46832.sergei.shtylyov@cogentembedded.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Paul Mundt |
Headers | show |
Hi Sergei, On Wed, Jun 19, 2013 at 7:07 AM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > sh_eth_interrupt() uses the same Rx interrupt mask twice to check the interrupt > status register -- #define EESR_RX_CHECK and use it instead. > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Thanks for the patch, nice to see that this driver is moving forward. Can you please include information about which SoC / board this code has been tested on? As you know, the actual hardware that this driver is operating on is not very well documented, so at least having information about the SoC together with the commit message or patch may help in the future. Cheers, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Magnus Damm <magnus.damm@gmail.com> Date: Wed, 19 Jun 2013 15:47:47 +0900 > Hi Sergei, > > On Wed, Jun 19, 2013 at 7:07 AM, Sergei Shtylyov > <sergei.shtylyov@cogentembedded.com> wrote: >> sh_eth_interrupt() uses the same Rx interrupt mask twice to check the interrupt >> status register -- #define EESR_RX_CHECK and use it instead. >> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > Thanks for the patch, nice to see that this driver is moving forward. > > Can you please include information about which SoC / board this code > has been tested on? As you know, the actual hardware that this driver > is operating on is not very well documented, so at least having > information about the SoC together with the commit message or patch > may help in the future. Sergei, please make this suggested change and resubmit this series, thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 06/19/2013 11:50 AM, David Miller wrote: >> On Wed, Jun 19, 2013 at 7:07 AM, Sergei Shtylyov >> <sergei.shtylyov@cogentembedded.com> wrote: >>> sh_eth_interrupt() uses the same Rx interrupt mask twice to check the interrupt >>> status register -- #define EESR_RX_CHECK and use it instead. >>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> >> Thanks for the patch, nice to see that this driver is moving forward. Magnus, BTW, are you content with the amount of cleanup that is currently queued in the Dave Miller's 'net-next.git' repo, or should I move further: e.g., move the SoC specific fields like 'register_type' from the platform data to the driver's internal data structure? >> Can you please include information about which SoC / board this code >> has been tested on? As you know, the actual hardware that this driver >> is operating on is not very well documented, so at least having >> information about the SoC together with the commit message or patch >> may help in the future. > Sergei, please make this suggested change and resubmit this series, thank you. Hm, I guess Magnus didn't really mean patch #1 which doesn't change anything in the driver's behavior but only the actual NAPI support. OK, it was tested on R8A7778 BOCK-W board and I'll add that to the changelog. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Sergei, On Thu, Jun 20, 2013 at 3:27 AM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > On 06/19/2013 11:50 AM, David Miller wrote: >>> On Wed, Jun 19, 2013 at 7:07 AM, Sergei Shtylyov >>> <sergei.shtylyov@cogentembedded.com> wrote: >>>> >>>> sh_eth_interrupt() uses the same Rx interrupt mask twice to check the >>>> interrupt >>>> status register -- #define EESR_RX_CHECK and use it instead. > > >>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > >>> Thanks for the patch, nice to see that this driver is moving forward. > > > Magnus, BTW, are you content with the amount of cleanup that is currently > queued in the Dave Miller's 'net-next.git' repo, or should I move further: > e.g., move the SoC specific fields like 'register_type' from the platform > data to the driver's internal data structure? I just had a look at this particular driver in net-next.git and I think it looks very good. Thanks a lot for your efforts! Regarding moving further with cleanups, it looks to me that it is now possible to build a single kernel image with this driver included and use it on multiple SoCs without #ifdef causing trouble. This recent development has been needed for mach-shmobile to play well with the multiplatform work going on in the ARM architecture. So since that seems solved then I'm quite happy with the driver state from a cleanliness point of view. As for this driver in general, I'd be very happy to see future development in these areas: - DT support - PHY support for r8a7790 Lager - PHY IRQ support for r8a7790 Lager Let me know if I can help you with remote board access. >>> Can you please include information about which SoC / board this code >>> has been tested on? As you know, the actual hardware that this driver >>> is operating on is not very well documented, so at least having >>> information about the SoC together with the commit message or patch >>> may help in the future. > > >> Sergei, please make this suggested change and resubmit this series, thank >> you. > > > Hm, I guess Magnus didn't really mean patch #1 which doesn't change > anything in the driver's behavior but only the actual NAPI support. OK, it > was tested on R8A7778 BOCK-W board and I'll add that to the changelog. Thanks for updating your code. In this particular case it may not matter very much, but in general I believe it is good to include which hardware the code as been tested on. Cheers, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 01-07-2013 16:12, Magnus Damm wrote: >>>>> sh_eth_interrupt() uses the same Rx interrupt mask twice to check the >>>>> interrupt >>>>> status register -- #define EESR_RX_CHECK and use it instead. >>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> >>>> Thanks for the patch, nice to see that this driver is moving forward. >> Magnus, BTW, are you content with the amount of cleanup that is currently >> queued in the Dave Miller's 'net-next.git' repo, or should I move further: >> e.g., move the SoC specific fields like 'register_type' from the platform >> data to the driver's internal data structure? > I just had a look at this particular driver in net-next.git and I > think it looks very good. Thanks a lot for your efforts! > Regarding moving further with cleanups, it looks to me that it is now > possible to build a single kernel image with this driver included and > use it on multiple SoCs without #ifdef causing trouble. This recent > development has been needed for mach-shmobile to play well with the > multiplatform work going on in the ARM architecture. So since that > seems solved then I'm quite happy with the driver state from a > cleanliness point of view. > As for this driver in general, I'd be very happy to see future > development in these areas: > - DT support Full DT support won't be possible due to the driver using procedural platform data. Partial support will be possible using OF_DEV_AUXDATA() to assign the platform data to a device. > - PHY support for r8a7790 Lager Simon seems to be working on this. AFAIK, we don't yet have R8A7790 based board in our inventory (neither the board manual). > - PHY IRQ support for r8a7790 Lager > Let me know if I can help you with remote board access. Yes, you can. > Cheers, > / magnus WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -1497,23 +1497,14 @@ static irqreturn_t sh_eth_interrupt(int */ intr_status &= sh_eth_read(ndev, EESIPR) | DMAC_M_ECI; /* Clear interrupt */ - if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF | - EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF | - cd->tx_check | cd->eesr_err_check)) { + if (intr_status & (EESR_RX_CHECK | cd->tx_check | cd->eesr_err_check)) { sh_eth_write(ndev, intr_status, EESR); ret = IRQ_HANDLED; } else goto other_irq; - if (intr_status & (EESR_FRC | /* Frame recv*/ - EESR_RMAF | /* Multi cast address recv*/ - EESR_RRF | /* Bit frame recv */ - EESR_RTLF | /* Long frame recv*/ - EESR_RTSF | /* short frame recv */ - EESR_PRE | /* PHY-LSI recv error */ - EESR_CERF)){ /* recv frame CRC error */ + if (intr_status & EESR_RX_CHECK) sh_eth_rx(ndev, intr_status); - } /* Tx Check */ if (intr_status & cd->tx_check) { Index: net-next/drivers/net/ethernet/renesas/sh_eth.h =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.h +++ net-next/drivers/net/ethernet/renesas/sh_eth.h @@ -248,6 +248,14 @@ enum EESR_BIT { EESR_CERF = 0x00000001, }; +#define EESR_RX_CHECK (EESR_FRC | /* Frame recv */ \ + EESR_RMAF | /* Multicast address recv */ \ + EESR_RRF | /* Bit frame recv */ \ + EESR_RTLF | /* Long frame recv */ \ + EESR_RTSF | /* Short frame recv */ \ + EESR_PRE | /* PHY-LSI recv error */ \ + EESR_CERF) /* Recv frame CRC error */ + #define DEFAULT_TX_CHECK (EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | \ EESR_RTO) #define DEFAULT_EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | \
sh_eth_interrupt() uses the same Rx interrupt mask twice to check the interrupt status register -- #define EESR_RX_CHECK and use it instead. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- The patch is against the Dave Miller's 'net-next.git' repo. drivers/net/ethernet/renesas/sh_eth.c | 13 ++----------- drivers/net/ethernet/renesas/sh_eth.h | 8 ++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html