File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -306,6 +306,9 @@ enum {
306306 /* marked obsolete in the ATA/ATAPI-7 spec */
307307 ATA_CMD_RESTORE = 0x10 ,
308308
309+ /* Subcmds for ATA_CMD_FPDMA_RECV */
310+ ATA_SUBCMD_FPDMA_RECV_RD_LOG_DMA_EXT = 0x01 ,
311+
309312 /* Subcmds for ATA_CMD_FPDMA_SEND */
310313 ATA_SUBCMD_FPDMA_SEND_DSM = 0x00 ,
311314 ATA_SUBCMD_FPDMA_SEND_WR_LOG_DMA_EXT = 0x02 ,
@@ -329,7 +332,9 @@ enum {
329332 ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET = 0x04 ,
330333 ATA_LOG_NCQ_SEND_RECV_DSM_TRIM = (1 << 0 ),
331334 ATA_LOG_NCQ_SEND_RECV_RD_LOG_OFFSET = 0x08 ,
335+ ATA_LOG_NCQ_SEND_RECV_RD_LOG_SUPPORTED = (1 << 0 ),
332336 ATA_LOG_NCQ_SEND_RECV_WR_LOG_OFFSET = 0x0C ,
337+ ATA_LOG_NCQ_SEND_RECV_WR_LOG_SUPPORTED = (1 << 0 ),
333338 ATA_LOG_NCQ_SEND_RECV_SIZE = 0x10 ,
334339
335340 /* READ/WRITE LONG (obsolete) */
Original file line number Diff line number Diff line change @@ -1642,6 +1642,13 @@ static inline bool ata_fpdma_dsm_supported(struct ata_device *dev)
16421642 ATA_LOG_NCQ_SEND_RECV_DSM_TRIM );
16431643}
16441644
1645+ static inline bool ata_fpdma_read_log_supported (struct ata_device * dev )
1646+ {
1647+ return (dev -> flags & ATA_DFLAG_NCQ_SEND_RECV ) &&
1648+ (dev -> ncq_send_recv_cmds [ATA_LOG_NCQ_SEND_RECV_RD_LOG_OFFSET ] &
1649+ ATA_LOG_NCQ_SEND_RECV_RD_LOG_SUPPORTED );
1650+ }
1651+
16451652static inline void ata_qc_set_polling (struct ata_queued_cmd * qc )
16461653{
16471654 qc -> tf .ctl |= ATA_NIEN ;
You can’t perform that action at this time.
0 commit comments