Module Name:    src
Committed By:   uebayasi
Date:           Fri Oct 17 20:52:01 UTC 2014

Modified Files:
        src/sys/dev/cardbus: rbus_ppb.c

Log Message:
Fix i386 CARDBUS build.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/cardbus/rbus_ppb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/cardbus/rbus_ppb.c
diff -u src/sys/dev/cardbus/rbus_ppb.c:1.42 src/sys/dev/cardbus/rbus_ppb.c:1.43
--- src/sys/dev/cardbus/rbus_ppb.c:1.42	Thu Feb  2 19:43:02 2012
+++ src/sys/dev/cardbus/rbus_ppb.c	Fri Oct 17 20:52:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbus_ppb.c,v 1.42 2012/02/02 19:43:02 tls Exp $	*/
+/*	$NetBSD: rbus_ppb.c,v 1.43 2014/10/17 20:52:00 uebayasi 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.42 2012/02/02 19:43:02 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.43 2014/10/17 20:52:00 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -156,23 +156,14 @@ rbus_intr_fixup(pci_chipset_tag_t pc,
 void
 rbus_do_header_fixup(pci_chipset_tag_t pc, pcitag_t tag, void *context)
 {
-  int pin, irq;
   int bus, device, function;
-  pcireg_t intr, id;
+  pcireg_t intr;
   int *pline = (int *)context;
   int line = *pline;
 
   pci_decompose_tag(pc, tag, &bus, &device, &function);
-  id = pci_conf_read(pc, tag, PCI_ID_REG);
 
   intr = pci_conf_read(pc, tag, PCI_INTERRUPT_REG);
-  pin = PCI_INTERRUPT_PIN(intr);
-  irq = PCI_INTERRUPT_LINE(intr);
-
-#if 0
-  printf("do_header %02x:%02x:%02x pin=%d => line %d\n",
-	 bus, device, function, pin, line);
-#endif
 
   intr &= ~(PCI_INTERRUPT_LINE_MASK << PCI_INTERRUPT_LINE_SHIFT);
   intr |= (line << PCI_INTERRUPT_LINE_SHIFT);
@@ -532,7 +523,6 @@ rbus_do_phys_allocate(pci_chipset_tag_t 
 	struct cardbus_softc *sc     = rct->sc;
 	cardbus_function_t       *cf = sc->sc_cf;
 	rbus_tag_t          rbustag;
-	bus_space_tag_t     bustag;
 	bus_addr_t mask = size -1;
 	bus_addr_t base = 0;
 	bus_space_handle_t handle;
@@ -565,11 +555,9 @@ rbus_do_phys_allocate(pci_chipset_tag_t 
 	}
 
 	if(PCI_MAPREG_TYPE(type) == PCI_MAPREG_TYPE_IO) {
-	  bustag  = sc->sc_iot;
 	  rbustag = rct->iobustags[bus];
 	  bustype = "io";
 	} else {
-	  bustag  = sc->sc_memt;
 	  rbustag = rct->membustags[bus];
 	  bustype = "mem";
 	}
@@ -630,16 +618,10 @@ ppb_cardbus_attach(device_t parent, devi
 	struct pcibus_attach_args pba;
 	char devinfo[256];
 	pcireg_t busdata;
-	int mybus, rv;
-	u_int16_t pciirq;
 	int minbus, maxbus;
 
 	csc->sc_dev = self;
 
-	mybus = ct->ct_bus;
-	pciirq = 0;
-	rv = 0;
-
 	pci_devinfo(ca->ca_id, ca->ca_class, 0, devinfo, sizeof(devinfo));
 	printf(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(ca->ca_class));
 

Reply via email to