lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 8 Jan 2012 06:13:14 +0100
From:	Bjarke Istrup Pedersen <gurligebis@...too.org>
To:	Francois Romieu <romieu@...zoreil.com>
Cc:	netdev@...r.kernel.org, rl@...lgate.ch,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next 1/7] via-rhine: factor out tx_thresh handling

2012/1/8 Bjarke Istrup Pedersen <gurligebis@...too.org>:
> 2012/1/7 Francois Romieu <romieu@...zoreil.com>:
>> Signed-off-by: Francois Romieu <romieu@...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

Hey again,

Nevermind, my mail client seems to have ate the first mail of the set
that mentions it :)
I'll test it later today :)

/Bjarke
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists