All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjarke Istrup Pedersen <gurligebis@gentoo.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org, rl@hellgate.ch,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH net-next 1/7] via-rhine: factor out tx_thresh handling
Date: Sun, 8 Jan 2012 05:41:49 +0100	[thread overview]
Message-ID: <CACPM=kVKm1xYnBGJ_-ABaBkLcSApnixagQhqmgi89OfCTn5ktQ@mail.gmail.com> (raw)
In-Reply-To: <20120107224941.GA25021@electric-eye.fr.zoreil.com>

2012/1/7 Francois Romieu <romieu@fr.zoreil.com>:
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> ---
>  drivers/net/ethernet/via/via-rhine.c |   17 ++++++++++++-----
>  1 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
> index 5c4983b..93987e8 100644
> --- a/drivers/net/ethernet/via/via-rhine.c
> +++ b/drivers/net/ethernet/via/via-rhine.c
> @@ -657,6 +657,16 @@ static void rhine_poll(struct net_device *dev)
>  }
>  #endif
>
> +static void rhine_kick_tx_threshold(struct rhine_private *rp)
> +{
> +       if (rp->tx_thresh < 0xe0) {
> +               void __iomem *ioaddr = rp->base;
> +
> +               rp->tx_thresh += 0x20;
> +               BYTE_REG_BITS_SET(rp->tx_thresh, 0x80, ioaddr + TxConfig);
> +       }
> +}
> +
>  static int rhine_napipoll(struct napi_struct *napi, int budget)
>  {
>        struct rhine_private *rp = container_of(napi, struct rhine_private, napi);
> @@ -1910,8 +1920,7 @@ static void rhine_error(struct net_device *dev, int intr_status)
>                                    intr_status);
>        }
>        if (intr_status & IntrTxUnderrun) {
> -               if (rp->tx_thresh < 0xE0)
> -                       BYTE_REG_BITS_SET((rp->tx_thresh += 0x20), 0x80, ioaddr + TxConfig);
> +               rhine_kick_tx_threshold(rp);
>                if (debug > 1)
>                        netdev_info(dev, "Transmitter underrun, Tx threshold now %02x\n",
>                                    rp->tx_thresh);
> @@ -1923,9 +1932,7 @@ static void rhine_error(struct net_device *dev, int intr_status)
>        if ((intr_status & IntrTxError) &&
>            (intr_status & (IntrTxAborted |
>             IntrTxUnderrun | IntrTxDescRace)) == 0) {
> -               if (rp->tx_thresh < 0xE0) {
> -                       BYTE_REG_BITS_SET((rp->tx_thresh += 0x20), 0x80, ioaddr + TxConfig);
> -               }
> +               rhine_kick_tx_threshold(rp);
>                if (debug > 1)
>                        netdev_info(dev, "Unspecified error. Tx threshold now %02x\n",
>                                    rp->tx_thresh);
> --
> 1.7.6.4
>

Still net-next, or should they be applied on top of mainline 3.2? :)

/Bjarke

  reply	other threads:[~2012-01-08  4:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 22:48 [PATCH net-next 0/7] via-rhine NAPI rework and misc Francois Romieu
2012-01-07 22:49 ` [PATCH net-next 1/7] via-rhine: factor out tx_thresh handling Francois Romieu
2012-01-08  4:41   ` Bjarke Istrup Pedersen [this message]
2012-01-08  5:13     ` Bjarke Istrup Pedersen
2012-01-08  9:39     ` Francois Romieu
2012-01-07 22:50 ` [PATCH net-next 2/7] via-rhine: balance interrupt acknowledge and events retrieval Francois Romieu
2012-01-07 22:50 ` [PATCH net-next 3/7] via-rhine: remove useless forward declarations Francois Romieu
2012-01-07 22:51 ` [PATCH net-next 4/7] via-rhine: move work from irq handler to softirq and beyond Francois Romieu
2012-01-07 22:51 ` [PATCH net-next 5/7] via-rhine: RHINE_WAIT_FOR macro removal Francois Romieu
2012-01-07 22:52 ` [PATCH net-next 6/7] via-rhine: per device debug level Francois Romieu
2012-01-07 22:52 ` [PATCH net-next 7/7] via-rhine: rework suspend and resume Francois Romieu
2012-01-08 11:57 ` [PATCH net-next 0/7] via-rhine NAPI rework and misc Bjarke Istrup Pedersen
2012-01-10 22:55 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACPM=kVKm1xYnBGJ_-ABaBkLcSApnixagQhqmgi89OfCTn5ktQ@mail.gmail.com' \
    --to=gurligebis@gentoo.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.