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
8a09222d
Commit
8a09222d
authored
Mar 06, 2005
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/garz/repo/netdev-2.6/s2io
into pobox.com:/garz/repo/net-drivers-2.6
parents
302683a5
83932276
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
35 deletions
+18
-35
drivers/net/s2io.c
drivers/net/s2io.c
+18
-35
No files found.
drivers/net/s2io.c
View file @
8a09222d
...
...
@@ -699,8 +699,7 @@ static int init_nic(struct s2io_nic *nic)
val64
=
0
;
writeq
(
val64
,
&
bar0
->
sw_reset
);
val64
=
readq
(
&
bar0
->
sw_reset
);
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
2
);
msleep
(
500
);
/* Enable Receiving broadcasts */
add
=
&
bar0
->
mac_cfg
;
...
...
@@ -953,8 +952,7 @@ static int init_nic(struct s2io_nic *nic)
dev
->
name
);
return
-
1
;
}
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
msleep
(
50
);
time
++
;
}
...
...
@@ -992,8 +990,7 @@ static int init_nic(struct s2io_nic *nic)
return
-
1
;
}
time
++
;
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
msleep
(
50
);
}
/*
...
...
@@ -1422,8 +1419,7 @@ static int start_nic(struct s2io_nic *nic)
SPECIAL_REG_WRITE
(
val64
,
&
bar0
->
mc_rldram_mrs
,
UF
);
val64
=
readq
(
&
bar0
->
mc_rldram_mrs
);
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
10
);
/* Delay by around 100 ms. */
msleep
(
100
);
/* Delay by around 100 ms. */
/* Enabling ECC Protection. */
val64
=
readq
(
&
bar0
->
adapter_control
);
...
...
@@ -2438,8 +2434,7 @@ int wait_for_cmd_complete(nic_t * sp)
ret
=
SUCCESS
;
break
;
}
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
msleep
(
50
);
if
(
cnt
++
>
10
)
break
;
}
...
...
@@ -2478,15 +2473,13 @@ void s2io_reset(nic_t * sp)
* As of now I'am just giving a 250ms delay and hoping that the
* PCI write to sw_reset register is done by this time.
*/
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
4
);
msleep
(
250
);
/* Restore the PCI state saved during initializarion. */
pci_restore_state
(
sp
->
pdev
);
s2io_init_pci
(
sp
);
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
4
);
msleep
(
250
);
/* SXE-002: Configure link and activity LED to turn it off */
subid
=
sp
->
pdev
->
subsystem_device
;
...
...
@@ -3304,11 +3297,10 @@ static int s2io_ethtool_idnic(struct net_device *dev, u32 data)
sp
->
id_timer
.
data
=
(
unsigned
long
)
sp
;
}
mod_timer
(
&
sp
->
id_timer
,
jiffies
);
set_current_state
(
TASK_INTERRUPTIBLE
);
if
(
data
)
schedule_timeout
(
data
*
HZ
);
msleep
(
data
*
1000
);
else
schedule_timeout
(
MAX_SCHEDULE_TIMEOUT
);
msleep
(
0xFFFFFFFF
);
del_timer_sync
(
&
sp
->
id_timer
);
if
(
CARDS_WITH_FAULTY_LINK_INDICATORS
(
subid
))
{
...
...
@@ -3411,8 +3403,7 @@ static int read_eeprom(nic_t * sp, int off, u32 * data)
ret
=
0
;
break
;
}
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
msleep
(
50
);
exit_cnt
++
;
}
...
...
@@ -3452,8 +3443,7 @@ static int write_eeprom(nic_t * sp, int off, u32 data, int cnt)
ret
=
0
;
break
;
}
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
msleep
(
50
);
exit_cnt
++
;
}
...
...
@@ -3709,8 +3699,7 @@ static int s2io_bist_test(nic_t * sp, uint64_t * data)
ret
=
0
;
break
;
}
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
10
);
msleep
(
100
);
cnt
++
;
}
...
...
@@ -3811,8 +3800,7 @@ static int s2io_rldram_test(nic_t * sp, uint64_t * data)
val64
=
readq
(
&
bar0
->
mc_rldram_test_ctrl
);
if
(
val64
&
MC_RLDRAM_TEST_DONE
)
break
;
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
5
);
msleep
(
200
);
}
if
(
cnt
==
5
)
...
...
@@ -3828,8 +3816,7 @@ static int s2io_rldram_test(nic_t * sp, uint64_t * data)
val64
=
readq
(
&
bar0
->
mc_rldram_test_ctrl
);
if
(
val64
&
MC_RLDRAM_TEST_DONE
)
break
;
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
2
);
msleep
(
500
);
}
if
(
cnt
==
5
)
...
...
@@ -4189,8 +4176,7 @@ static void s2io_set_link(unsigned long data)
* Allow a small delay for the NICs self initiated
* cleanup to complete.
*/
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
10
);
msleep
(
100
);
val64
=
readq
(
&
bar0
->
adapter_status
);
if
(
verify_xena_quiescence
(
val64
,
nic
->
device_enabled_once
))
{
...
...
@@ -4244,10 +4230,8 @@ static void s2io_card_down(nic_t * sp)
register
u64
val64
=
0
;
/* If s2io_set_link task is executing, wait till it completes. */
while
(
test_and_set_bit
(
0
,
&
(
sp
->
link_state
)))
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
}
while
(
test_and_set_bit
(
0
,
&
(
sp
->
link_state
)))
msleep
(
50
);
atomic_set
(
&
sp
->
card_state
,
CARD_DOWN
);
/* disable Tx and Rx traffic on the NIC */
...
...
@@ -4263,8 +4247,7 @@ static void s2io_card_down(nic_t * sp)
break
;
}
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
HZ
/
20
);
msleep
(
50
);
cnt
++
;
if
(
cnt
==
10
)
{
DBG_PRINT
(
ERR_DBG
,
...
...
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