1 #define UHA_MSCP_MAX 32 /* store up to 32 MSCPs at one time */ 2 #define MSCP_HASH_SIZE 32 /* hash table size for phystokv */ 3 #define MSCP_HASH_SHIFT 9 4 #define MSCP_HASH(x) ((((long)(x))>>MSCP_HASH_SHIFT) & (MSCP_HASH_SIZE - 1)) 5 6 struct uha_softc { 7 struct device sc_dev; 8 bus_chipset_tag_t sc_bc; 9 10 bus_io_handle_t sc_ioh; 11 int sc_irq, sc_drq; 12 void *sc_ih; 13 14 void (*start_mbox) __P((struct uha_softc *, struct uha_mscp *)); 15 int (*poll) __P((struct uha_softc *, struct scsi_xfer *, int)); 16 void (*init) __P((struct uha_softc *)); 17 18 struct uha_mscp *sc_mscphash[MSCP_HASH_SIZE]; 19 TAILQ_HEAD(, uha_mscp) sc_free_mscp; 20 int sc_nummscps; 21 int sc_scsi_dev; /* our scsi id */ 22 struct scsi_link sc_link; 23 }; 24 25 void uha_attach __P((struct uha_softc *)); 26 void uha_timeout __P((void *arg)); 27 struct uha_mscp *uha_mscp_phys_kv __P((struct uha_softc *, u_long)); 28 void uha_done __P((struct uha_softc *, struct uha_mscp *)); 29