Deleted Added
sdiff udiff text old ( 104707 ) new ( 112782 )
full compact
1/*
2 * Device probe and attach routines for the following
3 * Advanced Systems Inc. SCSI controllers:
4 *
5 * Single Channel Products:
6 * ABP742 - Bus-Master EISA (240 CDB)
7 *
8 * Dual Channel Products:

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

27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * $FreeBSD: head/sys/dev/advansys/adv_eisa.c 104707 2002-10-09 08:50:26Z peter $
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/module.h>
42#include <sys/bus.h>
43

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

166 if (adv_b == NULL)
167 goto bad;
168
169 /*
170 * Allocate a parent dmatag for all tags created
171 * by the MI portions of the advansys driver
172 */
173 /* XXX Should be a child of the PCI bus dma tag */
174 error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1,
175 /*boundary*/0,
176 /*lowaddr*/ADV_EISA_MAX_DMA_ADDR,
177 /*highaddr*/BUS_SPACE_MAXADDR,
178 /*filter*/NULL, /*filterarg*/NULL,
179 /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
180 /*nsegments*/~0,
181 /*maxsegsz*/ADV_EISA_MAX_DMA_COUNT,
182 /*flags*/0,
183 &adv_b->parent_dmat);
184
185 if (error != 0) {
186 printf("%s: Could not allocate DMA tag - error %d\n",
187 adv_name(adv_b), error);
188 adv_free(adv_b);
189 goto bad;
190 }
191

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

201 goto bad;
202 }
203
204 /*
205 * Allocate a parent dmatag for all tags created
206 * by the MI portions of the advansys driver
207 */
208 /* XXX Should be a child of the PCI bus dma tag */
209 error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1,
210 /*boundary*/0,
211 /*lowaddr*/ADV_EISA_MAX_DMA_ADDR,
212 /*highaddr*/BUS_SPACE_MAXADDR,
213 /*filter*/NULL, /*filterarg*/NULL,
214 /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
215 /*nsegments*/~0,
216 /*maxsegsz*/ADV_EISA_MAX_DMA_COUNT,
217 /*flags*/0,
218 &adv->parent_dmat);
219
220 if (error != 0) {
221 printf("%s: Could not allocate DMA tag - error %d\n",
222 adv_name(adv), error);
223 adv_free(adv);
224 goto bad;
225 }
226
227 adv->init_level++;
228 break;
229 default:
230 printf("adveisaattach: Unknown device type!\n");
231 goto bad;
232 break;
233 }
234
235 if (overrun_buf == NULL) {
236 /* Need to allocate our overrun buffer */
237 if (bus_dma_tag_create(adv->parent_dmat,
238 /*alignment*/8,
239 /*boundary*/0,
240 ADV_EISA_MAX_DMA_ADDR,
241 BUS_SPACE_MAXADDR,
242 /*filter*/NULL,
243 /*filterarg*/NULL,
244 ADV_OVERRUN_BSIZE,
245 /*nsegments*/1,
246 BUS_SPACE_MAXSIZE_32BIT,
247 /*flags*/0,
248 &overrun_dmat) != 0) {
249 adv_free(adv);
250 goto bad;
251 }
252 if (bus_dmamem_alloc(overrun_dmat,
253 (void **)&overrun_buf,
254 BUS_DMA_NOWAIT,
255 &overrun_dmamap) != 0) {
256 bus_dma_tag_destroy(overrun_dmat);

--- 83 unchanged lines hidden ---