From owner-freebsd-drivers@freebsd.org Mon May 22 18:12:46 2017 Return-Path: Delivered-To: freebsd-drivers@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 7F29AD78D94 for ; Mon, 22 May 2017 18:12:46 +0000 (UTC) (envelope-from kyenduri@brkt.com) Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57D13105A for ; Mon, 22 May 2017 18:12:46 +0000 (UTC) (envelope-from kyenduri@brkt.com) Received: by mail-pf0-x235.google.com with SMTP id n23so89591576pfb.2 for ; Mon, 22 May 2017 11:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brkt.com; s=google; h=from:subject:message-id:date:to:mime-version; bh=hOFN6JnqNmoktn64t4BZ/UysZRV0wtm1HFFoegkh5Qs=; b=dDCS85s/irVUTDRmCtaRoLCC9nPD7EZk+1sNnovSu3tVwqKjNSp6BlXZEFFW8c1CEe 1YRphhfdebciq3SL6Tlv9NlRAYcF+04jUi6FF9Tdvc4conWgdahJN+Ritgo/HHIIEc1i ZHCihkpPtCCDEdUwmeR8Z2adDaczwHmpc8vpI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:message-id:date:to:mime-version; bh=hOFN6JnqNmoktn64t4BZ/UysZRV0wtm1HFFoegkh5Qs=; b=refQTzb10Wdi8U/fWT3wQ1mKCxThWaUz6iR6KbebTK1ncu5Z0LLoR902m7x0Wihneo +JFBiia3G9FCyiWxHAVdnENeHC/UPu5eyZDY0EtEvmk63nZWZ63KFL76mtAO6QZL8UD2 ALAD2g1LnLZf4aa6Rb1F9B5tyI33TlWKvwjn/1okOVliFIaQznDAID/HjJioNMHoSh1i 31RI9Wr7jWsMzmShABVqTLeRZ4dGlwUolA/OAlKun6M+iXs2sa/s6Sq+D0SDkmsiWl0U azHyW+EycL/uGnkBljijhP2uozpwXR3kTK1+W7LLvAtUOo2DoMVSgH47CLfl4wGG2z1n 0S7A== X-Gm-Message-State: AODbwcDQXjCsd05KcugkK62QSWZjxYFpWr1kIpag4NBDDKOHHcNUqSXb FVH7UkyrEX/ut1ZwtGD2yQ== X-Received: by 10.84.236.4 with SMTP id q4mr25065160plk.10.1495476765533; Mon, 22 May 2017 11:12:45 -0700 (PDT) Received: from krishnas-mbp.int.brkt.com (cerberus.brkt.com. [208.185.168.138]) by smtp.gmail.com with ESMTPSA id w30sm31971815pge.45.2017.05.22.11.12.44 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 May 2017 11:12:44 -0700 (PDT) From: Krishna Yenduri Subject: ACPI mediated Hotplug? Message-Id: <3DDBEFB3-AB51-4AD2-845D-A8B81ECB417A@brkt.com> Date: Mon, 22 May 2017 11:12:43 -0700 To: freebsd-drivers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 18:12:46 -0000 Hi Folks, I have a AWS instance (m4.large) running FreeBSD = 11.0-STABLE-amd64-2017-04-20. The system came up with a primary interface ixv0. Per pciconf - ixv0@pci0:0:3:0: class=3D0x020000 card=3D0x00000000 = chip=3D0x10ed8086 rev=3D0x01 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '82599 Ethernet Controller Virtual Function' class =3D network subclass =3D ethernet I attached another network interface while the system is up. But, it = does not show up in the pciconf -l output. Doing # devctl rescan pci0 causes it to appear. I want to make the interface appear automatically rather than having to run the devctl command. BTW, this works on Linux. Is there a way to use the ACPI framework in FreeBSD so that the Hotplug happens automatically? DTracing shows that adding a new interface triggers calls to AcpiEvSciXruptHandler and AcpiEvAsynchExecuteGpeMethod. Is it safe to add a hook in to pci_rescan_method() from these routines? Any pointers to the ACPI<->FreeBSD kernel interface are much appreciated. Thanks, -Krishna=