John Baldwin
10012d5309
Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF.
...
Previously the loop in PCIIOCGETCONF would terminate as soon as it
found enough matches. Now it will continue iterating through the
PCI device list and only terminate if it finds another matching device
for which it has no room to store a conf structure. This means that
PCI_GETCONF_LAST_DEVICE is reliably returned when the number of
matching devices is equal to the number of slots in the matches
buffer. For example, if a program requests the conf structure for a
single PCI function with a specified domain/bus/slot/function it will
now get PCI_GETCONF_LAST_DEVICE instead of PCI_GETCONF_MORE_DEVS.
While here, simplify the loop conditional a bit more by explicitly
breaking out of the loop if copyout() fails and removing a redundant
i < pci_numdevs check.
Reviewed by: vangyzen, imp
MFC after: 1 month
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7445
2016-08-09 17:57:11 +00:00
..
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-22 13:58:32 +00:00
2016-07-13 19:16:32 +00:00
2016-04-21 19:57:40 +00:00
2016-05-03 03:41:25 +00:00
2016-04-21 20:30:38 +00:00
2016-04-26 15:03:15 +00:00
2016-04-21 19:57:40 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-07-17 12:45:58 +00:00
2016-04-21 19:48:28 +00:00
2016-05-10 16:40:19 +00:00
2016-02-18 01:24:10 +00:00
2016-04-19 23:37:24 +00:00
2016-05-03 03:41:25 +00:00
2016-05-14 18:44:30 +00:00
2016-03-29 12:19:46 +00:00
2016-05-22 13:58:32 +00:00
2016-05-03 03:41:25 +00:00
2016-05-24 13:57:23 +00:00
2016-03-15 05:17:29 +00:00
2016-05-03 17:11:33 +00:00
2016-05-03 03:41:25 +00:00
2016-08-01 00:36:29 +00:00
2016-05-18 23:39:31 +00:00
2016-05-03 03:41:25 +00:00
2016-06-01 05:15:11 +00:00
2016-07-12 02:16:48 +00:00
2016-05-03 03:41:25 +00:00
2016-05-04 06:24:10 +00:00
2016-05-26 16:48:20 +00:00
2016-06-06 07:09:02 +00:00
2016-08-08 16:19:24 +00:00
2016-04-26 23:09:47 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-06-03 18:54:16 +00:00
2016-08-01 16:26:08 +00:00
2016-02-04 22:39:27 +00:00
2016-05-24 01:42:21 +00:00
2016-02-27 03:38:01 +00:00
2016-05-03 03:41:25 +00:00
2016-05-22 13:58:32 +00:00
2016-05-03 03:41:25 +00:00
2016-07-06 14:09:49 +00:00
2016-05-03 03:41:25 +00:00
2016-02-27 03:38:01 +00:00
2016-03-18 01:28:41 +00:00
2016-05-03 03:41:25 +00:00
2016-07-11 16:56:51 +00:00
2016-08-09 17:49:42 +00:00
2016-04-26 15:03:15 +00:00
2016-05-03 03:41:25 +00:00
2016-04-21 20:30:38 +00:00
2016-05-25 01:23:19 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-07-14 13:55:38 +00:00
2016-07-10 18:28:15 +00:00
2016-08-01 21:19:51 +00:00
2016-05-03 03:41:25 +00:00
2016-02-20 01:32:58 +00:00
2016-04-21 19:57:40 +00:00
2016-02-01 17:41:21 +00:00
2016-05-04 06:24:51 +00:00
2016-05-03 03:41:25 +00:00
2016-08-08 05:57:04 +00:00
2016-04-21 19:57:40 +00:00
2016-07-10 18:28:15 +00:00
2016-05-03 03:41:25 +00:00
2016-07-23 14:38:09 +00:00
2016-05-04 23:00:57 +00:00
2016-08-06 18:48:47 +00:00
2016-05-03 03:41:25 +00:00
2016-05-27 22:14:39 +00:00
2016-06-05 18:16:33 +00:00
2016-05-10 10:21:03 +00:00
2016-07-21 15:48:41 +00:00
2016-05-03 03:41:25 +00:00
2016-07-31 06:24:26 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-02-27 03:34:01 +00:00
2016-05-04 01:43:07 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-08-03 16:52:00 +00:00
2016-08-09 04:50:20 +00:00
2016-05-03 03:41:25 +00:00
2016-05-30 09:05:24 +00:00
2016-02-27 03:38:01 +00:00
2016-03-24 23:24:00 +00:00
2016-05-11 17:38:09 +00:00
2016-04-10 23:07:00 +00:00
2016-05-03 03:41:25 +00:00
2016-07-10 18:28:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-08-05 02:56:31 +00:00
2016-03-22 06:24:52 +00:00
2016-05-03 03:41:25 +00:00
2016-05-19 22:19:35 +00:00
2016-07-06 20:48:42 +00:00
2016-06-09 13:04:57 +00:00
2016-05-03 03:41:25 +00:00
2016-05-27 11:37:02 +00:00
2016-05-20 11:56:16 +00:00
2016-04-11 10:53:25 +00:00
2016-05-03 03:41:25 +00:00
2016-07-30 19:03:32 +00:00
2016-05-26 11:12:36 +00:00
2016-07-07 03:39:18 +00:00
2016-07-19 17:31:48 +00:00
2016-08-08 18:57:50 +00:00
2016-05-03 03:41:25 +00:00
2016-07-26 13:36:28 +00:00
2016-04-07 20:12:45 +00:00
2016-05-18 23:39:31 +00:00
2016-05-03 03:41:25 +00:00
2016-05-04 06:23:49 +00:00
2016-04-29 22:14:11 +00:00
2016-03-18 01:28:41 +00:00
2016-04-26 15:03:15 +00:00
2016-03-09 19:36:25 +00:00
2016-05-10 10:24:35 +00:00
2016-05-03 03:41:25 +00:00
2016-07-23 18:16:40 +00:00
2016-05-03 03:41:25 +00:00
2016-08-09 07:43:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-13 15:15:54 +00:00
2016-05-03 03:41:25 +00:00
2016-07-12 19:34:10 +00:00
2016-07-12 19:34:10 +00:00
2016-08-09 15:52:17 +00:00
2016-06-02 12:26:55 +00:00
2016-02-27 03:38:01 +00:00
2016-08-09 15:51:11 +00:00
2016-05-03 03:41:25 +00:00
2016-05-19 22:28:46 +00:00
2016-05-12 03:36:49 +00:00
2016-08-09 15:56:33 +00:00
2016-05-03 03:41:25 +00:00
2016-04-20 01:17:18 +00:00
2016-01-27 02:23:54 +00:00
2016-05-03 03:41:25 +00:00
2016-05-17 12:52:31 +00:00
2016-04-19 23:37:24 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-07-30 21:06:59 +00:00
2016-07-19 19:19:03 +00:00
2016-07-28 22:40:31 +00:00
2016-07-24 08:35:45 +00:00
2016-06-03 15:33:21 +00:00
2016-04-10 23:07:00 +00:00
2016-08-09 15:55:14 +00:00
2016-05-09 19:28:22 +00:00
2016-05-17 12:52:31 +00:00
2016-05-03 03:41:25 +00:00
2016-02-27 03:38:01 +00:00
2016-04-21 15:38:28 +00:00
2016-05-20 00:03:22 +00:00
2016-05-03 03:41:25 +00:00
2016-08-09 17:57:11 +00:00
2016-05-03 03:41:25 +00:00
2016-05-17 12:52:31 +00:00
2016-05-03 03:41:25 +00:00
2016-03-18 01:28:41 +00:00
2016-03-18 01:28:41 +00:00
2016-07-21 16:34:56 +00:00
2016-03-02 03:26:56 +00:00
2016-05-03 03:41:25 +00:00
2016-06-07 04:51:50 +00:00
2016-06-07 04:51:50 +00:00
2016-03-02 03:26:56 +00:00
2016-06-08 02:37:23 +00:00
2016-06-09 14:44:05 +00:00
2016-05-03 03:41:25 +00:00
2016-04-19 23:37:24 +00:00
2016-05-03 03:41:25 +00:00
2016-04-21 19:40:10 +00:00
2016-02-27 03:38:01 +00:00
2016-04-20 14:47:16 +00:00
2016-06-20 22:45:19 +00:00
2016-05-03 03:41:25 +00:00
2016-03-02 03:26:56 +00:00
2016-04-26 15:03:15 +00:00
2016-05-26 02:55:41 +00:00
2016-05-03 03:41:25 +00:00
2016-06-09 12:33:53 +00:00
2016-04-21 15:38:28 +00:00
2016-05-03 03:41:25 +00:00
2016-06-04 19:53:47 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-03-01 17:47:32 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-31 15:05:50 +00:00
2016-04-19 23:37:24 +00:00
2016-05-26 07:02:20 +00:00
2016-01-27 02:23:54 +00:00
2016-04-19 23:37:24 +00:00
2016-04-23 20:29:55 +00:00
2016-06-01 14:03:13 +00:00
2016-05-03 03:41:25 +00:00
2016-04-10 23:07:00 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-19 00:04:58 +00:00
2016-02-19 03:37:56 +00:00
2016-05-03 03:41:25 +00:00
2016-08-09 15:50:03 +00:00
2016-05-03 03:41:25 +00:00
2016-07-24 08:52:49 +00:00
2016-07-20 22:05:44 +00:00
2016-08-06 20:27:12 +00:00
2016-05-14 06:07:15 +00:00
2016-04-19 23:37:24 +00:00
2016-07-18 14:40:13 +00:00
2016-06-05 16:20:12 +00:00
2016-03-01 17:47:32 +00:00
2016-07-26 15:34:26 +00:00
2016-02-18 01:24:10 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-02 16:47:28 +00:00
2016-05-20 08:58:06 +00:00
2016-05-03 03:41:25 +00:00
2016-04-30 14:41:18 +00:00
2016-05-02 16:47:28 +00:00
2016-05-03 03:41:25 +00:00
2016-08-05 15:48:56 +00:00
2016-04-19 15:36:18 +00:00
2016-05-03 03:41:25 +00:00