]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-small_fixes.patch
- legacy pme as module option and not hardcodes (so by default we match upstream...
[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 From: Stephen Hemminger <shemminger@vyatta.com>
15
16 Some BIOS's don't setup power management correctly (what else is
17 new) and don't allow use of PCI Express power control. Add a special
18 exception module parameter to allow working around this issue.
19 Based on slightly different patch by Knut Petersen.
20
21 Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
22 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
23 ---
24 Patch against -net (ie. 3.3.0)
25
26 --- a/drivers/net/ethernet/marvell/sky2.c       2012-01-10 10:56:56.855156017 -0800
27 +++ b/drivers/net/ethernet/marvell/sky2.c       2012-03-21 08:25:52.400929532 -0700
28 @@ -95,6 +95,10 @@ static int disable_msi = 0;
29  module_param(disable_msi, int, 0);
30  MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
31  
32 +static int legacy_pme = 0;
33 +module_param(legacy_pme, int, 0);
34 +MODULE_PARM_DESC(legacy_pme, "Legacy power management");
35 +
36  static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
37         { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
38         { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
39 @@ -867,6 +871,13 @@ static void sky2_wol_init(struct sky2_po
40         /* Disable PiG firmware */
41         sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF);
42  
43 +       /* Needed by some broken BIOSes, use PCI rather than PCI-e for WOL */
44 +       if (legacy_pme) {
45 +               u32 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
46 +               reg1 |= PCI_Y2_PME_LEGACY;
47 +               sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
48 +       }
49 +
50         /* block receiver */
51         sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
52         sky2_read32(hw, B0_CTST);
53
54
55 The RCU problem is likely to be a separate issue.  It might even be a 
56 result of the use-after-free problem with the elevator.
57
58 At any rate, it's clear that the crash in the refcounting log you
59 posted occurred because scsi_setup_blk_pc_cmnd() called
60 scsi_prep_state_check(), which tried to dereference the NULL pointer.
61
62 Would you like to try this patch to see if it fixes the problem?  As I 
63 said before, I'm not certain it's the best thing to do, but it worked 
64 on my system.
65
66 Alan Stern
67
68
69 Index: usb-3.0/drivers/scsi/scsi_lib.c
70 ===================================================================
71 --- usb-3.0.orig/drivers/scsi/scsi_lib.c
72 +++ usb-3.0/drivers/scsi/scsi_lib.c
73 @@ -1247,6 +1247,8 @@ int scsi_prep_fn(struct request_queue *q
74         struct scsi_device *sdev = q->queuedata;
75         int ret = BLKPREP_KILL;
76  
77 +       if (!sdev)
78 +               return ret;
79         if (req->cmd_type == REQ_TYPE_BLOCK_PC)
80                 ret = scsi_setup_blk_pc_cmnd(sdev, req);
81         return scsi_prep_return(q, req, ret);
82 Index: usb-3.0/drivers/scsi/scsi_sysfs.c
83 ===================================================================
84 --- usb-3.0.orig/drivers/scsi/scsi_sysfs.c
85 +++ usb-3.0/drivers/scsi/scsi_sysfs.c
86 @@ -322,6 +322,8 @@ static void scsi_device_dev_release_user
87                 kfree(evt);
88         }
89  
90 +       /* Freeing the queue signals to block that we're done */
91 +       scsi_free_queue(sdev->request_queue);
92         blk_put_queue(sdev->request_queue);
93         /* NULL queue means the device can't be used */
94         sdev->request_queue = NULL;
95 @@ -936,8 +938,6 @@ void __scsi_remove_device(struct scsi_de
96         /* cause the request function to reject all I/O requests */
97         sdev->request_queue->queuedata = NULL;
98  
99 -       /* Freeing the queue signals to block that we're done */
100 -       scsi_free_queue(sdev->request_queue);
101         put_device(dev);
102  }
103  
104
105
106 --
107 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
108 the body of a message to majordomo@vger.kernel.org
109 More majordomo info at  http://vger.kernel.org/majordomo-info.html
110 Please read the FAQ at  http://www.tux.org/lkml/
111 --- linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh~       2011-07-22 04:17:23.000000000 +0200
112 +++ linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh        2011-08-25 21:26:04.799150642 +0200
113 @@ -9,6 +9,12 @@
114                         $cc -print-file-name=lib${lib}.${ext} | grep -q /
115                         if [ $? -eq 0 ]; then
116                                 echo "-l${lib}"
117 +                               for libt in tinfow tinfo ; do
118 +                                       $cc -print-file-name=lib${libt}.${ext} | grep -q /
119 +                                       if [ $? -eq 0 ]; then
120 +                                               echo "-l${libt}"
121 +                                       fi
122 +                               done
123                                 exit
124                         fi
125                 done
126
127
128
129
This page took 0.043816 seconds and 4 git commands to generate.