aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptctl.c
diff options
context:
space:
mode:
authorMoore, Eric <Eric.Moore@lsil.com>2006-02-02 19:19:40 -0500
committer <jejb@mulgrave.il.steeleye.com>2006-02-04 17:32:18 -0500
commit5b5ef4f617f1706a23b0433d89a9c02ceb0980a5 (patch)
tree9ee0d3c2590af2ebd0dd542bf2803e8d909b551f /drivers/message/fusion/mptctl.c
parent86a7dcaae9c67a344e51190734b98684072d181c (diff)
[SCSI] fusion - mptctl - Event Log Fix
Use the hard coded value MPTCTL_EVENT_LOG_SIZE to fix bug where in certain cases, the ioc->eventLogSize was initialized. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r--drivers/message/fusion/mptctl.c5
1 files changed, 2 insertions, 3 deletions
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.