From 671a5c08c00efa1afe64172259119c173b3f8030 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 19 Sep 2005 18:46:11 -0700 Subject: [PATCH] --- yaml --- r: 9087 b: refs/heads/master c: 875bd5ab01bc0b760fd4e97838931cd2e7456cbd h: refs/heads/master i: 9085: d6a798c179bf583127299594725076188d3e7eb0 9083: 0a90fe6b046a468d1f42036cc1ae7dfabfdc1425 9079: 6c5a92ed8043883e83dfd9a57f6d770a37adb5d9 9071: b9b76ecffb5e2069de874a6e4a5e52aab7d3e1b5 9055: 120cc43a4f70c0bc4f91812b42203c3265d15b01 9023: f8231b4264145d45023feb333651ba94a892b740 8959: 854e93cbd15a658d66538fdadd1657f4d9cdd95f v: v3 --- [refs] | 2 +- trunk/arch/alpha/kernel/sys_dp264.c | 41 ++++++++++++++++------------- trunk/net/ipv4/raw.c | 2 +- trunk/net/ipv6/raw.c | 2 +- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 829f4aa22d8e..e07e05e39678 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e14c3caf605dfd29bd1aac3097e39db94afc9f07 +refs/heads/master: 875bd5ab01bc0b760fd4e97838931cd2e7456cbd diff --git a/trunk/arch/alpha/kernel/sys_dp264.c b/trunk/arch/alpha/kernel/sys_dp264.c index 9e36b07fa940..d5da6b1b28ee 100644 --- a/trunk/arch/alpha/kernel/sys_dp264.c +++ b/trunk/arch/alpha/kernel/sys_dp264.c @@ -394,6 +394,22 @@ clipper_init_irq(void) * 10 64 bit PCI option slot 3 (not bus 0) */ +static int __init +isa_irq_fixup(struct pci_dev *dev, int irq) +{ + u8 irq8; + + if (irq > 0) + return irq; + + /* This interrupt is routed via ISA bridge, so we'll + just have to trust whatever value the console might + have assigned. */ + pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8); + + return irq8 & 0xf; +} + static int __init dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { @@ -407,25 +423,13 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */ }; const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; - struct pci_controller *hose = dev->sysdata; int irq = COMMON_TABLE_LOOKUP; - if (irq > 0) { + if (irq > 0) irq += 16 * hose->index; - } else { - /* ??? The Contaq IDE controller on the ISA bridge uses - "legacy" interrupts 14 and 15. I don't know if anything - can wind up at the same slot+pin on hose1, so we'll - just have to trust whatever value the console might - have assigned. */ - - u8 irq8; - pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8); - irq = irq8; - } - return irq; + return isa_irq_fixup(dev, irq); } static int __init @@ -453,7 +457,8 @@ monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/ }; const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5; - return COMMON_TABLE_LOOKUP; + + return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP); } static u8 __init @@ -507,7 +512,8 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */ }; const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5; - return COMMON_TABLE_LOOKUP; + + return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP); } static int __init @@ -524,14 +530,13 @@ clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */ }; const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5; - struct pci_controller *hose = dev->sysdata; int irq = COMMON_TABLE_LOOKUP; if (irq > 0) irq += 16 * hose->index; - return irq; + return isa_irq_fixup(dev, irq); } static void __init diff --git a/trunk/net/ipv4/raw.c b/trunk/net/ipv4/raw.c index 304bb0a1d4f0..4b0d7e4d6269 100644 --- a/trunk/net/ipv4/raw.c +++ b/trunk/net/ipv4/raw.c @@ -361,7 +361,7 @@ static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) if (type && code) { get_user(fl->fl_icmp_type, type); - __get_user(fl->fl_icmp_code, code); + get_user(fl->fl_icmp_code, code); probed = 1; } break; diff --git a/trunk/net/ipv6/raw.c b/trunk/net/ipv6/raw.c index 5aa3691c578d..a1265a320b11 100644 --- a/trunk/net/ipv6/raw.c +++ b/trunk/net/ipv6/raw.c @@ -627,7 +627,7 @@ static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) if (type && code) { get_user(fl->fl_icmp_type, type); - __get_user(fl->fl_icmp_code, code); + get_user(fl->fl_icmp_code, code); probed = 1; } break;