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
83b819c5
Commit
83b819c5
authored
Apr 02, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] jiffies wrap fixes.
Some from 2.4, some from the kernel janitor team,..
parent
775efacb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
15 deletions
+15
-15
arch/cris/drivers/ethernet.c
arch/cris/drivers/ethernet.c
+3
-3
arch/cris/drivers/ide.c
arch/cris/drivers/ide.c
+1
-1
drivers/char/esp.c
drivers/char/esp.c
+1
-1
drivers/char/ip2/i2lib.c
drivers/char/ip2/i2lib.c
+1
-1
drivers/i2c/i2c-algo-bit.c
drivers/i2c/i2c-algo-bit.c
+2
-2
drivers/mtd/chips/sharp.c
drivers/mtd/chips/sharp.c
+1
-1
drivers/sbus/char/aurora.c
drivers/sbus/char/aurora.c
+1
-1
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.c
+2
-2
drivers/scsi/53c7xx.c
drivers/scsi/53c7xx.c
+2
-2
drivers/tc/zs.c
drivers/tc/zs.c
+1
-1
No files found.
arch/cris/drivers/ethernet.c
View file @
83b819c5
...
...
@@ -996,7 +996,7 @@ e100_rx(struct net_device *dev)
int
i
;
#endif
if
(
!
led_active
&&
jiffies
>
led_next_time
)
{
if
(
!
led_active
&&
time_after
(
jiffies
,
led_next_time
)
)
{
/* light the network leds depending on the current speed. */
e100_set_network_leds
(
NETWORK_ACTIVITY
);
...
...
@@ -1288,7 +1288,7 @@ e100_hardware_send_packet(char *buf, int length)
{
D
(
printk
(
"e100 send pack, buf 0x%x len %d
\n
"
,
buf
,
length
));
if
(
!
led_active
&&
jiffies
>
led_next_time
)
{
if
(
!
led_active
&&
time_after
(
jiffies
,
led_next_time
)
)
{
/* light the network leds depending on the current speed. */
e100_set_network_leds
(
NETWORK_ACTIVITY
);
...
...
@@ -1313,7 +1313,7 @@ e100_hardware_send_packet(char *buf, int length)
static
void
e100_clear_network_leds
(
unsigned
long
dummy
)
{
if
(
led_active
&&
jiffies
>
led_next_time
)
{
if
(
led_active
&&
jiffies
>
time_after
(
jiffies
,
led_next_time
)
)
{
e100_set_network_leds
(
NO_NETWORK_ACTIVITY
);
/* Set the earliest time we may set the LED */
...
...
arch/cris/drivers/ide.c
View file @
83b819c5
...
...
@@ -355,7 +355,7 @@ init_e100_ide (void)
printk
(
"ide: waiting %d seconds for drives to regain consciousness
\n
"
,
CONFIG_ETRAX_IDE_DELAY
);
h
=
jiffies
+
(
CONFIG_ETRAX_IDE_DELAY
*
HZ
);
while
(
jiffies
<
h
)
;
while
(
time_before
(
jiffies
,
h
)
)
;
/* reset the dma channels we will use */
...
...
drivers/char/esp.c
View file @
83b819c5
...
...
@@ -2161,7 +2161,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
if
(
signal_pending
(
current
))
break
;
if
(
timeout
&&
((
orig_jiffies
+
timeout
)
<
jiffies
))
if
(
timeout
&&
time_after
(
jiffies
,
orig_jiffies
+
timeout
))
break
;
serial_out
(
info
,
UART_ESI_CMD1
,
ESI_NO_COMMAND
);
...
...
drivers/char/ip2/i2lib.c
View file @
83b819c5
...
...
@@ -1330,7 +1330,7 @@ i2DrainOutput(i2ChanStrPtr pCh, int timeout)
// if expires == 0 then timer poped, then do not need to del_timer
if
((
timeout
>
0
)
&&
pCh
->
BookmarkTimer
.
expires
&&
(
pCh
->
BookmarkTimer
.
expires
>
jiffi
es
))
{
time_before
(
jiffies
,
pCh
->
BookmarkTimer
.
expir
es
))
{
del_timer
(
&
(
pCh
->
BookmarkTimer
)
);
pCh
->
BookmarkTimer
.
expires
=
0
;
...
...
drivers/i2c/i2c-algo-bit.c
View file @
83b819c5
...
...
@@ -49,7 +49,7 @@
/* respectively. This makes sure that the algorithm works. Some chips */
/* might not like this, as they have an internal timeout of some mils */
/*
#define SLO_IO jif=jiffies;while(
jiffies<=jif+i2c_table[minor].veryslow
)\
#define SLO_IO jif=jiffies;while(
time_before_eq(jiffies, jif+i2c_table[minor].veryslow)
)\
cond_resched();
*/
...
...
@@ -117,7 +117,7 @@ static inline int sclhi(struct i2c_algo_bit_data *adap)
* while they are processing data internally.
*/
setscl
(
adap
,
1
);
if
(
start
+
adap
->
timeout
<=
jiffies
)
{
if
(
time_after_eq
(
jiffies
,
start
+
adap
->
timeout
)
)
{
return
-
ETIMEDOUT
;
}
cond_resched
();
...
...
drivers/mtd/chips/sharp.c
View file @
83b819c5
...
...
@@ -440,7 +440,7 @@ static int sharp_do_wait_for_ready(struct map_info *map, struct flchip *chip,
timeo
=
jiffies
+
HZ
;
while
(
jiffies
<
timeo
){
while
(
time_before
(
jiffies
,
timeo
)
){
map
->
write32
(
map
,
CMD_READ_STATUS
,
adr
);
status
=
map
->
read32
(
map
,
adr
);
if
((
status
&
SR_READY
)
==
SR_READY
){
...
...
drivers/sbus/char/aurora.c
View file @
83b819c5
...
...
@@ -179,7 +179,7 @@ extern inline void aurora_long_delay(unsigned long delay)
#ifdef AURORA_DEBUG
printk
(
"aurora_long_delay: start
\n
"
);
#endif
for
(
i
=
jiffies
+
delay
;
i
>
jiffies
;
)
;
for
(
i
=
jiffies
+
delay
;
time_before
(
jiffies
,
i
)
;
)
;
#ifdef AURORA_DEBUG
printk
(
"aurora_long_delay: end
\n
"
);
#endif
...
...
drivers/scsi/53c7,8xx.c
View file @
83b819c5
...
...
@@ -1869,7 +1869,7 @@ NCR53c8xx_run_tests (struct Scsi_Host *host) {
*/
timeout
=
jiffies
+
5
*
HZ
/
10
;
while
((
hostdata
->
test_completed
==
-
1
)
&&
jiffies
<
timeout
)
{
while
((
hostdata
->
test_completed
==
-
1
)
&&
time_before
(
jiffies
,
timeout
)
)
{
barrier
();
cpu_relax
();
}
...
...
@@ -1955,7 +1955,7 @@ NCR53c8xx_run_tests (struct Scsi_Host *host) {
restore_flags
(
flags
);
timeout
=
jiffies
+
5
*
HZ
;
/* arbitrary */
while
((
hostdata
->
test_completed
==
-
1
)
&&
jiffies
<
timeout
)
{
while
((
hostdata
->
test_completed
==
-
1
)
&&
time_before
(
jiffies
,
timeout
)
)
{
barrier
();
cpu_relax
();
}
...
...
drivers/scsi/53c7xx.c
View file @
83b819c5
...
...
@@ -1627,7 +1627,7 @@ NCR53c7xx_run_tests (struct Scsi_Host *host) {
*/
timeout
=
jiffies
+
5
*
HZ
/
10
;
while
((
hostdata
->
test_completed
==
-
1
)
&&
jiffies
<
timeout
)
while
((
hostdata
->
test_completed
==
-
1
)
&&
time_before
(
jiffies
,
timeout
)
)
barrier
();
failed
=
1
;
...
...
@@ -1713,7 +1713,7 @@ NCR53c7xx_run_tests (struct Scsi_Host *host) {
restore_flags
(
flags
);
timeout
=
jiffies
+
5
*
HZ
;
/* arbitrary */
while
((
hostdata
->
test_completed
==
-
1
)
&&
jiffies
<
timeout
)
while
((
hostdata
->
test_completed
==
-
1
)
&&
time_before
(
jiffies
,
timeout
)
)
barrier
();
NCR53c7x0_write32
(
DSA_REG
,
0
);
...
...
drivers/tc/zs.c
View file @
83b819c5
...
...
@@ -1472,7 +1472,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
schedule_timeout
(
char_time
);
if
(
signal_pending
(
current
))
break
;
if
(
timeout
&&
((
orig_jiffies
+
timeout
)
<
jiffies
))
if
(
timeout
&&
time_after
(
jiffies
,
orig_jiffies
+
timeout
))
break
;
}
current
->
state
=
TASK_RUNNING
;
...
...
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