Deleted Added
full compact
mpt_pci.c (150007) mpt_pci.c (155521)
1/*-
2 * PCI specific probe and attach routines for LSI Fusion Adapters
3 * FreeBSD Version.
4 *
5 * Copyright (c) 2000, 2001 by Greg Ansley
6 * Partially derived from Matt Jacob's ISP driver.
7 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 by Matthew Jacob
8 * Feral Software

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

58 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
59 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
60 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
62 * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63 */
64
65#include <sys/cdefs.h>
1/*-
2 * PCI specific probe and attach routines for LSI Fusion Adapters
3 * FreeBSD Version.
4 *
5 * Copyright (c) 2000, 2001 by Greg Ansley
6 * Partially derived from Matt Jacob's ISP driver.
7 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 by Matthew Jacob
8 * Feral Software

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

58 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
59 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
60 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
62 * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63 */
64
65#include <sys/cdefs.h>
66__FBSDID("$FreeBSD: head/sys/dev/mpt/mpt_pci.c 150007 2005-09-11 19:58:19Z mjacob $");
66__FBSDID("$FreeBSD: head/sys/dev/mpt/mpt_pci.c 155521 2006-02-11 01:35:29Z mjacob $");
67
68#include <dev/mpt/mpt.h>
69#include <dev/mpt/mpt_cam.h>
70#include <dev/mpt/mpt_raid.h>
71
67
68#include <dev/mpt/mpt.h>
69#include <dev/mpt/mpt_cam.h>
70#include <dev/mpt/mpt_raid.h>
71
72#if __FreeBSD_version < 500000
73#include <pci/pcireg.h>
74#include <pci/pcivar.h>
75#else
76#include <dev/pci/pcireg.h>
77#include <dev/pci/pcivar.h>
78#endif
79
80#ifndef PCI_VENDOR_LSI
81#define PCI_VENDOR_LSI 0x1000
82#endif
83
84#ifndef PCI_PRODUCT_LSI_FC909
85#define PCI_PRODUCT_LSI_FC909 0x0620
86#endif

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

100#ifndef PCI_PRODUCT_LSI_FC929X
101#define PCI_PRODUCT_LSI_FC929X 0x0626
102#endif
103
104#ifndef PCI_PRODUCT_LSI_1030
105#define PCI_PRODUCT_LSI_1030 0x0030
106#endif
107
72
73#ifndef PCI_VENDOR_LSI
74#define PCI_VENDOR_LSI 0x1000
75#endif
76
77#ifndef PCI_PRODUCT_LSI_FC909
78#define PCI_PRODUCT_LSI_FC909 0x0620
79#endif

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

93#ifndef PCI_PRODUCT_LSI_FC929X
94#define PCI_PRODUCT_LSI_FC929X 0x0626
95#endif
96
97#ifndef PCI_PRODUCT_LSI_1030
98#define PCI_PRODUCT_LSI_1030 0x0030
99#endif
100
101#ifndef PCI_PRODUCT_LSI_SAS1064
102#define PCI_PRODUCT_LSI_SAS1064 0x0050
103#endif
104
105#ifndef PCI_PRODUCT_LSI_SAS1064A
106#define PCI_PRODUCT_LSI_SAS1064A 0x005C
107#endif
108
109#ifndef PCI_PRODUCT_LSI_SAS1064E
110#define PCI_PRODUCT_LSI_SAS1064E 0x0056
111#endif
112
113#ifndef PCI_PRODUCT_LSI_SAS1066
114#define PCI_PRODUCT_LSI_SAS1066 0x005E
115#endif
116
117#ifndef PCI_PRODUCT_LSI_SAS1066E
118#define PCI_PRODUCT_LSI_SAS1066E 0x005A
119#endif
120
121#ifndef PCI_PRODUCT_LSI_SAS1068
122#define PCI_PRODUCT_LSI_SAS1068 0x0054
123#endif
124
125#ifndef PCI_PRODUCT_LSI_SAS1068E
126#define PCI_PRODUCT_LSI_SAS1068E 0x0058
127#endif
128
129#ifndef PCI_PRODUCT_LSI_SAS1078
130#define PCI_PRODUCT_LSI_SAS1078 0x0060
131#endif
132
108#ifndef PCIM_CMD_SERRESPEN
109#define PCIM_CMD_SERRESPEN 0x0100
110#endif
111
112
133#ifndef PCIM_CMD_SERRESPEN
134#define PCIM_CMD_SERRESPEN 0x0100
135#endif
136
137
113
114#define MPT_IO_BAR 0
115#define MPT_MEM_BAR 1
116
117static int mpt_pci_probe(device_t);
118static int mpt_pci_attach(device_t);
119static void mpt_free_bus_resources(struct mpt_softc *mpt);
120static int mpt_pci_detach(device_t);
121static int mpt_pci_shutdown(device_t);

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

