Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mrsas/mrsas_cam.c
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | |||||
MR_LdSpanArrayGet(u_int32_t ld, u_int32_t span, | MR_LdSpanArrayGet(u_int32_t ld, u_int32_t span, | ||||
MR_DRV_RAID_MAP_ALL * map); | MR_DRV_RAID_MAP_ALL * map); | ||||
extern u_int16_t | extern u_int16_t | ||||
mrsas_get_updated_dev_handle(struct mrsas_softc *sc, | mrsas_get_updated_dev_handle(struct mrsas_softc *sc, | ||||
PLD_LOAD_BALANCE_INFO lbInfo, struct IO_REQUEST_INFO *io_info); | PLD_LOAD_BALANCE_INFO lbInfo, struct IO_REQUEST_INFO *io_info); | ||||
extern u_int8_t | extern u_int8_t | ||||
megasas_get_best_arm(PLD_LOAD_BALANCE_INFO lbInfo, u_int8_t arm, | megasas_get_best_arm(PLD_LOAD_BALANCE_INFO lbInfo, u_int8_t arm, | ||||
u_int64_t block, u_int32_t count); | u_int64_t block, u_int32_t count); | ||||
extern int mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t MSIxIndex); | |||||
/* | /* | ||||
* mrsas_cam_attach: Main entry to CAM subsystem | * mrsas_cam_attach: Main entry to CAM subsystem | ||||
* input: Adapter instance soft state | * input: Adapter instance soft state | ||||
* | * | ||||
* This function is called from mrsas_attach() during initialization to perform | * This function is called from mrsas_attach() during initialization to perform | ||||
* SIM allocations and XPT bus registration. If the kernel version is 7.4 or | * SIM allocations and XPT bus registration. If the kernel version is 7.4 or | ||||
* earlier, it would also initiate a bus scan. | * earlier, it would also initiate a bus scan. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,032 Lines • ▼ Show 20 Lines | |||||
* input: Pointer to SIM | * input: Pointer to SIM | ||||
* | * | ||||
* This is currently a stub function. | * This is currently a stub function. | ||||
*/ | */ | ||||
static void | static void | ||||
mrsas_cam_poll(struct cam_sim *sim) | mrsas_cam_poll(struct cam_sim *sim) | ||||
{ | { | ||||
struct mrsas_softc *sc = (struct mrsas_softc *)cam_sim_softc(sim); | struct mrsas_softc *sc = (struct mrsas_softc *)cam_sim_softc(sim); | ||||
int i; | |||||
mrsas_isr((void *)sc); | if (sc->msix_vectors != 0) | ||||
for(i = 0; i < sc->msix_vectors; i++) | |||||
mrsas_complete_cmd(sc, i); | |||||
else | |||||
mrsas_complete_cmd(sc, 0); | |||||
} | } | ||||
/* | /* | ||||
* mrsas_bus_scan: Perform bus scan | * mrsas_bus_scan: Perform bus scan | ||||
* input: Adapter instance soft state | * input: Adapter instance soft state | ||||
* | * | ||||
* This mrsas_bus_scan function is needed for FreeBSD 7.x. Also, it should not | * This mrsas_bus_scan function is needed for FreeBSD 7.x. Also, it should not | ||||
* be called in FreeBSD 8.x and later versions, where the bus scan is | * be called in FreeBSD 8.x and later versions, where the bus scan is | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |