Deleted Added
full compact
ahb.c (113350) ahb.c (115343)
1/*
2 * CAM SCSI device driver for the Adaptec 174X SCSI Host adapter
3 *
4 * Copyright (c) 1998 Justin T. Gibbs
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*
2 * CAM SCSI device driver for the Adaptec 174X SCSI Host adapter
3 *
4 * Copyright (c) 1998 Justin T. Gibbs
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/ahb/ahb.c 113350 2003-04-10 23:50:06Z mux $
28 * $FreeBSD: head/sys/dev/ahb/ahb.c 115343 2003-05-27 04:59:59Z scottl $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/malloc.h>
35#include <sys/module.h>
36#include <sys/bus.h>

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

783
784 ccb = ecb->ccb;
785
786 if (ccb != NULL) {
787 untimeout(ahbtimeout, ecb, ccb->ccb_h.timeout_ch);
788 LIST_REMOVE(&ccb->ccb_h, sim_links.le);
789
790 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/malloc.h>
35#include <sys/module.h>
36#include <sys/bus.h>

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

783
784 ccb = ecb->ccb;
785
786 if (ccb != NULL) {
787 untimeout(ahbtimeout, ecb, ccb->ccb_h.timeout_ch);
788 LIST_REMOVE(&ccb->ccb_h, sim_links.le);
789
790 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
791 int op;
791 bus_dmasync_op_t op;
792
793 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
794 op = BUS_DMASYNC_POSTREAD;
795 else
796 op = BUS_DMASYNC_POSTWRITE;
797 bus_dmamap_sync(ahb->buffer_dmat, ecb->dmamap, op);
798 bus_dmamap_unload(ahb->buffer_dmat, ecb->dmamap);
799 }

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

907 return;
908 }
909
910 ecb_paddr = ahbecbvtop(ahb, ecb);
911
912 if (nseg != 0) {
913 ahb_sg_t *sg;
914 bus_dma_segment_t *end_seg;
792
793 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
794 op = BUS_DMASYNC_POSTREAD;
795 else
796 op = BUS_DMASYNC_POSTWRITE;
797 bus_dmamap_sync(ahb->buffer_dmat, ecb->dmamap, op);
798 bus_dmamap_unload(ahb->buffer_dmat, ecb->dmamap);
799 }

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

907 return;
908 }
909
910 ecb_paddr = ahbecbvtop(ahb, ecb);
911
912 if (nseg != 0) {
913 ahb_sg_t *sg;
914 bus_dma_segment_t *end_seg;
915 int op;
915 bus_dmasync_op_t op;
916
917 end_seg = dm_segs + nseg;
918
919 /* Copy the segments into our SG list */
920 sg = ecb->sg_list;
921 while (dm_segs < end_seg) {
922 sg->addr = dm_segs->ds_addr;
923 sg->len = dm_segs->ds_len;

--- 441 unchanged lines hidden ---
916
917 end_seg = dm_segs + nseg;
918
919 /* Copy the segments into our SG list */
920 sg = ecb->sg_list;
921 while (dm_segs < end_seg) {
922 sg->addr = dm_segs->ds_addr;
923 sg->len = dm_segs->ds_len;

--- 441 unchanged lines hidden ---