diff options
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r-- | sys/cam/scsi/scsi_sa.c | 73 |
1 files changed, 47 insertions, 26 deletions
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index e8027e1..74a3382 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -735,13 +735,17 @@ sastrategy(struct bio *bp) * Place it at the end of the queue. */ bioq_insert_tail(&softc->bio_queue, bp); - softc->queue_count++; - CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("sastrategy: enqueuing a %d " - "%s byte %s queue count now %d\n", (int) bp->bio_bcount, - (softc->flags & SA_FLAG_FIXED)? "fixed" : "variable", - (bp->bio_cmd == BIO_READ)? "read" : "write", softc->queue_count)); - +#if 0 + CAM_DEBUG(periph->path, CAM_DEBUG_INFO, + ("sastrategy: queuing a %ld %s byte %s\n", bp->bio_bcount, + (softc->flags & SA_FLAG_FIXED)? "fixed" : "variable", + (bp->bio_cmd == BIO_READ)? "read" : "write")); +#endif + if (softc->queue_count > 1) { + CAM_DEBUG(periph->path, CAM_DEBUG_INFO, + ("sastrategy: queue count now %d\n", softc->queue_count)); + } splx(s); /* @@ -1507,7 +1511,7 @@ sastart(struct cam_periph *periph, union ccb *start_ccb) softc = (struct sa_softc *)periph->softc; - CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("sastart")); + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sastart\n")); switch (softc->state) { @@ -1600,12 +1604,20 @@ again: biodone(bp); break; } - CAM_DEBUG(periph->path, CAM_DEBUG_INFO, - ("Fixed Record Count is %d\n", length)); +#if 0 + CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_INFO, + ("issuing a %d fixed record %s\n", + length, (bp->bio_cmd == BIO_READ)? "read" : + "write")); +#endif } else { length = bp->bio_bcount; +#if 0 CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_INFO, - ("Variable Record Count is %d\n", length)); + ("issuing a %d variable byte %s\n", + length, (bp->bio_cmd == BIO_READ)? "read" : + "write")); +#endif } devstat_start_transaction_bio(softc->device_stats, bp); /* @@ -2780,6 +2792,21 @@ retry: * the saved value. */ switch (ccomp->hdr.pagecode & ~0x80) { + case SA_DEVICE_CONFIGURATION_PAGE: + { + struct scsi_dev_conf_page *dcp = &cpage->dconf; + if (calg == 0) { + dcp->sel_comp_alg = SA_COMP_NONE; + break; + } + if (calg != MT_COMP_ENABLE) { + dcp->sel_comp_alg = calg; + } else if (dcp->sel_comp_alg == SA_COMP_NONE && + softc->saved_comp_algorithm != 0) { + dcp->sel_comp_alg = softc->saved_comp_algorithm; + } + break; + } case SA_DATA_COMPRESSION_PAGE: if (ccomp->dcomp.dce_and_dcc & SA_DCP_DCC) { struct scsi_data_compression_page *dcp = &cpage->dcomp; @@ -2815,22 +2842,16 @@ retry: } break; } - /* XXX: fall-through intentional ? */ - case SA_DEVICE_CONFIGURATION_PAGE: - { - struct scsi_dev_conf_page *dcp = &cpage->dconf; - if (calg == 0) { - dcp->sel_comp_alg = SA_COMP_NONE; - break; - } - if (calg != MT_COMP_ENABLE) { - dcp->sel_comp_alg = calg; - } else if (dcp->sel_comp_alg == SA_COMP_NONE && - softc->saved_comp_algorithm != 0) { - dcp->sel_comp_alg = softc->saved_comp_algorithm; - } - break; - } + /* + * Compression does not appear to be supported- + * at least via the DATA COMPRESSION page. It + * would be too much to ask us to believe that + * the page itself is supported, but incorrectly + * reports an ability to manipulate data compression, + * so we'll assume that this device doesn't support + * compression. We can just fall through for that. + */ + /* FALLTHROUGH */ default: /* * The drive doesn't seem to support compression, |