/titanic_44/usr/src/uts/intel/io/dktp/hba/ghd/ |
H A D | ghd_dma.c | 31 ghd_dmafree_attr(gcmd_t *gcmdp) in ghd_dmafree_attr() argument 33 GDBG_DMA(("ghd_dma_attr_free: gcmdp 0x%p\n", (void *)gcmdp)); in ghd_dmafree_attr() 35 if (gcmdp->cmd_dma_handle != NULL) { in ghd_dmafree_attr() 36 if (ddi_dma_unbind_handle(gcmdp->cmd_dma_handle) != in ghd_dmafree_attr() 40 ddi_dma_free_handle(&gcmdp->cmd_dma_handle); in ghd_dmafree_attr() 42 (void *)gcmdp)); in ghd_dmafree_attr() 43 gcmdp->cmd_dma_handle = NULL; in ghd_dmafree_attr() 44 gcmdp->cmd_ccount = 0; in ghd_dmafree_attr() 45 gcmdp->cmd_totxfer = 0; in ghd_dmafree_attr() 52 gcmd_t *gcmdp, in ghd_dma_buf_bind_attr() argument [all …]
|
H A D | ghd.h | 138 #define GHD_GCMD_INIT(gcmdp, cmdp, gtgtp) \ argument 139 (L2_INIT(&(gcmdp)->cmd_q), \ 140 L2_INIT(&(gcmdp)->cmd_timer_link), \ 141 (gcmdp)->cmd_private = (cmdp), \ 142 (gcmdp)->cmd_gtgtp = (gtgtp) \ 293 void ghd_gcmd_free(gcmd_t *gcmdp); 345 #define GHD_COMPLETE(cccp, gcmpd) GHD_COMPLETE_INLINE(cccp, gcmdp) 346 #define GHD_TIMER_STOP(cccp, gcmdp) GHD_TIMER_STOP_INLINE(cccp, gcmdp) argument 347 #define GHD_DONEQ_PUT_HEAD(cccp, gcmdp) GHD_DONEQ_PUT_HEAD_INLINE(cccp, gcmdp) argument 348 #define GHD_DONEQ_PUT_TAIL(cccp, gcmdp) GHD_DONEQ_PUT_TAIL_INLINE(cccp, gcmdp) argument [all …]
|
H A D | ghd_timer.c | 98 #define GCMD_UPDATE_STATE(gcmdp, newstate) \ argument 100 if ((gcmdp)->cmd_state < (newstate)) { \ 101 ((gcmdp)->cmd_state = (newstate)); \ 176 gcmd_t *gcmdp; in ghd_timeout_loop() local 181 gcmdp = (gcmd_t *)L2_next(&cccp->ccc_activel); in ghd_timeout_loop() 182 while (gcmdp) { in ghd_timeout_loop() 186 if ((gcmdp->cmd_timeout > 0) && in ghd_timeout_loop() 187 (lbolt - gcmdp->cmd_start_time >= gcmdp->cmd_timeout)) { in ghd_timeout_loop() 190 gcmdp = (gcmd_t *)L2_next(&gcmdp->cmd_timer_link); in ghd_timeout_loop() 314 ghd_timer_newstate(ccc_t *cccp, gcmd_t *gcmdp, gtgt_t *gtgtp, in ghd_timer_newstate() argument [all …]
|
H A D | ghd_scsa.c | 71 gcmd_t *gcmdp = PKTP2GCMDP(pktp); in ghd_tran_sync_pkt() local 74 if (gcmdp->cmd_dma_handle) { in ghd_tran_sync_pkt() 75 status = ddi_dma_sync(gcmdp->cmd_dma_handle, 0, 0, in ghd_tran_sync_pkt() 76 (gcmdp->cmd_dma_flags & DDI_DMA_READ) ? in ghd_tran_sync_pkt() 97 gcmd_t *gcmdp; in ghd_pktalloc() local 114 gcmdp = &gwp->gwrap.gw_gcmd; in ghd_pktalloc() 116 ASSERT((caddr_t)gwp == (caddr_t)gcmdp); in ghd_pktalloc() 122 GHD_GCMD_INIT(gcmdp, (void *)(gwp + 1), gtgtp); in ghd_pktalloc() 127 gcmdp->cmd_pktp = pktp; in ghd_pktalloc() 135 if (!(*cccp->ccc_ccballoc)(gtgtp, gcmdp, cmdlen, statuslen, tgtlen, in ghd_pktalloc() [all …]
|
H A D | ghd_waitq.c | 201 gcmd_t *gcmdp; in ghd_waitq_shuffle_up() local 234 if ((gcmdp = L2_remove_head(&GDEV_QHEAD(gdevp))) == NULL) { in ghd_waitq_shuffle_up() 240 L2_add(&GHBA_QHEAD(cccp), &gcmdp->cmd_q, gcmdp); in ghd_waitq_shuffle_up() 242 gcmdp->cmd_waitq_level++; in ghd_waitq_shuffle_up() 244 (void *)gdevp, (void *)gcmdp)); in ghd_waitq_shuffle_up() 250 ghd_waitq_delete(ccc_t *cccp, gcmd_t *gcmdp) in ghd_waitq_delete() argument 252 gtgt_t *gtgtp = GCMDP2GTGTP(gcmdp); in ghd_waitq_delete() 269 switch (gcmdp->cmd_waitq_level) { in ghd_waitq_delete() 279 L2_delete(&gcmdp->cmd_q); in ghd_waitq_delete() 283 L2_delete(&gcmdp->cmd_q); in ghd_waitq_delete() [all …]
|
H A D | ghd.c | 96 ghd_complete(ccc_t *cccp, gcmd_t *gcmdp) in ghd_complete() argument 99 GHD_COMPLETE_INLINE(cccp, gcmdp); in ghd_complete() 111 ghd_doneq_put_head(ccc_t *cccp, gcmd_t *gcmdp) in ghd_doneq_put_head() argument 113 GHD_DONEQ_PUT_HEAD_INLINE(cccp, gcmdp) in ghd_doneq_put_head() 124 ghd_doneq_put_tail(ccc_t *cccp, gcmd_t *gcmdp) in ghd_doneq_put_tail() argument 126 GHD_DONEQ_PUT_TAIL_INLINE(cccp, gcmdp) in ghd_doneq_put_tail() 133 gcmd_t *gcmdp; in ghd_doneq_get() local 136 if ((gcmdp = L2_next(&cccp->ccc_doneq)) != NULL) in ghd_doneq_get() 137 L2_delete(&gcmdp->cmd_q); in ghd_doneq_get() 139 return (gcmdp); in ghd_doneq_get() [all …]
|
H A D | ghd_gcmd.c | 69 gcmd_t *gcmdp; in ghd_gcmd_alloc() local 87 gcmdp = &gwp->gwrap.gw.gcmd; in ghd_gcmd_alloc() 88 GHD_GCMD_INIT(gcmdp, (void *)(gwp + 1), gtgtp); in ghd_gcmd_alloc() 89 return (gcmdp); in ghd_gcmd_alloc() 99 ghd_gcmd_free(gcmd_t *gcmdp) in ghd_gcmd_free() argument 101 kmem_free(gcmdp, ((gw_t *)gcmdp)->glen); in ghd_gcmd_free()
|
H A D | ghd_dma.h | 41 int ghd_dmaget_attr(ccc_t *cccp, gcmd_t *gcmdp, long count, int sg_size, 44 int ghd_dma_buf_bind_attr(ccc_t *ccp, gcmd_t *gcmdp, struct buf *bp, 48 void ghd_dmafree_attr(gcmd_t *gcmdp); 50 uint_t ghd_dmaget_next_attr(ccc_t *cccp, gcmd_t *gcmdp, long max_transfer_cnt,
|
/titanic_44/usr/src/uts/sun/sys/dada/adapters/ghd/ |
H A D | ghd.h | 121 #define GHD_GCMD_INIT(gcmdp, cmdp, gtgtp) \ argument 122 (L2_INIT(&(gcmdp)->cmd_q), \ 123 L2_INIT(&(gcmdp)->cmd_timer_link), \ 124 (gcmdp)->cmd_private = (cmdp), \ 125 (gcmdp)->cmd_gtgtp = (gtgtp) \ 254 void ghd_gcmd_free(gcmd_t *gcmdp); 305 #define GHD_COMPLETE(cccp, gcmpd) GHD_COMPLETE_INLINE(cccp, gcmdp) 306 #define GHD_TIMER_STOP(cccp, gcmdp) GHD_TIMER_STOP_INLINE(cccp, gcmdp) argument 307 #define GHD_DONEQ_PUT(cccp, gcmdp) GHD_DONEQ_PUT_INLINE(cccp, gcmdp) argument 309 #define GHD_COMPLETE(cccp, gcmpd) ghd_complete(cccp, gcmdp) [all …]
|
/titanic_44/usr/src/uts/intel/io/dktp/controller/ata/ |
H A D | atapi.c | 816 gcmd_t *gcmdp, in atapi_ccballoc() argument 824 ata_pkt_t *ata_pktp = GCMD2APKT(gcmdp); in atapi_ccballoc() 829 ata_pktp->ap_gcmdp = gcmdp; in atapi_ccballoc() 875 gcmd_t *gcmdp = PKTP2GCMDP(spktp); in atapi_tran_destroy_pkt() local 879 if (gcmdp->cmd_dma_handle != NULL) { in atapi_tran_destroy_pkt() 880 ghd_dmafree_attr(gcmdp); in atapi_tran_destroy_pkt() 897 gcmd_t *gcmdp) in atapi_ccbfree() argument 917 gcmd_t *gcmdp = PKTP2GCMDP(spktp); in atapi_tran_dmafree() local 921 if (gcmdp->cmd_dma_handle != NULL) { in atapi_tran_dmafree() 922 ghd_dmafree_attr(gcmdp); in atapi_tran_dmafree() [all …]
|
H A D | ata_common.h | 535 #define GCMD2APKT(gcmdp) ((ata_pkt_t *)gcmdp->cmd_private) argument 555 #define GCMD2TGT(gcmdp) GTGTP2ATATGTP(GCMDP2GTGTP(gcmdp)) argument 560 #define GCMD2DRV(gcmdp) GTGTP2ATADRVP(GCMDP2GTGTP(gcmdp)) argument 704 void ata_pciide_dma_sg_func(gcmd_t *gcmdp, ddi_dma_cookie_t *dmackp,
|
H A D | ata_disk.c | 1241 gcmd_t *gcmdp = CPKT2GCMD(pktp); in ata_disk_do_ioctl() local 1242 ata_pkt_t *ata_pktp = GCMD2APKT(gcmdp); in ata_disk_do_ioctl() 1254 rc = ghd_transport(&ata_ctlp->ac_ccc, gcmdp, gcmdp->cmd_gtgtp, in ata_disk_do_ioctl() 1284 gcmd_t *gcmdp; in ata_disk_pktalloc() local 1292 if ((gcmdp = ghd_gcmd_alloc(gtgtp, in ata_disk_pktalloc() 1297 ASSERT(gcmdp != NULL); in ata_disk_pktalloc() 1299 ata_pktp = GCMD2APKT(gcmdp); in ata_disk_pktalloc() 1304 pktp->cp_ctl_private = (void *)gcmdp; in ata_disk_pktalloc() 1305 ata_pktp->ap_gcmdp = gcmdp; in ata_disk_pktalloc() 1306 gcmdp->cmd_pktp = (void *)pktp; in ata_disk_pktalloc() [all …]
|
H A D | atapi.h | 115 int atapi_ccballoc(gtgt_t *gtgtp, gcmd_t *gcmdp, int cmdlen, 117 void atapi_ccbfree(gcmd_t *gcmdp);
|
H A D | ata_common.c | 59 static int ata_hba_start(void *handle, gcmd_t *gcmdp); 60 static void ata_hba_complete(void *handle, gcmd_t *gcmdp, int do_callback); 61 static int ata_timeout_func(void *hba_handle, gcmd_t *gcmdp, 885 gcmd_t *gcmdp, in ata_hba_complete() argument 893 ata_drvp = GCMD2DRV(gcmdp); in ata_hba_complete() 894 ata_pktp = GCMD2APKT(gcmdp); in ata_hba_complete() 906 gcmd_t *gcmdp, in ata_timeout_func() argument 919 if (gcmdp != NULL) in ata_timeout_func() 920 ata_pktp = GCMD2APKT(gcmdp); in ata_timeout_func() 930 ghd_complete(&ata_ctlp->ac_ccc, gcmdp); in ata_timeout_func() [all …]
|
H A D | ata_dma.c | 272 gcmd_t *gcmdp, in ata_pciide_dma_sg_func() argument 277 ata_pkt_t *ata_pktp = GCMD2APKT(gcmdp); in ata_pciide_dma_sg_func() 286 gcmdp, dmackp, single_segment, seg_index)); in ata_pciide_dma_sg_func()
|
/titanic_44/usr/src/uts/sun/sys/dada/adapters/ |
H A D | atapi.h | 108 int atapi_ccballoc(gtgt_t *gtgtp, gcmd_t *gcmdp, int cmdlen, 110 void atapi_ccbfree(gcmd_t *gcmdp);
|