|
@@ -41,6 +41,7 @@
|
|
|
#include <linux/timer.h>
|
|
|
#include <linux/pci.h>
|
|
|
#include <linux/init.h>
|
|
|
+#include <linux/jiffies.h>
|
|
|
#include <linux/random.h>
|
|
|
#include <asm/io.h>
|
|
|
#include <asm/uaccess.h>
|
|
@@ -3654,8 +3655,8 @@ static void DAC960_V1_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|
|
(NewEnquiry->EventLogSequenceNumber !=
|
|
|
OldEnquiry->EventLogSequenceNumber) ||
|
|
|
Controller->MonitoringTimerCount == 0 ||
|
|
|
- (jiffies - Controller->SecondaryMonitoringTime
|
|
|
- >= DAC960_SecondaryMonitoringInterval))
|
|
|
+ time_after_eq(jiffies, Controller->SecondaryMonitoringTime
|
|
|
+ + DAC960_SecondaryMonitoringInterval))
|
|
|
{
|
|
|
Controller->V1.NeedLogicalDriveInformation = true;
|
|
|
Controller->V1.NewEventLogSequenceNumber =
|
|
@@ -5640,8 +5641,8 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
|
|
|
unsigned int StatusChangeCounter =
|
|
|
Controller->V2.HealthStatusBuffer->StatusChangeCounter;
|
|
|
boolean ForceMonitoringCommand = false;
|
|
|
- if (jiffies - Controller->SecondaryMonitoringTime
|
|
|
- > DAC960_SecondaryMonitoringInterval)
|
|
|
+ if (time_after(jiffies, Controller->SecondaryMonitoringTime
|
|
|
+ + DAC960_SecondaryMonitoringInterval))
|
|
|
{
|
|
|
int LogicalDriveNumber;
|
|
|
for (LogicalDriveNumber = 0;
|
|
@@ -5669,8 +5670,8 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
|
|
|
ControllerInfo->ConsistencyChecksActive +
|
|
|
ControllerInfo->RebuildsActive +
|
|
|
ControllerInfo->OnlineExpansionsActive == 0 ||
|
|
|
- jiffies - Controller->PrimaryMonitoringTime
|
|
|
- < DAC960_MonitoringTimerInterval) &&
|
|
|
+ time_before(jiffies, Controller->PrimaryMonitoringTime
|
|
|
+ + DAC960_MonitoringTimerInterval)) &&
|
|
|
!ForceMonitoringCommand)
|
|
|
{
|
|
|
Controller->MonitoringTimer.expires =
|
|
@@ -5807,8 +5808,8 @@ static void DAC960_Message(DAC960_MessageLevel_T MessageLevel,
|
|
|
Controller->ProgressBufferLength = Length;
|
|
|
if (Controller->EphemeralProgressMessage)
|
|
|
{
|
|
|
- if (jiffies - Controller->LastProgressReportTime
|
|
|
- >= DAC960_ProgressReportingInterval)
|
|
|
+ if (time_after_eq(jiffies, Controller->LastProgressReportTime
|
|
|
+ + DAC960_ProgressReportingInterval))
|
|
|
{
|
|
|
printk("%sDAC960#%d: %s", DAC960_MessageLevelMap[MessageLevel],
|
|
|
Controller->ControllerNumber, Buffer);
|