Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c63fdf46 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

drivers/net: normalize TX_TIMEOUT



Some network drivers use old TX_TIMEOUT definitions, assuming HZ=100 of
old kernels.

Convert these definitions to include HZ, since HZ can be 1000 these
days.

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 973a34aa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ struct net_local {
#define RX_BUF_SIZE 	(1518+14+18)	/* packet+header+RBD */
#define RX_BUF_END		(dev->mem_end - dev->mem_start)

#define TX_TIMEOUT 5
#define TX_TIMEOUT (HZ/20)

/*
  That's it: only 86 bytes to set up the beast, including every extra
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static int rx_nocopy, rx_copy, queued_packet;
#define WAIT_TX_AVAIL 200

/* Operational parameter that usually are not changed. */
#define TX_TIMEOUT  40		/* Time in jiffies before concluding Tx hung */
#define TX_TIMEOUT  ((4*HZ)/10)	/* Time in jiffies before concluding Tx hung */

/* The size here is somewhat misleading: the Corkscrew also uses the ISA
   aliased registers at <base>+0x400.
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ enum commands {
#define	 RX_SUSPEND	0x0030
#define	 RX_ABORT	0x0040

#define TX_TIMEOUT	5
#define TX_TIMEOUT	(HZ/20)


struct i596_reg {
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@
#define TX_DESC_SIZE		10
#define MAX_RBUFF_SZ		0x600
#define MAX_TBUFF_SZ		0x600
#define TX_TIMEOUT		50
#define TX_TIMEOUT		(HZ/2)
#define DELAY			1000
#define CAM0			0x0

+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ struct net_local {
#define PORT_OFFSET(o) (o)


#define TX_TIMEOUT		10
#define TX_TIMEOUT		(HZ/10)


/* Index to functions, as function prototypes. */
Loading