aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/ibmphp_ebda.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_ebda.c')
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c103
1 files changed, 51 insertions, 52 deletions
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 9df78bc14541..bd044158b36c 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -123,7 +123,7 @@ static struct ebda_pci_rsrc *alloc_ebda_pci_rsrc (void)
123static void __init print_bus_info (void) 123static void __init print_bus_info (void)
124{ 124{
125 struct bus_info *ptr; 125 struct bus_info *ptr;
126 126
127 list_for_each_entry(ptr, &bus_info_head, bus_info_list) { 127 list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
128 debug ("%s - slot_min = %x\n", __func__, ptr->slot_min); 128 debug ("%s - slot_min = %x\n", __func__, ptr->slot_min);
129 debug ("%s - slot_max = %x\n", __func__, ptr->slot_max); 129 debug ("%s - slot_max = %x\n", __func__, ptr->slot_max);
@@ -131,7 +131,7 @@ static void __init print_bus_info (void)
131 debug ("%s - bus# = %x\n", __func__, ptr->busno); 131 debug ("%s - bus# = %x\n", __func__, ptr->busno);
132 debug ("%s - current_speed = %x\n", __func__, ptr->current_speed); 132 debug ("%s - current_speed = %x\n", __func__, ptr->current_speed);
133 debug ("%s - controller_id = %x\n", __func__, ptr->controller_id); 133 debug ("%s - controller_id = %x\n", __func__, ptr->controller_id);
134 134
135 debug ("%s - slots_at_33_conv = %x\n", __func__, ptr->slots_at_33_conv); 135 debug ("%s - slots_at_33_conv = %x\n", __func__, ptr->slots_at_33_conv);
136 debug ("%s - slots_at_66_conv = %x\n", __func__, ptr->slots_at_66_conv); 136 debug ("%s - slots_at_66_conv = %x\n", __func__, ptr->slots_at_66_conv);
137 debug ("%s - slots_at_66_pcix = %x\n", __func__, ptr->slots_at_66_pcix); 137 debug ("%s - slots_at_66_pcix = %x\n", __func__, ptr->slots_at_66_pcix);
@@ -144,7 +144,7 @@ static void __init print_bus_info (void)
144static void print_lo_info (void) 144static void print_lo_info (void)
145{ 145{
146 struct rio_detail *ptr; 146 struct rio_detail *ptr;
147 debug ("print_lo_info ----\n"); 147 debug ("print_lo_info ----\n");
148 list_for_each_entry(ptr, &rio_lo_head, rio_detail_list) { 148 list_for_each_entry(ptr, &rio_lo_head, rio_detail_list) {
149 debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id); 149 debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
150 debug ("%s - rio_type = %x\n", __func__, ptr->rio_type); 150 debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
@@ -176,7 +176,7 @@ static void __init print_ebda_pci_rsrc (void)
176 struct ebda_pci_rsrc *ptr; 176 struct ebda_pci_rsrc *ptr;
177 177
178 list_for_each_entry(ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) { 178 list_for_each_entry(ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) {
179 debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n", 179 debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
180 __func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr); 180 __func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
181 } 181 }
182} 182}
@@ -259,7 +259,7 @@ int __init ibmphp_access_ebda (void)
259 ebda_seg = readw (io_mem); 259 ebda_seg = readw (io_mem);
260 iounmap (io_mem); 260 iounmap (io_mem);
261 debug ("returned ebda segment: %x\n", ebda_seg); 261 debug ("returned ebda segment: %x\n", ebda_seg);
262 262
263 io_mem = ioremap(ebda_seg<<4, 1); 263 io_mem = ioremap(ebda_seg<<4, 1);
264 if (!io_mem) 264 if (!io_mem)
265 return -ENOMEM; 265 return -ENOMEM;
@@ -310,7 +310,7 @@ int __init ibmphp_access_ebda (void)
310 re = readw (io_mem + sub_addr); /* next sub blk */ 310 re = readw (io_mem + sub_addr); /* next sub blk */
311 311
312 sub_addr += 2; 312 sub_addr += 2;
313 rc_id = readw (io_mem + sub_addr); /* sub blk id */ 313 rc_id = readw (io_mem + sub_addr); /* sub blk id */
314 314
315 sub_addr += 2; 315 sub_addr += 2;
316 if (rc_id != 0x5243) 316 if (rc_id != 0x5243)
@@ -330,7 +330,7 @@ int __init ibmphp_access_ebda (void)
330 debug ("info about hpc descriptor---\n"); 330 debug ("info about hpc descriptor---\n");
331 debug ("hot blk format: %x\n", format); 331 debug ("hot blk format: %x\n", format);
332 debug ("num of controller: %x\n", num_ctlrs); 332 debug ("num of controller: %x\n", num_ctlrs);
333 debug ("offset of hpc data structure enteries: %x\n ", sub_addr); 333 debug ("offset of hpc data structure entries: %x\n ", sub_addr);
334 334
335 sub_addr = base + re; /* re sub blk */ 335 sub_addr = base + re; /* re sub blk */
336 /* FIXME: rc is never used/checked */ 336 /* FIXME: rc is never used/checked */
@@ -359,7 +359,7 @@ int __init ibmphp_access_ebda (void)
359 debug ("info about rsrc descriptor---\n"); 359 debug ("info about rsrc descriptor---\n");
360 debug ("format: %x\n", format); 360 debug ("format: %x\n", format);
361 debug ("num of rsrc: %x\n", num_entries); 361 debug ("num of rsrc: %x\n", num_entries);
362 debug ("offset of rsrc data structure enteries: %x\n ", sub_addr); 362 debug ("offset of rsrc data structure entries: %x\n ", sub_addr);
363 363
364 hs_complete = 1; 364 hs_complete = 1;
365 } else { 365 } else {
@@ -376,7 +376,7 @@ int __init ibmphp_access_ebda (void)
376 rio_table_ptr->scal_count = readb (io_mem + offset + 1); 376 rio_table_ptr->scal_count = readb (io_mem + offset + 1);
377 rio_table_ptr->riodev_count = readb (io_mem + offset + 2); 377 rio_table_ptr->riodev_count = readb (io_mem + offset + 2);
378 rio_table_ptr->offset = offset +3 ; 378 rio_table_ptr->offset = offset +3 ;
379 379
380 debug("info about rio table hdr ---\n"); 380 debug("info about rio table hdr ---\n");
381 debug("ver_num: %x\nscal_count: %x\nriodev_count: %x\noffset of rio table: %x\n ", 381 debug("ver_num: %x\nscal_count: %x\nriodev_count: %x\noffset of rio table: %x\n ",
382 rio_table_ptr->ver_num, rio_table_ptr->scal_count, 382 rio_table_ptr->ver_num, rio_table_ptr->scal_count,
@@ -440,12 +440,12 @@ static int __init ebda_rio_table (void)
440 rio_detail_ptr->chassis_num = readb (io_mem + offset + 14); 440 rio_detail_ptr->chassis_num = readb (io_mem + offset + 14);
441// debug ("rio_node_id: %x\nbbar: %x\nrio_type: %x\nowner_id: %x\nport0_node: %x\nport0_port: %x\nport1_node: %x\nport1_port: %x\nfirst_slot_num: %x\nstatus: %x\n", rio_detail_ptr->rio_node_id, rio_detail_ptr->bbar, rio_detail_ptr->rio_type, rio_detail_ptr->owner_id, rio_detail_ptr->port0_node_connect, rio_detail_ptr->port0_port_connect, rio_detail_ptr->port1_node_connect, rio_detail_ptr->port1_port_connect, rio_detail_ptr->first_slot_num, rio_detail_ptr->status); 441// debug ("rio_node_id: %x\nbbar: %x\nrio_type: %x\nowner_id: %x\nport0_node: %x\nport0_port: %x\nport1_node: %x\nport1_port: %x\nfirst_slot_num: %x\nstatus: %x\n", rio_detail_ptr->rio_node_id, rio_detail_ptr->bbar, rio_detail_ptr->rio_type, rio_detail_ptr->owner_id, rio_detail_ptr->port0_node_connect, rio_detail_ptr->port0_port_connect, rio_detail_ptr->port1_node_connect, rio_detail_ptr->port1_port_connect, rio_detail_ptr->first_slot_num, rio_detail_ptr->status);
442 //create linked list of chassis 442 //create linked list of chassis
443 if (rio_detail_ptr->rio_type == 4 || rio_detail_ptr->rio_type == 5) 443 if (rio_detail_ptr->rio_type == 4 || rio_detail_ptr->rio_type == 5)
444 list_add (&rio_detail_ptr->rio_detail_list, &rio_vg_head); 444 list_add (&rio_detail_ptr->rio_detail_list, &rio_vg_head);
445 //create linked list of expansion box 445 //create linked list of expansion box
446 else if (rio_detail_ptr->rio_type == 6 || rio_detail_ptr->rio_type == 7) 446 else if (rio_detail_ptr->rio_type == 6 || rio_detail_ptr->rio_type == 7)
447 list_add (&rio_detail_ptr->rio_detail_list, &rio_lo_head); 447 list_add (&rio_detail_ptr->rio_detail_list, &rio_lo_head);
448 else 448 else
449 // not in my concern 449 // not in my concern
450 kfree (rio_detail_ptr); 450 kfree (rio_detail_ptr);
451 offset += 15; 451 offset += 15;
@@ -456,7 +456,7 @@ static int __init ebda_rio_table (void)
456} 456}
457 457
458/* 458/*
459 * reorganizing linked list of chassis 459 * reorganizing linked list of chassis
460 */ 460 */
461static struct opt_rio *search_opt_vg (u8 chassis_num) 461static struct opt_rio *search_opt_vg (u8 chassis_num)
462{ 462{
@@ -464,7 +464,7 @@ static struct opt_rio *search_opt_vg (u8 chassis_num)
464 list_for_each_entry(ptr, &opt_vg_head, opt_rio_list) { 464 list_for_each_entry(ptr, &opt_vg_head, opt_rio_list) {
465 if (ptr->chassis_num == chassis_num) 465 if (ptr->chassis_num == chassis_num)
466 return ptr; 466 return ptr;
467 } 467 }
468 return NULL; 468 return NULL;
469} 469}
470 470
@@ -472,7 +472,7 @@ static int __init combine_wpg_for_chassis (void)
472{ 472{
473 struct opt_rio *opt_rio_ptr = NULL; 473 struct opt_rio *opt_rio_ptr = NULL;
474 struct rio_detail *rio_detail_ptr = NULL; 474 struct rio_detail *rio_detail_ptr = NULL;
475 475
476 list_for_each_entry(rio_detail_ptr, &rio_vg_head, rio_detail_list) { 476 list_for_each_entry(rio_detail_ptr, &rio_vg_head, rio_detail_list) {
477 opt_rio_ptr = search_opt_vg (rio_detail_ptr->chassis_num); 477 opt_rio_ptr = search_opt_vg (rio_detail_ptr->chassis_num);
478 if (!opt_rio_ptr) { 478 if (!opt_rio_ptr) {
@@ -484,14 +484,14 @@ static int __init combine_wpg_for_chassis (void)
484 opt_rio_ptr->first_slot_num = rio_detail_ptr->first_slot_num; 484 opt_rio_ptr->first_slot_num = rio_detail_ptr->first_slot_num;
485 opt_rio_ptr->middle_num = rio_detail_ptr->first_slot_num; 485 opt_rio_ptr->middle_num = rio_detail_ptr->first_slot_num;
486 list_add (&opt_rio_ptr->opt_rio_list, &opt_vg_head); 486 list_add (&opt_rio_ptr->opt_rio_list, &opt_vg_head);
487 } else { 487 } else {
488 opt_rio_ptr->first_slot_num = min (opt_rio_ptr->first_slot_num, rio_detail_ptr->first_slot_num); 488 opt_rio_ptr->first_slot_num = min (opt_rio_ptr->first_slot_num, rio_detail_ptr->first_slot_num);
489 opt_rio_ptr->middle_num = max (opt_rio_ptr->middle_num, rio_detail_ptr->first_slot_num); 489 opt_rio_ptr->middle_num = max (opt_rio_ptr->middle_num, rio_detail_ptr->first_slot_num);
490 } 490 }
491 } 491 }
492 print_opt_vg (); 492 print_opt_vg ();
493 return 0; 493 return 0;
494} 494}
495 495
496/* 496/*
497 * reorganizing linked list of expansion box 497 * reorganizing linked list of expansion box
@@ -502,7 +502,7 @@ static struct opt_rio_lo *search_opt_lo (u8 chassis_num)
502 list_for_each_entry(ptr, &opt_lo_head, opt_rio_lo_list) { 502 list_for_each_entry(ptr, &opt_lo_head, opt_rio_lo_list) {
503 if (ptr->chassis_num == chassis_num) 503 if (ptr->chassis_num == chassis_num)
504 return ptr; 504 return ptr;
505 } 505 }
506 return NULL; 506 return NULL;
507} 507}
508 508
@@ -510,7 +510,7 @@ static int combine_wpg_for_expansion (void)
510{ 510{
511 struct opt_rio_lo *opt_rio_lo_ptr = NULL; 511 struct opt_rio_lo *opt_rio_lo_ptr = NULL;
512 struct rio_detail *rio_detail_ptr = NULL; 512 struct rio_detail *rio_detail_ptr = NULL;
513 513
514 list_for_each_entry(rio_detail_ptr, &rio_lo_head, rio_detail_list) { 514 list_for_each_entry(rio_detail_ptr, &rio_lo_head, rio_detail_list) {
515 opt_rio_lo_ptr = search_opt_lo (rio_detail_ptr->chassis_num); 515 opt_rio_lo_ptr = search_opt_lo (rio_detail_ptr->chassis_num);
516 if (!opt_rio_lo_ptr) { 516 if (!opt_rio_lo_ptr) {
@@ -522,22 +522,22 @@ static int combine_wpg_for_expansion (void)
522 opt_rio_lo_ptr->first_slot_num = rio_detail_ptr->first_slot_num; 522 opt_rio_lo_ptr->first_slot_num = rio_detail_ptr->first_slot_num;
523 opt_rio_lo_ptr->middle_num = rio_detail_ptr->first_slot_num; 523 opt_rio_lo_ptr->middle_num = rio_detail_ptr->first_slot_num;
524 opt_rio_lo_ptr->pack_count = 1; 524 opt_rio_lo_ptr->pack_count = 1;
525 525
526 list_add (&opt_rio_lo_ptr->opt_rio_lo_list, &opt_lo_head); 526 list_add (&opt_rio_lo_ptr->opt_rio_lo_list, &opt_lo_head);
527 } else { 527 } else {
528 opt_rio_lo_ptr->first_slot_num = min (opt_rio_lo_ptr->first_slot_num, rio_detail_ptr->first_slot_num); 528 opt_rio_lo_ptr->first_slot_num = min (opt_rio_lo_ptr->first_slot_num, rio_detail_ptr->first_slot_num);
529 opt_rio_lo_ptr->middle_num = max (opt_rio_lo_ptr->middle_num, rio_detail_ptr->first_slot_num); 529 opt_rio_lo_ptr->middle_num = max (opt_rio_lo_ptr->middle_num, rio_detail_ptr->first_slot_num);
530 opt_rio_lo_ptr->pack_count = 2; 530 opt_rio_lo_ptr->pack_count = 2;
531 } 531 }
532 } 532 }
533 return 0; 533 return 0;
534} 534}
535 535
536 536
537/* Since we don't know the max slot number per each chassis, hence go 537/* Since we don't know the max slot number per each chassis, hence go
538 * through the list of all chassis to find out the range 538 * through the list of all chassis to find out the range
539 * Arguments: slot_num, 1st slot number of the chassis we think we are on, 539 * Arguments: slot_num, 1st slot number of the chassis we think we are on,
540 * var (0 = chassis, 1 = expansion box) 540 * var (0 = chassis, 1 = expansion box)
541 */ 541 */
542static int first_slot_num (u8 slot_num, u8 first_slot, u8 var) 542static int first_slot_num (u8 slot_num, u8 first_slot, u8 var)
543{ 543{
@@ -547,7 +547,7 @@ static int first_slot_num (u8 slot_num, u8 first_slot, u8 var)
547 547
548 if (!var) { 548 if (!var) {
549 list_for_each_entry(opt_vg_ptr, &opt_vg_head, opt_rio_list) { 549 list_for_each_entry(opt_vg_ptr, &opt_vg_head, opt_rio_list) {
550 if ((first_slot < opt_vg_ptr->first_slot_num) && (slot_num >= opt_vg_ptr->first_slot_num)) { 550 if ((first_slot < opt_vg_ptr->first_slot_num) && (slot_num >= opt_vg_ptr->first_slot_num)) {
551 rc = -ENODEV; 551 rc = -ENODEV;
552 break; 552 break;
553 } 553 }
@@ -569,7 +569,7 @@ static struct opt_rio_lo * find_rxe_num (u8 slot_num)
569 569
570 list_for_each_entry(opt_lo_ptr, &opt_lo_head, opt_rio_lo_list) { 570 list_for_each_entry(opt_lo_ptr, &opt_lo_head, opt_rio_lo_list) {
571 //check to see if this slot_num belongs to expansion box 571 //check to see if this slot_num belongs to expansion box
572 if ((slot_num >= opt_lo_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_lo_ptr->first_slot_num, 1))) 572 if ((slot_num >= opt_lo_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_lo_ptr->first_slot_num, 1)))
573 return opt_lo_ptr; 573 return opt_lo_ptr;
574 } 574 }
575 return NULL; 575 return NULL;
@@ -580,8 +580,8 @@ static struct opt_rio * find_chassis_num (u8 slot_num)
580 struct opt_rio *opt_vg_ptr; 580 struct opt_rio *opt_vg_ptr;
581 581
582 list_for_each_entry(opt_vg_ptr, &opt_vg_head, opt_rio_list) { 582 list_for_each_entry(opt_vg_ptr, &opt_vg_head, opt_rio_list) {
583 //check to see if this slot_num belongs to chassis 583 //check to see if this slot_num belongs to chassis
584 if ((slot_num >= opt_vg_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_vg_ptr->first_slot_num, 0))) 584 if ((slot_num >= opt_vg_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_vg_ptr->first_slot_num, 0)))
585 return opt_vg_ptr; 585 return opt_vg_ptr;
586 } 586 }
587 return NULL; 587 return NULL;
@@ -594,13 +594,13 @@ static u8 calculate_first_slot (u8 slot_num)
594{ 594{
595 u8 first_slot = 1; 595 u8 first_slot = 1;
596 struct slot * slot_cur; 596 struct slot * slot_cur;
597 597
598 list_for_each_entry(slot_cur, &ibmphp_slot_head, ibm_slot_list) { 598 list_for_each_entry(slot_cur, &ibmphp_slot_head, ibm_slot_list) {
599 if (slot_cur->ctrl) { 599 if (slot_cur->ctrl) {
600 if ((slot_cur->ctrl->ctlr_type != 4) && (slot_cur->ctrl->ending_slot_num > first_slot) && (slot_num > slot_cur->ctrl->ending_slot_num)) 600 if ((slot_cur->ctrl->ctlr_type != 4) && (slot_cur->ctrl->ending_slot_num > first_slot) && (slot_num > slot_cur->ctrl->ending_slot_num))
601 first_slot = slot_cur->ctrl->ending_slot_num; 601 first_slot = slot_cur->ctrl->ending_slot_num;
602 } 602 }
603 } 603 }
604 return first_slot + 1; 604 return first_slot + 1;
605 605
606} 606}
@@ -622,11 +622,11 @@ static char *create_file_name (struct slot * slot_cur)
622 err ("Structure passed is empty\n"); 622 err ("Structure passed is empty\n");
623 return NULL; 623 return NULL;
624 } 624 }
625 625
626 slot_num = slot_cur->number; 626 slot_num = slot_cur->number;
627 627
628 memset (str, 0, sizeof(str)); 628 memset (str, 0, sizeof(str));
629 629
630 if (rio_table_ptr) { 630 if (rio_table_ptr) {
631 if (rio_table_ptr->ver_num == 3) { 631 if (rio_table_ptr->ver_num == 3) {
632 opt_vg_ptr = find_chassis_num (slot_num); 632 opt_vg_ptr = find_chassis_num (slot_num);
@@ -660,7 +660,7 @@ static char *create_file_name (struct slot * slot_cur)
660 /* if both NULL and we DO have correct RIO table in BIOS */ 660 /* if both NULL and we DO have correct RIO table in BIOS */
661 return NULL; 661 return NULL;
662 } 662 }
663 } 663 }
664 if (!flag) { 664 if (!flag) {
665 if (slot_cur->ctrl->ctlr_type == 4) { 665 if (slot_cur->ctrl->ctlr_type == 4) {
666 first_slot = calculate_first_slot (slot_num); 666 first_slot = calculate_first_slot (slot_num);
@@ -798,7 +798,7 @@ static int __init ebda_rsrc_controller (void)
798 slot_ptr->ctl_index = readb (io_mem + addr_slot + 2*slot_num); 798 slot_ptr->ctl_index = readb (io_mem + addr_slot + 2*slot_num);
799 slot_ptr->slot_cap = readb (io_mem + addr_slot + 3*slot_num); 799 slot_ptr->slot_cap = readb (io_mem + addr_slot + 3*slot_num);
800 800
801 // create bus_info lined list --- if only one slot per bus: slot_min = slot_max 801 // create bus_info lined list --- if only one slot per bus: slot_min = slot_max
802 802
803 bus_info_ptr2 = ibmphp_find_same_bus_num (slot_ptr->slot_bus_num); 803 bus_info_ptr2 = ibmphp_find_same_bus_num (slot_ptr->slot_bus_num);
804 if (!bus_info_ptr2) { 804 if (!bus_info_ptr2) {
@@ -814,9 +814,9 @@ static int __init ebda_rsrc_controller (void)
814 bus_info_ptr1->index = bus_index++; 814 bus_info_ptr1->index = bus_index++;
815 bus_info_ptr1->current_speed = 0xff; 815 bus_info_ptr1->current_speed = 0xff;
816 bus_info_ptr1->current_bus_mode = 0xff; 816 bus_info_ptr1->current_bus_mode = 0xff;
817 817
818 bus_info_ptr1->controller_id = hpc_ptr->ctlr_id; 818 bus_info_ptr1->controller_id = hpc_ptr->ctlr_id;
819 819
820 list_add_tail (&bus_info_ptr1->bus_info_list, &bus_info_head); 820 list_add_tail (&bus_info_ptr1->bus_info_list, &bus_info_head);
821 821
822 } else { 822 } else {
@@ -851,7 +851,7 @@ static int __init ebda_rsrc_controller (void)
851 bus_info_ptr2->slots_at_66_conv = bus_ptr->slots_at_66_conv; 851 bus_info_ptr2->slots_at_66_conv = bus_ptr->slots_at_66_conv;
852 bus_info_ptr2->slots_at_66_pcix = bus_ptr->slots_at_66_pcix; 852 bus_info_ptr2->slots_at_66_pcix = bus_ptr->slots_at_66_pcix;
853 bus_info_ptr2->slots_at_100_pcix = bus_ptr->slots_at_100_pcix; 853 bus_info_ptr2->slots_at_100_pcix = bus_ptr->slots_at_100_pcix;
854 bus_info_ptr2->slots_at_133_pcix = bus_ptr->slots_at_133_pcix; 854 bus_info_ptr2->slots_at_133_pcix = bus_ptr->slots_at_133_pcix;
855 } 855 }
856 bus_ptr++; 856 bus_ptr++;
857 } 857 }
@@ -864,7 +864,7 @@ static int __init ebda_rsrc_controller (void)
864 hpc_ptr->u.pci_ctlr.dev_fun = readb (io_mem + addr + 1); 864 hpc_ptr->u.pci_ctlr.dev_fun = readb (io_mem + addr + 1);
865 hpc_ptr->irq = readb (io_mem + addr + 2); 865 hpc_ptr->irq = readb (io_mem + addr + 2);
866 addr += 3; 866 addr += 3;
867 debug ("ctrl bus = %x, ctlr devfun = %x, irq = %x\n", 867 debug ("ctrl bus = %x, ctlr devfun = %x, irq = %x\n",
868 hpc_ptr->u.pci_ctlr.bus, 868 hpc_ptr->u.pci_ctlr.bus,
869 hpc_ptr->u.pci_ctlr.dev_fun, hpc_ptr->irq); 869 hpc_ptr->u.pci_ctlr.dev_fun, hpc_ptr->irq);
870 break; 870 break;
@@ -932,7 +932,7 @@ static int __init ebda_rsrc_controller (void)
932 tmp_slot->supported_speed = 2; 932 tmp_slot->supported_speed = 2;
933 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_66_MAX) == EBDA_SLOT_66_MAX) 933 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_66_MAX) == EBDA_SLOT_66_MAX)
934 tmp_slot->supported_speed = 1; 934 tmp_slot->supported_speed = 1;
935 935
936 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_PCIX_CAP) == EBDA_SLOT_PCIX_CAP) 936 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_PCIX_CAP) == EBDA_SLOT_PCIX_CAP)
937 tmp_slot->supported_bus_mode = 1; 937 tmp_slot->supported_bus_mode = 1;
938 else 938 else
@@ -1000,7 +1000,7 @@ error_no_hpc:
1000 return rc; 1000 return rc;
1001} 1001}
1002 1002
1003/* 1003/*
1004 * map info (bus, devfun, start addr, end addr..) of i/o, memory, 1004 * map info (bus, devfun, start addr, end addr..) of i/o, memory,
1005 * pfm from the physical addr to a list of resource. 1005 * pfm from the physical addr to a list of resource.
1006 */ 1006 */
@@ -1057,7 +1057,7 @@ static int __init ebda_rsrc_rsrc (void)
1057 addr += 10; 1057 addr += 10;
1058 1058
1059 debug ("rsrc from mem or pfm ---\n"); 1059 debug ("rsrc from mem or pfm ---\n");
1060 debug ("rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n", 1060 debug ("rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
1061 rsrc_ptr->rsrc_type, rsrc_ptr->bus_num, rsrc_ptr->dev_fun, rsrc_ptr->start_addr, rsrc_ptr->end_addr); 1061 rsrc_ptr->rsrc_type, rsrc_ptr->bus_num, rsrc_ptr->dev_fun, rsrc_ptr->start_addr, rsrc_ptr->end_addr);
1062 1062
1063 list_add (&rsrc_ptr->ebda_pci_rsrc_list, &ibmphp_ebda_pci_rsrc_head); 1063 list_add (&rsrc_ptr->ebda_pci_rsrc_list, &ibmphp_ebda_pci_rsrc_head);
@@ -1096,7 +1096,7 @@ struct bus_info *ibmphp_find_same_bus_num (u32 num)
1096 struct bus_info *ptr; 1096 struct bus_info *ptr;
1097 1097
1098 list_for_each_entry(ptr, &bus_info_head, bus_info_list) { 1098 list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
1099 if (ptr->busno == num) 1099 if (ptr->busno == num)
1100 return ptr; 1100 return ptr;
1101 } 1101 }
1102 return NULL; 1102 return NULL;
@@ -1110,7 +1110,7 @@ int ibmphp_get_bus_index (u8 num)
1110 struct bus_info *ptr; 1110 struct bus_info *ptr;
1111 1111
1112 list_for_each_entry(ptr, &bus_info_head, bus_info_list) { 1112 list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
1113 if (ptr->busno == num) 1113 if (ptr->busno == num)
1114 return ptr->index; 1114 return ptr->index;
1115 } 1115 }
1116 return -ENODEV; 1116 return -ENODEV;
@@ -1168,7 +1168,7 @@ static struct pci_device_id id_table[] = {
1168 .subdevice = HPC_SUBSYSTEM_ID, 1168 .subdevice = HPC_SUBSYSTEM_ID,
1169 .class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00), 1169 .class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
1170 }, {} 1170 }, {}
1171}; 1171};
1172 1172
1173MODULE_DEVICE_TABLE(pci, id_table); 1173MODULE_DEVICE_TABLE(pci, id_table);
1174 1174
@@ -1197,7 +1197,7 @@ static int ibmphp_probe (struct pci_dev * dev, const struct pci_device_id *ids)
1197 struct controller *ctrl; 1197 struct controller *ctrl;
1198 1198
1199 debug ("inside ibmphp_probe\n"); 1199 debug ("inside ibmphp_probe\n");
1200 1200
1201 list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) { 1201 list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) {
1202 if (ctrl->ctlr_type == 1) { 1202 if (ctrl->ctlr_type == 1) {
1203 if ((dev->devfn == ctrl->u.pci_ctlr.dev_fun) && (dev->bus->number == ctrl->u.pci_ctlr.bus)) { 1203 if ((dev->devfn == ctrl->u.pci_ctlr.dev_fun) && (dev->bus->number == ctrl->u.pci_ctlr.bus)) {
@@ -1210,4 +1210,3 @@ static int ibmphp_probe (struct pci_dev * dev, const struct pci_device_id *ids)
1210 } 1210 }
1211 return -ENODEV; 1211 return -ENODEV;
1212} 1212}
1213