summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2016-04-17 05:24:28 +0000
committerimp <imp@FreeBSD.org>2016-04-17 05:24:28 +0000
commit1821739d94e04a31dfd747ffb9dbc53a450e6363 (patch)
tree4bcb2368eeb86855284091dfe3aa729aa2c0195c /sys/cam
parent8cbbfb3edc78e81aa9db89e4dfb9ea47a167d8c7 (diff)
downloadFreeBSD-src-1821739d94e04a31dfd747ffb9dbc53a450e6363.zip
FreeBSD-src-1821739d94e04a31dfd747ffb9dbc53a450e6363.tar.gz
tag_action is not used at all in ata. It's set to 1 for ordered
transactions, but that value isn't used. It's bogusly used to report in devstat, due to a cut and paste error from SCSI. Mark it as unused in cam_fill_ataio. Reclaim the memory as a new ata_flags. In addition, tag_id and init_id are completely unused, so reclaim those as 'unused' now too. These were needlessly copied when ata was split from scsi. This allows us, in the future, to create structures that can communicate AUXILIARY regsiter to the SIMs, which cannot be done now. Differential Revision: https://reviews.freebsd.org/D5598
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c2
-rw-r--r--sys/cam/cam_ccb.h15
-rw-r--r--sys/cam/cam_periph.c2
-rw-r--r--sys/cam/scsi/scsi_pass.c2
4 files changed, 7 insertions, 14 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 7b1ebb4..b308065 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1851,7 +1851,7 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
ada_retry_count,
adadone,
rw_op,
- tag_code,
+ 0,
data_ptr,
bp->bio_bcount,
ada_default_timeout*1000);
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index c739aa6..7d3974d 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -744,15 +744,8 @@ struct ccb_ataio {
u_int8_t *data_ptr; /* Ptr to the data buf/SG list */
u_int32_t dxfer_len; /* Data transfer length */
u_int32_t resid; /* Transfer residual length: 2's comp */
- u_int8_t tag_action; /* What to do for tag queueing */
- /*
- * The tag action should be either the define below (to send a
- * non-tagged transaction) or one of the defined scsi tag messages
- * from scsi_message.h.
- */
-#define CAM_TAG_ACTION_NONE 0x00
- u_int tag_id; /* tag id from initator (target mode) */
- u_int init_id; /* initiator id of who selected */
+ u_int8_t ata_flags; /* Flags for the rest of the buffer */
+ uint32_t unused[2]; /* Keep the same size */
};
struct ccb_accept_tio {
@@ -1298,7 +1291,7 @@ cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retries,
static __inline void
cam_fill_ataio(struct ccb_ataio *ataio, u_int32_t retries,
void (*cbfcnp)(struct cam_periph *, union ccb *),
- u_int32_t flags, u_int tag_action,
+ u_int32_t flags, u_int tag_action __unused,
u_int8_t *data_ptr, u_int32_t dxfer_len,
u_int32_t timeout)
{
@@ -1309,7 +1302,7 @@ cam_fill_ataio(struct ccb_ataio *ataio, u_int32_t retries,
ataio->ccb_h.timeout = timeout;
ataio->data_ptr = data_ptr;
ataio->dxfer_len = dxfer_len;
- ataio->tag_action = tag_action;
+ ataio->ata_flags = 0;
}
static __inline void
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 299b4ec..85b2ff9 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1117,7 +1117,7 @@ cam_periph_runccb(union ccb *ccb,
} else if (ccb->ccb_h.func_code == XPT_ATA_IO) {
devstat_end_transaction(ds,
ccb->ataio.dxfer_len - ccb->ataio.resid,
- ccb->ataio.tag_action & 0x3,
+ 0, /* Not used in ATA */
((ccb->ccb_h.flags & CAM_DIR_MASK) ==
CAM_DIR_NONE) ? DEVSTAT_NO_DATA :
(ccb->ccb_h.flags & CAM_DIR_OUT) ?
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index b961285..66d5c52 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -945,7 +945,7 @@ passdone(struct cam_periph *periph, union ccb *done_ccb)
case XPT_ATA_IO:
devstat_end_transaction(softc->device_stats,
done_ccb->ataio.dxfer_len - done_ccb->ataio.resid,
- done_ccb->ataio.tag_action & 0x3,
+ 0, /* Not used in ATA */
((done_ccb->ccb_h.flags & CAM_DIR_MASK) ==
CAM_DIR_NONE) ? DEVSTAT_NO_DATA :
(done_ccb->ccb_h.flags & CAM_DIR_OUT) ?
OpenPOWER on IntegriCloud