Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpi3mr/mpi3mr.c
Show First 20 Lines • Show All 2,170 Lines • ▼ Show 20 Lines | sc->init_cmds.callback = NULL; | ||||
iocinit_req.SenseBufferFreeQueueAddress = | iocinit_req.SenseBufferFreeQueueAddress = | ||||
sc->sense_buf_q_phys; | sc->sense_buf_q_phys; | ||||
iocinit_req.DriverInformationAddress = drvr_info_phys; | iocinit_req.DriverInformationAddress = drvr_info_phys; | ||||
getmicrotime(&now); | getmicrotime(&now); | ||||
time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); | time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); | ||||
iocinit_req.TimeStamp = htole64(time_in_msec); | iocinit_req.TimeStamp = htole64(time_in_msec); | ||||
iocinit_req.MsgFlags |= MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED; | |||||
init_completion(&sc->init_cmds.completion); | init_completion(&sc->init_cmds.completion); | ||||
retval = mpi3mr_submit_admin_cmd(sc, &iocinit_req, | retval = mpi3mr_submit_admin_cmd(sc, &iocinit_req, | ||||
sizeof(iocinit_req)); | sizeof(iocinit_req)); | ||||
if (retval) { | if (retval) { | ||||
printf(IOCNAME "Issue IOCInit: Admin Post failed\n", | printf(IOCNAME "Issue IOCInit: Admin Post failed\n", | ||||
sc->name); | sc->name); | ||||
goto out_unlock; | goto out_unlock; | ||||
▲ Show 20 Lines • Show All 1,147 Lines • ▼ Show 20 Lines | void mpi3mr_update_device(struct mpi3mr_softc *sc, | ||||
case MPI3_DEVICE0_ASTATUS_NEEDS_INITIALIZATION: | case MPI3_DEVICE0_ASTATUS_NEEDS_INITIALIZATION: | ||||
case MPI3_DEVICE0_ASTATUS_DEVICE_MISSING_DELAY: | case MPI3_DEVICE0_ASTATUS_DEVICE_MISSING_DELAY: | ||||
break; | break; | ||||
default: | default: | ||||
tgtdev->is_hidden = 1; | tgtdev->is_hidden = 1; | ||||
break; | break; | ||||
} | } | ||||
switch (flags & MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_MASK) { | |||||
case MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_256_LB: | |||||
tgtdev->ws_len = 256; | |||||
break; | |||||
case MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_2048_LB: | |||||
tgtdev->ws_len = 2048; | |||||
break; | |||||
case MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_NO_LIMIT: | |||||
default: | |||||
tgtdev->ws_len = 0; | |||||
break; | |||||
} | |||||
switch (tgtdev->dev_type) { | switch (tgtdev->dev_type) { | ||||
case MPI3_DEVICE_DEVFORM_SAS_SATA: | case MPI3_DEVICE_DEVFORM_SAS_SATA: | ||||
{ | { | ||||
Mpi3Device0SasSataFormat_t *sasinf = | Mpi3Device0SasSataFormat_t *sasinf = | ||||
&dev_pg0->DeviceSpecific.SasSataFormat; | &dev_pg0->DeviceSpecific.SasSataFormat; | ||||
U16 dev_info = (sasinf->DeviceInfo); | U16 dev_info = (sasinf->DeviceInfo); | ||||
tgtdev->dev_spec.sassata_inf.dev_info = dev_info; | tgtdev->dev_spec.sassata_inf.dev_info = dev_info; | ||||
tgtdev->dev_spec.sassata_inf.sas_address = | tgtdev->dev_spec.sassata_inf.sas_address = | ||||
▲ Show 20 Lines • Show All 2,293 Lines • ▼ Show 20 Lines | static void mpi3mr_invalidate_devhandles(struct mpi3mr_softc *sc) | ||||
mtx_lock_spin(&sc->target_lock); | mtx_lock_spin(&sc->target_lock); | ||||
TAILQ_FOREACH(target, &sc->cam_sc->tgt_list, tgt_next) { | TAILQ_FOREACH(target, &sc->cam_sc->tgt_list, tgt_next) { | ||||
if (target) { | if (target) { | ||||
target->dev_handle = MPI3MR_INVALID_DEV_HANDLE; | target->dev_handle = MPI3MR_INVALID_DEV_HANDLE; | ||||
target->io_throttle_enabled = 0; | target->io_throttle_enabled = 0; | ||||
target->io_divert = 0; | target->io_divert = 0; | ||||
target->throttle_group = NULL; | target->throttle_group = NULL; | ||||
target->ws_len = 0; | |||||
} | } | ||||
} | } | ||||
mtx_unlock_spin(&sc->target_lock); | mtx_unlock_spin(&sc->target_lock); | ||||
} | } | ||||
/** | /** | ||||
* mpi3mr_rfresh_tgtdevs - Refresh target device exposure | * mpi3mr_rfresh_tgtdevs - Refresh target device exposure | ||||
* @sc: Adapter instance reference | * @sc: Adapter instance reference | ||||
▲ Show 20 Lines • Show All 494 Lines • Show Last 20 Lines |