Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tn40xx Driver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Tn40xx Driver
Commits
bcf44f8e
Commit
bcf44f8e
authored
5 years ago
by
Andrew Cooks
Browse files
Options
Downloads
Patches
Plain Diff
remove unused macros for timers and BDX_MSI*
parent
b58fcd70
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tn40.h
+0
-54
0 additions, 54 deletions
tn40.h
with
0 additions
and
54 deletions
tn40.h
+
0
−
54
View file @
bcf44f8e
...
...
@@ -205,19 +205,12 @@ struct bdx_device_descr {
char
*
name
;
};
/* Compile Time Switches */
/* start */
/*#define USE_TIMERS */
#define BDX_MSI
/* end */
#define BDX_DEF_MSG_ENABLE (NETIF_MSG_DRV | \
NETIF_MSG_PROBE | \
NETIF_MSG_LINK)
/* RX copy break size */
#define BDX_COPYBREAK 257
#define BDX_MSI_STRING "msi "
/*
* netdev tx queue len for Luxor. The default value is 1000.
* ifconfig eth1 txqueuelen 3000 - to change it at runtime.
...
...
@@ -962,53 +955,6 @@ struct txf_desc {
#define ROUND_UP(n, m) (((n) + (m - 1)) & ~(m - 1))
#endif
#if defined(USE_TIMERS)
#define CLOCK_FREQ 3000000000ULL
#define CYCLES_2_MSEC (CLOCK_FREQ/1000)
#define CYCLES_2_USEC (CLOCK_FREQ/1000000)
#define CYCLES_2_NSEC (CLOCK_FREQ/1000000000)
#define TIMER_PERIOD 10ULL
#define TIMER_NAME(t) t##_timer
#define RESET_TIMER(t) (TIMER_NAME(t).time = TIMER_NAME(t).count = 0ULL, \
rdtscll(TIMER_NAME(t).start), \
TIMER_NAME(t).begin = TIMER_NAME(t).start)
#define PRINT_TIMER(t) do { if (likely(TIMER_NAME(t).begin > 0)) \
printk(KERN_ERR \
"%s: time = %llu msec count = %llu " \
"period = %llu nsec\n", \
TIMER_NAME(t).name, \
TIMER_NAME(t).time/CYCLES_2_MSEC, \
TIMER_NAME(t).count, \
TIMER_NAME(t).time * CYCLES_2_NSEC/ \
MAX(TIMER_NAME(t).count, 1ULL)) ; \
RESET_TIMER(t) ; } while (0)
#define DEF_TIMER(t) static struct timer TIMER_NAME(t) = { .name = #t }
#define START_TIMER(t) do { rdtscll(TIMER_NAME(t).start) ; \
if (TIMER_NAME(t).start > TIMER_NAME(t).begin + \
TIMER_PERIOD*CLOCK_FREQ) \
PRINT_TIMER(t) ; \
++TIMER_NAME(t).count ; } while(0)
#define END_TIMER(t) do { rdtscll(TIMER_NAME(t).stop), \
TIMER_NAME(t).time += TIMER_NAME(t).stop - \
TIMER_NAME(t).start ; } \
while ((0))
struct
timer
{
u64
begin
;
u64
start
;
u64
stop
;
u64
time
;
u64
count
;
char
*
name
;
};
#else
#define DEF_TIMER(name)
#define START_TIMER(t)
#define END_TIMER(t)
#define RESET_TIMER(t)
#define PRINT_TIMER(t)
#endif
u32
bdx_mdio_get
(
struct
bdx_priv
*
priv
);
int
bdx_mdio_write
(
struct
bdx_priv
*
priv
,
int
device
,
int
port
,
u16
addr
,
u16
data
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment