This patch will add new interface to support more than 256 JBODs.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc
This commit is contained in:
kadesai 2018-12-14 08:00:45 +00:00
parent bdabc799dc
commit f3d059705f
3 changed files with 32 additions and 3 deletions

View File

@ -2272,6 +2272,9 @@ mrsas_init_fw(struct mrsas_softc *sc)
if (sc->use_seqnum_jbod_fp)
device_printf(sc->mrsas_dev, "FW supports JBOD Map \n");
if (sc->support_morethan256jbod)
device_printf(sc->mrsas_dev, "FW supports JBOD Map Ext \n");
if (mrsas_setup_raidmap(sc) != SUCCESS) {
device_printf(sc->mrsas_dev, "Error: RAID map setup FAILED !!! "
"There seems to be some problem in the controller\n"
@ -3381,6 +3384,9 @@ mrsas_get_ctrl_info(struct mrsas_softc *sc)
sc->use_seqnum_jbod_fp =
sc->ctrl_info->adapterOperations3.useSeqNumJbodFP;
sc->support_morethan256jbod =
sc->ctrl_info->adapterOperations4.supportPdMapTargetId;
sc->disableOnlineCtrlReset =
sc->ctrl_info->properties.OnOffProperties.disableOnlineCtrlReset;

View File

@ -1023,7 +1023,8 @@ struct MR_PD_CFG_SEQ {
u_int8_t tmCapable:1;
u_int8_t reserved:7;
} capability;
u_int8_t reserved[3];
u_int8_t reserved;
u_int16_t pdTargetId;
} __packed;
struct MR_PD_CFG_SEQ_NUM_SYNC {
@ -2197,7 +2198,21 @@ struct mrsas_ctrl_info {
u_int32_t reserved:7;
} adapterOperations3;
u_int8_t pad[0x800 - 0x7EC]; /* 0x7EC */
u_int8_t pad_cpld[16];
struct {
u_int16_t ctrlInfoExtSupported:1;
u_int16_t supportIbuttonLess:1;
u_int16_t supportedEncAlgo:1;
u_int16_t supportEncryptedMfc:1;
u_int16_t imageUploadSupported:1;
u_int16_t supportSESCtrlInMultipathCfg:1;
u_int16_t supportPdMapTargetId:1;
u_int16_t FWSwapsBBUVPDInfo:1;
u_int16_t reserved:8;
} adapterOperations4;
u_int8_t pad[0x800 - 0x7FE]; /* 0x7FE */
} __packed;
/*
@ -3042,6 +3057,8 @@ struct mrsas_softc {
u_int8_t mrsas_gen3_ctrl;
u_int8_t secure_jbod_support;
u_int8_t use_seqnum_jbod_fp;
/* FW suport for more than 256 PD/JBOD */
u_int32_t support_morethan256jbod;
u_int8_t max256vdSupport;
u_int16_t fw_supported_vd_count;
u_int16_t fw_supported_pd_count;

View File

@ -1084,7 +1084,13 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd,
//printf("Using Drv seq num\n");
pd_sync = (void *)sc->jbodmap_mem[(sc->pd_seq_map_id - 1) & 1];
cmd->tmCapable = pd_sync->seq[device_id].capability.tmCapable;
io_request->RaidContext.raid_context.VirtualDiskTgtId = device_id + 255;
/* More than 256 PD/JBOD support for Ventura */
if (sc->support_morethan256jbod)
io_request->RaidContext.raid_context.VirtualDiskTgtId =
pd_sync->seq[device_id].pdTargetId;
else
io_request->RaidContext.raid_context.VirtualDiskTgtId =
device_id + 255;
io_request->RaidContext.raid_context.configSeqNum = pd_sync->seq[device_id].seqNum;
io_request->DevHandle = pd_sync->seq[device_id].devHandle;
if (sc->is_ventura)