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).
This commit is contained in:
parent
53286eb3f2
commit
ebea20aed7
@ -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 };
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user