aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-15 08:46:23 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-06-15 23:40:41 -0400
commit7bb7ee8704fea9fec9eea53322b8464c3ed70a3d (patch)
tree44797865685e1f95bd6b54cefbee9755d21d23b9 /include/linux
parentscsi: ufs-bsg: Fix runtime PM imbalance on error (diff)
downloadlinux-dev-7bb7ee8704fea9fec9eea53322b8464c3ed70a3d.tar.xz
linux-dev-7bb7ee8704fea9fec9eea53322b8464c3ed70a3d.zip
scsi: libata: Provide an ata_scsi_dma_need_drain stub for !CONFIG_ATA
SAS drivers can be compiled with ata support disabled. Provide a stub so that the drivers don't have to ifdef around wiring up ata_scsi_dma_need_drain. Link: https://lore.kernel.org/r/20200615064624.37317-2-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index af832852e620..042e584daca7 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1092,7 +1092,11 @@ extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,
#define ATA_SCSI_COMPAT_IOCTL /* empty */
#endif
extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
+#if IS_ENABLED(CONFIG_ATA)
bool ata_scsi_dma_need_drain(struct request *rq);
+#else
+#define ata_scsi_dma_need_drain NULL
+#endif
extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
unsigned int cmd, void __user *arg);
extern bool ata_link_online(struct ata_link *link);