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
e339106d
Commit
e339106d
authored
Oct 27, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] bring the cops appletalk driver back
parent
48ccae24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
drivers/net/appletalk/cops.c
drivers/net/appletalk/cops.c
+12
-10
No files found.
drivers/net/appletalk/cops.c
View file @
e339106d
...
@@ -182,6 +182,7 @@ struct cops_local
...
@@ -182,6 +182,7 @@ struct cops_local
int
nodeid
;
/* Set to 1 once have nodeid. */
int
nodeid
;
/* Set to 1 once have nodeid. */
unsigned
char
node_acquire
;
/* Node ID when acquired. */
unsigned
char
node_acquire
;
/* Node ID when acquired. */
struct
atalk_addr
node_addr
;
/* Full node address */
struct
atalk_addr
node_addr
;
/* Full node address */
spinlock_t
lock
;
/* RX/TX lock */
};
};
/* Index to functions, as function prototypes. */
/* Index to functions, as function prototypes. */
...
@@ -322,6 +323,7 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
...
@@ -322,6 +323,7 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
lp
=
(
struct
cops_local
*
)
dev
->
priv
;
memset
(
lp
,
0
,
sizeof
(
struct
cops_local
));
memset
(
lp
,
0
,
sizeof
(
struct
cops_local
));
spinlock_init
(
&
lp
->
lock
);
/* Copy local board variable to lp struct. */
/* Copy local board variable to lp struct. */
lp
->
board
=
board
;
lp
->
board
=
board
;
...
@@ -759,8 +761,7 @@ static void cops_rx(struct net_device *dev)
...
@@ -759,8 +761,7 @@ static void cops_rx(struct net_device *dev)
unsigned
long
flags
;
unsigned
long
flags
;
save_flags
(
flags
);
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
cli
();
/* Disable interrupts. */
if
(
lp
->
board
==
DAYNA
)
if
(
lp
->
board
==
DAYNA
)
{
{
...
@@ -779,7 +780,7 @@ static void cops_rx(struct net_device *dev)
...
@@ -779,7 +780,7 @@ static void cops_rx(struct net_device *dev)
if
(
boguscount
==
1000000
)
if
(
boguscount
==
1000000
)
{
{
printk
(
KERN_WARNING
"%s: DMA timed out.
\n
"
,
dev
->
name
);
printk
(
KERN_WARNING
"%s: DMA timed out.
\n
"
,
dev
->
name
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
lp
->
lock
,
flags
);
return
;
return
;
}
}
}
}
...
@@ -814,7 +815,7 @@ static void cops_rx(struct net_device *dev)
...
@@ -814,7 +815,7 @@ static void cops_rx(struct net_device *dev)
if
(
lp
->
board
==
DAYNA
)
if
(
lp
->
board
==
DAYNA
)
outb
(
1
,
ioaddr
+
DAYNA_INT_CARD
);
/* Interrupt the card */
outb
(
1
,
ioaddr
+
DAYNA_INT_CARD
);
/* Interrupt the card */
restore_flags
(
flags
);
/* Restore interrupts. */
spin_unlock_irqrestore
(
&
lp
->
lock
,
flags
);
/* Restore interrupts. */
/* Check for bad response length */
/* Check for bad response length */
if
(
pkt_len
<
0
||
pkt_len
>
MAX_LLAP_SIZE
)
if
(
pkt_len
<
0
||
pkt_len
>
MAX_LLAP_SIZE
)
...
@@ -890,12 +891,13 @@ static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
...
@@ -890,12 +891,13 @@ static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
save_flags
(
flags
);
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
cli
();
/* Disable interrupts. */
if
(
lp
->
board
==
DAYNA
)
/* Wait for adapter transmit buffer. */
if
(
lp
->
board
==
DAYNA
)
/* Wait for adapter transmit buffer. */
while
((
inb
(
ioaddr
+
DAYNA_CARD_STATUS
)
&
DAYNA_TX_READY
)
==
0
);
while
((
inb
(
ioaddr
+
DAYNA_CARD_STATUS
)
&
DAYNA_TX_READY
)
==
0
)
cpu_relax
();
if
(
lp
->
board
==
TANGENT
)
/* Wait for adapter transmit buffer. */
if
(
lp
->
board
==
TANGENT
)
/* Wait for adapter transmit buffer. */
while
((
inb
(
ioaddr
+
TANG_CARD_STATUS
)
&
TANG_TX_READY
)
==
0
);
while
((
inb
(
ioaddr
+
TANG_CARD_STATUS
)
&
TANG_TX_READY
)
==
0
)
cpu_relax
();
/* Output IO length. */
/* Output IO length. */
outb
(
skb
->
len
,
ioaddr
);
outb
(
skb
->
len
,
ioaddr
);
...
@@ -915,7 +917,7 @@ static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
...
@@ -915,7 +917,7 @@ static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
if
(
lp
->
board
==
DAYNA
)
/* Dayna requires you kick the card */
if
(
lp
->
board
==
DAYNA
)
/* Dayna requires you kick the card */
outb
(
1
,
ioaddr
+
DAYNA_INT_CARD
);
outb
(
1
,
ioaddr
+
DAYNA_INT_CARD
);
restore_flags
(
flags
);
/* Restore interrupts. */
spin_unlock_irqrestore
(
&
lp
->
lock
,
flags
);
/* Restore interrupts. */
/* Done sending packet, update counters and cleanup. */
/* Done sending packet, update counters and cleanup. */
lp
->
stats
.
tx_packets
++
;
lp
->
stats
.
tx_packets
++
;
...
...
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