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
f385dd77
Commit
f385dd77
authored
Dec 02, 2002
by
Adam Kropelin
Committed by
Jeff Garzik
Dec 02, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr ewrk3] fix and enable ethtool phys-id ioctl
parent
467578b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
drivers/net/ewrk3.c
drivers/net/ewrk3.c
+5
-14
No files found.
drivers/net/ewrk3.c
View file @
f385dd77
...
@@ -1754,23 +1754,17 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
...
@@ -1754,23 +1754,17 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
return
0
;
return
0
;
}
}
#ifdef BROKEN
/* Blink LED for identification */
/* Blink LED for identification */
case
ETHTOOL_PHYS_ID
:
{
case
ETHTOOL_PHYS_ID
:
{
struct
ethtool_value
edata
;
struct
ethtool_value
edata
;
u_long
flags
;
u_long
flags
;
long
delay
,
ret
;
u_char
cr
;
u_char
cr
;
int
count
;
int
count
;
wait_queue_head_t
wait
;
init_waitqueue_head
(
&
wait
);
if
(
copy_from_user
(
&
edata
,
useraddr
,
sizeof
(
edata
)))
if
(
copy_from_user
(
&
edata
,
useraddr
,
sizeof
(
edata
)))
return
-
EFAULT
;
return
-
EFAULT
;
/* Toggle LED 4x per second */
/* Toggle LED 4x per second */
delay
=
HZ
>>
2
;
count
=
edata
.
data
<<
2
;
count
=
edata
.
data
<<
2
;
spin_lock_irqsave
(
&
lp
->
hw_lock
,
flags
);
spin_lock_irqsave
(
&
lp
->
hw_lock
,
flags
);
...
@@ -1791,24 +1785,21 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
...
@@ -1791,24 +1785,21 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
/* Wait a little while */
/* Wait a little while */
spin_unlock_irqrestore
(
&
lp
->
hw_lock
,
flags
);
spin_unlock_irqrestore
(
&
lp
->
hw_lock
,
flags
);
ret
=
delay
;
set_current_state
(
TASK_UNINTERRUPTIBLE
)
;
__wait_event_interruptible_timeout
(
wait
,
0
,
ret
);
schedule_timeout
(
HZ
>>
2
);
spin_lock_irqsave
(
&
lp
->
hw_lock
,
flags
);
spin_lock_irqsave
(
&
lp
->
hw_lock
,
flags
);
/* Exit if we got a signal */
/* Exit if we got a signal */
if
(
ret
==
-
ERESTARTSYS
)
if
(
signal_pending
(
current
)
)
goto
out
;
break
;
}
}
ret
=
0
;
out:
lp
->
led_mask
=
CR_LED
;
lp
->
led_mask
=
CR_LED
;
cr
=
inb
(
EWRK3_CR
);
cr
=
inb
(
EWRK3_CR
);
outb
(
cr
&
~
CR_LED
,
EWRK3_CR
);
outb
(
cr
&
~
CR_LED
,
EWRK3_CR
);
spin_unlock_irqrestore
(
&
lp
->
hw_lock
,
flags
);
spin_unlock_irqrestore
(
&
lp
->
hw_lock
,
flags
);
return
ret
;
return
signal_pending
(
current
)
?
-
ERESTARTSYS
:
0
;
}
}
#endif
/* BROKEN */
}
}
...
...
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