bt.c (47432) | bt.c (49860) |
---|---|
1/* 2 * Generic driver for the BusLogic MultiMaster SCSI host adapters 3 * Product specific probe and attach routines can be found in: 4 * i386/isa/bt_isa.c BT-54X, BT-445 cards 5 * i386/eisa/bt_eisa.c BT-74x, BT-75x cards 6 * pci/bt_pci.c BT-946, BT-948, BT-956, BT-958 cards 7 * 8 * Copyright (c) 1998, 1999 Justin T. Gibbs. --- 15 unchanged lines hidden (view full) --- 24 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Generic driver for the BusLogic MultiMaster SCSI host adapters 3 * Product specific probe and attach routines can be found in: 4 * i386/isa/bt_isa.c BT-54X, BT-445 cards 5 * i386/eisa/bt_eisa.c BT-74x, BT-75x cards 6 * pci/bt_pci.c BT-946, BT-948, BT-956, BT-958 cards 7 * 8 * Copyright (c) 1998, 1999 Justin T. Gibbs. --- 15 unchanged lines hidden (view full) --- 24 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $Id: bt.c,v 1.21 1999/05/08 21:59:00 dfr Exp $ | 32 * $Id: bt.c,v 1.22 1999/05/23 18:54:34 gibbs Exp $ |
33 */ 34 35 /* 36 * Special thanks to Leonard N. Zubkoff for writing such a complete and 37 * well documented Mylex/BusLogic MultiMaster driver for Linux. Support 38 * in this driver for the wide range of MultiMaster controllers and 39 * firmware revisions, with their otherwise undocumented quirks, would not 40 * have been possible without his efforts. --- 661 unchanged lines hidden (view full) --- 702 * need to perform during normal operation. 703 * 704 * Unless we need to further restrict the allocation, we rely 705 * on the restrictions of the parent dmat, hence the common 706 * use of MAXADDR and MAXSIZE. 707 */ 708 709 /* DMA tag for mapping buffers into device visible space. */ | 33 */ 34 35 /* 36 * Special thanks to Leonard N. Zubkoff for writing such a complete and 37 * well documented Mylex/BusLogic MultiMaster driver for Linux. Support 38 * in this driver for the wide range of MultiMaster controllers and 39 * firmware revisions, with their otherwise undocumented quirks, would not 40 * have been possible without his efforts. --- 661 unchanged lines hidden (view full) --- 702 * need to perform during normal operation. 703 * 704 * Unless we need to further restrict the allocation, we rely 705 * on the restrictions of the parent dmat, hence the common 706 * use of MAXADDR and MAXSIZE. 707 */ 708 709 /* DMA tag for mapping buffers into device visible space. */ |
710 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/0, /*boundary*/0, | 710 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/1, /*boundary*/0, |
711 /*lowaddr*/BUS_SPACE_MAXADDR, 712 /*highaddr*/BUS_SPACE_MAXADDR, 713 /*filter*/NULL, /*filterarg*/NULL, 714 /*maxsize*/MAXBSIZE, /*nsegments*/BT_NSEG, 715 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 716 /*flags*/BUS_DMA_ALLOCNOW, 717 &bt->buffer_dmat) != 0) { 718 goto error_exit; 719 } 720 721 bt->init_level++; 722 /* DMA tag for our mailboxes */ | 711 /*lowaddr*/BUS_SPACE_MAXADDR, 712 /*highaddr*/BUS_SPACE_MAXADDR, 713 /*filter*/NULL, /*filterarg*/NULL, 714 /*maxsize*/MAXBSIZE, /*nsegments*/BT_NSEG, 715 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 716 /*flags*/BUS_DMA_ALLOCNOW, 717 &bt->buffer_dmat) != 0) { 718 goto error_exit; 719 } 720 721 bt->init_level++; 722 /* DMA tag for our mailboxes */ |
723 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/0, /*boundary*/0, | 723 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/1, /*boundary*/0, |
724 /*lowaddr*/BUS_SPACE_MAXADDR, 725 /*highaddr*/BUS_SPACE_MAXADDR, 726 /*filter*/NULL, /*filterarg*/NULL, 727 bt->num_boxes * (sizeof(bt_mbox_in_t) 728 + sizeof(bt_mbox_out_t)), 729 /*nsegments*/1, 730 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 731 /*flags*/0, &bt->mailbox_dmat) != 0) { --- 19 unchanged lines hidden (view full) --- 751 752 bt->init_level++; 753 754 bt->in_boxes = (bt_mbox_in_t *)&bt->out_boxes[bt->num_boxes]; 755 756 btinitmboxes(bt); 757 758 /* DMA tag for our ccb structures */ | 724 /*lowaddr*/BUS_SPACE_MAXADDR, 725 /*highaddr*/BUS_SPACE_MAXADDR, 726 /*filter*/NULL, /*filterarg*/NULL, 727 bt->num_boxes * (sizeof(bt_mbox_in_t) 728 + sizeof(bt_mbox_out_t)), 729 /*nsegments*/1, 730 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 731 /*flags*/0, &bt->mailbox_dmat) != 0) { --- 19 unchanged lines hidden (view full) --- 751 752 bt->init_level++; 753 754 bt->in_boxes = (bt_mbox_in_t *)&bt->out_boxes[bt->num_boxes]; 755 756 btinitmboxes(bt); 757 758 /* DMA tag for our ccb structures */ |
759 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/0, /*boundary*/0, | 759 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/1, /*boundary*/0, |
760 /*lowaddr*/BUS_SPACE_MAXADDR, 761 /*highaddr*/BUS_SPACE_MAXADDR, 762 /*filter*/NULL, /*filterarg*/NULL, 763 bt->max_ccbs * sizeof(struct bt_ccb), 764 /*nsegments*/1, 765 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 766 /*flags*/0, &bt->ccb_dmat) != 0) { 767 goto error_exit; --- 13 unchanged lines hidden (view full) --- 781 bus_dmamap_load(bt->ccb_dmat, bt->ccb_dmamap, 782 bt->bt_ccb_array, 783 bt->max_ccbs * sizeof(struct bt_ccb), 784 btmapccbs, bt, /*flags*/0); 785 786 bt->init_level++; 787 788 /* DMA tag for our S/G structures. We allocate in page sized chunks */ | 760 /*lowaddr*/BUS_SPACE_MAXADDR, 761 /*highaddr*/BUS_SPACE_MAXADDR, 762 /*filter*/NULL, /*filterarg*/NULL, 763 bt->max_ccbs * sizeof(struct bt_ccb), 764 /*nsegments*/1, 765 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 766 /*flags*/0, &bt->ccb_dmat) != 0) { 767 goto error_exit; --- 13 unchanged lines hidden (view full) --- 781 bus_dmamap_load(bt->ccb_dmat, bt->ccb_dmamap, 782 bt->bt_ccb_array, 783 bt->max_ccbs * sizeof(struct bt_ccb), 784 btmapccbs, bt, /*flags*/0); 785 786 bt->init_level++; 787 788 /* DMA tag for our S/G structures. We allocate in page sized chunks */ |
789 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/0, /*boundary*/0, | 789 if (bus_dma_tag_create(bt->parent_dmat, /*alignment*/1, /*boundary*/0, |
790 /*lowaddr*/BUS_SPACE_MAXADDR, 791 /*highaddr*/BUS_SPACE_MAXADDR, 792 /*filter*/NULL, /*filterarg*/NULL, 793 PAGE_SIZE, /*nsegments*/1, 794 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 795 /*flags*/0, &bt->sg_dmat) != 0) { 796 goto error_exit; 797 } --- 1557 unchanged lines hidden --- | 790 /*lowaddr*/BUS_SPACE_MAXADDR, 791 /*highaddr*/BUS_SPACE_MAXADDR, 792 /*filter*/NULL, /*filterarg*/NULL, 793 PAGE_SIZE, /*nsegments*/1, 794 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 795 /*flags*/0, &bt->sg_dmat) != 0) { 796 goto error_exit; 797 } --- 1557 unchanged lines hidden --- |