[Midnightbsd-cvs] src [9051] trunk/sys/cam/scsi/scsi_cd.c: add missing xpt_schedule call
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Oct 1 06:01:51 EDT 2016
Revision: 9051
http://svnweb.midnightbsd.org/src/?rev=9051
Author: laffer1
Date: 2016-10-01 06:01:51 -0400 (Sat, 01 Oct 2016)
Log Message:
-----------
add missing xpt_schedule call
Modified Paths:
--------------
trunk/sys/cam/scsi/scsi_cd.c
Modified: trunk/sys/cam/scsi/scsi_cd.c
===================================================================
--- trunk/sys/cam/scsi/scsi_cd.c 2016-10-01 10:01:23 UTC (rev 9050)
+++ trunk/sys/cam/scsi/scsi_cd.c 2016-10-01 10:01:51 UTC (rev 9051)
@@ -581,7 +581,7 @@
if (softc->state == CD_STATE_NORMAL && !softc->tur) {
if (cam_periph_acquire(periph) == CAM_REQ_CMP) {
softc->tur = 1;
- xpt_schedule(periph, CAM_PRIORITY_DEV);
+ xpt_schedule(periph, CAM_PRIORITY_NORMAL);
}
}
/* FALLTHROUGH */
@@ -1612,9 +1612,11 @@
xpt_action(start_ccb);
}
- if (bp != NULL || softc->tur) {
+ if (bp != NULL || softc->tur ||
+ periph->immediate_priority != CAM_PRIORITY_NONE) {
/* Have more work to do, so ensure we stay scheduled */
- xpt_schedule(periph, CAM_PRIORITY_NORMAL);
+ xpt_schedule(periph, min(CAM_PRIORITY_NORMAL,
+ periph->immediate_priority));
}
break;
}
@@ -3293,10 +3295,11 @@
if (softc->flags & CD_FLAG_CHANGER)
return;
- if (softc->state == CD_STATE_NORMAL && !softc->tur) {
+ if (softc->state == CD_STATE_NORMAL && !softc->tur &&
+ softc->outstanding_cmds == 0) {
if (cam_periph_acquire(periph) == CAM_REQ_CMP) {
softc->tur = 1;
- xpt_schedule(periph, CAM_PRIORITY_DEV);
+ xpt_schedule(periph, CAM_PRIORITY_NORMAL);
}
}
/* Queue us up again */
More information about the Midnightbsd-cvs
mailing list