blob: e17ef54f0efced2d0173a9f5af250c2f0fa93517 [file] [log] [blame]
Kristen Accardi783c49f2006-03-03 10:16:05 -08001/*
2 * Common ACPI functions for hot plug platforms
3 *
4 * Copyright (C) 2006 Intel Corporation
5 *
6 * All rights reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or (at
11 * your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 * Send feedback to <kristen.c.accardi@intel.com>
24 *
25 */
26
27#include <linux/module.h>
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +090028#include <linux/moduleparam.h>
Kristen Accardi783c49f2006-03-03 10:16:05 -080029#include <linux/kernel.h>
30#include <linux/types.h>
31#include <linux/pci.h>
Greg Kroah-Hartman7a54f252006-10-13 20:05:19 -070032#include <linux/pci_hotplug.h>
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +090033#include <linux/pci-acpi.h>
Kristen Accardi783c49f2006-03-03 10:16:05 -080034#include <acpi/acpi.h>
35#include <acpi/acpi_bus.h>
36#include <acpi/actypes.h>
Kristen Accardi783c49f2006-03-03 10:16:05 -080037
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +090038#define MY_NAME "acpi_pcihp"
39
Harvey Harrison66bef8c2008-03-03 19:09:46 -080040#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +090041#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
42#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
43#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
44
Kristen Accardi783c49f2006-03-03 10:16:05 -080045#define METHOD_NAME__SUN "_SUN"
46#define METHOD_NAME__HPP "_HPP"
47#define METHOD_NAME_OSHP "OSHP"
48
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +090049static int debug_acpi;
50
Kenji Kaneshigee22b73502006-05-02 10:57:14 +090051static acpi_status
52decode_type0_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
53{
54 int i;
55 union acpi_object *fields = record->package.elements;
56 u32 revision = fields[1].integer.value;
57
58 switch (revision) {
59 case 1:
60 if (record->package.count != 6)
61 return AE_ERROR;
62 for (i = 2; i < 6; i++)
63 if (fields[i].type != ACPI_TYPE_INTEGER)
64 return AE_ERROR;
65 hpx->t0 = &hpx->type0_data;
66 hpx->t0->revision = revision;
67 hpx->t0->cache_line_size = fields[2].integer.value;
68 hpx->t0->latency_timer = fields[3].integer.value;
69 hpx->t0->enable_serr = fields[4].integer.value;
70 hpx->t0->enable_perr = fields[5].integer.value;
71 break;
72 default:
73 printk(KERN_WARNING
74 "%s: Type 0 Revision %d record not supported\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -080075 __func__, revision);
Kenji Kaneshigee22b73502006-05-02 10:57:14 +090076 return AE_ERROR;
77 }
78 return AE_OK;
79}
80
81static acpi_status
82decode_type1_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
83{
84 int i;
85 union acpi_object *fields = record->package.elements;
86 u32 revision = fields[1].integer.value;
87
88 switch (revision) {
89 case 1:
90 if (record->package.count != 5)
91 return AE_ERROR;
92 for (i = 2; i < 5; i++)
93 if (fields[i].type != ACPI_TYPE_INTEGER)
94 return AE_ERROR;
95 hpx->t1 = &hpx->type1_data;
96 hpx->t1->revision = revision;
97 hpx->t1->max_mem_read = fields[2].integer.value;
98 hpx->t1->avg_max_split = fields[3].integer.value;
99 hpx->t1->tot_max_split = fields[4].integer.value;
100 break;
101 default:
102 printk(KERN_WARNING
103 "%s: Type 1 Revision %d record not supported\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800104 __func__, revision);
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900105 return AE_ERROR;
106 }
107 return AE_OK;
108}
109
110static acpi_status
111decode_type2_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
112{
113 int i;
114 union acpi_object *fields = record->package.elements;
115 u32 revision = fields[1].integer.value;
116
117 switch (revision) {
118 case 1:
119 if (record->package.count != 18)
120 return AE_ERROR;
121 for (i = 2; i < 18; i++)
122 if (fields[i].type != ACPI_TYPE_INTEGER)
123 return AE_ERROR;
124 hpx->t2 = &hpx->type2_data;
125 hpx->t2->revision = revision;
126 hpx->t2->unc_err_mask_and = fields[2].integer.value;
127 hpx->t2->unc_err_mask_or = fields[3].integer.value;
128 hpx->t2->unc_err_sever_and = fields[4].integer.value;
129 hpx->t2->unc_err_sever_or = fields[5].integer.value;
130 hpx->t2->cor_err_mask_and = fields[6].integer.value;
131 hpx->t2->cor_err_mask_or = fields[7].integer.value;
132 hpx->t2->adv_err_cap_and = fields[8].integer.value;
133 hpx->t2->adv_err_cap_or = fields[9].integer.value;
134 hpx->t2->pci_exp_devctl_and = fields[10].integer.value;
135 hpx->t2->pci_exp_devctl_or = fields[11].integer.value;
136 hpx->t2->pci_exp_lnkctl_and = fields[12].integer.value;
137 hpx->t2->pci_exp_lnkctl_or = fields[13].integer.value;
138 hpx->t2->sec_unc_err_sever_and = fields[14].integer.value;
139 hpx->t2->sec_unc_err_sever_or = fields[15].integer.value;
140 hpx->t2->sec_unc_err_mask_and = fields[16].integer.value;
141 hpx->t2->sec_unc_err_mask_or = fields[17].integer.value;
142 break;
143 default:
144 printk(KERN_WARNING
145 "%s: Type 2 Revision %d record not supported\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800146 __func__, revision);
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900147 return AE_ERROR;
148 }
149 return AE_OK;
150}
151
152static acpi_status
153acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx)
154{
155 acpi_status status;
156 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
157 union acpi_object *package, *record, *fields;
158 u32 type;
159 int i;
160
161 /* Clear the return buffer with zeros */
162 memset(hpx, 0, sizeof(struct hotplug_params));
163
164 status = acpi_evaluate_object(handle, "_HPX", NULL, &buffer);
165 if (ACPI_FAILURE(status))
166 return status;
167
168 package = (union acpi_object *)buffer.pointer;
169 if (package->type != ACPI_TYPE_PACKAGE) {
170 status = AE_ERROR;
171 goto exit;
172 }
173
174 for (i = 0; i < package->package.count; i++) {
175 record = &package->package.elements[i];
176 if (record->type != ACPI_TYPE_PACKAGE) {
177 status = AE_ERROR;
178 goto exit;
179 }
180
181 fields = record->package.elements;
182 if (fields[0].type != ACPI_TYPE_INTEGER ||
183 fields[1].type != ACPI_TYPE_INTEGER) {
184 status = AE_ERROR;
185 goto exit;
186 }
187
188 type = fields[0].integer.value;
189 switch (type) {
190 case 0:
191 status = decode_type0_hpx_record(record, hpx);
192 if (ACPI_FAILURE(status))
193 goto exit;
194 break;
195 case 1:
196 status = decode_type1_hpx_record(record, hpx);
197 if (ACPI_FAILURE(status))
198 goto exit;
199 break;
200 case 2:
201 status = decode_type2_hpx_record(record, hpx);
202 if (ACPI_FAILURE(status))
203 goto exit;
204 break;
205 default:
206 printk(KERN_ERR "%s: Type %d record not supported\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800207 __func__, type);
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900208 status = AE_ERROR;
209 goto exit;
210 }
211 }
212 exit:
213 kfree(buffer.pointer);
214 return status;
215}
Kristen Accardi783c49f2006-03-03 10:16:05 -0800216
217static acpi_status
218acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
219{
220 acpi_status status;
221 u8 nui[4];
222 struct acpi_buffer ret_buf = { 0, NULL};
MUNEDA Takahirob2e6e3b2006-03-17 09:18:39 +0900223 struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL };
Kristen Accardi783c49f2006-03-03 10:16:05 -0800224 union acpi_object *ext_obj, *package;
Kristen Accardi783c49f2006-03-03 10:16:05 -0800225 int i, len = 0;
226
MUNEDA Takahirob2e6e3b2006-03-17 09:18:39 +0900227 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
228
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900229 /* Clear the return buffer with zeros */
230 memset(hpp, 0, sizeof(struct hotplug_params));
231
Kristen Accardi783c49f2006-03-03 10:16:05 -0800232 /* get _hpp */
233 status = acpi_evaluate_object(handle, METHOD_NAME__HPP, NULL, &ret_buf);
234 switch (status) {
235 case AE_BUFFER_OVERFLOW:
236 ret_buf.pointer = kmalloc (ret_buf.length, GFP_KERNEL);
237 if (!ret_buf.pointer) {
238 printk(KERN_ERR "%s:%s alloc for _HPP fail\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800239 __func__, (char *)string.pointer);
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700240 kfree(string.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800241 return AE_NO_MEMORY;
242 }
243 status = acpi_evaluate_object(handle, METHOD_NAME__HPP,
244 NULL, &ret_buf);
245 if (ACPI_SUCCESS(status))
246 break;
247 default:
248 if (ACPI_FAILURE(status)) {
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800249 pr_debug("%s:%s _HPP fail=0x%x\n", __func__,
MUNEDA Takahirob2e6e3b2006-03-17 09:18:39 +0900250 (char *)string.pointer, status);
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700251 kfree(string.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800252 return status;
253 }
254 }
255
256 ext_obj = (union acpi_object *) ret_buf.pointer;
257 if (ext_obj->type != ACPI_TYPE_PACKAGE) {
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800258 printk(KERN_ERR "%s:%s _HPP obj not a package\n", __func__,
MUNEDA Takahirob2e6e3b2006-03-17 09:18:39 +0900259 (char *)string.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800260 status = AE_ERROR;
261 goto free_and_return;
262 }
263
264 len = ext_obj->package.count;
265 package = (union acpi_object *) ret_buf.pointer;
266 for ( i = 0; (i < len) || (i < 4); i++) {
267 ext_obj = (union acpi_object *) &package->package.elements[i];
268 switch (ext_obj->type) {
269 case ACPI_TYPE_INTEGER:
270 nui[i] = (u8)ext_obj->integer.value;
271 break;
272 default:
273 printk(KERN_ERR "%s:%s _HPP obj type incorrect\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800274 __func__, (char *)string.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800275 status = AE_ERROR;
276 goto free_and_return;
277 }
278 }
279
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900280 hpp->t0 = &hpp->type0_data;
281 hpp->t0->cache_line_size = nui[0];
282 hpp->t0->latency_timer = nui[1];
283 hpp->t0->enable_serr = nui[2];
284 hpp->t0->enable_perr = nui[3];
Kristen Accardi783c49f2006-03-03 10:16:05 -0800285
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900286 pr_debug(" _HPP: cache_line_size=0x%x\n", hpp->t0->cache_line_size);
287 pr_debug(" _HPP: latency timer =0x%x\n", hpp->t0->latency_timer);
288 pr_debug(" _HPP: enable SERR =0x%x\n", hpp->t0->enable_serr);
289 pr_debug(" _HPP: enable PERR =0x%x\n", hpp->t0->enable_perr);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800290
291free_and_return:
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700292 kfree(string.pointer);
293 kfree(ret_buf.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800294 return status;
295}
296
297
298
299/* acpi_run_oshp - get control of hotplug from the firmware
300 *
301 * @handle - the handle of the hotplug controller.
302 */
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900303static acpi_status acpi_run_oshp(acpi_handle handle)
Kristen Accardi783c49f2006-03-03 10:16:05 -0800304{
305 acpi_status status;
MUNEDA Takahirob2e6e3b2006-03-17 09:18:39 +0900306 struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL };
307
308 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800309
310 /* run OSHP */
311 status = acpi_evaluate_object(handle, METHOD_NAME_OSHP, NULL, NULL);
312 if (ACPI_FAILURE(status))
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +0900313 if (status != AE_NOT_FOUND)
314 printk(KERN_ERR "%s:%s OSHP fails=0x%x\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800315 __func__, (char *)string.pointer, status);
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +0900316 else
317 dbg("%s:%s OSHP not found\n",
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800318 __func__, (char *)string.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800319 else
Harvey Harrison66bef8c2008-03-03 19:09:46 -0800320 pr_debug("%s:%s OSHP passes\n", __func__,
MUNEDA Takahirob2e6e3b2006-03-17 09:18:39 +0900321 (char *)string.pointer);
322
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700323 kfree(string.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800324 return status;
325}
Kristen Accardi783c49f2006-03-03 10:16:05 -0800326
327/* acpi_get_hp_params_from_firmware
328 *
Kenji Kaneshige7430e342006-05-02 10:54:50 +0900329 * @bus - the pci_bus of the bus on which the device is newly added
Kristen Accardi783c49f2006-03-03 10:16:05 -0800330 * @hpp - allocated by the caller
331 */
Kenji Kaneshige7430e342006-05-02 10:54:50 +0900332acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus,
Kristen Accardi783c49f2006-03-03 10:16:05 -0800333 struct hotplug_params *hpp)
334{
335 acpi_status status = AE_NOT_FOUND;
Kenji Kaneshige7430e342006-05-02 10:54:50 +0900336 acpi_handle handle, phandle;
337 struct pci_bus *pbus = bus;
338 struct pci_dev *pdev;
339
340 do {
341 pdev = pbus->self;
342 if (!pdev) {
343 handle = acpi_get_pci_rootbridge_handle(
344 pci_domain_nr(pbus), pbus->number);
345 break;
346 }
347 handle = DEVICE_ACPI_HANDLE(&(pdev->dev));
348 pbus = pbus->parent;
349 } while (!handle);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800350
351 /*
352 * _HPP settings apply to all child buses, until another _HPP is
353 * encountered. If we don't find an _HPP for the input pci dev,
354 * look for it in the parent device scope since that would apply to
355 * this pci dev. If we don't find any _HPP, use hardcoded defaults
356 */
Kenji Kaneshige7430e342006-05-02 10:54:50 +0900357 while (handle) {
Kenji Kaneshigee22b73502006-05-02 10:57:14 +0900358 status = acpi_run_hpx(handle, hpp);
359 if (ACPI_SUCCESS(status))
360 break;
Kristen Accardi783c49f2006-03-03 10:16:05 -0800361 status = acpi_run_hpp(handle, hpp);
Kenji Kaneshige7430e342006-05-02 10:54:50 +0900362 if (ACPI_SUCCESS(status))
Kristen Accardi783c49f2006-03-03 10:16:05 -0800363 break;
Kenji Kaneshige7430e342006-05-02 10:54:50 +0900364 if (acpi_root_bridge(handle))
365 break;
366 status = acpi_get_parent(handle, &phandle);
367 if (ACPI_FAILURE(status))
368 break;
369 handle = phandle;
Kristen Accardi783c49f2006-03-03 10:16:05 -0800370 }
371 return status;
372}
373EXPORT_SYMBOL_GPL(acpi_get_hp_params_from_firmware);
374
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900375/**
376 * acpi_get_hp_hw_control_from_firmware
377 * @dev: the pci_dev of the bridge that has a hotplug controller
378 * @flags: requested control bits for _OSC
379 *
380 * Attempt to take hotplug control from firmware.
381 */
382int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags)
383{
384 acpi_status status;
Jiri Slabye0d94be2008-08-11 17:47:40 +0200385 acpi_handle chandle, handle;
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900386 struct pci_dev *pdev = dev;
387 struct pci_bus *parent;
388 struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL };
389
390 flags &= (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |
391 OSC_SHPC_NATIVE_HP_CONTROL |
392 OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
393 if (!flags) {
394 err("Invalid flags %u specified!\n", flags);
395 return -EINVAL;
396 }
397
398 /*
399 * Per PCI firmware specification, we should run the ACPI _OSC
400 * method to get control of hotplug hardware before using it. If
401 * an _OSC is missing, we look for an OSHP to do the same thing.
Jiri Slabye0d94be2008-08-11 17:47:40 +0200402 * To handle different BIOS behavior, we look for _OSC on a root
403 * bridge preferentially (according to PCI fw spec). Later for
404 * OSHP within the scope of the hotplug controller and its parents,
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900405 * upto the host bridge under which this controller exists.
406 */
Jiri Slaby056c58e2008-08-18 20:22:54 +0200407 handle = acpi_find_root_bridge_handle(pdev);
Jiri Slabye0d94be2008-08-11 17:47:40 +0200408 if (handle) {
409 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
410 dbg("Trying to get hotplug control for %s\n",
411 (char *)string.pointer);
412 status = pci_osc_control_set(handle, flags);
413 if (ACPI_SUCCESS(status))
414 goto got_one;
415 kfree(string.pointer);
416 string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };
417 }
418
419 pdev = dev;
420 handle = DEVICE_ACPI_HANDLE(&dev->dev);
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900421 while (!handle) {
422 /*
423 * This hotplug controller was not listed in the ACPI name
424 * space at all. Try to get acpi handle of parent pci bus.
425 */
426 if (!pdev || !pdev->bus->parent)
427 break;
428 parent = pdev->bus->parent;
429 dbg("Could not find %s in acpi namespace, trying parent\n",
430 pci_name(pdev));
431 if (!parent->self)
432 /* Parent must be a host bridge */
433 handle = acpi_get_pci_rootbridge_handle(
434 pci_domain_nr(parent),
435 parent->number);
436 else
437 handle = DEVICE_ACPI_HANDLE(&(parent->self->dev));
438 pdev = parent->self;
439 }
440
441 while (handle) {
442 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);
443 dbg("Trying to get hotplug control for %s \n",
444 (char *)string.pointer);
Jiri Slabye0d94be2008-08-11 17:47:40 +0200445 status = acpi_run_oshp(handle);
446 if (ACPI_SUCCESS(status))
447 goto got_one;
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900448 if (acpi_root_bridge(handle))
449 break;
450 chandle = handle;
451 status = acpi_get_parent(chandle, &handle);
452 if (ACPI_FAILURE(status))
453 break;
454 }
455
456 dbg("Cannot get control of hotplug hardware for pci %s\n",
457 pci_name(dev));
458
459 kfree(string.pointer);
460 return -ENODEV;
Jiri Slabye0d94be2008-08-11 17:47:40 +0200461got_one:
462 dbg("Gained control for hotplug HW for pci %s (%s)\n", pci_name(dev),
463 (char *)string.pointer);
464 kfree(string.pointer);
465 return 0;
Kenji Kaneshigeac9c0522008-05-28 15:01:03 +0900466}
467EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800468
469/* acpi_root_bridge - check to see if this acpi object is a root bridge
470 *
471 * @handle - the acpi object in question.
472 */
473int acpi_root_bridge(acpi_handle handle)
474{
475 acpi_status status;
476 struct acpi_device_info *info;
477 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
478 int i;
479
480 status = acpi_get_object_info(handle, &buffer);
481 if (ACPI_SUCCESS(status)) {
482 info = buffer.pointer;
483 if ((info->valid & ACPI_VALID_HID) &&
484 !strcmp(PCI_ROOT_HID_STRING,
485 info->hardware_id.value)) {
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700486 kfree(buffer.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800487 return 1;
488 }
489 if (info->valid & ACPI_VALID_CID) {
490 for (i=0; i < info->compatibility_id.count; i++) {
491 if (!strcmp(PCI_ROOT_HID_STRING,
492 info->compatibility_id.id[i].value)) {
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700493 kfree(buffer.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800494 return 1;
495 }
496 }
497 }
Kristen Accardi81b26bc2006-04-18 14:36:43 -0700498 kfree(buffer.pointer);
Kristen Accardi783c49f2006-03-03 10:16:05 -0800499 }
500 return 0;
501}
502EXPORT_SYMBOL_GPL(acpi_root_bridge);
Kenji Kaneshigeaad20ca2006-05-10 22:20:34 +0900503
504module_param(debug_acpi, bool, 0644);
505MODULE_PARM_DESC(debug_acpi, "Debugging mode for ACPI enabled or not");