aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libfc/fc_rport.c2
-rw-r--r--include/scsi/libfc.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 6b569732f892..6d68482649c9 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -127,7 +127,7 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport,
127 if (rdata) 127 if (rdata)
128 return rdata; 128 return rdata;
129 129
130 rdata = kzalloc(sizeof(*rdata), GFP_KERNEL); 130 rdata = kzalloc(sizeof(*rdata) + lport->rport_priv_size, GFP_KERNEL);
131 if (!rdata) 131 if (!rdata)
132 return NULL; 132 return NULL;
133 133
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index b0310b9b3469..fcbee8c38b0c 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -799,6 +799,7 @@ struct fc_disc {
799 * @mfs: The maximum Fibre Channel payload size 799 * @mfs: The maximum Fibre Channel payload size
800 * @max_retry_count: The maximum retry attempts 800 * @max_retry_count: The maximum retry attempts
801 * @max_rport_retry_count: The maximum remote port retry attempts 801 * @max_rport_retry_count: The maximum remote port retry attempts
802 * @rport_priv_size: Size needed by driver after struct fc_rport_priv
802 * @lro_xid: The maximum XID for LRO 803 * @lro_xid: The maximum XID for LRO
803 * @lso_max: The maximum large offload send size 804 * @lso_max: The maximum large offload send size
804 * @fcts: FC-4 type mask 805 * @fcts: FC-4 type mask
@@ -848,6 +849,7 @@ struct fc_lport {
848 u32 mfs; 849 u32 mfs;
849 u8 max_retry_count; 850 u8 max_retry_count;
850 u8 max_rport_retry_count; 851 u8 max_rport_retry_count;
852 u16 rport_priv_size;
851 u16 link_speed; 853 u16 link_speed;
852 u16 link_supported_speeds; 854 u16 link_supported_speeds;
853 u16 lro_xid; 855 u16 lro_xid;