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
e149ee4c
Commit
e149ee4c
authored
Apr 28, 2002
by
Dave Jones
Committed by
Jaroslav Kysela
Apr 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Jiffies wrap fixes.
parent
2617765b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
17 deletions
+20
-17
drivers/atm/fore200e.c
drivers/atm/fore200e.c
+4
-4
drivers/net/fc/iph5526.c
drivers/net/fc/iph5526.c
+4
-1
drivers/net/rrunner.c
drivers/net/rrunner.c
+1
-1
drivers/scsi/cpqfcTSstructs.h
drivers/scsi/cpqfcTSstructs.h
+1
-1
drivers/scsi/gdth_proc.c
drivers/scsi/gdth_proc.c
+1
-1
drivers/scsi/qlogicfas.c
drivers/scsi/qlogicfas.c
+4
-4
drivers/scsi/qlogicfc.c
drivers/scsi/qlogicfc.c
+2
-2
drivers/scsi/sun3_scsi.c
drivers/scsi/sun3_scsi.c
+1
-1
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/digi_acceleport.c
+2
-2
No files found.
drivers/atm/fore200e.c
View file @
e149ee4c
...
@@ -251,7 +251,7 @@ static void
...
@@ -251,7 +251,7 @@ static void
fore200e_spin
(
int
msecs
)
fore200e_spin
(
int
msecs
)
{
{
unsigned
long
timeout
=
jiffies
+
MSECS
(
msecs
);
unsigned
long
timeout
=
jiffies
+
MSECS
(
msecs
);
while
(
jiffies
<
timeout
);
while
(
time_before
(
jiffies
,
timeout
)
);
}
}
...
@@ -266,7 +266,7 @@ fore200e_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int msecs)
...
@@ -266,7 +266,7 @@ fore200e_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int msecs)
if
((
ok
=
(
*
addr
==
val
))
||
(
*
addr
&
STATUS_ERROR
))
if
((
ok
=
(
*
addr
==
val
))
||
(
*
addr
&
STATUS_ERROR
))
break
;
break
;
}
while
(
jiffies
<
timeout
);
}
while
(
time_before
(
jiffies
,
timeout
)
);
#if 1
#if 1
if
(
!
ok
)
{
if
(
!
ok
)
{
...
@@ -289,7 +289,7 @@ fore200e_io_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int mse
...
@@ -289,7 +289,7 @@ fore200e_io_poll(struct fore200e* fore200e, volatile u32* addr, u32 val, int mse
if
((
ok
=
(
fore200e
->
bus
->
read
(
addr
)
==
val
)))
if
((
ok
=
(
fore200e
->
bus
->
read
(
addr
)
==
val
)))
break
;
break
;
}
while
(
jiffies
<
timeout
);
}
while
(
time_before
(
jiffies
,
timeout
)
);
#if 1
#if 1
if
(
!
ok
)
{
if
(
!
ok
)
{
...
@@ -2416,7 +2416,7 @@ fore200e_monitor_getc(struct fore200e* fore200e)
...
@@ -2416,7 +2416,7 @@ fore200e_monitor_getc(struct fore200e* fore200e)
unsigned
long
timeout
=
jiffies
+
MSECS
(
50
);
unsigned
long
timeout
=
jiffies
+
MSECS
(
50
);
int
c
;
int
c
;
while
(
jiffies
<
timeout
)
{
while
(
time_before
(
jiffies
,
timeout
)
)
{
c
=
(
int
)
fore200e
->
bus
->
read
(
&
monitor
->
soft_uart
.
recv
);
c
=
(
int
)
fore200e
->
bus
->
read
(
&
monitor
->
soft_uart
.
recv
);
...
...
drivers/net/fc/iph5526.c
View file @
e149ee4c
...
@@ -3870,8 +3870,11 @@ struct pci_dev *pdev = NULL;
...
@@ -3870,8 +3870,11 @@ struct pci_dev *pdev = NULL;
/* Wait for the Link to come up and the login process
/* Wait for the Link to come up and the login process
* to complete.
* to complete.
*/
*/
for
(
timeout
=
jiffies
+
10
*
HZ
;
(
timeout
>
jiffies
)
&&
((
fi
->
g
.
link_up
==
FALSE
)
||
(
fi
->
g
.
port_discovery
==
TRUE
)
||
(
fi
->
g
.
explore_fabric
==
TRUE
)
||
(
fi
->
g
.
perform_adisc
==
TRUE
));)
for
(
timeout
=
jiffies
+
10
*
HZ
;
time_before
(
jiffies
,
timeout
)
&&
((
fi
->
g
.
link_up
==
FALSE
)
||
(
fi
->
g
.
port_discovery
==
TRUE
)
||
(
fi
->
g
.
explore_fabric
==
TRUE
)
||
(
fi
->
g
.
perform_adisc
==
TRUE
));)
{
cpu_relax
();
barrier
();
barrier
();
}
count
++
;
count
++
;
no_of_hosts
++
;
no_of_hosts
++
;
...
...
drivers/net/rrunner.c
View file @
e149ee4c
...
@@ -773,7 +773,7 @@ static int rr_init1(struct net_device *dev)
...
@@ -773,7 +773,7 @@ static int rr_init1(struct net_device *dev)
* Give the FirmWare time to chew on the `get running' command.
* Give the FirmWare time to chew on the `get running' command.
*/
*/
myjif
=
jiffies
+
5
*
HZ
;
myjif
=
jiffies
+
5
*
HZ
;
while
(
(
jiffies
<
myjif
)
&&
!
rrpriv
->
fw_running
);
while
(
time_before
(
jiffies
,
myjif
)
&&
!
rrpriv
->
fw_running
);
netif_start_queue
(
dev
);
netif_start_queue
(
dev
);
...
...
drivers/scsi/cpqfcTSstructs.h
View file @
e149ee4c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#define DbgDelay(secs) { int wait_time; printk( " DbgDelay %ds ", secs); \
#define DbgDelay(secs) { int wait_time; printk( " DbgDelay %ds ", secs); \
for( wait_time=jiffies + (secs*HZ); \
for( wait_time=jiffies + (secs*HZ); \
wait_time > jiffies
;) ; }
time_before(jiffies, wait_time)
;) ; }
#define CPQFCTS_DRIVER_VER(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
#define CPQFCTS_DRIVER_VER(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
// don't forget to also change MODULE_DESCRIPTION in cpqfcTSinit.c
// don't forget to also change MODULE_DESCRIPTION in cpqfcTSinit.c
...
...
drivers/scsi/gdth_proc.c
View file @
e149ee4c
...
@@ -1464,7 +1464,7 @@ static int gdth_update_timeout(int hanum, Scsi_Cmnd *scp, int timeout)
...
@@ -1464,7 +1464,7 @@ static int gdth_update_timeout(int hanum, Scsi_Cmnd *scp, int timeout)
timer_table
[
SCSI_TIMER
].
expires
=
jiffies
+
timeout
;
timer_table
[
SCSI_TIMER
].
expires
=
jiffies
+
timeout
;
timer_active
|=
1
<<
SCSI_TIMER
;
timer_active
|=
1
<<
SCSI_TIMER
;
}
else
{
}
else
{
if
(
jiffies
+
timeout
<
timer_table
[
SCSI_TIMER
].
expires
)
if
(
time_before
(
jiffies
+
timeout
,
timer_table
[
SCSI_TIMER
].
expires
)
)
timer_table
[
SCSI_TIMER
].
expires
=
jiffies
+
timeout
;
timer_table
[
SCSI_TIMER
].
expires
=
jiffies
+
timeout
;
}
}
}
}
...
...
drivers/scsi/qlogicfas.c
View file @
e149ee4c
...
@@ -271,11 +271,11 @@ static int ql_wai(void)
...
@@ -271,11 +271,11 @@ static int ql_wai(void)
int
i
,
k
;
int
i
,
k
;
k
=
0
;
k
=
0
;
i
=
jiffies
+
WATCHDOG
;
i
=
jiffies
+
WATCHDOG
;
while
(
i
>
jiffies
&&
!
qabort
&&
!
((
k
=
inb
(
qbase
+
4
))
&
0xe0
))
{
while
(
time_before
(
jiffies
,
i
)
&&
!
qabort
&&
!
((
k
=
inb
(
qbase
+
4
))
&
0xe0
))
{
barrier
();
barrier
();
cpu_relax
();
cpu_relax
();
}
}
if
(
i
<=
jiffies
)
if
(
time_after_eq
(
jiffies
,
i
)
)
return
(
DID_TIME_OUT
);
return
(
DID_TIME_OUT
);
if
(
qabort
)
if
(
qabort
)
return
(
qabort
==
1
?
DID_ABORT
:
DID_RESET
);
return
(
qabort
==
1
?
DID_ABORT
:
DID_RESET
);
...
@@ -407,8 +407,8 @@ rtrc(2)
...
@@ -407,8 +407,8 @@ rtrc(2)
}
}
/*** Enter Status (and Message In) Phase ***/
/*** Enter Status (and Message In) Phase ***/
k
=
jiffies
+
WATCHDOG
;
k
=
jiffies
+
WATCHDOG
;
while
(
k
>
jiffies
&&
!
qabort
&&
!
(
inb
(
qbase
+
4
)
&
6
));
/* wait for status phase */
while
(
time_before
(
jiffies
,
k
)
&&
!
qabort
&&
!
(
inb
(
qbase
+
4
)
&
6
));
/* wait for status phase */
if
(
k
<=
jiffies
)
{
if
(
time_after_eq
(
jiffies
,
k
)
)
{
ql_zap
();
ql_zap
();
return
(
DID_TIME_OUT
<<
16
);
return
(
DID_TIME_OUT
<<
16
);
}
}
...
...
drivers/scsi/qlogicfc.c
View file @
e149ee4c
...
@@ -802,7 +802,7 @@ int isp2x00_detect(Scsi_Host_Template * tmpt)
...
@@ -802,7 +802,7 @@ int isp2x00_detect(Scsi_Host_Template * tmpt)
outw
(
HCCR_CLEAR_RISC_INTR
,
host
->
io_port
+
HOST_HCCR
);
outw
(
HCCR_CLEAR_RISC_INTR
,
host
->
io_port
+
HOST_HCCR
);
isp2x00_enable_irqs
(
host
);
isp2x00_enable_irqs
(
host
);
/* wait for the loop to come up */
/* wait for the loop to come up */
for
(
wait_time
=
jiffies
+
10
*
HZ
;
wait_time
>
jiffies
&&
hostdata
->
adapter_state
==
AS_LOOP_DOWN
;)
{
for
(
wait_time
=
jiffies
+
10
*
HZ
;
time_before
(
jiffies
,
wait_time
)
&&
hostdata
->
adapter_state
==
AS_LOOP_DOWN
;)
{
barrier
();
barrier
();
cpu_relax
();
cpu_relax
();
}
}
...
@@ -819,7 +819,7 @@ int isp2x00_detect(Scsi_Host_Template * tmpt)
...
@@ -819,7 +819,7 @@ int isp2x00_detect(Scsi_Host_Template * tmpt)
some time before recognizing it is attached to a fabric */
some time before recognizing it is attached to a fabric */
#if ISP2x00_FABRIC
#if ISP2x00_FABRIC
for
(
wait_time
=
jiffies
+
5
*
HZ
;
wait_time
>
jiffies
;)
{
for
(
wait_time
=
jiffies
+
5
*
HZ
;
time_before
(
jiffies
,
wait_time
)
;)
{
barrier
();
barrier
();
cpu_relax
();
cpu_relax
();
}
}
...
...
drivers/scsi/sun3_scsi.c
View file @
e149ee4c
...
@@ -357,7 +357,7 @@ static void sun3_scsi_reset_boot(struct Scsi_Host *instance)
...
@@ -357,7 +357,7 @@ static void sun3_scsi_reset_boot(struct Scsi_Host *instance)
NCR5380_write
(
INITIATOR_COMMAND_REG
,
ICR_BASE
);
NCR5380_write
(
INITIATOR_COMMAND_REG
,
ICR_BASE
);
NCR5380_read
(
RESET_PARITY_INTERRUPT_REG
);
NCR5380_read
(
RESET_PARITY_INTERRUPT_REG
);
for
(
end
=
jiffies
+
AFTER_RESET_DELAY
;
jiffies
<
end
;
)
for
(
end
=
jiffies
+
AFTER_RESET_DELAY
;
time_before
(
jiffies
,
end
)
;
)
barrier
();
barrier
();
/* switch on SCSI IRQ again */
/* switch on SCSI IRQ again */
...
...
drivers/usb/serial/digi_acceleport.c
View file @
e149ee4c
...
@@ -732,7 +732,7 @@ count );
...
@@ -732,7 +732,7 @@ count );
while
(
count
>
0
&&
ret
==
0
)
{
while
(
count
>
0
&&
ret
==
0
)
{
while
(
(
port
->
write_urb
->
status
==
-
EINPROGRESS
while
(
(
port
->
write_urb
->
status
==
-
EINPROGRESS
||
priv
->
dp_write_urb_in_use
)
&&
jiffies
<
timeout
)
{
||
priv
->
dp_write_urb_in_use
)
&&
time_before
(
jiffies
,
timeout
)
)
{
cond_wait_interruptible_timeout_irqrestore
(
cond_wait_interruptible_timeout_irqrestore
(
&
port
->
write_wait
,
DIGI_RETRY_TIMEOUT
,
&
port
->
write_wait
,
DIGI_RETRY_TIMEOUT
,
&
priv
->
dp_port_lock
,
flags
);
&
priv
->
dp_port_lock
,
flags
);
...
@@ -897,7 +897,7 @@ static int digi_transmit_idle( struct usb_serial_port *port,
...
@@ -897,7 +897,7 @@ static int digi_transmit_idle( struct usb_serial_port *port,
spin_lock_irqsave
(
&
priv
->
dp_port_lock
,
flags
);
spin_lock_irqsave
(
&
priv
->
dp_port_lock
,
flags
);
while
(
jiffies
<
timeout
&&
!
priv
->
dp_transmit_idle
)
{
while
(
time_before
(
jiffies
,
timeout
)
&&
!
priv
->
dp_transmit_idle
)
{
cond_wait_interruptible_timeout_irqrestore
(
cond_wait_interruptible_timeout_irqrestore
(
&
priv
->
dp_transmit_idle_wait
,
DIGI_RETRY_TIMEOUT
,
&
priv
->
dp_transmit_idle_wait
,
DIGI_RETRY_TIMEOUT
,
&
priv
->
dp_port_lock
,
flags
);
&
priv
->
dp_port_lock
,
flags
);
...
...
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