• Home
  • Raw
  • Download

Lines Matching refs:scb_data

397 	return (ahc->scb_data->hscb_busaddr  in ahc_hscb_busaddr()
404 ahc_dmamap_sync(ahc, ahc->scb_data->hscb_dmat, in ahc_sync_scb()
405 ahc->scb_data->hscb_dmamap, in ahc_sync_scb()
416 ahc_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb->sg_map->sg_dmamap, in ahc_sync_sglist()
531 if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) { in ahc_get_scb()
533 scb = SLIST_FIRST(&ahc->scb_data->free_scbs); in ahc_get_scb()
537 SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle); in ahc_get_scb()
551 ahc->scb_data->scbindex[hscb->tag] = NULL; in ahc_free_scb()
555 SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle); in ahc_free_scb()
566 scb = ahc->scb_data->scbindex[tag]; in ahc_lookup_scb()
607 ahc->scb_data->scbindex[scb->hscb->tag] = scb; in ahc_swap_with_next_hscb()
658 offset = scb - ahc->scb_data->scbarray; in ahc_get_sense_buf()
659 return (&ahc->scb_data->sense[offset]); in ahc_get_sense_buf()
667 offset = scb - ahc->scb_data->scbarray; in ahc_get_sense_bufaddr()
668 return (ahc->scb_data->sense_busaddr in ahc_get_sense_bufaddr()
1488 ahc->scb_data->hscbs[scbptr].tag); in ahc_handle_seqint()
2743 for (i = 0; i < ahc->scb_data->maxhscbs; i++) { in ahc_update_pending_scbs()
4466 if (ahc->scb_data == NULL) { in ahc_softc_init()
4467 ahc->scb_data = kmalloc(sizeof(*ahc->scb_data), GFP_ATOMIC); in ahc_softc_init()
4468 if (ahc->scb_data == NULL) in ahc_softc_init()
4470 memset(ahc->scb_data, 0, sizeof(*ahc->scb_data)); in ahc_softc_init()
4732 for (i = 0; i < ahc->scb_data->maxhscbs; i++) { in ahc_build_free_scb_list()
4776 struct scb_data *scb_data; in ahc_init_scbdata() local
4778 scb_data = ahc->scb_data; in ahc_init_scbdata()
4779 SLIST_INIT(&scb_data->free_scbs); in ahc_init_scbdata()
4780 SLIST_INIT(&scb_data->sg_maps); in ahc_init_scbdata()
4783 scb_data->scbarray = kmalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC, GFP_ATOMIC); in ahc_init_scbdata()
4784 if (scb_data->scbarray == NULL) in ahc_init_scbdata()
4786 memset(scb_data->scbarray, 0, sizeof(struct scb) * AHC_SCB_MAX_ALLOC); in ahc_init_scbdata()
4790 scb_data->maxhscbs = ahc_probe_scbs(ahc); in ahc_init_scbdata()
4791 if (ahc->scb_data->maxhscbs == 0) { in ahc_init_scbdata()
4815 /*flags*/0, &scb_data->hscb_dmat) != 0) { in ahc_init_scbdata()
4819 scb_data->init_level++; in ahc_init_scbdata()
4822 if (ahc_dmamem_alloc(ahc, scb_data->hscb_dmat, in ahc_init_scbdata()
4823 (void **)&scb_data->hscbs, in ahc_init_scbdata()
4824 BUS_DMA_NOWAIT, &scb_data->hscb_dmamap) != 0) { in ahc_init_scbdata()
4828 scb_data->init_level++; in ahc_init_scbdata()
4831 ahc_dmamap_load(ahc, scb_data->hscb_dmat, scb_data->hscb_dmamap, in ahc_init_scbdata()
4832 scb_data->hscbs, in ahc_init_scbdata()
4834 ahc_dmamap_cb, &scb_data->hscb_busaddr, /*flags*/0); in ahc_init_scbdata()
4836 scb_data->init_level++; in ahc_init_scbdata()
4847 /*flags*/0, &scb_data->sense_dmat) != 0) { in ahc_init_scbdata()
4851 scb_data->init_level++; in ahc_init_scbdata()
4854 if (ahc_dmamem_alloc(ahc, scb_data->sense_dmat, in ahc_init_scbdata()
4855 (void **)&scb_data->sense, in ahc_init_scbdata()
4856 BUS_DMA_NOWAIT, &scb_data->sense_dmamap) != 0) { in ahc_init_scbdata()
4860 scb_data->init_level++; in ahc_init_scbdata()
4863 ahc_dmamap_load(ahc, scb_data->sense_dmat, scb_data->sense_dmamap, in ahc_init_scbdata()
4864 scb_data->sense, in ahc_init_scbdata()
4866 ahc_dmamap_cb, &scb_data->sense_busaddr, /*flags*/0); in ahc_init_scbdata()
4868 scb_data->init_level++; in ahc_init_scbdata()
4878 /*flags*/0, &scb_data->sg_dmat) != 0) { in ahc_init_scbdata()
4882 scb_data->init_level++; in ahc_init_scbdata()
4885 memset(scb_data->hscbs, 0, in ahc_init_scbdata()
4889 if (scb_data->numscbs == 0) { in ahc_init_scbdata()
4914 struct scb_data *scb_data; in ahc_fini_scbdata() local
4916 scb_data = ahc->scb_data; in ahc_fini_scbdata()
4917 if (scb_data == NULL) in ahc_fini_scbdata()
4920 switch (scb_data->init_level) { in ahc_fini_scbdata()
4926 while ((sg_map = SLIST_FIRST(&scb_data->sg_maps))!= NULL) { in ahc_fini_scbdata()
4927 SLIST_REMOVE_HEAD(&scb_data->sg_maps, links); in ahc_fini_scbdata()
4928 ahc_dmamap_unload(ahc, scb_data->sg_dmat, in ahc_fini_scbdata()
4930 ahc_dmamem_free(ahc, scb_data->sg_dmat, in ahc_fini_scbdata()
4935 ahc_dma_tag_destroy(ahc, scb_data->sg_dmat); in ahc_fini_scbdata()
4938 ahc_dmamap_unload(ahc, scb_data->sense_dmat, in ahc_fini_scbdata()
4939 scb_data->sense_dmamap); in ahc_fini_scbdata()
4941 ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense, in ahc_fini_scbdata()
4942 scb_data->sense_dmamap); in ahc_fini_scbdata()
4943 ahc_dmamap_destroy(ahc, scb_data->sense_dmat, in ahc_fini_scbdata()
4944 scb_data->sense_dmamap); in ahc_fini_scbdata()
4946 ahc_dma_tag_destroy(ahc, scb_data->sense_dmat); in ahc_fini_scbdata()
4948 ahc_dmamap_unload(ahc, scb_data->hscb_dmat, in ahc_fini_scbdata()
4949 scb_data->hscb_dmamap); in ahc_fini_scbdata()
4951 ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs, in ahc_fini_scbdata()
4952 scb_data->hscb_dmamap); in ahc_fini_scbdata()
4953 ahc_dmamap_destroy(ahc, scb_data->hscb_dmat, in ahc_fini_scbdata()
4954 scb_data->hscb_dmamap); in ahc_fini_scbdata()
4956 ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat); in ahc_fini_scbdata()
4961 if (scb_data->scbarray != NULL) in ahc_fini_scbdata()
4962 kfree(scb_data->scbarray); in ahc_fini_scbdata()
4968 struct scb_data *scb_data; in ahc_alloc_scbs() local
4976 scb_data = ahc->scb_data; in ahc_alloc_scbs()
4977 if (scb_data->numscbs >= AHC_SCB_MAX_ALLOC) in ahc_alloc_scbs()
4981 next_scb = &scb_data->scbarray[scb_data->numscbs]; in ahc_alloc_scbs()
4989 if (ahc_dmamem_alloc(ahc, scb_data->sg_dmat, in ahc_alloc_scbs()
4996 SLIST_INSERT_HEAD(&scb_data->sg_maps, sg_map, links); in ahc_alloc_scbs()
4998 ahc_dmamap_load(ahc, scb_data->sg_dmat, sg_map->sg_dmamap, in ahc_alloc_scbs()
5006 newcount = min(newcount, (AHC_SCB_MAX_ALLOC - scb_data->numscbs)); in ahc_alloc_scbs()
5031 next_scb->hscb = &scb_data->hscbs[scb_data->numscbs]; in ahc_alloc_scbs()
5032 next_scb->hscb->tag = ahc->scb_data->numscbs; in ahc_alloc_scbs()
5033 SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, in ahc_alloc_scbs()
5038 ahc->scb_data->numscbs++; in ahc_alloc_scbs()
5078 ahc->scb_data->maxhscbs, AHC_MAX_QUEUE); in ahc_controller_info()
5080 sprintf(buf, "%d SCBs", ahc->scb_data->maxhscbs); in ahc_controller_info()
5161 physaddr = ahc->scb_data->hscb_busaddr; in ahc_chip_init()
5406 if (ahc->scb_data->maxhscbs == 0) in ahc_init()
5429 if (ahc->scb_data->maxhscbs < AHC_SCB_MAX_ALLOC) { in ahc_init()
5984 ahc->scb_data->scbindex[scb->hscb->tag] = NULL; in ahc_search_qinfifo()
6010 if (scb_index >= ahc->scb_data->numscbs) { in ahc_search_qinfifo()
6013 scb_index, ahc->scb_data->numscbs); in ahc_search_qinfifo()
6196 if (scb_index >= ahc->scb_data->numscbs) { in ahc_search_disc_list()
6199 scb_index, ahc->scb_data->numscbs); in ahc_search_disc_list()
6422 for (i = 0; i < ahc->scb_data->maxhscbs; i++) { in ahc_abort_scbs()
7231 printk("\nSCB count = %d\n", ahc->scb_data->numscbs); in ahc_dump_card_state()
7289 for (i = 0; i < ahc->scb_data->maxhscbs; i++) { in ahc_dump_card_state()
7322 SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) { in ahc_dump_card_state()