Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix regression introduced in 1.72.
details: https://anonhg.NetBSD.org/src/rev/ef8eb38f6c9a
branches: trunk
changeset: 764014:ef8eb38f6c9a
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Apr 10 15:02:01 2011 +0000
description:
Fix regression introduced in 1.72.
(Attach arguments need to be copied before using the copy.)
diffstat:
sys/dev/pci/viaide.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r 29823680e18f -r ef8eb38f6c9a sys/dev/pci/viaide.c
--- a/sys/dev/pci/viaide.c Sun Apr 10 14:38:19 2011 +0000
+++ b/sys/dev/pci/viaide.c Sun Apr 10 15:02:01 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: viaide.c,v 1.72 2011/04/04 20:37:56 dyoung Exp $ */
+/* $NetBSD: viaide.c,v 1.73 2011/04/10 15:02:01 jakllsch Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.72 2011/04/04 20:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.73 2011/04/10 15:02:01 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -914,11 +914,14 @@
struct pciide_channel *cp;
struct ata_channel *wdc_cp;
struct wdc_regs *wdr;
- struct pci_attach_args pacopy, *pa = &pacopy;
- pcireg_t interface = PCI_INTERFACE(pa->pa_class);
+ struct pci_attach_args pacopy, *pa;
+ pcireg_t interface;
int channel;
pacopy = *pa0;
+ pa = &pacopy;
+ interface = PCI_INTERFACE(pa->pa_class);
+
if (via_sata_chip_map_common(sc, pa) == 0)
return;
@@ -986,14 +989,17 @@
struct pciide_channel *cp;
struct ata_channel *wdc_cp;
struct wdc_regs *wdr;
- struct pci_attach_args pacopy, *pa = &pacopy;
- pcireg_t interface = PCI_INTERFACE(pa->pa_class);
+ struct pci_attach_args pacopy, *pa;
+ pcireg_t interface;
int channel;
pci_intr_handle_t intrhandle;
const char *intrstr;
int i;
pacopy = *pa0;
+ pa = &pacopy;
+ interface = PCI_INTERFACE(pa->pa_class);
+
if (via_sata_chip_map_common(sc, pa) == 0)
return;
Home |
Main Index |
Thread Index |
Old Index