Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mrsas/mrsas.c
Show First 20 Lines • Show All 2,775 Lines • ▼ Show 20 Lines | mrsas_ioc_init(struct mrsas_softc *sc) | ||||
if (sc->max_chain_frame_sz > MEGASAS_CHAIN_FRAME_SZ_MIN) | if (sc->max_chain_frame_sz > MEGASAS_CHAIN_FRAME_SZ_MIN) | ||||
init_frame->driver_operations.mfi_capabilities.support_ext_io_size = 1; | init_frame->driver_operations.mfi_capabilities.support_ext_io_size = 1; | ||||
init_frame->driver_operations.reg = htole32(init_frame->driver_operations.reg); | init_frame->driver_operations.reg = htole32(init_frame->driver_operations.reg); | ||||
phys_addr = (bus_addr_t)sc->ioc_init_phys_mem + 1024; | phys_addr = (bus_addr_t)sc->ioc_init_phys_mem + 1024; | ||||
init_frame->queue_info_new_phys_addr_lo = htole32(phys_addr); | init_frame->queue_info_new_phys_addr_lo = htole32(phys_addr); | ||||
init_frame->data_xfer_len = htole32(sizeof(Mpi2IOCInitRequest_t)); | init_frame->data_xfer_len = htole32(sizeof(Mpi2IOCInitRequest_t)); | ||||
req_desc.addr.u.low = htole32((bus_addr_t)sc->ioc_init_phys_mem & 0xFFFFFFFF); | req_desc.addr.Words = htole64((bus_addr_t)sc->ioc_init_phys_mem); | ||||
jhibbits: Would it not work to only keep line 2788, and always do htole64() instead? | |||||
req_desc.addr.u.high = htole32((bus_addr_t)sc->ioc_init_phys_mem >> 32); | |||||
req_desc.MFAIo.RequestFlags = | req_desc.MFAIo.RequestFlags = | ||||
(MRSAS_REQ_DESCRIPT_FLAGS_MFA << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); | (MRSAS_REQ_DESCRIPT_FLAGS_MFA << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); | ||||
mrsas_disable_intr(sc); | mrsas_disable_intr(sc); | ||||
mrsas_dprint(sc, MRSAS_OCR, "Issuing IOC INIT command to FW.\n"); | mrsas_dprint(sc, MRSAS_OCR, "Issuing IOC INIT command to FW.\n"); | ||||
mrsas_write_64bit_req_desc(sc, req_desc.addr.u.low, req_desc.addr.u.high); | mrsas_write_64bit_req_desc(sc, req_desc.addr.u.low, req_desc.addr.u.high); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 2,291 Lines • Show Last 20 Lines |
Would it not work to only keep line 2788, and always do htole64() instead?