sym_hipd.c (9f4d4e5e189ad86ea8a02717db232fc7637ce1d7) | sym_hipd.c (4bc42357a91961def51ab92571e0c1052a49e3e9) |
---|---|
1/*- 2 * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 3 * PCI-SCSI controllers. 4 * 5 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr> 6 * 7 * This driver also supports the following Symbios/LSI PCI-SCSI chips: 8 * 53C810A, 53C825A, 53C860, 53C875, 53C876, 53C885, 53C895, --- 1595 unchanged lines hidden (view full) --- 1604 /* 1605 * General controller parameters and configuration. 1606 */ 1607 u_short device_id; /* PCI device id */ 1608 u_char revision_id; /* PCI device revision id */ 1609 u_int features; /* Chip features map */ 1610 u_char myaddr; /* SCSI id of the adapter */ 1611 u_char maxburst; /* log base 2 of dwords burst */ | 1/*- 2 * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 3 * PCI-SCSI controllers. 4 * 5 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr> 6 * 7 * This driver also supports the following Symbios/LSI PCI-SCSI chips: 8 * 53C810A, 53C825A, 53C860, 53C875, 53C876, 53C885, 53C895, --- 1595 unchanged lines hidden (view full) --- 1604 /* 1605 * General controller parameters and configuration. 1606 */ 1607 u_short device_id; /* PCI device id */ 1608 u_char revision_id; /* PCI device revision id */ 1609 u_int features; /* Chip features map */ 1610 u_char myaddr; /* SCSI id of the adapter */ 1611 u_char maxburst; /* log base 2 of dwords burst */ |
1612 u_char maxsegcnt; /* Max DMA S/G segments */ | |
1613 u_char maxwide; /* Maximum transfer width */ 1614 u_char minsync; /* Min sync period factor (ST) */ 1615 u_char maxsync; /* Max sync period factor (ST) */ 1616 u_char maxoffs; /* Max scsi offset (ST) */ 1617 u_char minsync_dt; /* Min sync period factor (DT) */ 1618 u_char maxsync_dt; /* Max sync period factor (DT) */ 1619 u_char maxoffs_dt; /* Max scsi offset (DT) */ 1620 u_char multiplier; /* Clock multiplier (1,2,4) */ --- 6509 unchanged lines hidden (view full) --- 8130 cpi->transport = XPORT_SPI; 8131 cpi->transport_version = 2; 8132 cpi->xport_specific.spi.ppr_options = SID_SPI_CLOCK_ST; 8133 if (np->features & FE_ULTRA3) { 8134 cpi->transport_version = 3; 8135 cpi->xport_specific.spi.ppr_options = 8136 SID_SPI_CLOCK_DT_ST; 8137 } | 1612 u_char maxwide; /* Maximum transfer width */ 1613 u_char minsync; /* Min sync period factor (ST) */ 1614 u_char maxsync; /* Max sync period factor (ST) */ 1615 u_char maxoffs; /* Max scsi offset (ST) */ 1616 u_char minsync_dt; /* Min sync period factor (DT) */ 1617 u_char maxsync_dt; /* Max sync period factor (DT) */ 1618 u_char maxoffs_dt; /* Max scsi offset (DT) */ 1619 u_char multiplier; /* Clock multiplier (1,2,4) */ --- 6509 unchanged lines hidden (view full) --- 8129 cpi->transport = XPORT_SPI; 8130 cpi->transport_version = 2; 8131 cpi->xport_specific.spi.ppr_options = SID_SPI_CLOCK_ST; 8132 if (np->features & FE_ULTRA3) { 8133 cpi->transport_version = 3; 8134 cpi->xport_specific.spi.ppr_options = 8135 SID_SPI_CLOCK_DT_ST; 8136 } |
8138 cpi->maxio = np->maxsegcnt * SYM_CONF_DMA_BOUNDARY; | 8137 cpi->maxio = SYM_CONF_MAX_SG * PAGE_SIZE; |
8139 sym_xpt_done2(np, ccb, CAM_REQ_CMP); 8140 break; 8141 case XPT_ABORT: 8142 abort_ccb = ccb->cab.abort_ccb; 8143 switch(abort_ccb->ccb_h.func_code) { 8144 case XPT_SCSI_IO: 8145 if (sym_abort_scsiio(np, abort_ccb, 0) == 0) { 8146 sym_xpt_done2(np, ccb, CAM_REQ_CMP); --- 384 unchanged lines hidden (view full) --- 8531 sym_que_init(&np->free_ccbq); 8532 sym_que_init(&np->busy_ccbq); 8533 sym_que_init(&np->comp_ccbq); 8534 sym_que_init(&np->cam_ccbq); 8535 8536 /* 8537 * Allocate a tag for the DMA of user data. 8538 */ | 8138 sym_xpt_done2(np, ccb, CAM_REQ_CMP); 8139 break; 8140 case XPT_ABORT: 8141 abort_ccb = ccb->cab.abort_ccb; 8142 switch(abort_ccb->ccb_h.func_code) { 8143 case XPT_SCSI_IO: 8144 if (sym_abort_scsiio(np, abort_ccb, 0) == 0) { 8145 sym_xpt_done2(np, ccb, CAM_REQ_CMP); --- 384 unchanged lines hidden (view full) --- 8530 sym_que_init(&np->free_ccbq); 8531 sym_que_init(&np->busy_ccbq); 8532 sym_que_init(&np->comp_ccbq); 8533 sym_que_init(&np->cam_ccbq); 8534 8535 /* 8536 * Allocate a tag for the DMA of user data. 8537 */ |
8539 np->maxsegcnt = MIN(SYM_CONF_MAX_SG, 8540 (MAXPHYS / SYM_CONF_DMA_BOUNDARY) + 1); | |
8541 if (bus_dma_tag_create(np->bus_dmat, 1, SYM_CONF_DMA_BOUNDARY, 8542 BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, | 8538 if (bus_dma_tag_create(np->bus_dmat, 1, SYM_CONF_DMA_BOUNDARY, 8539 BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, |
8543 BUS_SPACE_MAXSIZE, np->maxsegcnt, SYM_CONF_DMA_BOUNDARY, | 8540 BUS_SPACE_MAXSIZE, SYM_CONF_MAX_SG, SYM_CONF_DMA_BOUNDARY, |
8544 BUS_DMA_ALLOCNOW, busdma_lock_mutex, &np->mtx, &np->data_dmat)) { 8545 device_printf(dev, "failed to create DMA tag.\n"); 8546 goto attach_failed; 8547 } 8548 8549 /* 8550 * Read and apply some fix-ups to the PCI COMMAND 8551 * register. We want the chip to be enabled for: --- 1144 unchanged lines hidden --- | 8541 BUS_DMA_ALLOCNOW, busdma_lock_mutex, &np->mtx, &np->data_dmat)) { 8542 device_printf(dev, "failed to create DMA tag.\n"); 8543 goto attach_failed; 8544 } 8545 8546 /* 8547 * Read and apply some fix-ups to the PCI COMMAND 8548 * register. We want the chip to be enabled for: --- 1144 unchanged lines hidden --- |