From owner-svn-src-stable@freebsd.org Sat Oct 22 16:24:13 2016 Return-Path: Delivered-To: svn-src-stable@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 D050FC1CC93; Sat, 22 Oct 2016 16:24:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B7B4D51; Sat, 22 Oct 2016 16:24:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9MGOCUg011573; Sat, 22 Oct 2016 16:24:12 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9MGOCnY011570; Sat, 22 Oct 2016 16:24:12 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610221624.u9MGOCnY011570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 22 Oct 2016 16:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r307776 - in stable/11/sys: arm/broadcom/bcm2835 arm/conf modules/rpi_ft5406 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2016 16:24:13 -0000 Author: gonzo Date: Sat Oct 22 16:24:12 2016 New Revision: 307776 URL: https://svnweb.freebsd.org/changeset/base/307776 Log: MFC r306618, r306619 r306618: Fix attach/detach methods - Initialize lock before starting worker process - Do not hold lock when destroying evdev. By that time ther should be no other active code pathes that can access softc r306619: Add rpi_ft5406 module and add it to extra modules in Raspberry Pi configs Added: stable/11/sys/modules/rpi_ft5406/ - copied from r306619, head/sys/modules/rpi_ft5406/ Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c stable/11/sys/arm/conf/RPI-B stable/11/sys/arm/conf/RPI2 Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Sat Oct 22 15:26:32 2016 (r307775) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Sat Oct 22 16:24:12 2016 (r307776) @@ -288,13 +288,13 @@ ft5406ts_attach(device_t dev) sc->sc_init_hook.ich_func = ft5406ts_init; sc->sc_init_hook.ich_arg = sc; + FT5406_LOCK_INIT(sc); + if (config_intrhook_establish(&sc->sc_init_hook) != 0) { device_printf(dev, "config_intrhook_establish failed\n"); return (ENOMEM); } - FT5406_LOCK_INIT(sc); - return (0); } @@ -308,10 +308,11 @@ ft5406ts_detach(device_t dev) FT5406_LOCK(sc); if (sc->sc_worker) sc->sc_detaching = 1; + wakeup(sc); + FT5406_UNLOCK(sc); if (sc->sc_evdev) evdev_free(sc->sc_evdev); - FT5406_UNLOCK(sc); FT5406_LOCK_DESTROY(sc); Modified: stable/11/sys/arm/conf/RPI-B ============================================================================== --- stable/11/sys/arm/conf/RPI-B Sat Oct 22 15:26:32 2016 (r307775) +++ stable/11/sys/arm/conf/RPI-B Sat Oct 22 16:24:12 2016 (r307776) @@ -94,4 +94,4 @@ options FDT # Configure using FDT/DTB # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC #makeoptions FDT_DTS_FILE=rpi.dts -makeoptions MODULES_EXTRA=dtb/rpi +makeoptions MODULES_EXTRA="dtb/rpi rpi_ft5406" Modified: stable/11/sys/arm/conf/RPI2 ============================================================================== --- stable/11/sys/arm/conf/RPI2 Sat Oct 22 15:26:32 2016 (r307775) +++ stable/11/sys/arm/conf/RPI2 Sat Oct 22 16:24:12 2016 (r307776) @@ -98,4 +98,4 @@ options FDT # Configure using FDT/DTB # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC #makeoptions FDT_DTS_FILE=rpi2.dts -makeoptions MODULES_EXTRA=dtb/rpi +makeoptions MODULES_EXTRA="dtb/rpi rpi_ft5406"