Lines Matching +full:node +full:- +full:version

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * pnpbios -- PnP BIOS driver
5 * This driver provides access to Plug-'n'-Play services provided by
7 * Plug and Play BIOS Specification, Version 1.0A, 5 May 1994
25 * Adam Belay - <ambx1@neo.rr.com> - March 16, 2003
93 return -ENOMEM; in pnp_dock_event()
96 return -ENOMEM; in pnp_dock_event()
112 /* hint that policy agent should enter no-stdout debug mode */ in pnp_dock_event()
115 /* extensible set of named bus-specific parameters, in pnp_dock_event()
127 info->location_id, info->serial, info->capabilities); in pnp_dock_event()
142 int docked = -1, d = 0; in pnp_dock_thread()
191 u8 nodenum = dev->number; in pnpbios_get_resources()
192 struct pnp_bios_node *node; in pnpbios_get_resources() local
195 return -EPERM; in pnpbios_get_resources()
197 pnp_dbg(&dev->dev, "get resources\n"); in pnpbios_get_resources()
198 node = kzalloc(node_info.max_node_size, GFP_KERNEL); in pnpbios_get_resources()
199 if (!node) in pnpbios_get_resources()
200 return -1; in pnpbios_get_resources()
201 if (pnp_bios_get_dev_node(&nodenum, (char)PNPMODE_DYNAMIC, node)) { in pnpbios_get_resources()
202 kfree(node); in pnpbios_get_resources()
203 return -ENODEV; in pnpbios_get_resources()
205 pnpbios_read_resources_from_node(dev, node); in pnpbios_get_resources()
206 dev->active = pnp_is_active(dev); in pnpbios_get_resources()
207 kfree(node); in pnpbios_get_resources()
213 u8 nodenum = dev->number; in pnpbios_set_resources()
214 struct pnp_bios_node *node; in pnpbios_set_resources() local
218 return -EPERM; in pnpbios_set_resources()
220 pnp_dbg(&dev->dev, "set resources\n"); in pnpbios_set_resources()
221 node = kzalloc(node_info.max_node_size, GFP_KERNEL); in pnpbios_set_resources()
222 if (!node) in pnpbios_set_resources()
223 return -1; in pnpbios_set_resources()
224 if (pnp_bios_get_dev_node(&nodenum, (char)PNPMODE_DYNAMIC, node)) { in pnpbios_set_resources()
225 kfree(node); in pnpbios_set_resources()
226 return -ENODEV; in pnpbios_set_resources()
228 if (pnpbios_write_resources_to_node(dev, node) < 0) { in pnpbios_set_resources()
229 kfree(node); in pnpbios_set_resources()
230 return -1; in pnpbios_set_resources()
232 ret = pnp_bios_set_dev_node(node->handle, (char)PNPMODE_DYNAMIC, node); in pnpbios_set_resources()
233 kfree(node); in pnpbios_set_resources()
235 ret = -1; in pnpbios_set_resources()
239 static void pnpbios_zero_data_stream(struct pnp_bios_node *node) in pnpbios_zero_data_stream() argument
241 unsigned char *p = (char *)node->data; in pnpbios_zero_data_stream()
242 unsigned char *end = (char *)(node->data + node->size); in pnpbios_zero_data_stream()
266 struct pnp_bios_node *node; in pnpbios_disable_resources() local
267 u8 nodenum = dev->number; in pnpbios_disable_resources()
270 if (dev->flags & PNPBIOS_NO_DISABLE || !pnpbios_is_dynamic(dev)) in pnpbios_disable_resources()
271 return -EPERM; in pnpbios_disable_resources()
273 node = kzalloc(node_info.max_node_size, GFP_KERNEL); in pnpbios_disable_resources()
274 if (!node) in pnpbios_disable_resources()
275 return -ENOMEM; in pnpbios_disable_resources()
277 if (pnp_bios_get_dev_node(&nodenum, (char)PNPMODE_DYNAMIC, node)) { in pnpbios_disable_resources()
278 kfree(node); in pnpbios_disable_resources()
279 return -ENODEV; in pnpbios_disable_resources()
281 pnpbios_zero_data_stream(node); in pnpbios_disable_resources()
283 ret = pnp_bios_set_dev_node(dev->number, (char)PNPMODE_DYNAMIC, node); in pnpbios_disable_resources()
284 kfree(node); in pnpbios_disable_resources()
286 ret = -1; in pnpbios_disable_resources()
299 static int __init insert_device(struct pnp_bios_node *node) in insert_device() argument
307 if (dev->number == node->handle) in insert_device()
308 return -EEXIST; in insert_device()
311 pnp_eisa_id_to_string(node->eisa_id & PNP_EISA_ID_MASK, id); in insert_device()
312 dev = pnp_alloc_dev(&pnpbios_protocol, node->handle, id); in insert_device()
314 return -ENOMEM; in insert_device()
316 pnpbios_parse_data_stream(dev, node); in insert_device()
317 dev->active = pnp_is_active(dev); in insert_device()
318 dev->flags = node->flags; in insert_device()
319 if (!(dev->flags & PNPBIOS_NO_CONFIG)) in insert_device()
320 dev->capabilities |= PNP_CONFIGURABLE; in insert_device()
321 if (!(dev->flags & PNPBIOS_NO_DISABLE) && pnpbios_is_dynamic(dev)) in insert_device()
322 dev->capabilities |= PNP_DISABLE; in insert_device()
323 dev->capabilities |= PNP_READ; in insert_device()
325 dev->capabilities |= PNP_WRITE; in insert_device()
326 if (dev->flags & PNPBIOS_REMOVABLE) in insert_device()
327 dev->capabilities |= PNP_REMOVABLE; in insert_device()
330 if (!dev->active) in insert_device()
335 put_device(&dev->dev); in insert_device()
339 pnpbios_interface_attach_device(node); in insert_device()
349 struct pnp_bios_node *node; in build_devlist() local
351 node = kzalloc(node_info.max_node_size, GFP_KERNEL); in build_devlist()
352 if (!node) in build_devlist()
362 (&nodenum, (char)PNPMODE_DYNAMIC, node)) in build_devlist()
366 (&nodenum, (char)PNPMODE_STATIC, node)) in build_devlist()
370 if (insert_device(node) == 0) in build_devlist()
374 … "PnPBIOS: build_devlist: Node number 0x%x is out of sequence following node 0x%x. Aborting.\n", in build_devlist()
380 kfree(node); in build_devlist()
383 "PnPBIOS: %i node%s reported by PnP BIOS; %i recorded by driver\n", in build_devlist()
405 invert = (strncmp(str, "no-", 3) == 0); in pnpbios_setup()
432 * Search the defined area (0xf0000-0xffff0) for a valid PnP BIOS in pnpbios_probe_system()
439 if (check->fields.signature != PNP_SIGNATURE) in pnpbios_probe_system()
444 length = check->fields.length; in pnpbios_probe_system()
451 sum += check->chars[i]; in pnpbios_probe_system()
457 if (check->fields.version < 0x10) { in pnpbios_probe_system()
459 "PnPBIOS: PnP BIOS version %d.%d is not supported\n", in pnpbios_probe_system()
460 check->fields.version >> 4, in pnpbios_probe_system()
461 check->fields.version & 15); in pnpbios_probe_system()
465 "PnPBIOS: PnP BIOS version %d.%d, entry 0x%x:0x%x, dseg 0x%x\n", in pnpbios_probe_system()
466 check->fields.version >> 4, check->fields.version & 15, in pnpbios_probe_system()
467 check->fields.pm16cseg, check->fields.pm16offset, in pnpbios_probe_system()
468 check->fields.pm16dseg); in pnpbios_probe_system()
479 printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident); in exploding_pnp_bios()
512 return -ENODEV; in pnpbios_init()
519 return -ENODEV; in pnpbios_init()
525 return -ENODEV; in pnpbios_init()
530 /* read the node info */ in pnpbios_init()
534 "PnPBIOS: Unable to get node info. Aborting.\n"); in pnpbios_init()