162 desc = "LSILogic FC929 FC Adapter";
163 break;
164 case PCI_PRODUCT_LSI_FC929X:
165 desc = "LSILogic FC929X FC Adapter";
166 break;
167 case PCI_PRODUCT_LSI_1030:
168 desc = "LSILogic 1030 Ultra4 Adapter";
169 break;
138#define MPT_IO_BAR 0
139#define MPT_MEM_BAR 1
140
141static int mpt_pci_probe(device_t);
142static int mpt_pci_attach(device_t);
143static void mpt_free_bus_resources(struct mpt_softc *mpt);
144static int mpt_pci_detach(device_t);
145static int mpt_pci_shutdown(device_t);

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

186 desc = "LSILogic FC929 FC Adapter";
187 break;
188 case PCI_PRODUCT_LSI_FC929X:
189 desc = "LSILogic FC929X FC Adapter";
190 break;
191 case PCI_PRODUCT_LSI_1030:
192 desc = "LSILogic 1030 Ultra4 Adapter";
193 break;
194 case PCI_PRODUCT_LSI_SAS1064:
195 case PCI_PRODUCT_LSI_SAS1064A:
196 case PCI_PRODUCT_LSI_SAS1064E:
197 case PCI_PRODUCT_LSI_SAS1066:
198 case PCI_PRODUCT_LSI_SAS1066E:
199 case PCI_PRODUCT_LSI_SAS1068:
200 case PCI_PRODUCT_LSI_SAS1068E:
201 case PCI_PRODUCT_LSI_SAS1078:
202 desc = "LSILogic SAS Adapter";
203 break;
170 default:
171 return (ENXIO);
172 }
173
174 device_set_desc(dev, desc);
175 return (0);
176}
177

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

263 bzero(mpt, sizeof(struct mpt_softc));
264 switch ((pci_get_device(dev) & ~1)) {
265 case PCI_PRODUCT_LSI_FC909:
266 case PCI_PRODUCT_LSI_FC909A:
267 case PCI_PRODUCT_LSI_FC919:
268 case PCI_PRODUCT_LSI_FC929:
269 mpt->is_fc = 1;
270 break;
204 default:
205 return (ENXIO);
206 }
207
208 device_set_desc(dev, desc);
209 return (0);
210}
211

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

