summaryrefslogtreecommitdiff
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,
if (rdata)
return rdata;
- rdata = kzalloc(sizeof(*rdata), GFP_KERNEL);
+ rdata = kzalloc(sizeof(*rdata) + lport->rport_priv_size, GFP_KERNEL);
if (!rdata)
return NULL;
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 {
* @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;