Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mpr_sas_lsi.c
Show First 20 Lines • Show All 1,020 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
out: | out: | ||||
/* | /* | ||||
* Free the commands that may not have been freed from the SATA ID call | * Free the commands that may not have been freed from the SATA ID call | ||||
*/ | */ | ||||
for (i = 1; i < sc->num_reqs; i++) { | for (i = 1; i < sc->num_reqs; i++) { | ||||
cm = &sc->commands[i]; | cm = &sc->commands[i]; | ||||
if (cm->cm_flags & MPR_CM_FLAGS_SATA_ID_TIMEOUT) { | if (cm->cm_flags & MPR_CM_FLAGS_SATA_ID_TIMEOUT) { | ||||
free(cm->cm_data, M_MPR); | |||||
mpr_free_command(sc, cm); | mpr_free_command(sc, cm); | ||||
} | } | ||||
} | } | ||||
mprsas_startup_decrement(sassc); | mprsas_startup_decrement(sassc); | ||||
return (error); | return (error); | ||||
} | } | ||||
int | int | ||||
▲ Show 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | mpr_dprint(sc, MPR_INFO|MPR_MAPPING|MPR_FAULT, | ||||
"Error reading device %#x SATA PASSTHRU; iocstatus= 0x%x\n", | "Error reading device %#x SATA PASSTHRU; iocstatus= 0x%x\n", | ||||
handle, reply->IOCStatus); | handle, reply->IOCStatus); | ||||
error = ENXIO; | error = ENXIO; | ||||
goto out; | goto out; | ||||
} | } | ||||
out: | out: | ||||
/* | /* | ||||
* If the SATA_ID_TIMEOUT flag has been set for this command, don't free | * If the SATA_ID_TIMEOUT flag has been set for this command, don't free | ||||
* it. The command will be freed after sending a target reset TM. If | * it. The command and buffer will be freed after sending an Abort | ||||
* the command did timeout, use EWOULDBLOCK. | * Task TM. If the command did timeout, use EWOULDBLOCK. | ||||
*/ | */ | ||||
if ((cm->cm_flags & MPR_CM_FLAGS_SATA_ID_TIMEOUT) == 0) | if ((cm->cm_flags & MPR_CM_FLAGS_SATA_ID_TIMEOUT) == 0) { | ||||
mpr_free_command(sc, cm); | mpr_free_command(sc, cm); | ||||
else if (error == 0) | |||||
error = EWOULDBLOCK; | |||||
cm->cm_data = NULL; | |||||
free(buffer, M_MPR); | free(buffer, M_MPR); | ||||
} else if (error == 0) | |||||
error = EWOULDBLOCK; | |||||
return (error); | return (error); | ||||
} | } | ||||
static void | static void | ||||
mprsas_ata_id_timeout(void *data) | mprsas_ata_id_timeout(void *data) | ||||
{ | { | ||||
struct mpr_softc *sc; | struct mpr_softc *sc; | ||||
struct mpr_command *cm; | struct mpr_command *cm; | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |