svn commit: r232943 - in stable/9/sys/cam: ata scsi
Alexander Motin
mav at FreeBSD.org
Tue Mar 13 20:36:04 UTC 2012
Author: mav
Date: Tue Mar 13 20:36:03 2012
New Revision: 232943
URL: http://svn.freebsd.org/changeset/base/232943
Log:
MFc r229288:
Remove unneeded checks for CAM_DEV_QFRZN after cam_periph_runccb() call.
cam_periph_runccb() since the beginning checks it and releases device queue.
After r203108 it even clears CAM_DEV_QFRZN flag after that to avoid double
release, so removed code is unreachable now.
Modified:
stable/9/sys/cam/ata/ata_da.c
stable/9/sys/cam/scsi/scsi_da.c
stable/9/sys/cam/scsi/scsi_sa.c
stable/9/sys/cam/scsi/scsi_ses.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/cam/ata/ata_da.c
==============================================================================
--- stable/9/sys/cam/ata/ata_da.c Tue Mar 13 20:34:33 2012 (r232942)
+++ stable/9/sys/cam/ata/ata_da.c Tue Mar 13 20:36:03 2012 (r232943)
@@ -493,13 +493,6 @@ adaclose(struct disk *dp)
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
xpt_print(periph->path, "Synchronize cache failed\n");
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
xpt_release_ccb(ccb);
}
Modified: stable/9/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/9/sys/cam/scsi/scsi_da.c Tue Mar 13 20:34:33 2012 (r232942)
+++ stable/9/sys/cam/scsi/scsi_da.c Tue Mar 13 20:36:03 2012 (r232943)
@@ -991,13 +991,6 @@ daclose(struct disk *dp)
}
}
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
xpt_release_ccb(ccb);
}
@@ -2306,14 +2299,6 @@ dagetcapacity(struct cam_periph *periph)
/*cam_flags*/CAM_RETRY_SELTO,
sense_flags,
softc->disk->d_devstat);
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
if (error == 0)
goto rc16ok;
@@ -2351,14 +2336,6 @@ dagetcapacity(struct cam_periph *periph)
/*cam_flags*/CAM_RETRY_SELTO,
sense_flags,
softc->disk->d_devstat);
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
if (error == 0) {
block_len = scsi_4btoul(rcap->length);
maxsector = scsi_4btoul(rcap->addr);
@@ -2385,14 +2362,6 @@ dagetcapacity(struct cam_periph *periph)
/*cam_flags*/CAM_RETRY_SELTO,
sense_flags,
softc->disk->d_devstat);
-
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path,
- /*relsim_flags*/0,
- /*reduction*/0,
- /*timeout*/0,
- /*getcount_only*/0);
-
if (error == 0) {
rc16ok:
block_len = scsi_4btoul(rcaplong->length);
Modified: stable/9/sys/cam/scsi/scsi_sa.c
==============================================================================
--- stable/9/sys/cam/scsi/scsi_sa.c Tue Mar 13 20:34:33 2012 (r232942)
+++ stable/9/sys/cam/scsi/scsi_sa.c Tue Mar 13 20:36:03 2012 (r232943)
@@ -1853,14 +1853,12 @@ samount(struct cam_periph *periph, int o
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
if (error == ENXIO) {
softc->flags &= ~SA_FLAG_TAPE_MOUNTED;
scsi_test_unit_ready(&ccb->csio, 0, sadone,
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
} else if (error) {
/*
* We don't need to freeze the tape because we
@@ -1882,7 +1880,6 @@ samount(struct cam_periph *periph, int o
MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, IO_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
}
if ((softc->flags & SA_FLAG_TAPE_MOUNTED) == 0) {
@@ -1905,7 +1902,6 @@ samount(struct cam_periph *periph, int o
FALSE, FALSE, 1, SSD_FULL_SIZE, REWIND_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
/*
* In case this doesn't work, do a REWIND instead
@@ -1915,7 +1911,6 @@ samount(struct cam_periph *periph, int o
FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
}
if (error) {
xpt_release_ccb(ccb);
@@ -1945,13 +1940,11 @@ samount(struct cam_periph *periph, int o
IO_TIMEOUT);
(void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG,
FALSE, SSD_FULL_SIZE, REWIND_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
SF_NO_PRINT | SF_RETRY_UA,
softc->device_stats);
- QFRLS(ccb);
if (error) {
xpt_print(periph->path,
"unable to rewind after test read\n");
@@ -1969,7 +1962,6 @@ samount(struct cam_periph *periph, int o
error = cam_periph_runccb(ccb, saerror, CAM_RETRY_SELTO,
SF_NO_PRINT | SF_RETRY_UA, softc->device_stats);
- QFRLS(ccb);
xpt_release_ccb(ccb);
if (error != 0) {
@@ -2580,7 +2572,6 @@ retry:
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
status = ccb->ccb_h.status & CAM_STATUS_MASK;
@@ -2644,7 +2635,6 @@ retry:
error = cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT,
softc->device_stats);
- QFRLS(ccb);
if (error != 0)
goto sagetparamsexit;
@@ -2956,7 +2946,6 @@ retry:
error = cam_periph_runccb(ccb, saerror, 0,
sense_flags, softc->device_stats);
- QFRLS(ccb);
if (CAM_DEBUGGED(periph->path, CAM_DEBUG_INFO)) {
int idx;
@@ -3014,7 +3003,6 @@ retry:
ccb->ccb_h.retry_count = 1;
cam_periph_runccb(ccb, saerror, 0, sense_flags,
softc->device_stats);
- QFRLS(ccb);
}
xpt_release_ccb(ccb);
@@ -3072,7 +3060,6 @@ saprevent(struct cam_periph *periph, int
SSD_FULL_SIZE, SCSIOP_TIMEOUT);
error = cam_periph_runccb(ccb, saerror, 0, sf, softc->device_stats);
- QFRLS(ccb);
if (error == 0) {
if (action == PR_ALLOW)
softc->flags &= ~SA_FLAG_TAPE_LOCKED;
@@ -3102,9 +3089,6 @@ sarewind(struct cam_periph *periph)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
xpt_release_ccb(ccb);
if (error == 0)
softc->fileno = softc->blkno = (daddr_t) 0;
@@ -3138,9 +3122,6 @@ saspace(struct cam_periph *periph, int c
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
xpt_release_ccb(ccb);
/*
@@ -3212,9 +3193,6 @@ sawritefilemarks(struct cam_periph *peri
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
-
if (error == 0 && nmarks) {
struct sa_softc *softc = (struct sa_softc *)periph->softc;
nwm = nmarks - softc->last_ctl_resid;
@@ -3265,8 +3243,6 @@ sardpos(struct cam_periph *periph, int h
softc->dsreg = MTIO_DSREG_RBSY;
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0);
if (error == 0) {
if (loc.flags & SA_RPOS_UNCERTAIN) {
@@ -3306,8 +3282,6 @@ sasetpos(struct cam_periph *periph, int
softc->dsreg = MTIO_DSREG_POS;
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0);
xpt_release_ccb(ccb);
/*
* Note relative file && block number position as now unknown.
@@ -3335,8 +3309,6 @@ saretension(struct cam_periph *periph)
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
xpt_release_ccb(ccb);
if (error == 0)
softc->fileno = softc->blkno = (daddr_t) 0;
@@ -3362,7 +3334,6 @@ sareservereleaseunit(struct cam_periph *
error = cam_periph_runccb(ccb, saerror, 0,
SF_RETRY_UA | SF_NO_PRINT, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- QFRLS(ccb);
xpt_release_ccb(ccb);
/*
@@ -3394,7 +3365,6 @@ saloadunload(struct cam_periph *periph,
softc->dsreg = (load)? MTIO_DSREG_LD : MTIO_DSREG_UNL;
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- QFRLS(ccb);
xpt_release_ccb(ccb);
if (error || load == 0)
@@ -3425,8 +3395,6 @@ saerase(struct cam_periph *periph, int l
error = cam_periph_runccb(ccb, saerror, 0, 0, softc->device_stats);
softc->dsreg = MTIO_DSREG_REST;
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
xpt_release_ccb(ccb);
return (error);
}
Modified: stable/9/sys/cam/scsi/scsi_ses.c
==============================================================================
--- stable/9/sys/cam/scsi/scsi_ses.c Tue Mar 13 20:34:33 2012 (r232942)
+++ stable/9/sys/cam/scsi/scsi_ses.c Tue Mar 13 20:36:03 2012 (r232943)
@@ -679,8 +679,6 @@ ses_runcmd(struct ses_softc *ssc, char *
bcopy(cdb, ccb->csio.cdb_io.cdb_bytes, cdbl);
error = cam_periph_runccb(ccb, seserror, SES_CFLAGS, SES_FLAGS, NULL);
- if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
- cam_release_devq(ccb->ccb_h.path, 0, 0, 0, FALSE);
if (error) {
if (dptr) {
*dlenp = dlen;
More information about the svn-src-stable-9
mailing list