]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-small_fixes.patch
- fix problems like 'unregister_netdevice: waiting for tap0 to become free. Usage...
[packages/kernel.git] / kernel-small_fixes.patch
1 --- linux-2.6.33/scripts/mod/modpost.c~ 2010-02-24 19:52:17.000000000 +0100
2 +++ linux-2.6.33/scripts/mod/modpost.c  2010-03-07 14:26:47.242168558 +0100
3 @@ -15,7 +15,8 @@
4  #include <stdio.h>
5  #include <ctype.h>
6  #include "modpost.h"
7 -#include "../../include/generated/autoconf.h"
8 +// PLD architectures don't use CONFIG_SYMBOL_PREFIX
9 +//#include "../../include/generated/autoconf.h"
10  #include "../../include/linux/license.h"
11  
12  /* Some toolchains use a `_' prefix for all user symbols. */
13
14 --- linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh~       2011-07-22 04:17:23.000000000 +0200
15 +++ linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh        2011-08-25 21:26:04.799150642 +0200
16 @@ -9,6 +9,12 @@
17                         $cc -print-file-name=lib${lib}.${ext} | grep -q /
18                         if [ $? -eq 0 ]; then
19                                 echo "-l${lib}"
20 +                               for libt in tinfow tinfo ; do
21 +                                       $cc -print-file-name=lib${libt}.${ext} | grep -q /
22 +                                       if [ $? -eq 0 ]; then
23 +                                               echo "-l${libt}"
24 +                                       fi
25 +                               done
26                                 exit
27                         fi
28                 done
29
30 diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
31 index 7a0c800..ec5ebbb 100644
32 --- a/drivers/net/ethernet/realtek/r8169.c
33 +++ b/drivers/net/ethernet/realtek/r8169.c
34 @@ -6927,6 +6927,14 @@ rtl_init_one(struct pci_dev *pdev, const
35         for (i = 0; i < ETH_ALEN; i++)
36                 dev->dev_addr[i] = RTL_R8(MAC0 + i);
37  
38 +       if (!is_valid_ether_addr(dev->dev_addr)) {
39 +               /* Report it and use a random ethernet address instead */
40 +               netdev_err(dev, "Invalid MAC address: %pM\n", dev->dev_addr);
41 +               random_ether_addr(dev->dev_addr);
42 +               netdev_info(dev, "Using random MAC address: %pM\n",
43 +                               dev->dev_addr);
44 +       }
45 +
46         SET_ETHTOOL_OPS(dev, &rtl8169_ethtool_ops);
47         dev->watchdog_timeo = RTL8169_TX_TIMEOUT;
48  
49 commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
50 Author: Neil Horman <nhorman@tuxdriver.com>
51 Date:   Tue Apr 16 16:38:32 2013 -0400
52
53     iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
54     
55     A few years back intel published a spec update:
56     http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
57     
58     For the 5520 and 5500 chipsets which contained an errata (specificially errata
59     53), which noted that these chipsets can't properly do interrupt remapping, and
60     as a result the recommend that interrupt remapping be disabled in bios.  While
61     many vendors have a bios update to do exactly that, not all do, and of course
62     not all users update their bios to a level that corrects the problem.  As a
63     result, occasionally interrupts can arrive at a cpu even after affinity for that
64     interrupt has be moved, leading to lost or spurrious interrupts (usually
65     characterized by the message:
66     kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)
67     
68     There have been several incidents recently of people seeing this error, and
69     investigation has shown that they have system for which their BIOS level is such
70     that this feature was not properly turned off.  As such, it would be good to
71     give them a reminder that their systems are vulnurable to this problem.  For
72     details of those that reported the problem, please see:
73     https://bugzilla.redhat.com/show_bug.cgi?id=887006
74     
75     [ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]
76     
77     Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
78     CC: Prarit Bhargava <prarit@redhat.com>
79     CC: Don Zickus <dzickus@redhat.com>
80     CC: Don Dutile <ddutile@redhat.com>
81     CC: Bjorn Helgaas <bhelgaas@google.com>
82     CC: Asit Mallick <asit.k.mallick@intel.com>
83     CC: David Woodhouse <dwmw2@infradead.org>
84     CC: linux-pci@vger.kernel.org
85     CC: Joerg Roedel <joro@8bytes.org>
86     CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
87     CC: Arkadiusz Miƛkiewicz <arekm@maven.pl>
88     Signed-off-by: Joerg Roedel <joro@8bytes.org>
89
90 diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
91 index 95fd352..aca6aa2 100644
92 --- a/arch/x86/include/asm/irq_remapping.h
93 +++ b/arch/x86/include/asm/irq_remapping.h
94 @@ -28,6 +28,7 @@
95  
96  extern void setup_irq_remapping_ops(void);
97  extern int irq_remapping_supported(void);
98 +extern void set_irq_remapping_broken(void);
99  extern int irq_remapping_prepare(void);
100  extern int irq_remapping_enable(void);
101  extern void irq_remapping_disable(void);
102 @@ -54,6 +55,7 @@ void irq_remap_modify_chip_defaults(struct irq_chip *chip);
103  
104  static inline void setup_irq_remapping_ops(void) { }
105  static inline int irq_remapping_supported(void) { return 0; }
106 +static inline void set_irq_remapping_broken(void) { }
107  static inline int irq_remapping_prepare(void) { return -ENODEV; }
108  static inline int irq_remapping_enable(void) { return -ENODEV; }
109  static inline void irq_remapping_disable(void) { }
110 diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
111 index 3755ef4..94ab6b9 100644
112 --- a/arch/x86/kernel/early-quirks.c
113 +++ b/arch/x86/kernel/early-quirks.c
114 @@ -18,6 +18,7 @@
115  #include <asm/apic.h>
116  #include <asm/iommu.h>
117  #include <asm/gart.h>
118 +#include <asm/irq_remapping.h>
119  
120  static void __init fix_hypertransport_config(int num, int slot, int func)
121  {
122 @@ -192,6 +193,21 @@ static void __init ati_bugs_contd(int num, int slot, int func)
123  }
124  #endif
125  
126 +static void __init intel_remapping_check(int num, int slot, int func)
127 +{
128 +       u8 revision;
129 +
130 +       revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
131 +
132 +       /*
133 +        * Revision 0x13 of this chipset supports irq remapping
134 +        * but has an erratum that breaks its behavior, flag it as such
135 +        */
136 +       if (revision == 0x13)
137 +               set_irq_remapping_broken();
138 +
139 +}
140 +
141  #define QFLAG_APPLY_ONCE       0x1
142  #define QFLAG_APPLIED          0x2
143  #define QFLAG_DONE             (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
144 @@ -221,6 +237,10 @@ static struct chipset early_qrk[] __initdata = {
145           PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
146         { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
147           PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
148 +       { PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST,
149 +         PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
150 +       { PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
151 +         PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
152         {}
153  };
154  
155 diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
156 index f3b8f23..5b19b2d 100644
157 --- a/drivers/iommu/intel_irq_remapping.c
158 +++ b/drivers/iommu/intel_irq_remapping.c
159 @@ -524,6 +524,16 @@ static int __init intel_irq_remapping_supported(void)
160  
161         if (disable_irq_remap)
162                 return 0;
163 +       if (irq_remap_broken) {
164 +               WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
165 +                          "This system BIOS has enabled interrupt remapping\n"
166 +                          "on a chipset that contains an erratum making that\n"
167 +                          "feature unstable.  To maintain system stability\n"
168 +                          "interrupt remapping is being disabled.  Please\n"
169 +                          "contact your BIOS vendor for an update\n");
170 +               disable_irq_remap = 1;
171 +               return 0;
172 +       }
173  
174         if (!dmar_ir_support())
175                 return 0;
176 diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
177 index d56f8c1..3c11043 100644
178 --- a/drivers/iommu/irq_remapping.c
179 +++ b/drivers/iommu/irq_remapping.c
180 @@ -19,6 +19,7 @@
181  int irq_remapping_enabled;
182  
183  int disable_irq_remap;
184 +int irq_remap_broken;
185  int disable_sourceid_checking;
186  int no_x2apic_optout;
187  
188 @@ -211,6 +212,11 @@ void __init setup_irq_remapping_ops(void)
189  #endif
190  }
191  
192 +void set_irq_remapping_broken(void)
193 +{
194 +       irq_remap_broken = 1;
195 +}
196 +
197  int irq_remapping_supported(void)
198  {
199         if (disable_irq_remap)
200 diff --git a/drivers/iommu/irq_remapping.h b/drivers/iommu/irq_remapping.h
201 index ecb6376..90c4dae 100644
202 --- a/drivers/iommu/irq_remapping.h
203 +++ b/drivers/iommu/irq_remapping.h
204 @@ -32,6 +32,7 @@ struct pci_dev;
205  struct msi_msg;
206  
207  extern int disable_irq_remap;
208 +extern int irq_remap_broken;
209  extern int disable_sourceid_checking;
210  extern int no_x2apic_optout;
211  extern int irq_remapping_enabled;
212 @@ -89,6 +90,7 @@ extern struct irq_remap_ops amd_iommu_irq_ops;
213  
214  #define irq_remapping_enabled 0
215  #define disable_irq_remap     1
216 +#define irq_remap_broken      0
217  
218  #endif /* CONFIG_IRQ_REMAP */
219  
220 From patchwork Mon Jun  3 08:16:21 2013
221 Content-Type: text/plain; charset="utf-8"
222 MIME-Version: 1.0
223 Content-Transfer-Encoding: 7bit
224 Subject: ipv6: assign rt6_info to inet6_ifaddr in init_loopback
225 Date: Sun, 02 Jun 2013 22:16:21 -0000
226 From: Gao feng <gaofeng@cn.fujitsu.com>
227 X-Patchwork-Id: 248198
228 Message-Id: <1370247381-3091-1-git-send-email-gaofeng@cn.fujitsu.com>
229 To: davem@davemloft.net, yoshfuji@linux-ipv6.org
230 Cc: netdev@vger.kernel.org, jasowang@redhat.com,
231  kumaran.4353@gmail.com, Maruthi.Thotad@ap.sony.com,
232  Gao feng <gaofeng@cn.fujitsu.com>
233
234 Commit 25fb6ca4ed9cad72f14f61629b68dc03c0d9713f
235 "net IPv6 : Fix broken IPv6 routing table after loopback down-up"
236 forgot to assign rt6_info to the inet6_ifaddr.
237 When disable the net device, the rt6_info which allocated
238 in init_loopback will not be destroied in __ipv6_ifa_notify.
239
240 This will trigger the waring message below
241 [23527.916091] unregister_netdevice: waiting for tap0 to become free. Usage count = 1
242
243 Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
244 Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
245
246 ---
247 net/ipv6/addrconf.c | 4 +++-
248  1 file changed, 3 insertions(+), 1 deletion(-)
249
250 diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
251 index d1b2d80..1bbf744 100644
252 --- a/net/ipv6/addrconf.c
253 +++ b/net/ipv6/addrconf.c
254 @@ -2658,8 +2658,10 @@ static void init_loopback(struct net_device *dev)
255                         sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0);
256  
257                         /* Failure cases are ignored */
258 -                       if (!IS_ERR(sp_rt))
259 +                       if (!IS_ERR(sp_rt)) {
260 +                               sp_ifa->rt = sp_rt;
261                                 ip6_ins_rt(sp_rt);
262 +                       }
263                 }
264                 read_unlock_bh(&idev->lock);
265         }
This page took 0.153545 seconds and 4 git commands to generate.