summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-01-13 23:51:14 +0000
committerscottl <scottl@FreeBSD.org>2003-01-13 23:51:14 +0000
commitc1ba1fb1205392b8f4cb23a7451e47f0d7275e3d (patch)
tree6516449da77eb1c11f2ae62be7cb03985e046532 /sys/dev
parent74b41b188c877711d5db97f2c580cc07b10f49ef (diff)
downloadFreeBSD-src-c1ba1fb1205392b8f4cb23a7451e47f0d7275e3d.zip
FreeBSD-src-c1ba1fb1205392b8f4cb23a7451e47f0d7275e3d.tar.gz
Since reseting the SCSI busses via the passthrough interface usually
confuses the controller, tell CAM not to do it. Also report the correct error condition to CAM when it tries to probe a target that doesn't exists. This should make the CAM interface less risky to use. MFC After: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac_cam.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c
index 44f7db4..8ece0dd 100644
--- a/sys/dev/aac/aac_cam.c
+++ b/sys/dev/aac/aac_cam.c
@@ -220,7 +220,9 @@ aac_cam_action(struct cam_sim *sim, union ccb *ccb)
cpi->version_num = 1;
cpi->hba_inquiry = PI_WIDE_16;
cpi->target_sprt = 0;
- cpi->hba_misc = 0;
+
+ /* Resetting via the passthrough causes problems. */
+ cpi->hba_misc = PIM_NOBUSRESET;
cpi->hba_eng_cnt = 0;
cpi->max_target = camsc->inf->TargetsPerBus;
cpi->max_lun = 8; /* Per the controller spec */
@@ -514,7 +516,7 @@ aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb)
e = aac_sync_fib(sc, ContainerCommand, 0, fib,
sizeof(struct aac_vmioctl));
if (e) {
- device_printf(sc->aac_dev, "Error 0x%x sending passthrough\n",
+ device_printf(sc->aac_dev,"Error %d sending ResetBus command\n",
e);
aac_release_sync_fib(sc);
return (CAM_REQ_ABORTED);
@@ -557,18 +559,21 @@ aac_cam_get_tran_settings(struct aac_softc *sc, struct ccb_trans_settings *cts,
error = aac_sync_fib(sc, ContainerCommand, 0, fib,
sizeof(struct aac_vmioctl));
if (error) {
- device_printf(sc->aac_dev, "Error %d sending VMIoctl command\n",
- error);
+ device_printf(sc->aac_dev, "Error %d sending GetDeviceProbeInfo"
+ " command\n", error);
aac_release_sync_fib(sc);
return (CAM_REQ_INVALID);
}
vmi_resp = (struct aac_vmi_devinfo_resp *)&fib->data[0];
if (vmi_resp->Status != ST_OK) {
- device_printf(sc->aac_dev, "VM_Ioctl returned %d\n",
- vmi_resp->Status);
+ /*
+ * The only reason why this command will return an error is
+ * if the requested device doesn't exist.
+ */
+ debug(1, "GetDeviceProbeInfo returned %d\n", vmi_resp->Status);
aac_release_sync_fib(sc);
- return (CAM_REQ_CMP_ERR);
+ return (CAM_DEV_NOT_THERE);
}
cts->bus_width = ((vmi_resp->Inquiry7 & 0x60) >> 5);
OpenPOWER on IntegriCloud