297 bzero(mpt, sizeof(struct mpt_softc));
298 switch ((pci_get_device(dev) & ~1)) {
299 case PCI_PRODUCT_LSI_FC909:
300 case PCI_PRODUCT_LSI_FC909A:
301 case PCI_PRODUCT_LSI_FC919:
302 case PCI_PRODUCT_LSI_FC929:
303 mpt->is_fc = 1;
304 break;
305 case PCI_PRODUCT_LSI_SAS1064:
306 case PCI_PRODUCT_LSI_SAS1064A:
307 case PCI_PRODUCT_LSI_SAS1064E:
308 case PCI_PRODUCT_LSI_SAS1066:
309 case PCI_PRODUCT_LSI_SAS1066E:
310 case PCI_PRODUCT_LSI_SAS1068:
311 case PCI_PRODUCT_LSI_SAS1068E:
312 case PCI_PRODUCT_LSI_SAS1078:
313 mpt->is_sas = 1;
314 break;
271 default:
272 break;
273 }
274 mpt->dev = dev;
275 mpt->unit = device_get_unit(dev);
276 mpt->raid_resync_rate = MPT_RAID_RESYNC_RATE_DEFAULT;
277 mpt->raid_mwce_setting = MPT_RAID_MWCE_DEFAULT;
278 mpt->raid_queue_depth = MPT_RAID_QUEUE_DEPTH_DEFAULT;
315 default:
316 break;
317 }
318 mpt->dev = dev;
319 mpt->unit = device_get_unit(dev);
320 mpt->raid_resync_rate = MPT_RAID_RESYNC_RATE_DEFAULT;
321 mpt->raid_mwce_setting = MPT_RAID_MWCE_DEFAULT;
322 mpt->raid_queue_depth = MPT_RAID_QUEUE_DEPTH_DEFAULT;
323 mpt->verbose = MPT_PRT_NONE;
279 mpt_set_options(mpt);
324 mpt_set_options(mpt);
280 mpt->verbose = MPT_PRT_INFO;
281 mpt->verbose += (bootverbose != 0)? 1 : 0;
282
325 if (mpt->verbose == MPT_PRT_NONE) {
326 mpt->verbose = MPT_PRT_WARN;
327 /* Print INFO level (if any) if bootverbose is set */
328 mpt->verbose += (bootverbose != 0)? 1 : 0;
329 }
283 /* Make sure memory access decoders are enabled */
284 cmd = pci_read_config(dev, PCIR_COMMAND, 2);
285 if ((cmd & PCIM_CMD_MEMEN) == 0) {
286 device_printf(dev, "Memory accesses disabled");
287 goto bad;
288 }
289
290 /*

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

308 */
309 if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 ||
310 (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) {
311 mpt_link_peer(mpt);
312 }
313
314 /*
315 * Set up register access. PIO mode is required for
330 /* Make sure memory access decoders are enabled */
331 cmd = pci_read_config(dev, PCIR_COMMAND, 2);
332 if ((cmd & PCIM_CMD_MEMEN) == 0) {
333 device_printf(dev, "Memory accesses disabled");
334 goto bad;
335 }
336
337 /*

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

355 */
356 if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 ||
357 (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) {
358 mpt_link_peer(mpt);
359 }
360
361 /*
362 * Set up register access. PIO mode is required for
316 * certain reset operations.
363 * certain reset operations (but must be disabled for
364 * some cards otherwise).
317 */
318 mpt->pci_pio_rid = PCIR_BAR(MPT_IO_BAR);
319 mpt->pci_pio_reg = bus_alloc_resource(dev, SYS_RES_IOPORT,
320 &mpt->pci_pio_rid, 0, ~0, 0, RF_ACTIVE);
321 if (mpt->pci_pio_reg == NULL) {
322 device_printf(dev, "unable to map registers in PIO mode\n");
323 goto bad;
324 }
325 mpt->pci_pio_st = rman_get_bustag(mpt->pci_pio_reg);
326 mpt->pci_pio_sh = rman_get_bushandle(mpt->pci_pio_reg);
327
328 /* Allocate kernel virtual memory for the 9x9's Mem0 region */
329 mpt->pci_mem_rid = PCIR_BAR(MPT_MEM_BAR);
330 mpt->pci_reg = bus_alloc_resource(dev, SYS_RES_MEMORY,
331 &mpt->pci_mem_rid, 0, ~0, 0, RF_ACTIVE);
332 if (mpt->pci_reg == NULL) {
333 device_printf(dev, "Unable to memory map registers.\n");
365 */
366 mpt->pci_pio_rid = PCIR_BAR(MPT_IO_BAR);
367 mpt->pci_pio_reg = bus_alloc_resource(dev, SYS_RES_IOPORT,
368 &mpt->pci_pio_rid, 0, ~0, 0, RF_ACTIVE);
369 if (mpt->pci_pio_reg == NULL) {
370 device_printf(dev, "unable to map registers in PIO mode\n");
371 goto bad;
372 }
373 mpt->pci_pio_st = rman_get_bustag(mpt->pci_pio_reg);
374 mpt->pci_pio_sh = rman_get_bushandle(mpt->pci_pio_reg);
375
376 /* Allocate kernel virtual memory for the 9x9's Mem0 region */
377 mpt->pci_mem_rid = PCIR_BAR(MPT_MEM_BAR);
378 mpt->pci_reg = bus_alloc_resource(dev, SYS_RES_MEMORY,
379 &mpt->pci_mem_rid, 0, ~0, 0, RF_ACTIVE);
380 if (mpt->pci_reg == NULL) {
381 device_printf(dev, "Unable to memory map registers.\n");
382 if (mpt->is_sas) {
383 device_printf(dev, "Giving Up.\n");
384 goto bad;
385 }
334 device_printf(dev, "Falling back to PIO mode.\n");
335 mpt->pci_st = mpt->pci_pio_st;
336 mpt->pci_sh = mpt->pci_pio_sh;
337 } else {
338 mpt->pci_st = rman_get_bustag(mpt->pci_reg);
339 mpt->pci_sh = rman_get_bushandle(mpt->pci_reg);
340 }
341

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

379 * memory accesses (Mem1).
380 *
381 * Using Mem1 is known to make the chip stop responding to
382 * configuration space transfers, so we need to save it now
383 */
384
385 mpt_read_config_regs(mpt);
386
386 device_printf(dev, "Falling back to PIO mode.\n");
387 mpt->pci_st = mpt->pci_pio_st;
388 mpt->pci_sh = mpt->pci_pio_sh;
389 } else {
390 mpt->pci_st = rman_get_bustag(mpt->pci_reg);
391 mpt->pci_sh = rman_get_bushandle(mpt->pci_reg);
392 }
393

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

