ispvar.h (316092) | ispvar.h (316145) |
---|---|
1/* $FreeBSD: stable/11/sys/dev/isp/ispvar.h 316092 2017-03-28 10:25:56Z mav $ */ | 1/* $FreeBSD: stable/11/sys/dev/isp/ispvar.h 316145 2017-03-29 15:42:35Z mav $ */ |
2/*- 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * --- 43 unchanged lines hidden (view full) --- 53#define ISP_CORE_VERSION_MAJOR 7 54#define ISP_CORE_VERSION_MINOR 0 55 56/* 57 * Vector for bus specific code to provide specific services. 58 */ 59typedef struct ispsoftc ispsoftc_t; 60struct ispmdvec { | 2/*- 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * --- 43 unchanged lines hidden (view full) --- 53#define ISP_CORE_VERSION_MAJOR 7 54#define ISP_CORE_VERSION_MINOR 0 55 56/* 57 * Vector for bus specific code to provide specific services. 58 */ 59typedef struct ispsoftc ispsoftc_t; 60struct ispmdvec { |
61 int (*dv_rd_isr) (ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); | 61 void (*dv_run_isr) (ispsoftc_t *); |
62 uint32_t (*dv_rd_reg) (ispsoftc_t *, int); 63 void (*dv_wr_reg) (ispsoftc_t *, int, uint32_t); 64 int (*dv_mbxdma) (ispsoftc_t *); 65 int (*dv_dmaset) (ispsoftc_t *, XS_T *, void *); 66 void (*dv_dmaclr) (ispsoftc_t *, XS_T *, uint32_t); 67 int (*dv_irqsetup) (ispsoftc_t *); 68 void (*dv_dregs) (ispsoftc_t *, const char *); 69 const void * dv_ispfw; /* ptr to f/w */ --- 10 unchanged lines hidden (view full) --- 80#endif 81#define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS) 82#define ISP_MAX_LUNS(isp) (isp)->isp_maxluns 83 84/* 85 * Macros to access ISP registers through bus specific layers- 86 * mostly wrappers to vector through the mdvec structure. 87 */ | 62 uint32_t (*dv_rd_reg) (ispsoftc_t *, int); 63 void (*dv_wr_reg) (ispsoftc_t *, int, uint32_t); 64 int (*dv_mbxdma) (ispsoftc_t *); 65 int (*dv_dmaset) (ispsoftc_t *, XS_T *, void *); 66 void (*dv_dmaclr) (ispsoftc_t *, XS_T *, uint32_t); 67 int (*dv_irqsetup) (ispsoftc_t *); 68 void (*dv_dregs) (ispsoftc_t *, const char *); 69 const void * dv_ispfw; /* ptr to f/w */ --- 10 unchanged lines hidden (view full) --- 80#endif 81#define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS) 82#define ISP_MAX_LUNS(isp) (isp)->isp_maxluns 83 84/* 85 * Macros to access ISP registers through bus specific layers- 86 * mostly wrappers to vector through the mdvec structure. 87 */ |
88#define ISP_READ_ISR(isp, isrp, semap, info) \ 89 (*(isp)->isp_mdvec->dv_rd_isr)(isp, isrp, semap, info) | 88#define ISP_RUN_ISR(isp) \ 89 (*(isp)->isp_mdvec->dv_run_isr)(isp) |
90 91#define ISP_READ(isp, reg) \ 92 (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg)) 93 94#define ISP_WRITE(isp, reg, val) \ 95 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), (val)) 96 97#define ISP_MBOXDMASETUP(isp) \ --- 441 unchanged lines hidden (view full) --- 539 540 541 uint32_t isp_confopts; /* config options */ 542 543 uint32_t isp_rqstinrp; /* register for REQINP */ 544 uint32_t isp_rqstoutrp; /* register for REQOUTP */ 545 uint32_t isp_respinrp; /* register for RESINP */ 546 uint32_t isp_respoutrp; /* register for RESOUTP */ | 90 91#define ISP_READ(isp, reg) \ 92 (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg)) 93 94#define ISP_WRITE(isp, reg, val) \ 95 (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), (val)) 96 97#define ISP_MBOXDMASETUP(isp) \ --- 441 unchanged lines hidden (view full) --- 539 540 541 uint32_t isp_confopts; /* config options */ 542 543 uint32_t isp_rqstinrp; /* register for REQINP */ 544 uint32_t isp_rqstoutrp; /* register for REQOUTP */ 545 uint32_t isp_respinrp; /* register for RESINP */ 546 uint32_t isp_respoutrp; /* register for RESOUTP */ |
547 548 /* 549 * Instrumentation 550 */ 551 uint64_t isp_intcnt; /* total int count */ 552 uint64_t isp_intbogus; /* spurious int count */ 553 uint64_t isp_intmboxc; /* mbox completions */ 554 uint64_t isp_intoasync; /* other async */ 555 uint64_t isp_rsltccmplt; /* CMDs on result q */ 556 uint64_t isp_fphccmplt; /* CMDs via fastpost */ 557 uint16_t isp_rscchiwater; 558 uint16_t isp_fpcchiwater; | |
559 NANOTIME_T isp_init_time; /* time were last initialized */ 560 561 /* 562 * Volatile state 563 */ 564 565 volatile u_int isp_mboxbsy; /* mailbox command active */ 566 volatile u_int isp_state; --- 241 unchanged lines hidden (view full) --- 808 809/* 810 * Shutdown hardware after use. 811 */ 812void isp_shutdown(ispsoftc_t *); 813 814/* 815 * Internal Interrupt Service Routine | 547 NANOTIME_T isp_init_time; /* time were last initialized */ 548 549 /* 550 * Volatile state 551 */ 552 553 volatile u_int isp_mboxbsy; /* mailbox command active */ 554 volatile u_int isp_state; --- 241 unchanged lines hidden (view full) --- 796 797/* 798 * Shutdown hardware after use. 799 */ 800void isp_shutdown(ispsoftc_t *); 801 802/* 803 * Internal Interrupt Service Routine |
816 * 817 * The outer layers do the spade work to get the appropriate status register, 818 * semaphore register and first mailbox register (if appropriate). This also 819 * means that most spurious/bogus interrupts not for us can be filtered first. | |
820 */ | 804 */ |
821void isp_intr(ispsoftc_t *, uint16_t, uint16_t, uint16_t); | 805#ifdef ISP_TARGET_MODE 806void isp_intr_atioq(ispsoftc_t *); 807#endif 808void isp_intr_async(ispsoftc_t *, uint16_t event); 809void isp_intr_mbox(ispsoftc_t *, uint16_t mbox0); 810void isp_intr_respq(ispsoftc_t *); |
822 823 824/* 825 * Command Entry Point- Platform Dependent layers call into this 826 */ 827int isp_start(XS_T *); 828 829/* these values are what isp_start returns */ --- 318 unchanged lines hidden --- | 811 812 813/* 814 * Command Entry Point- Platform Dependent layers call into this 815 */ 816int isp_start(XS_T *); 817 818/* these values are what isp_start returns */ --- 318 unchanged lines hidden --- |