 dc1bdbd9b8
			
		
	
	
	dc1bdbd9b8
	
	
	
		
			
			Make it possible to disconnect the IB RC connection used by the SRP protocol to communicate with a target. Have the SRP transport layer create a sysfs "delete" attribute for initiator drivers that support this functionality. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: David Dillow <dillowda@ornl.gov> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
		
			
				
	
	
		
			47 lines
		
	
	
	
		
			1.1 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
	
		
			1.1 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef SCSI_TRANSPORT_SRP_H
 | |
| #define SCSI_TRANSPORT_SRP_H
 | |
| 
 | |
| #include <linux/transport_class.h>
 | |
| #include <linux/types.h>
 | |
| #include <linux/mutex.h>
 | |
| 
 | |
| #define SRP_RPORT_ROLE_INITIATOR 0
 | |
| #define SRP_RPORT_ROLE_TARGET 1
 | |
| 
 | |
| struct srp_rport_identifiers {
 | |
| 	u8 port_id[16];
 | |
| 	u8 roles;
 | |
| };
 | |
| 
 | |
| struct srp_rport {
 | |
| 	/* for initiator and target drivers */
 | |
| 
 | |
| 	struct device dev;
 | |
| 
 | |
| 	u8 port_id[16];
 | |
| 	u8 roles;
 | |
| 
 | |
| 	/* for initiator drivers */
 | |
| 
 | |
| 	void *lld_data;	/* LLD private data */
 | |
| };
 | |
| 
 | |
| struct srp_function_template {
 | |
| 	/* for initiator drivers */
 | |
| 	void (*rport_delete)(struct srp_rport *rport);
 | |
| 	/* for target drivers */
 | |
| 	int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
 | |
| 	int (* it_nexus_response)(struct Scsi_Host *, u64, int);
 | |
| };
 | |
| 
 | |
| extern struct scsi_transport_template *
 | |
| srp_attach_transport(struct srp_function_template *);
 | |
| extern void srp_release_transport(struct scsi_transport_template *);
 | |
| 
 | |
| extern struct srp_rport *srp_rport_add(struct Scsi_Host *,
 | |
| 				       struct srp_rport_identifiers *);
 | |
| extern void srp_rport_del(struct srp_rport *);
 | |
| 
 | |
| extern void srp_remove_host(struct Scsi_Host *);
 | |
| 
 | |
| #endif
 |