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
0b9daf11
Commit
0b9daf11
authored
Aug 03, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MYRI_SBUS: Replace cli/sti with spinlocking.
parent
e3676f76
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
drivers/net/myri_sbus.c
drivers/net/myri_sbus.c
+8
-2
drivers/net/myri_sbus.h
drivers/net/myri_sbus.h
+1
-0
No files found.
drivers/net/myri_sbus.c
View file @
0b9daf11
...
@@ -546,8 +546,11 @@ static void myri_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -546,8 +546,11 @@ static void myri_interrupt(int irq, void *dev_id, struct pt_regs *regs)
struct
myri_eth
*
mp
=
(
struct
myri_eth
*
)
dev
->
priv
;
struct
myri_eth
*
mp
=
(
struct
myri_eth
*
)
dev
->
priv
;
unsigned
long
lregs
=
mp
->
lregs
;
unsigned
long
lregs
=
mp
->
lregs
;
struct
myri_channel
*
chan
=
&
mp
->
shmem
->
channel
;
struct
myri_channel
*
chan
=
&
mp
->
shmem
->
channel
;
unsigned
long
flags
;
u32
status
;
u32
status
;
spin_lock_irqsave
(
&
mp
->
irq_lock
,
flags
);
status
=
sbus_readl
(
lregs
+
LANAI_ISTAT
);
status
=
sbus_readl
(
lregs
+
LANAI_ISTAT
);
DIRQ
((
"myri_interrupt: status[%08x] "
,
status
));
DIRQ
((
"myri_interrupt: status[%08x] "
,
status
));
if
(
status
&
ISTAT_HOST
)
{
if
(
status
&
ISTAT_HOST
)
{
...
@@ -569,6 +572,8 @@ static void myri_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -569,6 +572,8 @@ static void myri_interrupt(int irq, void *dev_id, struct pt_regs *regs)
myri_enable_irq
(
lregs
,
mp
->
cregs
);
myri_enable_irq
(
lregs
,
mp
->
cregs
);
}
}
DIRQ
((
"
\n
"
));
DIRQ
((
"
\n
"
));
spin_unlock_irqrestore
(
&
mp
->
irq_lock
,
flags
);
}
}
static
int
myri_open
(
struct
net_device
*
dev
)
static
int
myri_open
(
struct
net_device
*
dev
)
...
@@ -622,7 +627,7 @@ static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -622,7 +627,7 @@ static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev)
return
1
;
return
1
;
}
}
s
ave_and_cli
(
flags
);
s
pin_lock_irqsave
(
&
mp
->
irq_lock
,
flags
);
DHDR
((
"xmit[skbdata(%p)]
\n
"
,
skb
->
data
));
DHDR
((
"xmit[skbdata(%p)]
\n
"
,
skb
->
data
));
#ifdef DEBUG_HEADER
#ifdef DEBUG_HEADER
...
@@ -669,7 +674,7 @@ static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -669,7 +674,7 @@ static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev)
DTX
((
"tbusy=0, returning 0
\n
"
));
DTX
((
"tbusy=0, returning 0
\n
"
));
netif_start_queue
(
dev
);
netif_start_queue
(
dev
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
mp
->
irq_lock
,
flags
);
return
0
;
return
0
;
}
}
...
@@ -900,6 +905,7 @@ static int __init myri_ether_init(struct net_device *dev, struct sbus_dev *sdev,
...
@@ -900,6 +905,7 @@ static int __init myri_ether_init(struct net_device *dev, struct sbus_dev *sdev,
printk
(
"%s: MyriCOM MyriNET Ethernet "
,
dev
->
name
);
printk
(
"%s: MyriCOM MyriNET Ethernet "
,
dev
->
name
);
mp
=
(
struct
myri_eth
*
)
dev
->
priv
;
mp
=
(
struct
myri_eth
*
)
dev
->
priv
;
spin_lock_init
(
&
mp
->
irq_lock
);
mp
->
myri_sdev
=
sdev
;
mp
->
myri_sdev
=
sdev
;
/* Clean out skb arrays. */
/* Clean out skb arrays. */
...
...
drivers/net/myri_sbus.h
View file @
0b9daf11
...
@@ -269,6 +269,7 @@ struct myri_eth {
...
@@ -269,6 +269,7 @@ struct myri_eth {
/* These are frequently accessed, keep together
/* These are frequently accessed, keep together
* to obtain good cache hit rates.
* to obtain good cache hit rates.
*/
*/
spinlock_t
irq_lock
;
struct
myri_shmem
*
shmem
;
/* Shared data structures. */
struct
myri_shmem
*
shmem
;
/* Shared data structures. */
unsigned
long
cregs
;
/* Control register space. */
unsigned
long
cregs
;
/* Control register space. */
struct
recvq
*
rqack
;
/* Where we ack rx's. */
struct
recvq
*
rqack
;
/* Where we ack rx's. */
...
...
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