431 * memory accesses (Mem1).
432 *
433 * Using Mem1 is known to make the chip stop responding to
434 * configuration space transfers, so we need to save it now
435 */
436
437 mpt_read_config_regs(mpt);
438
439 /*
440 * Disable PIO until we need it
441 */
442 pci_disable_io(dev, SYS_RES_IOPORT);
443
387 /* Initialize the hardware */
388 if (mpt->disabled == 0) {
444 /* Initialize the hardware */
445 if (mpt->disabled == 0) {
446
389 MPT_LOCK(mpt);
390 if (mpt_attach(mpt) != 0) {
391 MPT_UNLOCK(mpt);
392 goto bad;
393 }
394 }
395
396 return (0);

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

492 if (mpt)
493 return (mpt_shutdown(mpt));
494 return(0);
495}
496
497static int
498mpt_dma_mem_alloc(struct mpt_softc *mpt)
499{
447 MPT_LOCK(mpt);
448 if (mpt_attach(mpt) != 0) {
449 MPT_UNLOCK(mpt);
450 goto bad;
451 }
452 }
453
454 return (0);

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

550 if (mpt)
551 return (mpt_shutdown(mpt));
552 return(0);
553}
554
555static int
556mpt_dma_mem_alloc(struct mpt_softc *mpt)
557{
500 int i, error;
558 int i, error, nsegs;
501 uint8_t *vptr;
502 uint32_t pptr, end;
503 size_t len;
504 struct mpt_map_info mi;
505 device_t dev = mpt->dev;
506
507 /* Check if we alreay have allocated the reply memory */
508 if (mpt->reply_phys != 0) {

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

521 mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO);
522 if (mpt->request_pool == NULL) {
523 device_printf(dev, "cannot allocate request pool\n");
524 return (1);
525 }
526#endif
527
528 /*
559 uint8_t *vptr;
560 uint32_t pptr, end;
561 size_t len;
562 struct mpt_map_info mi;
563 device_t dev = mpt->dev;
564
565 /* Check if we alreay have allocated the reply memory */
566 if (mpt->reply_phys != 0) {

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

579 mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO);
580 if (mpt->request_pool == NULL) {
581 device_printf(dev, "cannot allocate request pool\n");
582 return (1);
583 }
584#endif
585
586 /*
529 * Create a parent dma tag for this device
587 * Create a parent dma tag for this device.
530 *
588 *
531 * Align at byte boundaries, limit to 32-bit addressing
532 * (The chip supports 64-bit addressing, but this driver doesn't)
589 * Align at byte boundaries, limit to 32-bit addressing for
590 * request/reply queues.
533 */
534 if (mpt_dma_tag_create(mpt, /*parent*/NULL, /*alignment*/1,
591 */
592 if (mpt_dma_tag_create(mpt, /*parent*/NULL, /*alignment*/1,
535 /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
593 /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR,
536 /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL,
537 /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
538 /*nsegments*/BUS_SPACE_MAXSIZE_32BIT,
539 /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0,
540 &mpt->parent_dmat) != 0) {
541 device_printf(dev, "cannot create parent dma tag\n");
542 return (1);
543 }
544
545 /* Create a child tag for reply buffers */
594 /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL,
595 /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
596 /*nsegments*/BUS_SPACE_MAXSIZE_32BIT,
597 /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0,
598 &mpt->parent_dmat) != 0) {
599 device_printf(dev, "cannot create parent dma tag\n");
600 return (1);
601 }
602
603 /* Create a child tag for reply buffers */
546 if (mpt_dma_tag_create(mpt, mpt->parent_dmat, PAGE_SIZE,
547 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
548 NULL, NULL, PAGE_SIZE, 1, BUS_SPACE_MAXSIZE_32BIT, 0,
604 if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 2 * PAGE_SIZE,
605 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
606 NULL, NULL, 2 * PAGE_SIZE, 1, BUS_SPACE_MAXSIZE_32BIT, 0,
549 &mpt->reply_dmat) != 0) {
550 device_printf(dev, "cannot create a dma tag for replies\n");
551 return (1);
552 }
553
554 /* Allocate some DMA accessable memory for replies */
555 if (bus_dmamem_alloc(mpt->reply_dmat, (void **)&mpt->reply,
556 BUS_DMA_NOWAIT, &mpt->reply_dmap) != 0) {
607 &mpt->reply_dmat) != 0) {
608 device_printf(dev, "cannot create a dma tag for replies\n");
609 return (1);
610 }
611
612 /* Allocate some DMA accessable memory for replies */
613 if (bus_dmamem_alloc(mpt->reply_dmat, (void **)&mpt->reply,
614 BUS_DMA_NOWAIT, &mpt->reply_dmap) != 0) {
557 device_printf(dev, "cannot allocate %lu bytes of reply memory\n",
558 (u_long)PAGE_SIZE);
615 device_printf(dev,
616 "cannot allocate %lu bytes of reply memory\n",
617 (u_long) (2 * PAGE_SIZE));
559 return (1);
560 }
561
562 mi.mpt = mpt;
563 mi.error = 0;
564
565 /* Load and lock it into "bus space" */
566 bus_dmamap_load(mpt->reply_dmat, mpt->reply_dmap, mpt->reply,
618 return (1);
619 }
620
621 mi.mpt = mpt;
622 mi.error = 0;
623
624 /* Load and lock it into "bus space" */
625 bus_dmamap_load(mpt->reply_dmat, mpt->reply_dmap, mpt->reply,
567 PAGE_SIZE, mpt_map_rquest, &mi, 0);
626 2 * PAGE_SIZE, mpt_map_rquest, &mi, 0);
568
569 if (mi.error) {
570 device_printf(dev,
571 "error %d loading dma map for DMA reply queue\n", mi.error);
572 return (1);
573 }
574 mpt->reply_phys = mi.phys;
575
576 /* Create a child tag for data buffers */
627
628 if (mi.error) {
629 device_printf(dev,
630 "error %d loading dma map for DMA reply queue\n", mi.error);
631 return (1);
632 }
633 mpt->reply_phys = mi.phys;
634
635 /* Create a child tag for data buffers */
636
637 /*
638 * XXX: we should say that nsegs is 'unrestricted, but that
639 * XXX: tickles a horrible bug in the busdma code. Instead,
640 * XXX: we'll derive a reasonable segment limit from MAXPHYS
641 */
642 nsegs = (MAXPHYS / PAGE_SIZE) + 1;
577 if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1,
578 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
643 if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1,
644 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
579 NULL, NULL, MAXBSIZE, MPT_SGL_MAX, BUS_SPACE_MAXSIZE_32BIT, 0,
645 NULL, NULL, MAXBSIZE, nsegs, BUS_SPACE_MAXSIZE_32BIT, 0,
580 &mpt->buffer_dmat) != 0) {
581 device_printf(dev,
582 "cannot create a dma tag for data buffers\n");
583 return (1);
584 }
585
586 /* Create a child tag for request buffers */
587 if (mpt_dma_tag_create(mpt, mpt->parent_dmat, PAGE_SIZE,
646 &mpt->buffer_dmat) != 0) {
647 device_printf(dev,
648 "cannot create a dma tag for data buffers\n");
649 return (1);
650 }
651
652 /* Create a child tag for request buffers */
653 if (mpt_dma_tag_create(mpt, mpt->parent_dmat, PAGE_SIZE,
588 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
654 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
589 NULL, NULL, MPT_REQ_MEM_SIZE(mpt), 1, BUS_SPACE_MAXSIZE_32BIT, 0,
590 &mpt->request_dmat) != 0) {
591 device_printf(dev, "cannot create a dma tag for requests\n");
592 return (1);
593 }
594
595 /* Allocate some DMA accessable memory for requests */
596 if (bus_dmamem_alloc(mpt->request_dmat, (void **)&mpt->request,

--- 153 unchanged lines hidden ---
655 NULL, NULL, MPT_REQ_MEM_SIZE(mpt), 1, BUS_SPACE_MAXSIZE_32BIT, 0,
656 &mpt->request_dmat) != 0) {
657 device_printf(dev, "cannot create a dma tag for requests\n");
658 return (1);
659 }
660
661 /* Allocate some DMA accessable memory for requests */
662 if (bus_dmamem_alloc(mpt->request_dmat, (void **)&mpt->request,

--- 153 unchanged lines hidden ---