We should never enter the PROBE_SETAN phase if we're not ATAPI, since
that's ATAPI specific. Instead, skip to PROBE_SET_MULTI instead for non ATAPI protocols. The prior code incorrectly terminated the probe with a break, rather than arranging for probedone to get called. This caused panics or worse on some systems.
This commit is contained in:
parent
b297e71ede
commit
e4bed0b403
@ -458,18 +458,12 @@ probestart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
0, 0x02);
|
||||
break;
|
||||
case PROBE_SETAN:
|
||||
/*
|
||||
* Only ATAPI defines this bit to mean AEN, but remember
|
||||
* what transport thinks about AEN.
|
||||
*/
|
||||
if ((softc->caps & CTS_SATA_CAPS_H_AN) &&
|
||||
periph->path->device->protocol == PROTO_ATAPI)
|
||||
/* Remember what transport thinks about AEN. */
|
||||
if (softc->caps & CTS_SATA_CAPS_H_AN)
|
||||
path->device->inq_flags |= SID_AEN;
|
||||
else
|
||||
path->device->inq_flags &= ~SID_AEN;
|
||||
xpt_async(AC_GETDEV_CHANGED, path, NULL);
|
||||
if (periph->path->device->protocol != PROTO_ATAPI)
|
||||
break;
|
||||
cam_fill_ataio(ataio,
|
||||
1,
|
||||
probedone,
|
||||
@ -1057,7 +1051,8 @@ device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case PROBE_SETDMAAA:
|
||||
if ((ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) &&
|
||||
if (path->device->protocol != PROTO_ATA &&
|
||||
(ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) &&
|
||||
(!(softc->caps & CTS_SATA_CAPS_H_AN)) !=
|
||||
(!(ident_buf->sataenabled & ATA_SUPPORT_ASYNCNOTIF))) {
|
||||
PROBE_SET_ACTION(softc, PROBE_SETAN);
|
||||
@ -1178,7 +1173,7 @@ device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0)
|
||||
else
|
||||
caps = 0;
|
||||
/* Remember what transport thinks about AEN. */
|
||||
if (caps & CTS_SATA_CAPS_H_AN)
|
||||
if ((caps & CTS_SATA_CAPS_H_AN) && path->device->protocol != PROTO_ATA)
|
||||
path->device->inq_flags |= SID_AEN;
|
||||
else
|
||||
path->device->inq_flags &= ~SID_AEN;
|
||||
|
Loading…
Reference in New Issue
Block a user