44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From: Ben Hutchings <ben@decadent.org.uk>
|
|
Date: Sun, 01 Jun 2014 20:47:46 +0100
|
|
Subject: target: Avoid ABI change in 3.14.5
|
|
|
|
Commit e63ed0d7a980 ("scsi: fix our current target reap infrastructure")
|
|
removed one field (ew) and changed the type of another (reap_ref).
|
|
|
|
Put back 'ew' and hide the type change to 'reap_ref', which remains
|
|
the same size and is only used within the SCSI core.
|
|
|
|
--- a/drivers/scsi/scsi_scan.c
|
|
+++ b/drivers/scsi/scsi_scan.c
|
|
@@ -433,6 +433,8 @@ static struct scsi_target *scsi_alloc_ta
|
|
}
|
|
dev = &starget->dev;
|
|
device_initialize(dev);
|
|
+ /* bwh: assert binary compatibility */
|
|
+ BUILD_BUG_ON(sizeof(starget->reap_ref) != sizeof(unsigned int));
|
|
kref_init(&starget->reap_ref);
|
|
dev->parent = get_device(parent);
|
|
dev_set_name(dev, "target%d:%d:%d", shost->host_no, channel, id);
|
|
--- a/include/scsi/scsi_device.h
|
|
+++ b/include/scsi/scsi_device.h
|
|
@@ -257,7 +257,11 @@ struct scsi_target {
|
|
struct list_head siblings;
|
|
struct list_head devices;
|
|
struct device dev;
|
|
+#ifdef __GENKSYMS__
|
|
+ unsigned int reap_ref;
|
|
+#else
|
|
struct kref reap_ref; /* last put renders target invisible */
|
|
+#endif
|
|
unsigned int channel;
|
|
unsigned int id; /* target id ... replace
|
|
* scsi_device.id eventually */
|
|
@@ -284,6 +288,7 @@ struct scsi_target {
|
|
#define SCSI_DEFAULT_TARGET_BLOCKED 3
|
|
|
|
char scsi_level;
|
|
+ struct execute_work ew; /* bwh: unused, for binary compatibility */
|
|
enum scsi_target_state state;
|
|
void *hostdata; /* available to low-level driver */
|
|
unsigned long starget_data[0]; /* for the transport */
|