Improve firmware download status check. Previous check was insufficient for
ATA since it ignored transport errors like command timeouts, while for SCSI it was just wrong.
This commit is contained in:
parent
8d6235fb66
commit
126690fec1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251743
@ -370,17 +370,15 @@ fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp,
|
|||||||
}
|
}
|
||||||
if (!sim_mode) {
|
if (!sim_mode) {
|
||||||
/* Execute the command. */
|
/* Execute the command. */
|
||||||
if (cam_send_ccb(cam_dev, ccb) < 0) {
|
if (cam_send_ccb(cam_dev, ccb) < 0 ||
|
||||||
|
(ccb->ccb_h.status & CAM_STATUS_MASK) !=
|
||||||
|
CAM_REQ_CMP) {
|
||||||
warnx("Error writing image to device");
|
warnx("Error writing image to device");
|
||||||
if (printerrors)
|
if (printerrors)
|
||||||
cam_error_print(cam_dev, ccb, CAM_ESF_ALL,
|
cam_error_print(cam_dev, ccb, CAM_ESF_ALL,
|
||||||
CAM_EPF_ALL, stderr);
|
CAM_EPF_ALL, stderr);
|
||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
if (ccb->ataio.res.status != 0 /*&& !last_pkt*/) {
|
|
||||||
cam_error_print(cam_dev, ccb, CAM_ESF_ALL,
|
|
||||||
CAM_EPF_ALL, stderr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Prepare next round. */
|
/* Prepare next round. */
|
||||||
pkt_count++;
|
pkt_count++;
|
||||||
|
Loading…
Reference in New Issue
Block a user