diff options
-rw-r--r-- | arch/alpha/kernel/sys_dp264.c | 41 | ||||
-rw-r--r-- | net/ipv4/raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 |
3 files changed, 25 insertions, 20 deletions
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 9e36b07fa94..d5da6b1b28e 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c | |||
@@ -395,6 +395,22 @@ clipper_init_irq(void) | |||
395 | */ | 395 | */ |
396 | 396 | ||
397 | static int __init | 397 | static int __init |
398 | isa_irq_fixup(struct pci_dev *dev, int irq) | ||
399 | { | ||
400 | u8 irq8; | ||
401 | |||
402 | if (irq > 0) | ||
403 | return irq; | ||
404 | |||
405 | /* This interrupt is routed via ISA bridge, so we'll | ||
406 | just have to trust whatever value the console might | ||
407 | have assigned. */ | ||
408 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8); | ||
409 | |||
410 | return irq8 & 0xf; | ||
411 | } | ||
412 | |||
413 | static int __init | ||
398 | dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 414 | dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
399 | { | 415 | { |
400 | static char irq_tab[6][5] __initdata = { | 416 | static char irq_tab[6][5] __initdata = { |
@@ -407,25 +423,13 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
407 | { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */ | 423 | { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */ |
408 | }; | 424 | }; |
409 | const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; | 425 | const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; |
410 | |||
411 | struct pci_controller *hose = dev->sysdata; | 426 | struct pci_controller *hose = dev->sysdata; |
412 | int irq = COMMON_TABLE_LOOKUP; | 427 | int irq = COMMON_TABLE_LOOKUP; |
413 | 428 | ||
414 | if (irq > 0) { | 429 | if (irq > 0) |
415 | irq += 16 * hose->index; | 430 | irq += 16 * hose->index; |
416 | } else { | ||
417 | /* ??? The Contaq IDE controller on the ISA bridge uses | ||
418 | "legacy" interrupts 14 and 15. I don't know if anything | ||
419 | can wind up at the same slot+pin on hose1, so we'll | ||
420 | just have to trust whatever value the console might | ||
421 | have assigned. */ | ||
422 | |||
423 | u8 irq8; | ||
424 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8); | ||
425 | irq = irq8; | ||
426 | } | ||
427 | 431 | ||
428 | return irq; | 432 | return isa_irq_fixup(dev, irq); |
429 | } | 433 | } |
430 | 434 | ||
431 | static int __init | 435 | static int __init |
@@ -453,7 +457,8 @@ monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
453 | { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/ | 457 | { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/ |
454 | }; | 458 | }; |
455 | const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5; | 459 | const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5; |
456 | return COMMON_TABLE_LOOKUP; | 460 | |
461 | return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP); | ||
457 | } | 462 | } |
458 | 463 | ||
459 | static u8 __init | 464 | static u8 __init |
@@ -507,7 +512,8 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
507 | { 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */ | 512 | { 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */ |
508 | }; | 513 | }; |
509 | const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5; | 514 | const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5; |
510 | return COMMON_TABLE_LOOKUP; | 515 | |
516 | return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP); | ||
511 | } | 517 | } |
512 | 518 | ||
513 | static int __init | 519 | static int __init |
@@ -524,14 +530,13 @@ clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
524 | { -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */ | 530 | { -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */ |
525 | }; | 531 | }; |
526 | const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5; | 532 | const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5; |
527 | |||
528 | struct pci_controller *hose = dev->sysdata; | 533 | struct pci_controller *hose = dev->sysdata; |
529 | int irq = COMMON_TABLE_LOOKUP; | 534 | int irq = COMMON_TABLE_LOOKUP; |
530 | 535 | ||
531 | if (irq > 0) | 536 | if (irq > 0) |
532 | irq += 16 * hose->index; | 537 | irq += 16 * hose->index; |
533 | 538 | ||
534 | return irq; | 539 | return isa_irq_fixup(dev, irq); |
535 | } | 540 | } |
536 | 541 | ||
537 | static void __init | 542 | static void __init |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 304bb0a1d4f..4b0d7e4d626 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -361,7 +361,7 @@ static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) | |||
361 | 361 | ||
362 | if (type && code) { | 362 | if (type && code) { |
363 | get_user(fl->fl_icmp_type, type); | 363 | get_user(fl->fl_icmp_type, type); |
364 | __get_user(fl->fl_icmp_code, code); | 364 | get_user(fl->fl_icmp_code, code); |
365 | probed = 1; | 365 | probed = 1; |
366 | } | 366 | } |
367 | break; | 367 | break; |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 5aa3691c578..a1265a320b1 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -627,7 +627,7 @@ static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) | |||
627 | 627 | ||
628 | if (type && code) { | 628 | if (type && code) { |
629 | get_user(fl->fl_icmp_type, type); | 629 | get_user(fl->fl_icmp_type, type); |
630 | __get_user(fl->fl_icmp_code, code); | 630 | get_user(fl->fl_icmp_code, code); |
631 | probed = 1; | 631 | probed = 1; |
632 | } | 632 | } |
633 | break; | 633 | break; |