summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-07-27 07:47:35 +0000
committerimp <imp@FreeBSD.org>2001-07-27 07:47:35 +0000
commit99e02098701c38804a815ecfa8ce48ab4bbb4c4a (patch)
treee20143c7284a600a77d852cbf3999798a019896c /sys/pccard
parentceb7dfdec7cadfd491953e01ff211c4ef16d9978 (diff)
downloadFreeBSD-src-99e02098701c38804a815ecfa8ce48ab4bbb4c4a.zip
FreeBSD-src-99e02098701c38804a815ecfa8ce48ab4bbb4c4a.tar.gz
Minor nits merged from my stable tree:
o kill blank line that I introduced in cardinfo.h o Delete unused variable wasinactive. o return 0 from pccard_resume. o Set the state and lastsate initially to be empty. o move comment above code for interrupt dispatching. o Powerstate interface is now available as of 430002, not 500000 (note that this change will be not 100% correct since the power state stuff didn't enter current until well after 500000, but it is good enough for the two branche we have going now).
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/cardinfo.h1
-rw-r--r--sys/pccard/pccard.c3
-rw-r--r--sys/pccard/pcic.c1
-rw-r--r--sys/pccard/pcic_isa.c2
-rw-r--r--sys/pccard/pcic_pci.c4
5 files changed, 5 insertions, 6 deletions
diff --git a/sys/pccard/cardinfo.h b/sys/pccard/cardinfo.h
index f31427e..3294bb3 100644
--- a/sys/pccard/cardinfo.h
+++ b/sys/pccard/cardinfo.h
@@ -93,7 +93,6 @@
* we were suspended. Others do not. We make no use of this functionality
* at this time.
*/
-
enum cardstate { noslot, empty, suspend, filled, inactive };
/*
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 274918d..d8187d6 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -166,8 +166,6 @@ disable_slot(struct slot *slt)
static void
disable_slot_to(struct slot *slt)
{
- int wasinactive;
-
disable_slot(slt);
if (slt->state == empty)
printf("pccard: card removed, slot %d\n", slt->slotnum);
@@ -704,4 +702,5 @@ pccard_resume(device_t dev)
struct slot *slt = PCCARD_DEVICE2SOFTC(dev);
slt->ctrl->resume(slt);
+ return (0);
}
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index 460f123..397ab63 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -349,6 +349,7 @@ pcic_attach(device_t dev)
/* Check for changes */
pcic_setb(sp, PCIC_POWER, PCIC_PCPWRE | PCIC_DISRST);
+ sp->slt->laststate = sp->slt->state = empty;
pcic_do_stat_delta(sp);
}
diff --git a/sys/pccard/pcic_isa.c b/sys/pccard/pcic_isa.c
index 4383e25..564e932 100644
--- a/sys/pccard/pcic_isa.c
+++ b/sys/pccard/pcic_isa.c
@@ -373,7 +373,7 @@ static int
pcicintr1(void *arg)
{
int slot, s;
- unsigned char chg;
+ u_int8_t chg;
struct pcic_softc *sc = (struct pcic_softc *) arg;
struct pcic_slot *sp = &sc->slots[0];
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 71575d2..f73a6bb 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -408,9 +408,9 @@ pcic_pci_intr(void *arg)
/* Ack the interrupt, all of them to be safe */
bus_space_write_4(sp->bst, sp->bsh, 0, 0xffffffff);
}
- stat = bus_space_read_4(sp->bst, sp->bsh, CB_SOCKET_STATE);
/* Now call children interrupts if any */
+ stat = bus_space_read_4(sp->bst, sp->bsh, CB_SOCKET_STATE);
if (sp->intr && (stat & CB_SS_CD) == 0)
sp->intr(sp->argp);
}
@@ -447,7 +447,7 @@ pcic_pci_probe(device_t dev)
return (ENXIO);
device_set_desc(dev, desc);
-#if __FreeBSD_version > 500000
+#if __FreeBSD_version >= 430002
/*
* Take us out of power down mode.
*/
OpenPOWER on IntegriCloud