Commit 908c4745 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Thadeu Lima de Souza Cascardo

scsi: sas: provide stub implementation for scsi_is_sas_rphy

BugLink: http://bugs.launchpad.net/bugs/1693369

Provide a stub implementation for scsi_is_sas_rphy for kernel
configurations which do not have CONFIG_SCSI_SAS_ATTRS defined.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Suggested-by: default avatarJames Bottomley <jejb@linux.vnet.ibm.com>
Reviewed-by: default avatarJames E.J. Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
(back ported from commit c1a23f6d)
Signed-off-by: default avatarJoseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 19a501ee
......@@ -10,6 +10,21 @@ struct scsi_transport_template;
struct sas_rphy;
struct request;
#if !IS_ENABLED(CONFIG_SCSI_SAS_ATTRS)
static inline int is_sas_attached(struct scsi_device *sdev)
{
return 0;
}
static inline int scsi_is_sas_rphy(const struct device *sdev)
{
return 0;
}
#else
extern int is_sas_attached(struct scsi_device *sdev);
extern int scsi_is_sas_rphy(const struct device *);
#endif
static inline int sas_protocol_ata(enum sas_protocol proto)
{
return ((proto & SAS_PROTOCOL_SATA) ||
......@@ -193,7 +208,6 @@ extern int sas_rphy_add(struct sas_rphy *);
extern void sas_rphy_remove(struct sas_rphy *);
extern void sas_rphy_delete(struct sas_rphy *);
extern void sas_rphy_unlink(struct sas_rphy *);
extern int scsi_is_sas_rphy(const struct device *);
struct sas_port *sas_port_alloc(struct device *, int);
struct sas_port *sas_port_alloc_num(struct device *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment