From owner-p4-projects@FreeBSD.ORG Mon Feb 16 01:52:19 2015 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63B86649; Mon, 16 Feb 2015 01:52:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24A60647 for ; Mon, 16 Feb 2015 01:52:19 +0000 (UTC) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682: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 1032D635 for ; Mon, 16 Feb 2015 01:52:19 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.9/8.14.9) with ESMTP id t1G1qIRc088724 for ; Mon, 16 Feb 2015 01:52:18 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.9/8.14.9/Submit) id t1G1qIlY088721 for perforce@freebsd.org; Mon, 16 Feb 2015 01:52:18 GMT (envelope-from jmg@freebsd.org) Date: Mon, 16 Feb 2015 01:52:18 GMT Message-Id: <201502160152.t1G1qIlY088721@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney Subject: PERFORCE change 1206240 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.18-1 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 01:52:19 -0000 http://p4web.freebsd.org/@@1206240?ac=10 Change 1206240 by jmg@jmg_pciehp on 2015/02/16 01:52:09 remove timeout and use the correct callout interface... Sponsored by: FreeBSD Foundation Affected files ... .. //depot/projects/pciehotplug/sys/dev/pci/pcie_hp.c#3 edit .. //depot/projects/pciehotplug/sys/dev/pci/pcivar.h#3 edit Differences ... ==== //depot/projects/pciehotplug/sys/dev/pci/pcie_hp.c#3 (text+ko) ==== @@ -352,8 +352,8 @@ * Per 6.7.3.3, delay for 100ms after DLL Active * before talking to device. */ - dinfo->cfg.hp.hp_dllhndl = timeout(rescan_bus, dev, - hz / 10); + callout_reset(&dinfo->cfg.hp.hp_co, hz / 10, + rescan_bus, dev); } else if (((linksta & PCIEM_LINK_STA_DL_ACTIVE) == 0) && dinfo->cfg.hp.hp_cnt == 1) { @@ -439,8 +439,7 @@ pci_slot_status_print(pcib); dinfo->cfg.hp.hp_cnt = 0; - dinfo->cfg.hp.hp_dllhndl = - (struct callout_handle)CALLOUT_HANDLE_INITIALIZER(); + callout_init(&dinfo->cfg.hp.hp_co, 0); device_printf(dev, "Hot plug slot number %u\n", PCIEM_SLOT_CAP_GETPSN(cap)); ==== //depot/projects/pciehotplug/sys/dev/pci/pcivar.h#3 (text+ko) ==== @@ -155,7 +155,7 @@ /* Interesting values for PCIe Hotplug */ struct pcicfg_hp { struct task hp_inttask; - struct callout_handle hp_dllhndl; + struct callout hp_co; int hp_cnt; /* Giant locked */ uint32_t hp_slotcap; /* cache this */ };