From bb4ae7807bd1d408992624cf93bae504c44dcb93 Mon Sep 17 00:00:00 2001
From: Daniel Wagner <dwagner@suse.de>
Date: Mon, 17 Jan 2022 16:33:39 +0100
Subject: scsi: kABI: Add suse_kabi_padding to scsi template structs
Patch-mainline: Never, kABI
References: bsc#1195056
The SCSI template structs are notoriously difficult to extend without
breaking kABI. Add placeholders for future changes allowing backward
compatibility.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
include/linux/nvme-fc-driver.h | 4 ++++
include/scsi/scsi_host.h | 2 ++
include/scsi/scsi_transport.h | 2 ++
include/scsi/scsi_transport_fc.h | 2 ++
include/scsi/scsi_transport_iscsi.h | 2 ++
include/scsi/scsi_transport_sas.h | 2 ++
include/scsi/scsi_transport_spi.h | 2 ++
include/scsi/scsi_transport_srp.h | 2 ++
8 files changed, 18 insertions(+)
diff --git a/include/linux/nvme-fc-driver.h b/include/linux/nvme-fc-driver.h
index 2a38f2b477a5..9028759417b9 100644
--- a/include/linux/nvme-fc-driver.h
+++ b/include/linux/nvme-fc-driver.h
@@ -508,6 +508,8 @@ struct nvme_fc_port_template {
u32 remote_priv_sz;
u32 lsrqst_priv_sz;
u32 fcprqst_priv_sz;
+
+ void *suse_kabi_padding;
};
@@ -970,6 +972,8 @@ struct nvmet_fc_target_template {
/* sizes of additional private data for data structures */
u32 target_priv_sz;
u32 lsrqst_priv_sz;
+
+ void *suse_kabi_padding;
};
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 962ded80a98f..3360976e5cb5 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -502,6 +502,8 @@ struct scsi_host_template {
/* Delay for runtime autosuspend */
int rpm_autosuspend_delay;
+
+ void *suse_kabi_padding;
};
/*
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index a0458bda3148..0b297406975e 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -43,6 +43,8 @@ struct scsi_transport_template {
* Allows a transport to override the default error handler.
*/
void (* eh_strategy_handler)(struct Scsi_Host *);
+
+ void *suse_kabi_padding;
};
#define transport_class_to_shost(tc) \
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index e80a7c542c88..fb44d4475a52 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -764,6 +764,8 @@ struct fc_function_template {
unsigned long show_host_system_hostname:1;
unsigned long disable_target_scan:1;
+
+ void *suse_kabi_padding;
};
/**
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index c5d7810fd792..f7f981348418 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -156,6 +156,8 @@ struct iscsi_transport {
int (*logout_flashnode_sid) (struct iscsi_cls_session *cls_sess);
int (*get_host_stats) (struct Scsi_Host *shost, char *buf, int len);
u8 (*check_protection)(struct iscsi_task *task, sector_t *sector);
+
+ void *suse_kabi_padding;
};
/*
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 05ec927a3c72..4798b56a7428 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -181,6 +181,8 @@ struct sas_function_template {
int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *);
void (*smp_handler)(struct bsg_job *, struct Scsi_Host *,
struct sas_rphy *);
+
+ void *suse_kabi_padding;
};
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h
index 78324502b1c9..48b48b5e25dd 100644
--- a/include/scsi/scsi_transport_spi.h
+++ b/include/scsi/scsi_transport_spi.h
@@ -132,6 +132,8 @@ struct spi_function_template {
unsigned long show_rti:1;
unsigned long show_pcomp_en:1;
unsigned long show_hold_mcs:1;
+
+ void *suse_kabi_padding;
};
struct scsi_transport_template *spi_attach_transport(struct spi_function_template *);
diff --git a/include/scsi/scsi_transport_srp.h b/include/scsi/scsi_transport_srp.h
index d22df12584f9..a1803e641e2f 100644
--- a/include/scsi/scsi_transport_srp.h
+++ b/include/scsi/scsi_transport_srp.h
@@ -100,6 +100,8 @@ struct srp_function_template {
int (*reconnect)(struct srp_rport *rport);
void (*terminate_rport_io)(struct srp_rport *rport);
void (*rport_delete)(struct srp_rport *rport);
+
+ void *suse_kabi_padding;
};
extern struct scsi_transport_template *
--
2.29.2