Skip to content

Commit

Permalink
STK SL500 personality module
Browse files Browse the repository at this point in the history
Start framework for STK SL500 personality module

Signed-off-by: Mark Harvey <markh794@gmail.com>
  • Loading branch information
markh794 committed Mar 9, 2014
1 parent 01427f8 commit 5c197af
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 15 deletions.
1 change: 1 addition & 0 deletions usr/smc.h
Expand Up @@ -43,6 +43,7 @@ void unload_drive_on_shutdown(struct s_info *src, struct s_info *dest);

void init_slot_info(struct lu_phy_attr *lu);
void init_stklxx(struct lu_phy_attr *lu);
void init_stkslxx(struct lu_phy_attr *lu);
void init_default_smc(struct lu_phy_attr *lu);
void init_scalar_smc(struct lu_phy_attr *lu);
void init_spectra_logic_smc(struct lu_phy_attr *lu);
Expand Down
24 changes: 24 additions & 0 deletions usr/stklxx_pm.c
Expand Up @@ -83,3 +83,27 @@ void init_stklxx(struct lu_phy_attr *lu)
init_smc_log_pages(lu);
init_smc_mode_pages(lu);
}

void init_stkslxx(struct lu_phy_attr *lu)
{
smc_pm.name = "mhVTL - STK SL series emulation";
smc_pm.library_has_map = TRUE;
smc_pm.library_has_barcode_reader = TRUE;
smc_pm.library_has_playground = TRUE;

/* Follow L700e/L180 SCSI Reference Manual - 8th Edition */
smc_pm.start_picker = 0x0001;
smc_pm.start_map = 0x000a; /* 10d */
smc_pm.start_drive = 0x01f4; /* 500d */
smc_pm.start_storage = 0x03e8; /* 1000d */

smc_pm.lu = lu;
smc_personality_module_register(&smc_pm);

init_slot_info(lu);

update_stk_l_vpd_80(lu);
update_stk_l_vpd_83(lu);
init_smc_log_pages(lu);
init_smc_mode_pages(lu);
}
32 changes: 17 additions & 15 deletions usr/vtllibrary.c
Expand Up @@ -1501,29 +1501,31 @@ static void cleanup_lu(struct lu_phy_attr *lu)

static void customise_lu(struct lu_phy_attr *lu)
{
if (!strncasecmp(lu->vendor_id, "stk", 3))
init_stklxx(lu); /* STK L series */
else if (!strncasecmp(lu->vendor_id, "IBM", 3))
if (!strncasecmp(lu->product_id, "3573-TL", 7)) {
if (!strncasecmp(lu->vendor_id, "stk", 3)) {
if (!strncasecmp(lu->product_id, "SL500", 5))
init_stkslxx(lu); /* STK SL series */
else
init_stklxx(lu); /* STK L series */
} else if (!strncasecmp(lu->vendor_id, "IBM", 3)) {
if (!strncasecmp(lu->product_id, "3573-TL", 7))
init_ibmts3100(lu);
} else {
else
init_ibmts3500(lu); /* IBM TS3500 series */
}
else if (!strncasecmp(lu->vendor_id, "HP", 2))
if (!strncasecmp(lu->product_id, "MSL", 3)) {
} else if (!strncasecmp(lu->vendor_id, "HP", 2)) {
if (!strncasecmp(lu->product_id, "MSL", 3))
init_hp_msl_smc(lu);
} else {
else
init_hp_eml_smc(lu);
}
else if (!strncasecmp(lu->product_id, "OVERLAND", 8))
} else if (!strncasecmp(lu->product_id, "OVERLAND", 8)) {
init_overland_smc(lu);
else if (!strncasecmp(lu->product_id, "scalar", 6))
} else if (!strncasecmp(lu->product_id, "scalar", 6)) {
init_scalar_smc(lu);
else if (!strncasecmp(lu->vendor_id, "SPECTRA ", 7) &&
!strncasecmp(lu->product_id, "PYTHON", 6))
} else if (!strncasecmp(lu->vendor_id, "SPECTRA ", 7) &&
!strncasecmp(lu->product_id, "PYTHON", 6)) {
init_spectra_logic_smc(lu);
else
} else {
init_default_smc(lu);
}
}

void rereadconfig(int sig)
Expand Down

0 comments on commit 5c197af

Please sign in to comment.