dpt_scsi.c (46581) | dpt_scsi.c (49860) |
---|---|
1/* 2 * Copyright (c) 1997 by Simon Shapiro 3 * All Rights Reserved 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38 * team for creating and maintaining such a wonderful O/S. 39 * 40 * TODO: * Add ISA probe code. 41 * * Add driver-level RAID-0. This will allow interoperability with 42 * NiceTry, M$-Doze, Win-Dog, Slowlaris, etc., in recognizing RAID 43 * arrays that span controllers (Wow!). 44 */ 45 | 1/* 2 * Copyright (c) 1997 by Simon Shapiro 3 * All Rights Reserved 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38 * team for creating and maintaining such a wonderful O/S. 39 * 40 * TODO: * Add ISA probe code. 41 * * Add driver-level RAID-0. This will allow interoperability with 42 * NiceTry, M$-Doze, Win-Dog, Slowlaris, etc., in recognizing RAID 43 * arrays that span controllers (Wow!). 44 */ 45 |
46#ident "$Id: dpt_scsi.c,v 1.22 1998/12/22 20:21:12 eivind Exp $" | 46#ident "$Id: dpt_scsi.c,v 1.23 1999/05/06 20:16:22 ken Exp $" |
47 48#define _DPT_C_ 49 50#include "opt_dpt.h" 51#include <sys/param.h> 52#include <sys/systm.h> 53#include <sys/malloc.h> 54#include <sys/buf.h> --- 1099 unchanged lines hidden (view full) --- 1154 1155#ifdef DPT_RESET_BOARD 1156 printf("dpt%d: resetting HBA\n", dpt->unit); 1157 dpt_outb(dpt, HA_WCOMMAND, EATA_CMD_RESET); 1158 DELAY(750000); 1159 /* XXX Shouldn't we poll a status register or something??? */ 1160#endif 1161 /* DMA tag for our S/G structures. We allocate in page sized chunks */ | 47 48#define _DPT_C_ 49 50#include "opt_dpt.h" 51#include <sys/param.h> 52#include <sys/systm.h> 53#include <sys/malloc.h> 54#include <sys/buf.h> --- 1099 unchanged lines hidden (view full) --- 1154 1155#ifdef DPT_RESET_BOARD 1156 printf("dpt%d: resetting HBA\n", dpt->unit); 1157 dpt_outb(dpt, HA_WCOMMAND, EATA_CMD_RESET); 1158 DELAY(750000); 1159 /* XXX Shouldn't we poll a status register or something??? */ 1160#endif 1161 /* DMA tag for our S/G structures. We allocate in page sized chunks */ |
1162 if (bus_dma_tag_create(dpt->parent_dmat, /*alignment*/0, /*boundary*/0, | 1162 if (bus_dma_tag_create(dpt->parent_dmat, /*alignment*/1, /*boundary*/0, |
1163 /*lowaddr*/BUS_SPACE_MAXADDR, 1164 /*highaddr*/BUS_SPACE_MAXADDR, 1165 /*filter*/NULL, /*filterarg*/NULL, 1166 PAGE_SIZE, /*nsegments*/1, 1167 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 1168 /*flags*/0, &dpt->sg_dmat) != 0) { 1169 goto error_exit; 1170 } --- 105 unchanged lines hidden (view full) --- 1276 /* We can only get 64k buffers, so don't bother to waste space. */ 1277 if (dpt->sgsize < 17 || dpt->sgsize > 32) 1278 dpt->sgsize = 32; 1279 1280 if (dpt->sgsize > dpt_max_segs) 1281 dpt->sgsize = dpt_max_segs; 1282 1283 /* DMA tag for mapping buffers into device visible space. */ | 1163 /*lowaddr*/BUS_SPACE_MAXADDR, 1164 /*highaddr*/BUS_SPACE_MAXADDR, 1165 /*filter*/NULL, /*filterarg*/NULL, 1166 PAGE_SIZE, /*nsegments*/1, 1167 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 1168 /*flags*/0, &dpt->sg_dmat) != 0) { 1169 goto error_exit; 1170 } --- 105 unchanged lines hidden (view full) --- 1276 /* We can only get 64k buffers, so don't bother to waste space. */ 1277 if (dpt->sgsize < 17 || dpt->sgsize > 32) 1278 dpt->sgsize = 32; 1279 1280 if (dpt->sgsize > dpt_max_segs) 1281 dpt->sgsize = dpt_max_segs; 1282 1283 /* DMA tag for mapping buffers into device visible space. */ |
1284 if (bus_dma_tag_create(dpt->parent_dmat, /*alignment*/0, /*boundary*/0, | 1284 if (bus_dma_tag_create(dpt->parent_dmat, /*alignment*/1, /*boundary*/0, |
1285 /*lowaddr*/BUS_SPACE_MAXADDR, 1286 /*highaddr*/BUS_SPACE_MAXADDR, 1287 /*filter*/NULL, /*filterarg*/NULL, 1288 /*maxsize*/MAXBSIZE, /*nsegments*/dpt->sgsize, 1289 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 1290 /*flags*/BUS_DMA_ALLOCNOW, 1291 &dpt->buffer_dmat) != 0) { 1292 goto error_exit; 1293 } 1294 1295 dpt->init_level++; 1296 1297 /* DMA tag for our ccb structures and interrupt status packet */ | 1285 /*lowaddr*/BUS_SPACE_MAXADDR, 1286 /*highaddr*/BUS_SPACE_MAXADDR, 1287 /*filter*/NULL, /*filterarg*/NULL, 1288 /*maxsize*/MAXBSIZE, /*nsegments*/dpt->sgsize, 1289 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 1290 /*flags*/BUS_DMA_ALLOCNOW, 1291 &dpt->buffer_dmat) != 0) { 1292 goto error_exit; 1293 } 1294 1295 dpt->init_level++; 1296 1297 /* DMA tag for our ccb structures and interrupt status packet */ |
1298 if (bus_dma_tag_create(dpt->parent_dmat, /*alignment*/0, /*boundary*/0, | 1298 if (bus_dma_tag_create(dpt->parent_dmat, /*alignment*/1, /*boundary*/0, |
1299 /*lowaddr*/BUS_SPACE_MAXADDR, 1300 /*highaddr*/BUS_SPACE_MAXADDR, 1301 /*filter*/NULL, /*filterarg*/NULL, 1302 (dpt->max_dccbs * sizeof(struct dpt_ccb)) 1303 + sizeof(dpt_sp_t), 1304 /*nsegments*/1, 1305 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 1306 /*flags*/0, &dpt->dccb_dmat) != 0) { --- 1220 unchanged lines hidden --- | 1299 /*lowaddr*/BUS_SPACE_MAXADDR, 1300 /*highaddr*/BUS_SPACE_MAXADDR, 1301 /*filter*/NULL, /*filterarg*/NULL, 1302 (dpt->max_dccbs * sizeof(struct dpt_ccb)) 1303 + sizeof(dpt_sp_t), 1304 /*nsegments*/1, 1305 /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, 1306 /*flags*/0, &dpt->dccb_dmat) != 0) { --- 1220 unchanged lines hidden --- |