Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2015 01:52:18 GMT
From:      John-Mark Gurney <jmg@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 1206240 for review
Message-ID:  <201502160152.t1G1qIlY088721@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502160152.t1G1qIlY088721>