mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-18 22:14:16 +00:00 
			
		
		
		
	[SCSI] libfc: provide space for LLD after remote port structure
Add pre-zeroed space after the allocation for fc_rport_priv for use by the lower-level driver. This is primarily for VN2VN FIP mode, but could be used in other ways someday. The space required is specified in lport->rport_priv_size. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
		
							parent
							
								
									42e9041467
								
							
						
					
					
						commit
						f90377abca
					
				
					 2 changed files with 3 additions and 1 deletions
				
			
		|  | @ -127,7 +127,7 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, | |||
| 	if (rdata) | ||||
| 		return rdata; | ||||
| 
 | ||||
| 	rdata = kzalloc(sizeof(*rdata), GFP_KERNEL); | ||||
| 	rdata = kzalloc(sizeof(*rdata) + lport->rport_priv_size, GFP_KERNEL); | ||||
| 	if (!rdata) | ||||
| 		return NULL; | ||||
| 
 | ||||
|  |  | |||
|  | @ -799,6 +799,7 @@ struct fc_disc { | |||
|  * @mfs:                   The maximum Fibre Channel payload size | ||||
|  * @max_retry_count:       The maximum retry attempts | ||||
|  * @max_rport_retry_count: The maximum remote port retry attempts | ||||
|  * @rport_priv_size:       Size needed by driver after struct fc_rport_priv | ||||
|  * @lro_xid:               The maximum XID for LRO | ||||
|  * @lso_max:               The maximum large offload send size | ||||
|  * @fcts:                  FC-4 type mask | ||||
|  | @ -848,6 +849,7 @@ struct fc_lport { | |||
| 	u32			       mfs; | ||||
| 	u8			       max_retry_count; | ||||
| 	u8			       max_rport_retry_count; | ||||
| 	u16			       rport_priv_size; | ||||
| 	u16			       link_speed; | ||||
| 	u16			       link_supported_speeds; | ||||
| 	u16			       lro_xid; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Joe Eykholt
						Joe Eykholt