From owner-svn-src-head@freebsd.org Tue Mar 14 00:43:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48161D096AD; Tue, 14 Mar 2017 00:43:45 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp003.me.com (mr11p00im-asmtp003.me.com [17.110.69.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D86E18EB; Tue, 14 Mar 2017 00:43:45 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp003.me.com by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMS00J0049FNQ00@mr11p00im-asmtp003.me.com>; Tue, 14 Mar 2017 00:43:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1489452218; bh=gHVcsWsUMAFLed5DSQhjqVEK9jFWDCoaV7I5xi3Uo6o=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=gvu8hqY9ltMqaBDK8csQFAMgxjq5YHSWhU4V+aoeRW+8ypfS7i0Mj57k0nFv+NWUY o9BtMrMChSI9luLBid73it8Nhz1qPj+rHZElEC5BTcVpSYsBs9DzMhlwXqm0VNtBUZ smKTifPJY99XrKOYsckt8YqzzYOuO+gS+yRxucTNupV523GWwVA1sc3erBcvXiJoy1 AGXOFlyN57oELqh5vUoygJxxdsSP/46afkER1kNfvBgOgHft+ragMsWg9us3VhEEVv EG2cCC4S8q/2HLVEzFdgGbOgOHNnjZ+6amgGjkKW9W3efO9klASBE89F3RaUTE1eBv T7R/V3E930Lmw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMS00HM44ONZX10@mr11p00im-asmtp003.me.com>; Tue, 14 Mar 2017 00:43:36 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-13_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703140005 User-Agent: Microsoft-MacOutlook/f.1f.0.170216 Date: Mon, 13 Mar 2017 17:43:35 -0700 Subject: Re: svn commit: r315163 - head/sys/dev/isp From: Ravi Pokala Sender: "Pokala, Ravi" To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <5AE94770-B65A-4B09-A770-6EC55B29D121@panasas.com> Thread-topic: svn commit: r315163 - head/sys/dev/isp References: <201703121655.v2CGtIjX049531@repo.freebsd.org> In-reply-to: <201703121655.v2CGtIjX049531@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 00:43:45 -0000 Hi Alexander, This appears to break powerpc and sparc64 kernels: _.powerpc.GENERIC:cc1: warnings being treated as errors _.powerpc.GENERIC-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined -- _.powerpc.GENERIC:cc1: warnings being treated as errors _.powerpc.GENERIC-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined ... _.sparc64.GENERIC:cc1: warnings being treated as errors _.sparc64.GENERIC-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined _.sparc64.GENERIC-NODEBUG:cc1: warnings being treated as errors _.sparc64.GENERIC-NODEBUG-/usr/home/rpokala/freebsd/clean/base/head/sys/dev/isp/isp_freebsd.c:55: warning: 'isp_intr_enable' declared 'static' but never defined etc. Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Alexander Motin Date: 2017-03-12, Sunday at 09:55 To: , , Subject: svn commit: r315163 - head/sys/dev/isp Author: mav Date: Sun Mar 12 16:55:18 2017 New Revision: 315163 URL: https://svnweb.freebsd.org/changeset/base/315163 Log: Remove strange config_intrhook_establish() magic. Interrupts are enabled as part of chip reset just during driver attach. Later "enabling" of already enabled interrupts is useless. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:55:18 2017 (r315163) @@ -278,25 +278,11 @@ isp_attach(ispsoftc_t *isp) int du = device_get_unit(isp->isp_dev); int chan; - isp->isp_osinfo.ehook.ich_func = isp_intr_enable; - isp->isp_osinfo.ehook.ich_arg = isp; - /* - * Haha. Set this first, because if we're loaded as a module isp_intr_enable - * will be called right awawy, which will clear isp_osinfo.ehook_active, - * which would be unwise to then set again later. - */ - isp->isp_osinfo.ehook_active = 1; - if (config_intrhook_establish(&isp->isp_osinfo.ehook) != 0) { - isp_prt(isp, ISP_LOGERR, "could not establish interrupt enable hook"); - return (-EIO); - } - /* * Create the device queue for our SIM(s). */ isp->isp_osinfo.devq = cam_simq_alloc(isp->isp_maxcmds); if (isp->isp_osinfo.devq == NULL) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); return (EIO); } @@ -330,10 +316,6 @@ unwind: ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.cdev) { destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; @@ -371,10 +353,6 @@ isp_detach(ispsoftc_t *isp) destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.devq != NULL) { cam_simq_free(isp->isp_osinfo.devq); isp->isp_osinfo.devq = NULL; @@ -786,28 +764,6 @@ ispioctl(struct cdev *dev, u_long c, cad return (retval); } -static void -isp_intr_enable(void *arg) -{ - int chan; - ispsoftc_t *isp = arg; - ISP_LOCK(isp); - if (IS_FC(isp)) { - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } - } - } else { - ISP_ENABLE_INTS(isp); - } - isp->isp_osinfo.ehook_active = 0; - ISP_UNLOCK(isp); - /* Release our hook so that the boot can continue. */ - config_intrhook_disestablish(&isp->isp_osinfo.ehook); -} - /* * Local Inlines */ Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:55:18 2017 (r315163) @@ -270,7 +270,6 @@ struct isposinfo { struct mtx lock; device_t dev; struct cdev * cdev; - struct intr_config_hook ehook; struct cam_devq * devq; /* @@ -310,7 +309,6 @@ struct isposinfo { sixtyfourbit : 1, /* sixtyfour bit platform */ timer_active : 1, autoconf : 1, - ehook_active : 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done : 1,