Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/cardbus Don't create the device's PCI tag with Cardb...
details: https://anonhg.NetBSD.org/src/rev/6d8db652b0f2
branches: trunk
changeset: 752421:6d8db652b0f2
user: dyoung <dyoung%NetBSD.org@localhost>
date: Thu Feb 25 20:36:31 2010 +0000
description:
Don't create the device's PCI tag with Cardbus_make_tag(9), but save and
use the tag found in the cardbus_attach_args. Compile-tested, only.
diffstat:
sys/dev/cardbus/com_cardbus.c | 6 +++---
sys/dev/cardbus/if_fxp_cardbus.c | 9 +++++----
sys/dev/cardbus/rbus_ppb.c | 7 +++----
sys/dev/cardbus/siisata_cardbus.c | 8 +++++---
4 files changed, 16 insertions(+), 14 deletions(-)
diffs (142 lines):
diff -r 8fc955fd621e -r 6d8db652b0f2 sys/dev/cardbus/com_cardbus.c
--- a/sys/dev/cardbus/com_cardbus.c Thu Feb 25 18:37:12 2010 +0000
+++ b/sys/dev/cardbus/com_cardbus.c Thu Feb 25 20:36:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com_cardbus.c,v 1.24 2010/02/24 19:52:51 dyoung Exp $ */
+/* $NetBSD: com_cardbus.c,v 1.25 2010/02/25 20:36:31 dyoung Exp $ */
/*
* Copyright (c) 2000 Johan Danielsson
@@ -40,7 +40,7 @@
updated below. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_cardbus.c,v 1.24 2010/02/24 19:52:51 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_cardbus.c,v 1.25 2010/02/25 20:36:31 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -212,7 +212,7 @@
sc->sc_dev = self;
csc->cc_ct = ca->ca_ct;
- csc->cc_tag = Cardbus_make_tag(csc->cc_ct);
+ csc->cc_tag = ca->ca_tag;
if(gofigure(ca, csc) != 0)
return;
diff -r 8fc955fd621e -r 6d8db652b0f2 sys/dev/cardbus/if_fxp_cardbus.c
--- a/sys/dev/cardbus/if_fxp_cardbus.c Thu Feb 25 18:37:12 2010 +0000
+++ b/sys/dev/cardbus/if_fxp_cardbus.c Thu Feb 25 20:36:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fxp_cardbus.c,v 1.42 2010/02/24 23:38:40 dyoung Exp $ */
+/* $NetBSD: if_fxp_cardbus.c,v 1.43 2010/02/25 20:36:31 dyoung Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.42 2010/02/24 23:38:40 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.43 2010/02/25 20:36:31 dyoung Exp $");
#include "opt_inet.h"
#include "rnd.h"
@@ -91,6 +91,7 @@
struct fxp_cardbus_softc {
struct fxp_softc sc;
cardbus_devfunc_t ct;
+ pcitag_t tag;
pcireg_t base0_reg;
pcireg_t base1_reg;
bus_size_t size;
@@ -133,6 +134,7 @@
sc->sc_dev = self;
csc->ct = ca->ca_ct;
+ csc->tag = ca->ca_tag;
/*
* Map control/status registers.
@@ -193,8 +195,7 @@
cardbus_function_tag_t cf = psc->sc_cf;
pcireg_t command;
- pcitag_t tag = cardbus_make_tag(cc, cf, csc->ct->ct_bus,
- csc->ct->ct_func);
+ pcitag_t tag = csc->tag;
command = Cardbus_conf_read(csc->ct, tag, CARDBUS_COMMAND_STATUS_REG);
if (csc->base0_reg) {
diff -r 8fc955fd621e -r 6d8db652b0f2 sys/dev/cardbus/rbus_ppb.c
--- a/sys/dev/cardbus/rbus_ppb.c Thu Feb 25 18:37:12 2010 +0000
+++ b/sys/dev/cardbus/rbus_ppb.c Thu Feb 25 20:36:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rbus_ppb.c,v 1.32 2010/02/24 19:52:52 dyoung Exp $ */
+/* $NetBSD: rbus_ppb.c,v 1.33 2010/02/25 20:36:31 dyoung Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.32 2010/02/24 19:52:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.33 2010/02/25 20:36:31 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -744,8 +744,7 @@
printf("ppb_cardbus_setup called\n");
#if 0
/* not sure what to do here */
- pcitag_t tag = cardbus_make_tag(cc, cf, csc->ct->ct_bus,
- csc->ct->ct_dev, csc->ct->ct_func);
+ pcitag_t tag = csc->sc_tag;
command = Cardbus_conf_read(csc->ct, tag, CARDBUS_COMMAND_STATUS_REG);
if (csc->base0_reg) {
diff -r 8fc955fd621e -r 6d8db652b0f2 sys/dev/cardbus/siisata_cardbus.c
--- a/sys/dev/cardbus/siisata_cardbus.c Thu Feb 25 18:37:12 2010 +0000
+++ b/sys/dev/cardbus/siisata_cardbus.c Thu Feb 25 20:36:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata_cardbus.c,v 1.6 2010/02/25 00:47:39 dyoung Exp $ */
+/* $NetBSD: siisata_cardbus.c,v 1.7 2010/02/25 20:36:31 dyoung Exp $ */
/* Id: siisata_pci.c,v 1.11 2008/05/21 16:20:11 jakllsch Exp */
/*
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata_cardbus.c,v 1.6 2010/02/25 00:47:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata_cardbus.c,v 1.7 2010/02/25 20:36:31 dyoung Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -73,6 +73,7 @@
cardbus_chipset_tag_t sc_cc;
cardbus_function_tag_t sc_cf;
cardbus_devfunc_t sc_ct;
+ pcitag_t sc_tag;
bus_size_t sc_grsize;
bus_size_t sc_prsize;
@@ -153,6 +154,7 @@
csc->sc_cc = cc;
csc->sc_cf = cf;
csc->sc_ct = ct;
+ csc->sc_tag = ca->ca_tag;
cardbus_devinfo(ca->ca_id, ca->ca_class, 0, devinfo, sizeof(devinfo));
aprint_naive(": SATA-II HBA\n");
@@ -269,7 +271,7 @@
struct cardbus_devfunc *ct = csc->sc_ct;
cardbus_chipset_tag_t cc = ct->ct_cc;
cardbus_function_tag_t cf = ct->ct_cf;
- pcitag_t ctag = cardbus_make_tag(cc, cf, cbsc->sc_bus, ct->ct_func);
+ pcitag_t ctag = csc->sc_tag;
int rv;
rv = siisata_detach(sc, flags);
Home |
Main Index |
Thread Index |
Old Index