Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/dev/ic Pull up following revision(s) (requested by ha...



details:   https://anonhg.NetBSD.org/src/rev/7ed16d1e51ae
branches:  netbsd-6
changeset: 776998:7ed16d1e51ae
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Nov 15 16:47:26 2015 +0000

description:
Pull up following revision(s) (requested by hannken in ticket #1316):
        sys/dev/ic/mpt_netbsd.c: revision 1.32
Adapter leaks requests when mpt_event_notify_reply() has to acknowledge
an event leading to "adapter resource shortage" messages when the scsipi
subsystem tries to use all adapt_openings.
Change mpt_ctlop() to free the request on event MPI_FUNCTION_EVENT_ACK.
Tested on a SunFire X4275 with Symbios Logic SAS1068E (1000:0058, rev. 4).

diffstat:

 sys/dev/ic/mpt_netbsd.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r fa21adb0b002 -r 7ed16d1e51ae sys/dev/ic/mpt_netbsd.c
--- a/sys/dev/ic/mpt_netbsd.c   Sun Nov 15 16:43:54 2015 +0000
+++ b/sys/dev/ic/mpt_netbsd.c   Sun Nov 15 16:47:26 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpt_netbsd.c,v 1.17.2.2 2014/11/03 22:05:37 msaitoh Exp $      */
+/*     $NetBSD: mpt_netbsd.c,v 1.17.2.3 2015/11/15 16:47:26 bouyer Exp $       */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.17.2.2 2014/11/03 22:05:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.17.2.3 2015/11/15 16:47:26 bouyer Exp $");
 
 #include "bio.h"
 
@@ -1117,8 +1117,16 @@
                break;
 
        case MPI_FUNCTION_EVENT_ACK:
+           {
+               MSG_EVENT_ACK_REPLY *msg = vmsg;
+               int index = le32toh(msg->MsgContext) & ~0x80000000;
                mpt_free_reply(mpt, (reply << 1));
+               if (index >= 0 && index < MPT_MAX_REQUESTS(mpt)) {
+                       request_t *req = &mpt->request_pool[index];
+                       mpt_free_request(mpt, req);
+               }
                break;
+           }
 
        case MPI_FUNCTION_PORT_ENABLE:
            {



Home | Main Index | Thread Index | Old Index