aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptbase.c2
-rw-r--r--drivers/message/fusion/mptctl.c5
-rw-r--r--drivers/message/fusion/mptscsih.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 9a2c7605d49c..a3751d86216e 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -6142,7 +6142,7 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
6142 if (ioc->events && (ioc->eventTypes & ( 1 << event))) { 6142 if (ioc->events && (ioc->eventTypes & ( 1 << event))) {
6143 int idx; 6143 int idx;
6144 6144
6145 idx = ioc->eventContext % ioc->eventLogSize; 6145 idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE;
6146 6146
6147 ioc->events[idx].event = event; 6147 ioc->events[idx].event = event;
6148 ioc->events[idx].eventContext = ioc->eventContext; 6148 ioc->events[idx].eventContext = ioc->eventContext;
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 8e2369ff3322..b603fb8e604b 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1501,7 +1501,7 @@ mptctl_eventquery (unsigned long arg)
1501 return -ENODEV; 1501 return -ENODEV;
1502 } 1502 }
1503 1503
1504 karg.eventEntries = ioc->eventLogSize; 1504 karg.eventEntries = MPTCTL_EVENT_LOG_SIZE;
1505 karg.eventTypes = ioc->eventTypes; 1505 karg.eventTypes = ioc->eventTypes;
1506 1506
1507 /* Copy the data from kernel memory to user memory 1507 /* Copy the data from kernel memory to user memory
@@ -1551,7 +1551,6 @@ mptctl_eventenable (unsigned long arg)
1551 memset(ioc->events, 0, sz); 1551 memset(ioc->events, 0, sz);
1552 ioc->alloc_total += sz; 1552 ioc->alloc_total += sz;
1553 1553
1554 ioc->eventLogSize = MPTCTL_EVENT_LOG_SIZE;
1555 ioc->eventContext = 0; 1554 ioc->eventContext = 0;
1556 } 1555 }
1557 1556
@@ -1591,7 +1590,7 @@ mptctl_eventreport (unsigned long arg)
1591 maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS); 1590 maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
1592 1591
1593 1592
1594 max = ioc->eventLogSize < maxEvents ? ioc->eventLogSize : maxEvents; 1593 max = MPTCTL_EVENT_LOG_SIZE < maxEvents ? MPTCTL_EVENT_LOG_SIZE : maxEvents;
1595 1594
1596 /* If fewer than 1 event is requested, there must have 1595 /* If fewer than 1 event is requested, there must have
1597 * been some type of error. 1596 * been some type of error.
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 05789e505464..4fee6befc93d 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2489,7 +2489,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
2489 int idx; 2489 int idx;
2490 MPT_ADAPTER *ioc = hd->ioc; 2490 MPT_ADAPTER *ioc = hd->ioc;
2491 2491
2492 idx = ioc->eventContext % ioc->eventLogSize; 2492 idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE;
2493 ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE; 2493 ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE;
2494 ioc->events[idx].eventContext = ioc->eventContext; 2494 ioc->events[idx].eventContext = ioc->eventContext;
2495 2495