1/*- 2 * Copyright (c) 1997-2006 by Matthew Jacob 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 --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26/* 27 * SBus specific probe and attach routines for Qlogic ISP SCSI adapters. 28 * FreeBSD Version. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/isp/isp_sbus.c 166177 2007-01-23 00:02:29Z mjacob $"); |
33 34#include <sys/param.h> 35#include <sys/systm.h> 36#if __FreeBSD_version >= 700000 37#include <sys/linker.h> 38#include <sys/firmware.h> 39#endif 40#include <sys/bus.h> --- 428 unchanged lines hidden (view full) --- 469 bus_addr_t addr = segs->ds_addr; 470 471 isp->isp_rquest_dma = addr; 472 addr += ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)); 473 isp->isp_result_dma = addr; 474 } 475} 476 |
477static int 478isp_sbus_mbxdma(ispsoftc_t *isp) 479{ 480 struct isp_sbussoftc *sbs = (struct isp_sbussoftc *)isp; 481 caddr_t base; 482 uint32_t len; 483 int i, error, ns; 484 struct imush im; 485 486 /* 487 * Already been here? If so, leave... 488 */ 489 if (isp->isp_rquest) { 490 return (0); 491 } 492 493 ISP_UNLOCK(isp); 494 |
495 if (isp_dma_tag_create(BUS_DMA_ROOTARG(sbs->sbus_dev), 1, 496 BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT, 497 BUS_SPACE_MAXADDR_32BIT, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 498 ISP_NSEGS, BUS_SPACE_MAXADDR_24BIT, 0, &sbs->dmat)) { |
499 isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); 500 ISP_LOCK(isp); 501 return(1); 502 } 503 504 len = sizeof (XS_T **) * isp->isp_maxcmds; 505 isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); 506 if (isp->isp_xflist == NULL) { --- 358 unchanged lines hidden --- |