Deleted Added
sdiff udiff text old ( 109536 ) new ( 112782 )
full compact
1/*
2 * Device probe and attach routines for the following
3 * Advanced Systems Inc. SCSI controllers:
4 *
5 * Connectivity Products:
6 * ABP510/5150 - Bus-Master ISA (240 CDB) *
7 * ABP5140 - Bus-Master ISA PnP (16 CDB) * **
8 * ABP5142 - Bus-Master ISA PnP with floppy (16 CDB) ***

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

39 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
40 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
41 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 * SUCH DAMAGE.
46 *
47 * $FreeBSD: head/sys/dev/advansys/adv_isa.c 112782 2003-03-29 09:46:10Z mdodd $
48 */
49
50#include <sys/param.h>
51#include <sys/systm.h>
52#include <sys/kernel.h>
53
54#include <machine/bus_pio.h>
55#include <machine/bus.h>

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

213 panic("advisaprobe: Unknown card revision\n");
214 }
215
216 /*
217 * Allocate a parent dmatag for all tags created
218 * by the MI portions of the advansys driver
219 */
220 /* XXX Should be a child of the ISA bus dma tag */
221 error = bus_dma_tag_create(
222 /* parent */ NULL,
223 /* alignemnt */ 1,
224 /* boundary */ 0,
225 /* lowaddr */ lowaddr,
226 /* highaddr */ BUS_SPACE_MAXADDR,
227 /* filter */ NULL,
228 /* filterarg */ NULL,
229 /* maxsize */ maxsize,
230 /* nsegments */ ~0,
231 /* maxsegsz */ maxsegsz,
232 /* flags */ 0,
233 &adv->parent_dmat);
234
235 if (error != 0) {
236 printf("%s: Could not allocate DMA tag - error %d\n",
237 adv_name(adv), error);
238 adv_free(adv);
239 bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
240 break;
241 }
242
243 adv->init_level += 2;
244
245 if (overrun_buf == NULL) {
246 /* Need to allocate our overrun buffer */
247 if (bus_dma_tag_create(
248 /* parent */ adv->parent_dmat,
249 /* alignment */ 8,
250 /* boundary */ 0,
251 /* lowaddr */ ADV_ISA_MAX_DMA_ADDR,
252 /* highaddr */ BUS_SPACE_MAXADDR,
253 /* filter */ NULL,
254 /* filterarg */ NULL,
255 /* maxsize */ ADV_OVERRUN_BSIZE,
256 /* nsegments */ 1,
257 /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT,
258 /* flags */ 0,
259 &overrun_dmat) != 0) {
260 adv_free(adv);
261 bus_release_resource(dev, SYS_RES_IOPORT, 0,
262 iores);
263 break;
264 }
265 if (bus_dmamem_alloc(overrun_dmat,
266 (void **)&overrun_buf,
267 BUS_DMA_NOWAIT,

--- 152 unchanged lines hidden ---