Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mpr_sas_lsi.c
Show First 20 Lines • Show All 905 Lines • ▼ Show 20 Lines | mprsas_get_sas_address_for_sata_disk(struct mpr_softc *sc, | ||||
u32 *bufferptr; | u32 *bufferptr; | ||||
union _sata_sas_address hash_address; | union _sata_sas_address hash_address; | ||||
struct _ata_identify_device_data ata_identify; | struct _ata_identify_device_data ata_identify; | ||||
u8 buffer[MPT2SAS_MN_LEN + MPT2SAS_SN_LEN]; | u8 buffer[MPT2SAS_MN_LEN + MPT2SAS_SN_LEN]; | ||||
u32 ioc_status; | u32 ioc_status; | ||||
u8 sas_status; | u8 sas_status; | ||||
memset(&ata_identify, 0, sizeof(ata_identify)); | memset(&ata_identify, 0, sizeof(ata_identify)); | ||||
memset(&mpi_reply, 0, sizeof(mpi_reply)); | |||||
try_count = 0; | try_count = 0; | ||||
do { | do { | ||||
rc = mprsas_get_sata_identify(sc, handle, &mpi_reply, | rc = mprsas_get_sata_identify(sc, handle, &mpi_reply, | ||||
(char *)&ata_identify, sizeof(ata_identify), device_info); | (char *)&ata_identify, sizeof(ata_identify), device_info); | ||||
try_count++; | try_count++; | ||||
ioc_status = le16toh(mpi_reply.IOCStatus) | ioc_status = le16toh(mpi_reply.IOCStatus) | ||||
& MPI2_IOCSTATUS_MASK; | & MPI2_IOCSTATUS_MASK; | ||||
sas_status = mpi_reply.SASStatus; | sas_status = mpi_reply.SASStatus; | ||||
switch (ioc_status) { | switch (ioc_status) { | ||||
case MPI2_IOCSTATUS_SUCCESS: | case MPI2_IOCSTATUS_SUCCESS: | ||||
break; | break; | ||||
case MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR: | case MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR: | ||||
/* No sense sleeping. this error won't get better */ | /* No sense sleeping. this error won't get better */ | ||||
break; | break; | ||||
default: | default: | ||||
if (sc->spinup_wait_time > 0) { | if (sc->spinup_wait_time > 0) { | ||||
asomers: @slm Is this debug message to your liking? I don't want to commit it if it isn't exactly what… | |||||
Not Done Inline ActionsYou shouldn't really need to print this message because mprsas_get_sata_identify will print a message already if there is a problem. You can see this message in your issue, "... request for page completed with error...". And, in fact, ioc_status and sas_status will not show anything useful if there is no reply. slm: You shouldn't really need to print this message because mprsas_get_sata_identify will print a… | |||||
Not Done Inline ActionsI only added this because you asked for something like it in your email dated Jan-24. Do you want something different? Or should I just remove it? asomers: I only added this because you asked for something like it in your email dated Jan-24. Do you… | |||||
Not Done Inline ActionsOh, sorry. I only meant for you to add that for your own debugging purposes so that we could narrow down where the problem was. Now that we know that mpi_reply is not 0'd out, I think that's all we need and you can remove the print. slm: Oh, sorry. I only meant for you to add that for your own debugging purposes so that we could… | |||||
mpr_dprint(sc, MPR_INFO, "Sleeping %d seconds " | mpr_dprint(sc, MPR_INFO, "Sleeping %d seconds " | ||||
"after SATA ID error to wait for spinup\n", | "after SATA ID error to wait for spinup\n", | ||||
sc->spinup_wait_time); | sc->spinup_wait_time); | ||||
msleep(&sc->msleep_fake_chan, &sc->mpr_mtx, 0, | msleep(&sc->msleep_fake_chan, &sc->mpr_mtx, 0, | ||||
"mprid", sc->spinup_wait_time * hz); | "mprid", sc->spinup_wait_time * hz); | ||||
} | } | ||||
} | } | ||||
} while (((rc && (rc != EWOULDBLOCK)) || | } while (((rc && (rc != EWOULDBLOCK)) || | ||||
▲ Show 20 Lines • Show All 491 Lines • Show Last 20 Lines |
@slm Is this debug message to your liking? I don't want to commit it if it isn't exactly what you want.