Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ata/ata-dma.c
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | ata_dmainit(device_t dev) | ||||
ch->dma.unload = ata_dmaunload; | ch->dma.unload = ata_dmaunload; | ||||
if (ch->dma.alignment == 0) | if (ch->dma.alignment == 0) | ||||
ch->dma.alignment = 2; | ch->dma.alignment = 2; | ||||
if (ch->dma.boundary == 0) | if (ch->dma.boundary == 0) | ||||
ch->dma.boundary = 65536; | ch->dma.boundary = 65536; | ||||
if (ch->dma.segsize == 0) | if (ch->dma.segsize == 0) | ||||
ch->dma.segsize = 65536; | ch->dma.segsize = 65536; | ||||
if (ch->dma.max_iosize == 0) | if (ch->dma.max_iosize == 0) | ||||
ch->dma.max_iosize = MIN((ATA_DMA_ENTRIES - 1) * PAGE_SIZE, MAXPHYS); | ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE; | ||||
if (ch->dma.max_address == 0) | if (ch->dma.max_address == 0) | ||||
ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; | ch->dma.max_address = BUS_SPACE_MAXADDR_32BIT; | ||||
if (ch->dma.dma_slots == 0) | if (ch->dma.dma_slots == 0) | ||||
ch->dma.dma_slots = 1; | ch->dma.dma_slots = 1; | ||||
if (bus_dma_tag_create(bus_get_dma_tag(dev), ch->dma.alignment, 0, | if (bus_dma_tag_create(bus_get_dma_tag(dev), ch->dma.alignment, 0, | ||||
ch->dma.max_address, BUS_SPACE_MAXADDR, | ch->dma.max_address, BUS_SPACE_MAXADDR, | ||||
NULL, NULL, ch->dma.max_iosize, | NULL, NULL, ch->dma.max_iosize, | ||||
▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines |