summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcicvar.h
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-07-01 23:41:43 +0000
committerimp <imp@FreeBSD.org>2001-07-01 23:41:43 +0000
commitaef6e2616951d9fc086263ce8d8dd30f376642dd (patch)
treead67c4756014a02c1cc1214249bc91d5a639795c /sys/pccard/pcicvar.h
parent128e29a1c0dcf623dc5ad05b001664642932dbca (diff)
downloadFreeBSD-src-aef6e2616951d9fc086263ce8d8dd30f376642dd.zip
FreeBSD-src-aef6e2616951d9fc086263ce8d8dd30f376642dd.tar.gz
Some interrelated interrupt changes.
Frist, for pci slots, make the setup intr save the requested interrupt vector and arg and return rather than passing it up to our parent. On interrupts, we call this vector iff there's a card in the slot. This should eliminate some of the hangs or "weird" messages that people see when ejecting cards and also help close the race window somewhat. Reading the pci bus one more time for this information is judged to be an acceptible tradeoff since it is very very fast. Cleanup a little how we detect unsupported cards. Only detect unsupported cards (eg cardbus cards) on card insertion (or more pedantically when a card is actually present). This should allow us to change the message in the future to "cardbus card not supported with OLDCARD" :-). Note: We may also consider this for the ISA bus case, but there the reads are much more expensive and the location of the CD pin status lines appears to be less standardized. Also, the ISA management interrupt isn't shared with the card's interrupt. The mutliplex the CSC and function interrupts bit also appears to be non-standard (or at least not imlemented on all bridges).
Diffstat (limited to 'sys/pccard/pcicvar.h')
-rw-r--r--sys/pccard/pcicvar.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/pccard/pcicvar.h b/sys/pccard/pcicvar.h
index 9ffabe4..bd780c2 100644
--- a/sys/pccard/pcicvar.h
+++ b/sys/pccard/pcicvar.h
@@ -37,6 +37,8 @@ struct pcic_slot {
void (*putb)(struct pcic_slot *, int, u_char);
bus_space_tag_t bst;
bus_space_handle_t bsh;
+ driver_intr_t *intr;
+ void *argp;
};
enum pcic_irq_type { isa_parallel, pci_parallel, isa_serial };
@@ -50,7 +52,7 @@ struct pcic_softc
#define PCIC_PD_POWER 0x00000004 /* Uses CL-PD regs */
#define PCIC_VG_POWER 0x00000008 /* Uses VG power regs */
#define PCIC_KING_POWER 0x00000010 /* Uses IBM KING regs */
-#define PCIC_RICOH_POWER 0x00000020 /* Uses the ricoh power regs */
+#define PCIC_RICOH_POWER 0x0000020 /* Uses the ricoh power regs */
enum pcic_irq_type csc_route; /* How to route csc interrupts */
enum pcic_irq_type func_route; /* How to route function ints */
int iorid; /* Rid of I/O region */
OpenPOWER on IntegriCloud