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
b9b55ee3
Commit
b9b55ee3
authored
Feb 05, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[hamradio mkiss] correctly use spinlocks
Somebody didn't build this on SMP
parent
07ead08c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
drivers/net/hamradio/mkiss.c
drivers/net/hamradio/mkiss.c
+11
-11
No files found.
drivers/net/hamradio/mkiss.c
View file @
b9b55ee3
...
@@ -246,7 +246,7 @@ static void ax_changedmtu(struct ax_disp *ax)
...
@@ -246,7 +246,7 @@ static void ax_changedmtu(struct ax_disp *ax)
return
;
return
;
}
}
spin_lock_bh
(
ax
->
buflock
);
spin_lock_bh
(
&
ax
->
buflock
);
oxbuff
=
ax
->
xbuff
;
oxbuff
=
ax
->
xbuff
;
ax
->
xbuff
=
xbuff
;
ax
->
xbuff
=
xbuff
;
...
@@ -277,7 +277,7 @@ static void ax_changedmtu(struct ax_disp *ax)
...
@@ -277,7 +277,7 @@ static void ax_changedmtu(struct ax_disp *ax)
ax
->
mtu
=
dev
->
mtu
+
73
;
ax
->
mtu
=
dev
->
mtu
+
73
;
ax
->
buffsize
=
len
;
ax
->
buffsize
=
len
;
spin_unlock_bh
(
ax
->
buflock
);
spin_unlock_bh
(
&
ax
->
buflock
);
if
(
oxbuff
!=
NULL
)
if
(
oxbuff
!=
NULL
)
kfree
(
oxbuff
);
kfree
(
oxbuff
);
...
@@ -305,7 +305,7 @@ static void ax_bump(struct ax_disp *ax)
...
@@ -305,7 +305,7 @@ static void ax_bump(struct ax_disp *ax)
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
count
;
int
count
;
spin_lock_bh
(
ax
->
buflock
);
spin_lock_bh
(
&
ax
->
buflock
);
if
(
ax
->
rbuff
[
0
]
>
0x0f
)
{
if
(
ax
->
rbuff
[
0
]
>
0x0f
)
{
if
(
ax
->
rbuff
[
0
]
&
0x20
)
{
if
(
ax
->
rbuff
[
0
]
&
0x20
)
{
ax
->
crcmode
=
CRC_MODE_FLEX
;
ax
->
crcmode
=
CRC_MODE_FLEX
;
...
@@ -322,7 +322,7 @@ static void ax_bump(struct ax_disp *ax)
...
@@ -322,7 +322,7 @@ static void ax_bump(struct ax_disp *ax)
*
ax
->
rbuff
&=
~
0x20
;
*
ax
->
rbuff
&=
~
0x20
;
}
}
}
}
spin_unlock_bh
(
ax
->
buflock
);
spin_unlock_bh
(
&
ax
->
buflock
);
count
=
ax
->
rcount
;
count
=
ax
->
rcount
;
...
@@ -333,9 +333,9 @@ static void ax_bump(struct ax_disp *ax)
...
@@ -333,9 +333,9 @@ static void ax_bump(struct ax_disp *ax)
}
}
skb
->
dev
=
ax
->
dev
;
skb
->
dev
=
ax
->
dev
;
spin_lock_bh
(
ax
->
buflock
);
spin_lock_bh
(
&
ax
->
buflock
);
memcpy
(
skb_put
(
skb
,
count
),
ax
->
rbuff
,
count
);
memcpy
(
skb_put
(
skb
,
count
),
ax
->
rbuff
,
count
);
spin_unlock_bh
(
ax
->
buflock
);
spin_unlock_bh
(
&
ax
->
buflock
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
protocol
=
htons
(
ETH_P_AX25
);
skb
->
protocol
=
htons
(
ETH_P_AX25
);
netif_rx
(
skb
);
netif_rx
(
skb
);
...
@@ -363,7 +363,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
...
@@ -363,7 +363,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
p
=
icp
;
p
=
icp
;
spin_lock_bh
(
ax
->
buflock
);
spin_lock_bh
(
&
ax
->
buflock
);
switch
(
ax
->
crcmode
)
{
switch
(
ax
->
crcmode
)
{
unsigned
short
crc
;
unsigned
short
crc
;
...
@@ -386,7 +386,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
...
@@ -386,7 +386,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
ax
->
xleft
=
count
-
actual
;
ax
->
xleft
=
count
-
actual
;
ax
->
xhead
=
ax
->
xbuff
+
actual
;
ax
->
xhead
=
ax
->
xbuff
+
actual
;
spin_unlock_bh
(
ax
->
buflock
);
spin_unlock_bh
(
&
ax
->
buflock
);
}
}
/*
/*
...
@@ -759,18 +759,18 @@ static void kiss_unesc(struct ax_disp *ax, unsigned char s)
...
@@ -759,18 +759,18 @@ static void kiss_unesc(struct ax_disp *ax, unsigned char s)
break
;
break
;
}
}
spin_lock_bh
(
ax
->
buflock
);
spin_lock_bh
(
&
ax
->
buflock
);
if
(
!
test_bit
(
AXF_ERROR
,
&
ax
->
flags
))
{
if
(
!
test_bit
(
AXF_ERROR
,
&
ax
->
flags
))
{
if
(
ax
->
rcount
<
ax
->
buffsize
)
{
if
(
ax
->
rcount
<
ax
->
buffsize
)
{
ax
->
rbuff
[
ax
->
rcount
++
]
=
s
;
ax
->
rbuff
[
ax
->
rcount
++
]
=
s
;
spin_unlock_bh
(
ax
->
buflock
);
spin_unlock_bh
(
&
ax
->
buflock
);
return
;
return
;
}
}
ax
->
rx_over_errors
++
;
ax
->
rx_over_errors
++
;
set_bit
(
AXF_ERROR
,
&
ax
->
flags
);
set_bit
(
AXF_ERROR
,
&
ax
->
flags
);
}
}
spin_unlock_bh
(
ax
->
buflock
);
spin_unlock_bh
(
&
ax
->
buflock
);
}
}
...
...
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