Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
0605e5d2
Commit
0605e5d2
authored
Jan 19, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel modules: support up to 18 endpoints
parent
ad7ed061
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
device.c
kernel/wr_nic/device.c
+2
-2
dmtd.c
kernel/wr_nic/dmtd.c
+4
-4
nic-hardware.h
kernel/wr_nic/nic-hardware.h
+4
-6
No files found.
kernel/wr_nic/device.c
View file @
0605e5d2
...
...
@@ -149,8 +149,8 @@ static int __devinit wrn_probe(struct platform_device *pdev)
/* The ep structure is filled before calling ep_probe */
ep
=
netdev_priv
(
netdev
);
ep
->
wrn
=
wrn
;
ep
->
ep_regs
=
wrn
->
bases
[
WRN_FB_EP
]
;
/* FIXME: works for 1EP */
//
printk("ep %p, regs %i = %p\n", ep, i, ep->ep_regs);
ep
->
ep_regs
=
wrn
->
bases
[
WRN_FB_EP
]
+
i
*
FPGA_SIZE_EACH_EP
;
printk
(
"ep %p, regs %i = %p
\n
"
,
ep
,
i
,
ep
->
ep_regs
);
ep
->
ep_number
=
i
;
#if 0 /* FIXME: UPlink or not? */
if (i < WRN_NR_UPLINK)
...
...
kernel/wr_nic/dmtd.c
View file @
0605e5d2
...
...
@@ -58,10 +58,10 @@ int wrn_calib_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
if
(
copy_from_user
(
&
cal_req
,
rq
->
ifr_data
,
sizeof
(
cal_req
)))
return
-
EFAULT
;
#if 0
if (!(ep->ep_flags & BIT(WRN_EP_UP)))
return -EIO; /* was -EFAULT in minic */
#endif
if
(
0
)
{
/* FIXME: what' coming out of this thing? */
if
(
!
(
ep
->
ep_flags
&
BIT
(
WRN_EP_UP
)))
return
-
EIO
;
/* was -EFAULT in minic */
}
switch
(
cal_req
.
cmd
)
{
case
WRN_CAL_TX_ON
:
...
...
kernel/wr_nic/nic-hardware.h
View file @
0605e5d2
...
...
@@ -47,6 +47,7 @@
#define FPGA_SIZE_NIC 0x00010000
#define FPGA_BASE_EP 0x10030000
#define FPGA_SIZE_EP 0x00010000
#define FPGA_SIZE_EACH_EP 0x200
#define FPGA_BASE_VIC 0x10050000
#define FPGA_SIZE_VIC 0x00001000
#define FPGA_BASE_TS 0x10051000
...
...
@@ -57,17 +58,14 @@
enum
fpga_blocks
{
WRN_FB_NIC
,
WRN_FB_EP
,
WRN_FB_VIC
,
/* not mapped here (but in vic.ko) */
WRN_FB_VIC
,
/* not mapped here (but in
wr-
vic.ko) */
WRN_FB_TS
,
WRN_FB_PPSG
,
WRN_NR_OF_BLOCKS
,
};
/* In addition to the above enumeration, mark out endpoints (FIXME: 1 only) */
#define WRN_NR_ENDPOINTS 1
#define WRN_FIRST_EP WRN_BLOCK_EP_UP0
#define WRN_LAST_EP WRN_FIRST_EP
//#define WRN_NR_UPLINK (WRN_BLOCK_EP_DP0 - WRN_BLOCK_EP_UP0)
/* In addition to the above enumeration, we scan for those many endpoints */
#define WRN_NR_ENDPOINTS 18
/* 8 tx and 8 rx descriptors */
#define WRN_NR_DESC 8
...
...
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