Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mfi/mfi.c
Show First 20 Lines • Show All 451 Lines • ▼ Show 20 Lines | mfi_attach(struct mfi_softc *sc) | ||||
bus_dmamap_load(sc->verbuf_h_dmat, sc->verbuf_h_dmamap, | bus_dmamap_load(sc->verbuf_h_dmat, sc->verbuf_h_dmamap, | ||||
sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t), | sc->verbuf, MEGASAS_MAX_NAME*sizeof(bus_addr_t), | ||||
mfi_addr_cb, &sc->verbuf_h_busaddr, 0); | mfi_addr_cb, &sc->verbuf_h_busaddr, 0); | ||||
/* End: LSIP200113393 */ | /* End: LSIP200113393 */ | ||||
/* | /* | ||||
* Get information needed for sizing the contiguous memory for the | * Get information needed for sizing the contiguous memory for the | ||||
* frame pool. Size down the sgl parameter since we know that | * frame pool. Size down the sgl parameter since we know that | ||||
* we will never need more than what's required for MAXPHYS. | * we will never need more than what's required for MFI_MAXPHYS. | ||||
* It would be nice if these constants were available at runtime | * It would be nice if these constants were available at runtime | ||||
* instead of compile time. | * instead of compile time. | ||||
*/ | */ | ||||
status = sc->mfi_read_fw_status(sc); | status = sc->mfi_read_fw_status(sc); | ||||
max_fw_cmds = status & MFI_FWSTATE_MAXCMD_MASK; | max_fw_cmds = status & MFI_FWSTATE_MAXCMD_MASK; | ||||
if (mfi_max_cmds > 0 && mfi_max_cmds < max_fw_cmds) { | if (mfi_max_cmds > 0 && mfi_max_cmds < max_fw_cmds) { | ||||
device_printf(sc->mfi_dev, "FW MaxCmds = %d, limiting to %d\n", | device_printf(sc->mfi_dev, "FW MaxCmds = %d, limiting to %d\n", | ||||
max_fw_cmds, mfi_max_cmds); | max_fw_cmds, mfi_max_cmds); | ||||
▲ Show 20 Lines • Show All 3,328 Lines • Show Last 20 Lines |