]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/aic7xxx-leaves-timer-running-on-init-failure
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / aic7xxx-leaves-timer-running-on-init-failure
1 From: Hannes Reinecke <hare@suse.de>
2 Date: Wed, 25 Mar 2009 11:18:16 +0100
3 Subject: aic7xxx leaves timer running on init failure
4 References: bnc#469576
5
6 aic79xx leaves timers inserted when ahd_init() (which inserts
7 two timers at its very end) succeeds but ahd_pci_map_int()
8 fails. In this case ahd->init_level gets incremented to 5 only
9 when that function succeeds, but ahd_free() calls ahd_shutdown()
10 only when ahd->init_level == 5, and ahd_shutdown() is where the
11 timers get removed. Since the freeing of the IRQ is not controlled
12 by ahd->init_level, we should increment init_level prior to
13 calling ahd_pci_map_int().
14
15 Reported-by: Jan Beulich <jbeulich@novell.com>
16 Signed-off-by: Hannes Reinecke <hare@suse.de>
17 ---
18 drivers/scsi/aic7xxx/aic79xx_pci.c | 6 ++----
19 drivers/scsi/aic7xxx/aic7xxx_pci.c | 8 ++------
20 2 files changed, 4 insertions(+), 10 deletions(-)
21
22 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c
23 +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c
24 @@ -379,14 +379,12 @@ ahd_pci_config(struct ahd_softc *ahd, co
25 error = ahd_init(ahd);
26 if (error != 0)
27 return (error);
28 + ahd->init_level++;
29
30 /*
31 * Allow interrupts now that we are completely setup.
32 */
33 - error = ahd_pci_map_int(ahd);
34 - if (!error)
35 - ahd->init_level++;
36 - return error;
37 + return ahd_pci_map_int(ahd);
38 }
39
40 #ifdef CONFIG_PM
41 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c
42 +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c
43 @@ -960,16 +960,12 @@ ahc_pci_config(struct ahc_softc *ahc, co
44 error = ahc_init(ahc);
45 if (error != 0)
46 return (error);
47 + ahc->init_level++;
48
49 /*
50 * Allow interrupts now that we are completely setup.
51 */
52 - error = ahc_pci_map_int(ahc);
53 - if (error != 0)
54 - return (error);
55 -
56 - ahc->init_level++;
57 - return (0);
58 + return ahc_pci_map_int(ahc);
59 }
60
61 /*