From a283bd37d00e92e8874ca6325ae071691d4db388 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Tue, 24 May 2005 12:06:38 -0500 Subject: [SCSI] Add target alloc/destroy callbacks to the host template This gives the HBA driver notice when a target is created and destroyed to allow it to manage its own target based allocations accordingly. This is a much reduced verson of the original patch sent in by James.Smart@Emulex.com Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/scsi/scsi_device.h') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index c018020d9160..63c91dd85ca1 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -154,7 +154,9 @@ struct scsi_target { unsigned int id; /* target id ... replace * scsi_device.id eventually */ unsigned long create:1; /* signal that it needs to be added */ - unsigned long starget_data[0]; + void *hostdata; /* available to low-level driver */ + unsigned long starget_data[0]; /* for the transport */ + /* starget_data must be the last element!!!! */ } __attribute__((aligned(sizeof(unsigned long)))); #define to_scsi_target(d) container_of(d, struct scsi_target, dev) -- cgit v1.2.3