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