linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: martin.petersen@oracle.com
Cc: brking@us.ibm.com, jinpu.wang@cloud.ionos.com,
	John Garry <john.garry@huawei.com>,
	mpe@ellerman.id.au, linux-scsi@vger.kernel.org,
	linux-ide@vger.kernel.org
Subject: [PATCH 1/2] libata: provide a ata_scsi_dma_need_drain stub for !CONFIG_ATA
Date: Mon, 15 Jun 2020 08:46:23 +0200	[thread overview]
Message-ID: <20200615064624.37317-2-hch@lst.de> (raw)
In-Reply-To: <20200615064624.37317-1-hch@lst.de>

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.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/libata.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index af832852e62044..042e584daca73e 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);
-- 
2.26.2


  reply	other threads:[~2020-06-15  6:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15  6:46 fix ATAPI support for libsas drivers Christoph Hellwig
2020-06-15  6:46 ` Christoph Hellwig [this message]
2020-06-16  3:46   ` [PATCH 1/2] libata: provide a ata_scsi_dma_need_drain stub for !CONFIG_ATA Martin K. Petersen
2020-06-15  6:46 ` [PATCH 2/2] scsi: wire up ata_scsi_dma_need_drain for SAS HBA drivers Christoph Hellwig
2020-06-18  9:02 ` fix ATAPI support for libsas drivers John Garry
2020-06-18 15:28   ` Christoph Hellwig
2020-06-22  6:28     ` Hannes Reinecke
2020-06-23 11:44       ` John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200615064624.37317-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=brking@us.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=john.garry@huawei.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).