Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
27707477
Commit
27707477
authored
Mar 19, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gianfar-bql' of
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
parents
4da0bd73
5407b14c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
10 deletions
+17
-10
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar.c
+16
-6
drivers/net/ethernet/freescale/gianfar.h
drivers/net/ethernet/freescale/gianfar.h
+0
-3
drivers/net/ethernet/freescale/gianfar_ethtool.c
drivers/net/ethernet/freescale/gianfar_ethtool.c
+1
-1
No files found.
drivers/net/ethernet/freescale/gianfar.c
View file @
27707477
...
@@ -104,10 +104,7 @@
...
@@ -104,10 +104,7 @@
#include "fsl_pq_mdio.h"
#include "fsl_pq_mdio.h"
#define TX_TIMEOUT (1*HZ)
#define TX_TIMEOUT (1*HZ)
#undef BRIEF_GFAR_ERRORS
#undef VERBOSE_GFAR_ERRORS
const
char
gfar_driver_name
[]
=
"Gianfar Ethernet"
;
const
char
gfar_driver_version
[]
=
"1.3"
;
const
char
gfar_driver_version
[]
=
"1.3"
;
static
int
gfar_enet_open
(
struct
net_device
*
dev
);
static
int
gfar_enet_open
(
struct
net_device
*
dev
);
...
@@ -1755,9 +1752,12 @@ static void free_skb_resources(struct gfar_private *priv)
...
@@ -1755,9 +1752,12 @@ static void free_skb_resources(struct gfar_private *priv)
/* Go through all the buffer descriptors and free their data buffers */
/* Go through all the buffer descriptors and free their data buffers */
for
(
i
=
0
;
i
<
priv
->
num_tx_queues
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
num_tx_queues
;
i
++
)
{
struct
netdev_queue
*
txq
;
tx_queue
=
priv
->
tx_queue
[
i
];
tx_queue
=
priv
->
tx_queue
[
i
];
txq
=
netdev_get_tx_queue
(
tx_queue
->
dev
,
tx_queue
->
qindex
);
if
(
tx_queue
->
tx_skbuff
)
if
(
tx_queue
->
tx_skbuff
)
free_skb_tx_queue
(
tx_queue
);
free_skb_tx_queue
(
tx_queue
);
netdev_tx_reset_queue
(
txq
);
}
}
for
(
i
=
0
;
i
<
priv
->
num_rx_queues
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
num_rx_queues
;
i
++
)
{
...
@@ -2217,6 +2217,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -2217,6 +2217,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
lstatus
|=
BD_LFLAG
(
TXBD_CRC
|
TXBD_READY
)
|
skb_headlen
(
skb
);
lstatus
|=
BD_LFLAG
(
TXBD_CRC
|
TXBD_READY
)
|
skb_headlen
(
skb
);
}
}
netdev_tx_sent_queue
(
txq
,
skb
->
len
);
/*
/*
* We can work in parallel with gfar_clean_tx_ring(), except
* We can work in parallel with gfar_clean_tx_ring(), except
* when modifying num_txbdfree. Note that we didn't grab the lock
* when modifying num_txbdfree. Note that we didn't grab the lock
...
@@ -2460,6 +2462,7 @@ static void gfar_align_skb(struct sk_buff *skb)
...
@@ -2460,6 +2462,7 @@ static void gfar_align_skb(struct sk_buff *skb)
static
int
gfar_clean_tx_ring
(
struct
gfar_priv_tx_q
*
tx_queue
)
static
int
gfar_clean_tx_ring
(
struct
gfar_priv_tx_q
*
tx_queue
)
{
{
struct
net_device
*
dev
=
tx_queue
->
dev
;
struct
net_device
*
dev
=
tx_queue
->
dev
;
struct
netdev_queue
*
txq
;
struct
gfar_private
*
priv
=
netdev_priv
(
dev
);
struct
gfar_private
*
priv
=
netdev_priv
(
dev
);
struct
gfar_priv_rx_q
*
rx_queue
=
NULL
;
struct
gfar_priv_rx_q
*
rx_queue
=
NULL
;
struct
txbd8
*
bdp
,
*
next
=
NULL
;
struct
txbd8
*
bdp
,
*
next
=
NULL
;
...
@@ -2471,10 +2474,13 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
...
@@ -2471,10 +2474,13 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
int
frags
=
0
,
nr_txbds
=
0
;
int
frags
=
0
,
nr_txbds
=
0
;
int
i
;
int
i
;
int
howmany
=
0
;
int
howmany
=
0
;
int
tqi
=
tx_queue
->
qindex
;
unsigned
int
bytes_sent
=
0
;
u32
lstatus
;
u32
lstatus
;
size_t
buflen
;
size_t
buflen
;
rx_queue
=
priv
->
rx_queue
[
tx_queue
->
qindex
];
rx_queue
=
priv
->
rx_queue
[
tqi
];
txq
=
netdev_get_tx_queue
(
dev
,
tqi
);
bdp
=
tx_queue
->
dirty_tx
;
bdp
=
tx_queue
->
dirty_tx
;
skb_dirtytx
=
tx_queue
->
skb_dirtytx
;
skb_dirtytx
=
tx_queue
->
skb_dirtytx
;
...
@@ -2533,6 +2539,8 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
...
@@ -2533,6 +2539,8 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
bdp
=
next_txbd
(
bdp
,
base
,
tx_ring_size
);
bdp
=
next_txbd
(
bdp
,
base
,
tx_ring_size
);
}
}
bytes_sent
+=
skb
->
len
;
/*
/*
* If there's room in the queue (limit it to rx_buffer_size)
* If there's room in the queue (limit it to rx_buffer_size)
* we add this skb back into the pool, if it's the right size
* we add this skb back into the pool, if it's the right size
...
@@ -2557,13 +2565,15 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
...
@@ -2557,13 +2565,15 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
}
}
/* If we freed a buffer, we can restart transmission, if necessary */
/* If we freed a buffer, we can restart transmission, if necessary */
if
(
__netif_subqueue_stopped
(
dev
,
tx_queue
->
qindex
)
&&
tx_queue
->
num_txbdfree
)
if
(
netif_tx_queue_stopped
(
txq
)
&&
tx_queue
->
num_txbdfree
)
netif_wake_subqueue
(
dev
,
t
x_queue
->
qindex
);
netif_wake_subqueue
(
dev
,
t
qi
);
/* Update dirty indicators */
/* Update dirty indicators */
tx_queue
->
skb_dirtytx
=
skb_dirtytx
;
tx_queue
->
skb_dirtytx
=
skb_dirtytx
;
tx_queue
->
dirty_tx
=
bdp
;
tx_queue
->
dirty_tx
=
bdp
;
netdev_tx_completed_queue
(
txq
,
howmany
,
bytes_sent
);
return
howmany
;
return
howmany
;
}
}
...
...
drivers/net/ethernet/freescale/gianfar.h
View file @
27707477
...
@@ -78,11 +78,8 @@ struct ethtool_rx_list {
...
@@ -78,11 +78,8 @@ struct ethtool_rx_list {
#define INCREMENTAL_BUFFER_SIZE 512
#define INCREMENTAL_BUFFER_SIZE 512
#define PHY_INIT_TIMEOUT 100000
#define PHY_INIT_TIMEOUT 100000
#define GFAR_PHY_CHANGE_TIME 2
#define DEVICE_NAME "%s: Gianfar Ethernet Controller Version 1.2, "
#define DRV_NAME "gfar-enet"
#define DRV_NAME "gfar-enet"
extern
const
char
gfar_driver_name
[];
extern
const
char
gfar_driver_version
[];
extern
const
char
gfar_driver_version
[];
/* MAXIMUM NUMBER OF QUEUES SUPPORTED */
/* MAXIMUM NUMBER OF QUEUES SUPPORTED */
...
...
drivers/net/ethernet/freescale/gianfar_ethtool.c
View file @
27707477
...
@@ -58,7 +58,7 @@ static void gfar_gringparam(struct net_device *dev, struct ethtool_ringparam *rv
...
@@ -58,7 +58,7 @@ static void gfar_gringparam(struct net_device *dev, struct ethtool_ringparam *rv
static
int
gfar_sringparam
(
struct
net_device
*
dev
,
struct
ethtool_ringparam
*
rvals
);
static
int
gfar_sringparam
(
struct
net_device
*
dev
,
struct
ethtool_ringparam
*
rvals
);
static
void
gfar_gdrvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
drvinfo
);
static
void
gfar_gdrvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
drvinfo
);
static
char
stat_gstrings
[][
ETH_GSTRING_LEN
]
=
{
static
c
onst
c
har
stat_gstrings
[][
ETH_GSTRING_LEN
]
=
{
"rx-dropped-by-kernel"
,
"rx-dropped-by-kernel"
,
"rx-large-frame-errors"
,
"rx-large-frame-errors"
,
"rx-short-frame-errors"
,
"rx-short-frame-errors"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment