o Remove 9 unnecessary includes.

o Add Vpp power at 5.0V rather than 0. Setting it to zero violates
  the pccard spec.  Most pcic devices in use today don't let us
  violate the spec, but some older ones do.  Bill Paul sent this to
  me a long time ago and I thought I'd commit it before now.
o Add some debug stuff hidden behind bootverbose.
This commit is contained in:
Warner Losh 2000-09-20 20:02:49 +00:00
parent e4b13c6df1
commit d186a392ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66142
3 changed files with 8 additions and 12 deletions

View File

@ -41,16 +41,11 @@
#include <sys/select.h>
#include <sys/sysctl.h>
#include <sys/conf.h>
#include <sys/module.h>
#include <sys/uio.h>
#include <sys/poll.h>
#include <sys/bus.h>
#include <machine/bus.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/icu.h>
#include <i386/isa/intr_machdep.h>
#include <pccard/cardinfo.h>
#include <pccard/driver.h>
#include <pccard/pcic.h>
@ -282,7 +277,7 @@ inserted(void *arg)
* Enable 5V to the card so that the CIS can be read.
*/
slt->pwr.vcc = 50;
slt->pwr.vpp = 0;
slt->pwr.vpp = 50;
/*
* Disable any pending timeouts for this slot, and explicitly

View File

@ -59,13 +59,10 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
#include <i386/isa/isa_device.h>
#include <pccard/cardinfo.h>
#include <pccard/slot.h>
#include <pccard/pccard_nbk.h>
#include <dev/pccard/pccardvar.h>
#include <net/ethernet.h>

View File

@ -41,9 +41,7 @@
#include <pccard/i82365.h>
#include <pccard/cardinfo.h>
#include <pccard/driver.h>
#include <pccard/slot.h>
#include <pccard/pcic.h>
/* Get pnp IDs */
#include <isa/isavar.h>
@ -499,6 +497,7 @@ pcic_attach(device_t dev)
int error;
struct pcic_slot *sp;
int i;
int stat;
SET_UNIT(dev, validunits);
sp = &pcic_slots[GET_UNIT(dev) * PCIC_CARD_SLOTS];
@ -552,7 +551,10 @@ pcic_attach(device_t dev)
setb(sp, PCIC_POWER, PCIC_PCPWRE| PCIC_DISRST);
if (sp->slt == NULL)
continue;
if ((sp->getb(sp, PCIC_STATUS) & PCIC_CD) != PCIC_CD) {
stat = sp->getb(sp, PCIC_STATUS);
if (bootverbose)
printf("stat is %x\n", stat);
if ((stat & PCIC_CD) != PCIC_CD) {
sp->slt->laststate = sp->slt->state = empty;
} else {
sp->slt->laststate = sp->slt->state = filled;
@ -772,6 +774,8 @@ pcicintr(void *arg)
s = splhigh();
for (slot = 0; slot < PCIC_CARD_SLOTS; slot++, sp++) {
if (sp->slt && (chg = sp->getb(sp, PCIC_STAT_CHG)) != 0) {
if (bootverbose)
printf("Slot %d chg = 0x%x\n", slot, chg);
if (chg & PCIC_CDTCH) {
if ((sp->getb(sp, PCIC_STATUS) & PCIC_CD) ==
PCIC_CD) {