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
Kirill Smelkov
linux
Commits
a92cb452
Commit
a92cb452
authored
Jan 10, 2003
by
Alan Cox
Committed by
Linus Torvalds
Jan 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix padding for 3c507
parent
054309ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
drivers/net/3c507.c
drivers/net/3c507.c
+7
-4
No files found.
drivers/net/3c507.c
View file @
a92cb452
...
@@ -297,7 +297,7 @@ static int el16_close(struct net_device *dev);
...
@@ -297,7 +297,7 @@ static int el16_close(struct net_device *dev);
static
struct
net_device_stats
*
el16_get_stats
(
struct
net_device
*
dev
);
static
struct
net_device_stats
*
el16_get_stats
(
struct
net_device
*
dev
);
static
void
el16_tx_timeout
(
struct
net_device
*
dev
);
static
void
el16_tx_timeout
(
struct
net_device
*
dev
);
static
void
hardware_send_packet
(
struct
net_device
*
dev
,
void
*
buf
,
short
length
);
static
void
hardware_send_packet
(
struct
net_device
*
dev
,
void
*
buf
,
short
length
,
short
pad
);
static
void
init_82586_mem
(
struct
net_device
*
dev
);
static
void
init_82586_mem
(
struct
net_device
*
dev
);
static
int
netdev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
static
int
netdev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
...
@@ -499,7 +499,7 @@ static int el16_send_packet (struct sk_buff *skb, struct net_device *dev)
...
@@ -499,7 +499,7 @@ static int el16_send_packet (struct sk_buff *skb, struct net_device *dev)
/* Disable the 82586's input to the interrupt line. */
/* Disable the 82586's input to the interrupt line. */
outb
(
0x80
,
ioaddr
+
MISC_CTRL
);
outb
(
0x80
,
ioaddr
+
MISC_CTRL
);
hardware_send_packet
(
dev
,
buf
,
length
);
hardware_send_packet
(
dev
,
buf
,
skb
->
len
,
length
-
skb
->
len
);
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
/* Enable the 82586 interrupt input. */
/* Enable the 82586 interrupt input. */
...
@@ -752,12 +752,13 @@ static void init_82586_mem(struct net_device *dev)
...
@@ -752,12 +752,13 @@ static void init_82586_mem(struct net_device *dev)
return
;
return
;
}
}
static
void
hardware_send_packet
(
struct
net_device
*
dev
,
void
*
buf
,
short
length
)
static
void
hardware_send_packet
(
struct
net_device
*
dev
,
void
*
buf
,
short
length
,
short
pad
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
short
ioaddr
=
dev
->
base_addr
;
short
ioaddr
=
dev
->
base_addr
;
ushort
tx_block
=
lp
->
tx_head
;
ushort
tx_block
=
lp
->
tx_head
;
unsigned
long
write_ptr
=
dev
->
mem_start
+
tx_block
;
unsigned
long
write_ptr
=
dev
->
mem_start
+
tx_block
;
static
char
padding
[
ETH_ZLEN
];
/* Set the write pointer to the Tx block, and put out the header. */
/* Set the write pointer to the Tx block, and put out the header. */
isa_writew
(
0x0000
,
write_ptr
);
/* Tx status */
isa_writew
(
0x0000
,
write_ptr
);
/* Tx status */
...
@@ -766,7 +767,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
...
@@ -766,7 +767,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
isa_writew
(
tx_block
+
8
,
write_ptr
+=
2
);
/* Data Buffer offset. */
isa_writew
(
tx_block
+
8
,
write_ptr
+=
2
);
/* Data Buffer offset. */
/* Output the data buffer descriptor. */
/* Output the data buffer descriptor. */
isa_writew
(
length
|
0x8000
,
write_ptr
+=
2
);
/* Byte count parameter. */
isa_writew
(
(
pad
+
length
)
|
0x8000
,
write_ptr
+=
2
);
/* Byte count parameter. */
isa_writew
(
-
1
,
write_ptr
+=
2
);
/* No next data buffer. */
isa_writew
(
-
1
,
write_ptr
+=
2
);
/* No next data buffer. */
isa_writew
(
tx_block
+
22
+
SCB_BASE
,
write_ptr
+=
2
);
/* Buffer follows the NoOp command. */
isa_writew
(
tx_block
+
22
+
SCB_BASE
,
write_ptr
+=
2
);
/* Buffer follows the NoOp command. */
isa_writew
(
0x0000
,
write_ptr
+=
2
);
/* Buffer address high bits (always zero). */
isa_writew
(
0x0000
,
write_ptr
+=
2
);
/* Buffer address high bits (always zero). */
...
@@ -778,6 +779,8 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
...
@@ -778,6 +779,8 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
/* Output the packet at the write pointer. */
/* Output the packet at the write pointer. */
isa_memcpy_toio
(
write_ptr
+
2
,
buf
,
length
);
isa_memcpy_toio
(
write_ptr
+
2
,
buf
,
length
);
if
(
pad
)
isa_memcpy_toio
(
write_ptr
+
length
+
2
,
padding
,
pad
);
/* Set the old command link pointing to this send packet. */
/* Set the old command link pointing to this send packet. */
isa_writew
(
tx_block
,
dev
->
mem_start
+
lp
->
tx_cmd_link
);
isa_writew
(
tx_block
,
dev
->
mem_start
+
lp
->
tx_cmd_link
);
...
...
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