Deleted Added
full compact
aha.c (47506) aha.c (49860)
1/*
2 * Generic register and struct definitions for the Adaptech 154x/164x
3 * SCSI host adapters. Product specific probe and attach routines can
4 * be found in:
5 * aha 1540/1542B/1542C/1542CF/1542CP aha_isa.c
6 *
7 * Copyright (c) 1998 M. Warner Losh.
8 * All Rights Reserved.

--- 41 unchanged lines hidden (view full) ---

50 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
52 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 * SUCH DAMAGE.
57 *
1/*
2 * Generic register and struct definitions for the Adaptech 154x/164x
3 * SCSI host adapters. Product specific probe and attach routines can
4 * be found in:
5 * aha 1540/1542B/1542C/1542CF/1542CP aha_isa.c
6 *
7 * Copyright (c) 1998 M. Warner Losh.
8 * All Rights Reserved.

--- 41 unchanged lines hidden (view full) ---

50 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
52 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 * SUCH DAMAGE.
57 *
58 * $Id: aha.c,v 1.25 1999/05/14 23:10:25 imp Exp $
58 * $Id: aha.c,v 1.26 1999/05/25 20:15:19 gibbs Exp $
59 */
60
61#include "pnp.h"
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/malloc.h>
66#include <sys/buf.h>

--- 451 unchanged lines hidden (view full) ---

518 * need to perform during normal operation.
519 *
520 * Unless we need to further restrict the allocation, we rely
521 * on the restrictions of the parent dmat, hence the common
522 * use of MAXADDR and MAXSIZE.
523 */
524
525 /* DMA tag for mapping buffers into device visible space. */
59 */
60
61#include "pnp.h"
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/malloc.h>
66#include <sys/buf.h>

--- 451 unchanged lines hidden (view full) ---

518 * need to perform during normal operation.
519 *
520 * Unless we need to further restrict the allocation, we rely
521 * on the restrictions of the parent dmat, hence the common
522 * use of MAXADDR and MAXSIZE.
523 */
524
525 /* DMA tag for mapping buffers into device visible space. */
526 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/0, /*boundary*/0,
526 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/1, /*boundary*/0,
527 /*lowaddr*/BUS_SPACE_MAXADDR,
528 /*highaddr*/BUS_SPACE_MAXADDR,
529 /*filter*/NULL, /*filterarg*/NULL,
530 /*maxsize*/MAXBSIZE, /*nsegments*/AHA_NSEG,
531 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
532 /*flags*/BUS_DMA_ALLOCNOW,
533 &aha->buffer_dmat) != 0) {
534 goto error_exit;
535 }
536
537 aha->init_level++;
538 /* DMA tag for our mailboxes */
527 /*lowaddr*/BUS_SPACE_MAXADDR,
528 /*highaddr*/BUS_SPACE_MAXADDR,
529 /*filter*/NULL, /*filterarg*/NULL,
530 /*maxsize*/MAXBSIZE, /*nsegments*/AHA_NSEG,
531 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
532 /*flags*/BUS_DMA_ALLOCNOW,
533 &aha->buffer_dmat) != 0) {
534 goto error_exit;
535 }
536
537 aha->init_level++;
538 /* DMA tag for our mailboxes */
539 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/0, /*boundary*/0,
539 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/1, /*boundary*/0,
540 /*lowaddr*/BUS_SPACE_MAXADDR,
541 /*highaddr*/BUS_SPACE_MAXADDR,
542 /*filter*/NULL, /*filterarg*/NULL,
543 aha->num_boxes * (sizeof(aha_mbox_in_t)
544 + sizeof(aha_mbox_out_t)),
545 /*nsegments*/1,
546 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
547 /*flags*/0, &aha->mailbox_dmat) != 0) {

--- 19 unchanged lines hidden (view full) ---

567
568 aha->init_level++;
569
570 aha->in_boxes = (aha_mbox_in_t *)&aha->out_boxes[aha->num_boxes];
571
572 ahainitmboxes(aha);
573
574 /* DMA tag for our ccb structures */
540 /*lowaddr*/BUS_SPACE_MAXADDR,
541 /*highaddr*/BUS_SPACE_MAXADDR,
542 /*filter*/NULL, /*filterarg*/NULL,
543 aha->num_boxes * (sizeof(aha_mbox_in_t)
544 + sizeof(aha_mbox_out_t)),
545 /*nsegments*/1,
546 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
547 /*flags*/0, &aha->mailbox_dmat) != 0) {

--- 19 unchanged lines hidden (view full) ---

567
568 aha->init_level++;
569
570 aha->in_boxes = (aha_mbox_in_t *)&aha->out_boxes[aha->num_boxes];
571
572 ahainitmboxes(aha);
573
574 /* DMA tag for our ccb structures */
575 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/0, /*boundary*/0,
575 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/1, /*boundary*/0,
576 /*lowaddr*/BUS_SPACE_MAXADDR,
577 /*highaddr*/BUS_SPACE_MAXADDR,
578 /*filter*/NULL, /*filterarg*/NULL,
579 aha->max_ccbs * sizeof(struct aha_ccb),
580 /*nsegments*/1,
581 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
582 /*flags*/0, &aha->ccb_dmat) != 0) {
583 goto error_exit;

--- 13 unchanged lines hidden (view full) ---

597 bus_dmamap_load(aha->ccb_dmat, aha->ccb_dmamap,
598 aha->aha_ccb_array,
599 aha->max_ccbs * sizeof(struct aha_ccb),
600 ahamapccbs, aha, /*flags*/0);
601
602 aha->init_level++;
603
604 /* DMA tag for our S/G structures. We allocate in page sized chunks */
576 /*lowaddr*/BUS_SPACE_MAXADDR,
577 /*highaddr*/BUS_SPACE_MAXADDR,
578 /*filter*/NULL, /*filterarg*/NULL,
579 aha->max_ccbs * sizeof(struct aha_ccb),
580 /*nsegments*/1,
581 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
582 /*flags*/0, &aha->ccb_dmat) != 0) {
583 goto error_exit;

--- 13 unchanged lines hidden (view full) ---

597 bus_dmamap_load(aha->ccb_dmat, aha->ccb_dmamap,
598 aha->aha_ccb_array,
599 aha->max_ccbs * sizeof(struct aha_ccb),
600 ahamapccbs, aha, /*flags*/0);
601
602 aha->init_level++;
603
604 /* DMA tag for our S/G structures. We allocate in page sized chunks */
605 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/0, /*boundary*/0,
605 if (bus_dma_tag_create(aha->parent_dmat, /*alignment*/1, /*boundary*/0,
606 /*lowaddr*/BUS_SPACE_MAXADDR,
607 /*highaddr*/BUS_SPACE_MAXADDR,
608 /*filter*/NULL, /*filterarg*/NULL,
609 PAGE_SIZE, /*nsegments*/1,
610 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
611 /*flags*/0, &aha->sg_dmat) != 0) {
612 goto error_exit;
613 }

--- 1391 unchanged lines hidden ---
606 /*lowaddr*/BUS_SPACE_MAXADDR,
607 /*highaddr*/BUS_SPACE_MAXADDR,
608 /*filter*/NULL, /*filterarg*/NULL,
609 PAGE_SIZE, /*nsegments*/1,
610 /*maxsegsz*/BUS_SPACE_MAXSIZE_24BIT,
611 /*flags*/0, &aha->sg_dmat) != 0) {
612 goto error_exit;
613 }

--- 1391 unchanged lines hidden ---