Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140129322
D5598.id14204.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D5598.id14204.diff
View Options
Index: sys/cam/ata/ata_da.c
===================================================================
--- sys/cam/ata/ata_da.c
+++ sys/cam/ata/ata_da.c
@@ -1608,7 +1608,7 @@
ada_retry_count,
adadone,
rw_op,
- tag_code,
+ 0,
data_ptr,
bp->bio_bcount,
ada_default_timeout*1000);
Index: sys/cam/cam_ccb.h
===================================================================
--- sys/cam/cam_ccb.h
+++ sys/cam/cam_ccb.h
@@ -579,6 +579,7 @@
} pi_tmflag;
typedef enum {
+ PIM_ATA_EXT = 0x200,/* ATA requests can understand ata_ext requests */
PIM_EXTLUNS = 0x100,/* 64bit extended LUNs supported */
PIM_SCANHILO = 0x80, /* Bus scans from high ID to low ID */
PIM_NOREMOVE = 0x40, /* Removeable devices not included in scan */
@@ -734,15 +735,10 @@
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 */
+#define ATA_FLAG_AUX 0x1
+ uint32_t aux;
+ uint32_t unused;
};
struct ccb_accept_tio {
@@ -1288,7 +1284,7 @@
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)
{
@@ -1299,7 +1295,7 @@
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
Index: sys/cam/cam_periph.c
===================================================================
--- sys/cam/cam_periph.c
+++ sys/cam/cam_periph.c
@@ -1116,7 +1116,7 @@
} 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) ?
Index: sys/cam/scsi/scsi_pass.c
===================================================================
--- sys/cam/scsi/scsi_pass.c
+++ sys/cam/scsi/scsi_pass.c
@@ -945,7 +945,7 @@
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) ?
Index: sys/dev/ahci/ahci.c
===================================================================
--- sys/dev/ahci/ahci.c
+++ sys/dev/ahci/ahci.c
@@ -2420,6 +2420,12 @@
} else {
fis[15] = ccb->ataio.cmd.control;
}
+ if (ccb->ataio.flags & ATA_FLAG_AUX) {
+ fis[16] = ccb->ataio.aux & 0xff;
+ fis[17] = (ccb->ataio.aux >> 8) & 0xff;
+ fis[18] = (ccb->ataio.aux >> 16) & 0xff;
+ fis[19] = (ccb->ataio.aux >> 24) & 0xff;
+ }
return (20);
}
@@ -2674,7 +2680,7 @@
if (ch->caps & AHCI_CAP_SPM)
cpi->hba_inquiry |= PI_SATAPM;
cpi->target_sprt = 0;
- cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED;
+ cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED | PIM_ATA_EXT;
cpi->hba_eng_cnt = 0;
if (ch->caps & AHCI_CAP_SPM)
cpi->max_target = 15;
Index: sys/dev/ata/ata-all.c
===================================================================
--- sys/dev/ata/ata-all.c
+++ sys/dev/ata/ata-all.c
@@ -962,6 +962,11 @@
xpt_done(ccb);
return (-1);
}
+ /*
+ * We shouldn't see AUXILIARY register requests.
+ */
+ KASSERT (ccb->ccb_h.func_code != XPT_ATA_IO ||
+ ((ccb->ataio.ata_flags & ATA_FLAGS_AUX) == 0));
return (0);
}
Index: sys/dev/mvs/mvs.c
===================================================================
--- sys/dev/mvs/mvs.c
+++ sys/dev/mvs/mvs.c
@@ -2245,6 +2245,11 @@
xpt_done(ccb);
return (-1);
}
+ /*
+ * We shouldn't see AUXILIARY register requests.
+ */
+ KASSERT (ccb->ccb_h.func_code != XPT_ATA_IO ||
+ ((ccb->ataio.ata_flags & ATA_FLAGS_AUX) == 0));
return (0);
}
Index: sys/dev/siis/siis.c
===================================================================
--- sys/dev/siis/siis.c
+++ sys/dev/siis/siis.c
@@ -1728,6 +1728,12 @@
fis[13] = ccb->ataio.cmd.sector_count_exp;
}
fis[15] = ATA_A_4BIT;
+ if (ccb->ataio.flags & ATA_FLAG_AUX) {
+ fis[16] = ccb->ataio.aux & 0xff;
+ fis[17] = (ccb->ataio.aux >> 8) & 0xff;
+ fis[18] = (ccb->ataio.aux >> 16) & 0xff;
+ fis[19] = (ccb->ataio.aux >> 24) & 0xff;
+ }
} else {
/* Soft reset. */
}
@@ -1946,7 +1952,7 @@
cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE;
cpi->hba_inquiry |= PI_SATAPM;
cpi->target_sprt = 0;
- cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED;
+ cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED | PIM_ATA_EXT;
cpi->hba_eng_cnt = 0;
cpi->max_target = 15;
cpi->max_lun = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 3:28 PM (5 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27115182
Default Alt Text
D5598.id14204.diff (5 KB)
Attached To
Mode
D5598: Implement AUXILIARY REGISTER
Attached
Detach File
Event Timeline
Log In to Comment