diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-07-09 11:44:10 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-07-09 11:44:10 +0000 |
| commit | a6fadc5b8524bc403c026a620fd325448da8f28f (patch) | |
| tree | bc8617e28b65fa4ec413fc13be6200eb3225b035 | |
| parent | b322ba367cdb75882f1cede5a8b22c7fd17ced94 (diff) | |
| parent | 6f2b04a2ce785423fe988216ae694366499884b2 (diff) | |
| download | illumos-joyent-a6fadc5b8524bc403c026a620fd325448da8f28f.tar.gz | |
[illumos-gate merge]
commit 6f2b04a2ce785423fe988216ae694366499884b2
11304 cmd-crypto: NULL pointer errors
commit 19803d096124c0f1ca62906eb328234556bfad35
11303 cron: NULL pointer errors
commit a3ab7e857d66d206fcfc56f9a628266bd25a7bd0
11319 devfsadm: NULL pointer errors
commit 1fbb7a7c3b62c369349ec1774806ed321e4f6119
11332 Regression: 11184 causes kernel hang during boot on CPUs without ARAT
commit 62efa0e74455f83caa0fa7df8926a5ec9656b3ce
11213 tem: partially support CSI [ 38 and 48 sequences with smaller depths
commit 023a3eeed3dc3724c83a2c43af879ce1719b2e32
11324 expr: NULL pointer errors
commit c7cb3c8ba9fee2d8fc1a3ba06662ed84679fbd66
11323 syseventd: NULL pointer errors
commit 1a80a7c52201c03ace9f85bdb77b768062b06136
11322 dfs.cmds: NULL pointer errors
commit 8f32bfdc833ff8990921fa7b28a4d6bd970ef98f
11290 captoinfo: NULL pointer errors
commit 84bdd7fe0904e8a6527441769054b6bc92a1ffe0
10329 Remove scsi_vhci_f_asym_sun (StorEdge T3 support)
commit f9d4be10f65289547fa67ea8d1a3de54596b3ba1
11300 cpustat: NULL pointer errors
36 files changed, 171 insertions, 924 deletions
@@ -1090,7 +1090,6 @@ d kernel/misc/scsi_vhci 0755 root sys d kernel/misc/scsi_vhci/amd64 0755 root sys f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_asym_emc 0755 root sys f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_asym_lsi 0755 root sys -f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_asym_sun 0755 root sys f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_sym 0755 root sys f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_sym_emc 0755 root sys f kernel/misc/scsi_vhci/amd64/scsi_vhci_f_sym_hds 0755 root sys diff --git a/usr/src/boot/sys/boot/common/tem.c b/usr/src/boot/sys/boot/common/tem.c index cb65d5db71..6ae58830d8 100644 --- a/usr/src/boot/sys/boot/common/tem.c +++ b/usr/src/boot/sys/boot/common/tem.c @@ -67,6 +67,7 @@ #endif /* _HAVE_TEM_FIRMWARE */ #include <sys/consplat.h> #include <sys/kd.h> +#include <stdbool.h> extern int lz4_decompress(void *, void *, size_t, size_t, int); @@ -1182,6 +1183,35 @@ tem_setparam(struct tem_vt_state *tem, int count, int newparam) } } +static void +tem_select_color(struct tem_vt_state *tem, text_color_t color, bool fg) +{ + if (tems.ts_pdepth >= 24 || + (color < 8 && tems.ts_pdepth < 24)) { + if (fg == true) { + tem->tvs_fg_color = color; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + } else { + tem->tvs_bg_color = color; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG; + } + return; + } + + if (color > 15) + return; + + /* Bright color and depth < 24 */ + color -= 8; + if (fg == true) { + tem->tvs_fg_color = color; + tem->tvs_flags |= TEM_ATTR_BRIGHT_FG; + } else { + tem->tvs_bg_color = color; + tem->tvs_flags |= TEM_ATTR_BRIGHT_BG; + } +} + /* * select graphics mode based on the param vals stored in a_params */ @@ -1279,10 +1309,8 @@ tem_selgraph(struct tem_vt_state *tem) case 5: /* 256 colors */ count++; curparam--; - if (tems.ts_pdepth < 24) - break; - tem->tvs_fg_color = tem->tvs_params[count]; - tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + tem_select_color(tem, tem->tvs_params[count], + true); break; default: break; @@ -1328,10 +1356,8 @@ tem_selgraph(struct tem_vt_state *tem) case 5: /* 256 colors */ count++; curparam--; - if (tems.ts_pdepth < 24) - break; - tem->tvs_bg_color = tem->tvs_params[count]; - tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + tem_select_color(tem, tem->tvs_params[count], + false); break; default: break; diff --git a/usr/src/cmd/captoinfo/captoinfo.c b/usr/src/cmd/captoinfo/captoinfo.c index 3a7fc5b3e8..f5210c2a33 100644 --- a/usr/src/cmd/captoinfo/captoinfo.c +++ b/usr/src/cmd/captoinfo/captoinfo.c @@ -25,7 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* * NAME @@ -956,7 +956,7 @@ adddefaults(void) /* the rs string was renamed r2 (info rs2) */ if ((ostrval[uselevel][cap_rs] != NULL) && - (ostrval[uselevel][cap_rs][0] != NULL)) + (ostrval[uselevel][cap_rs][0] != '\0')) putstr("rs2", ostrval[uselevel][cap_rs]); handleko(); diff --git a/usr/src/cmd/cmd-crypto/pktool/common.c b/usr/src/cmd/cmd-crypto/pktool/common.c index 5bd30b4be9..aba3ef9c03 100644 --- a/usr/src/cmd/cmd-crypto/pktool/common.c +++ b/usr/src/cmd/cmd-crypto/pktool/common.c @@ -185,7 +185,7 @@ static void close_sess(CK_SESSION_HANDLE sess) { - if (sess == NULL) { + if (sess == 0) { return; } @@ -207,7 +207,7 @@ static void logout_token(CK_SESSION_HANDLE sess) { - if (sess == NULL) { + if (sess == 0) { return; } @@ -833,7 +833,7 @@ get_pk12_password(KMF_CREDENTIAL *cred) #define COUNTRY_DEFAULT "US" #define STATE_DEFAULT NULL -#define INVALID_INPUT gettext("Invalid input; please re-enter ...") +#define INVALID_INPUT gettext("Invalid input; please re-enter ...") #define SUBNAMESIZ 1024 #define RDN_MIN 1 diff --git a/usr/src/cmd/cmd-crypto/pktool/gencert.c b/usr/src/cmd/cmd-crypto/pktool/gencert.c index 6f507d2560..252b49d65e 100644 --- a/usr/src/cmd/cmd-crypto/pktool/gencert.c +++ b/usr/src/cmd/cmd-crypto/pktool/gencert.c @@ -109,7 +109,7 @@ gencert_pkcs11(KMF_HANDLE_T kmfhandle, SET_VALUE(kmf_set_cert_serial(&signedCert, serial), "serial number"); - SET_VALUE(kmf_set_cert_validity(&signedCert, NULL, ltime), + SET_VALUE(kmf_set_cert_validity(&signedCert, 0, ltime), "validity time"); SET_VALUE(kmf_set_cert_sig_alg(&signedCert, sigAlg), @@ -315,7 +315,7 @@ gencert_file(KMF_HANDLE_T kmfhandle, SET_VALUE(kmf_set_cert_serial(&signedCert, serial), "serial number"); - SET_VALUE(kmf_set_cert_validity(&signedCert, NULL, ltime), + SET_VALUE(kmf_set_cert_validity(&signedCert, 0, ltime), "validity time"); SET_VALUE(kmf_set_cert_sig_alg(&signedCert, sigAlg), @@ -467,7 +467,7 @@ gencert_nss(KMF_HANDLE_T kmfhandle, SET_VALUE(kmf_set_cert_serial(&signedCert, serial), "serial number"); - SET_VALUE(kmf_set_cert_validity(&signedCert, NULL, ltime), + SET_VALUE(kmf_set_cert_validity(&signedCert, 0, ltime), "validity time"); SET_VALUE(kmf_set_cert_sig_alg(&signedCert, sigAlg), diff --git a/usr/src/cmd/cmd-crypto/pktool/gencsr.c b/usr/src/cmd/cmd-crypto/pktool/gencsr.c index 501e8cabe7..6072673bc3 100644 --- a/usr/src/cmd/cmd-crypto/pktool/gencsr.c +++ b/usr/src/cmd/cmd-crypto/pktool/gencsr.c @@ -226,7 +226,7 @@ gencsr_file(KMF_HANDLE_T kmfhandle, SET_VALUE(kmf_set_csr_subject_altname(&csr, altname, altcrit, alttype), "kmf_set_csr_subject_altname"); } - if (kubits != NULL) { + if (kubits != 0) { SET_VALUE(kmf_set_csr_ku(&csr, kucrit, kubits), "kmf_set_csr_ku"); } @@ -312,7 +312,7 @@ gencsr_nss(KMF_HANDLE_T kmfhandle, SET_VALUE(kmf_set_csr_subject_altname(&csr, altname, altcrit, alttype), "kmf_set_csr_subject_altname"); } - if (kubits != NULL) { + if (kubits != 0) { SET_VALUE(kmf_set_csr_ku(&csr, kucrit, kubits), "kmf_set_csr_ku"); } diff --git a/usr/src/cmd/cmd-crypto/pktool/setpin.c b/usr/src/cmd/cmd-crypto/pktool/setpin.c index 40b49338e5..fb1e90c0ca 100644 --- a/usr/src/cmd/cmd-crypto/pktool/setpin.c +++ b/usr/src/cmd/cmd-crypto/pktool/setpin.c @@ -154,7 +154,7 @@ setpin_pkcs11(KMF_HANDLE_T handle, char *token_spec, boolean_t souser) if ((old_pin = (CK_UTF8CHAR_PTR) strdup(SOFT_DEFAULT_PIN)) == NULL) { cryptoerror(LOG_STDERR, "%s.", strerror(errno)); - final_pk11(NULL); + final_pk11(0); return (PK_ERR_PK11); } old_pinlen = strlen(SOFT_DEFAULT_PIN); @@ -164,7 +164,7 @@ setpin_pkcs11(KMF_HANDLE_T handle, char *token_spec, boolean_t souser) cryptoerror(LOG_STDERR, gettext("Unable to get token passphrase (%s)."), pkcs11_strerror(rv)); - final_pk11(NULL); + final_pk11(0); return (PK_ERR_PK11); } } @@ -180,7 +180,7 @@ setpin_pkcs11(KMF_HANDLE_T handle, char *token_spec, boolean_t souser) "Unable to get and confirm new passphrase (%s)."), pkcs11_strerror(rv)); free(old_pin); - final_pk11(NULL); + final_pk11(0); return (PK_ERR_PK11); } diff --git a/usr/src/cmd/cmd-crypto/pktool/signcsr.c b/usr/src/cmd/cmd-crypto/pktool/signcsr.c index d7ab9e6d83..c5d73b3ee9 100644 --- a/usr/src/cmd/cmd-crypto/pktool/signcsr.c +++ b/usr/src/cmd/cmd-crypto/pktool/signcsr.c @@ -127,7 +127,7 @@ build_cert_from_csr(KMF_CSR_DATA *csrdata, SET_VALUE(kmf_set_cert_serial(signedCert, serial), "serial number"); - SET_VALUE(kmf_set_cert_validity(signedCert, NULL, ltime), + SET_VALUE(kmf_set_cert_validity(signedCert, 0, ltime), "validity time"); if (issuer) { diff --git a/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c b/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c index 8155affad2..2657119705 100644 --- a/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c +++ b/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c @@ -661,11 +661,11 @@ cmd_init(TSS_HCONTEXT hContext, TSS_HTPM hTPM, int argc, char *argv[]) sizeof (well_known), well_known)) return (ERR_FAIL); - ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, NULL); + ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, 0); if (ret == TPM_E_NO_ENDORSEMENT) { if (createek(hContext, hTPM)) return (ERR_FAIL); - ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, NULL); + ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, 0); } if (ret) { print_error(ret, gettext("Take ownership")); @@ -701,7 +701,7 @@ cmd_auth(TSS_HCONTEXT hContext, TSS_HTPM hTPM, int argc, char *argv[]) gettext("= New TPM owner passphrase ="), 0, NULL)) return (ERR_FAIL); - ret = Tspi_ChangeAuth(hTPM, NULL, hNewPolicy); + ret = Tspi_ChangeAuth(hTPM, 0, hNewPolicy); if (ret && ret != TSP_ERROR(TSS_E_POLICY_NO_SECRET)) { print_error(ret, gettext("Change authorization")); return (ERR_FAIL); diff --git a/usr/src/cmd/cmd-crypto/tpmadm/main.c b/usr/src/cmd/cmd-crypto/tpmadm/main.c index a203527b54..31cf32c90d 100644 --- a/usr/src/cmd/cmd-crypto/tpmadm/main.c +++ b/usr/src/cmd/cmd-crypto/tpmadm/main.c @@ -195,7 +195,7 @@ set_policy_options(TSS_HPOLICY hPolicy, TSS_FLAG mode, char *prompt, unicode_prompt = Trspi_Native_To_UNICODE((BYTE *)prompt, &len); ret = Tspi_SetAttribData(hPolicy, TSS_TSPATTRIB_POLICY_POPUPSTRING, - NULL, len, unicode_prompt); + 0, len, unicode_prompt); if (ret) { print_error(ret, gettext("Set policy prompt")); return (ERR_FAIL); diff --git a/usr/src/cmd/cpc/common/cpustat.c b/usr/src/cmd/cpc/common/cpustat.c index 47088de802..48b6c6e4f4 100644 --- a/usr/src/cmd/cpc/common/cpustat.c +++ b/usr/src/cmd/cpc/common/cpustat.c @@ -94,7 +94,7 @@ static int ncpus; static int max_chip_id; static int *chip_designees; /* cpuid of CPU which counts for phs chip */ static int smt = 0; /* If set, cpustat needs to be SMT-aware. */ -static pcinfo_t fxinfo = { 0, "FX", NULL }; /* FX scheduler class info */ +static pcinfo_t fxinfo = { 0, "FX", 0 }; /* FX scheduler class info */ static uint_t timestamp_fmt = NODATE; @@ -463,7 +463,7 @@ gtick(void *arg) goto bad; (void) mutex_lock(&state->soak_lock); state->soak_state = SOAK_PAUSE; - if (thr_create(NULL, 0, soaker, state, NULL, &tid) != 0) + if (thr_create(NULL, 0, soaker, state, 0, &tid) != 0) goto bad; while (state->soak_state == SOAK_PAUSE) diff --git a/usr/src/cmd/cron/cron.c b/usr/src/cmd/cron/cron.c index e2c9086536..247eb10c94 100644 --- a/usr/src/cmd/cron/cron.c +++ b/usr/src/cmd/cron/cron.c @@ -29,7 +29,7 @@ */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* Copyright (c) 1987, 1988 Microsoft Corporation */ /* All Rights Reserved */ @@ -1245,7 +1245,7 @@ readcronfile(FILE *cf, struct usr *u, time_t reftime) if (strncmp(&line[cursor], ENV_TZ, strlen(ENV_TZ)) == 0) { if ((tmp = strchr(&line[cursor], '\n')) != NULL) { - *tmp = NULL; + *tmp = '\0'; } if (!isvalid_tz(&line[cursor + strlen(ENV_TZ)], NULL, @@ -1263,7 +1263,7 @@ readcronfile(FILE *cf, struct usr *u, time_t reftime) if (strncmp(&line[cursor], ENV_HOME, strlen(ENV_HOME)) == 0) { if ((tmp = strchr(&line[cursor], '\n')) != NULL) { - *tmp = NULL; + *tmp = '\0'; } if (home == NULL || strcmp(&line[cursor], get_obj(home))) { @@ -1277,7 +1277,7 @@ readcronfile(FILE *cf, struct usr *u, time_t reftime) if (strncmp(&line[cursor], ENV_SHELL, strlen(ENV_SHELL)) == 0) { if ((tmp = strchr(&line[cursor], '\n')) != NULL) { - *tmp = NULL; + *tmp = '\0'; } if (shell == NULL || strcmp(&line[cursor], get_obj(shell))) { @@ -2919,7 +2919,7 @@ msg_wait(long tim) static void process_msg(struct message *pmsg, time_t reftime) { - if (pmsg->etype == NULL) + if (pmsg->etype == 0) return; switch (pmsg->etype) { @@ -3696,7 +3696,7 @@ contract_abandon_latest(pid_t pid) static struct shared * create_shared(void *obj, void * (*obj_alloc)(void *obj), - void (*obj_free)(void *)) + void (*obj_free)(void *)) { struct shared *out; diff --git a/usr/src/cmd/cron/crontab.c b/usr/src/cmd/cron/crontab.c index cdb4e1e394..c6f1673ad8 100644 --- a/usr/src/cmd/cron/crontab.c +++ b/usr/src/cmd/cron/crontab.c @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ #include <sys/types.h> @@ -427,8 +427,7 @@ main(int argc, char **argv) } static void -copycron(fp) -FILE *fp; +copycron(FILE *fp) { FILE *tfp; char pid[6], *tnam_end; @@ -468,7 +467,7 @@ FILE *fp; strncpy(buf, &line[cursor + strlen(ENV_TZ)], sizeof (buf)); if ((x = strchr(buf, '\n')) != NULL) - *x = NULL; + *x = '\0'; if (isvalid_tz(buf, NULL, _VTZ_ALL)) { goto cont; @@ -484,7 +483,7 @@ FILE *fp; strncpy(buf, &line[cursor + strlen(ENV_SHELL)], sizeof (buf)); if ((x = strchr(buf, '\n')) != NULL) - *x = NULL; + *x = '\0'; if (isvalid_shell(buf)) { goto cont; @@ -500,7 +499,7 @@ FILE *fp; strncpy(buf, &line[cursor + strlen(ENV_HOME)], sizeof (buf)); if ((x = strchr(buf, '\n')) != NULL) - *x = NULL; + *x = '\0'; if (chdir(buf) == 0) { goto cont; } else { @@ -546,8 +545,7 @@ cont: } static int -next_field(lower, upper) -int lower, upper; +next_field(int lower, int upper) { int num, num2; @@ -605,8 +603,7 @@ int lower, upper; } static void -cerror(msg) -char *msg; +cerror(char *msg) { fprintf(stderr, gettext("%scrontab: error on previous line; %s\n"), line, msg); @@ -622,8 +619,7 @@ catch(int x) } static void -crabort(msg) -char *msg; +crabort(char *msg) { int sverrno; diff --git a/usr/src/cmd/devfsadm/cfg_link.c b/usr/src/cmd/devfsadm/cfg_link.c index ffdbc6d0af..e7229325ac 100644 --- a/usr/src/cmd/devfsadm/cfg_link.c +++ b/usr/src/cmd/devfsadm/cfg_link.c @@ -61,7 +61,7 @@ static int sata_cfg_creat_cb(di_minor_t minor, di_node_t node); static int sdcard_cfg_creat_cb(di_minor_t minor, di_node_t node); static di_node_t pci_cfg_chassis_node(di_node_t, di_prom_handle_t); -static char *pci_cfg_slotname(di_node_t, di_prom_handle_t, minor_t); +static char *pci_cfg_slotname(di_node_t, di_prom_handle_t, minor_t); static int pci_cfg_ap_node(minor_t, di_node_t, di_prom_handle_t, char *, int, int); static int pci_cfg_iob_name(di_minor_t, di_node_t, di_prom_handle_t, @@ -69,7 +69,7 @@ static int pci_cfg_iob_name(di_minor_t, di_node_t, di_prom_handle_t, static minor_t pci_cfg_pcidev(di_node_t, di_prom_handle_t); static int pci_cfg_ap_path(di_minor_t, di_node_t, di_prom_handle_t, char *, int, char **); -static char *pci_cfg_info_data(char *); +static char *pci_cfg_info_data(char *); static int pci_cfg_is_ap_path(di_node_t, di_prom_handle_t); static int pci_cfg_ap_legacy(di_minor_t, di_node_t, di_prom_handle_t, char *, int); @@ -87,7 +87,7 @@ static int di_propall_lookup_ints(di_prom_handle_t, int, dev_t, di_node_t, const char *, int **); static int di_propall_lookup_strings(di_prom_handle_t, int, dev_t, di_node_t, const char *, char **); -static int serid_printable(uint64_t *seridp); +static int serid_printable(uint64_t *seridp); static int di_propall_lookup_slot_names(di_prom_handle_t, int, dev_t, di_node_t, di_slot_name_t **); @@ -727,7 +727,7 @@ pci_cfg_ap_path(di_minor_t minor, di_node_t node, di_prom_handle_t ph, bufsz -= len - 1; /* set chasflag when the leaf node is within an iob */ - if ((curnode == node) != NULL) + if (curnode == node) chasflag = 1; } rv = pci_cfg_ap_node(pci_dev, curnode, ph, bufptr, bufsz, 0); diff --git a/usr/src/cmd/devfsadm/devfsadm.c b/usr/src/cmd/devfsadm/devfsadm.c index 52f4f4c0da..7cfcd09a81 100644 --- a/usr/src/cmd/devfsadm/devfsadm.c +++ b/usr/src/cmd/devfsadm/devfsadm.c @@ -378,7 +378,7 @@ main(int argc, char *argv[]) detachfromtty(); (void) cond_init(&cv, USYNC_THREAD, 0); (void) mutex_init(&count_lock, USYNC_THREAD, 0); - if (thr_create(NULL, NULL, + if (thr_create(NULL, 0, (void *(*)(void *))instance_flush_thread, NULL, THR_DETACHED, NULL) != 0) { err_print(CANT_CREATE_THREAD, "daemon", @@ -390,7 +390,7 @@ main(int argc, char *argv[]) /* start the minor_fini_thread */ (void) mutex_init(&minor_fini_mutex, USYNC_THREAD, 0); (void) cond_init(&minor_fini_cv, USYNC_THREAD, 0); - if (thr_create(NULL, NULL, + if (thr_create(NULL, 0, (void *(*)(void *))minor_fini_thread, NULL, THR_DETACHED, NULL)) { err_print(CANT_CREATE_THREAD, "minor_fini", @@ -705,7 +705,7 @@ parse_args(int argc, char *argv[]) } if (bind == TRUE) { - if ((mc.major == -1) || (mc.drvname[0] == NULL)) { + if ((mc.major == -1) || (mc.drvname[0] == '\0')) { err_print(MAJOR_AND_B_FLAG); devfsadm_exit(1); /*NOTREACHED*/ @@ -6354,7 +6354,7 @@ create_selector_list(char *selector) selector_list_t *selector_list; /* parse_devfs_spec splits the next field into keyword & value */ - while ((*selector != NULL) && (error == FALSE)) { + while ((*selector != '\0') && (error == FALSE)) { if (parse_selector(&selector, &key, &val) == DEVFSADM_FAILURE) { error = TRUE; break; @@ -7557,7 +7557,7 @@ getnexttoken(char *next, char **nextp, char **tokenpp, char *tchar) ; if (*cp1 == '=' || *cp1 == ':' || *cp1 == '&' || *cp1 == '|' || *cp1 == ';' || *cp1 == '\n' || *cp1 == '\0') { - *cp = NULL; /* terminate token */ + *cp = '\0'; /* terminate token */ cp = cp1; } } diff --git a/usr/src/cmd/dfs.cmds/sharectl/sharectl.c b/usr/src/cmd/dfs.cmds/sharectl/sharectl.c index fa76193d9a..7c4e985a9e 100644 --- a/usr/src/cmd/dfs.cmds/sharectl/sharectl.c +++ b/usr/src/cmd/dfs.cmds/sharectl/sharectl.c @@ -593,6 +593,6 @@ run_command(char *command, int argc, char *argv[], sa_handle_t handle) * need to check priviledges and restrict what can be done * based on least priviledge and sub-command. */ - ret = cmdvec->cmdfunc(handle, NULL, argc, argv); + ret = cmdvec->cmdfunc(handle, 0, argc, argv); return (ret); } diff --git a/usr/src/cmd/dfs.cmds/sharemgr/commands.c b/usr/src/cmd/dfs.cmds/sharemgr/commands.c index d6f9ad8611..79be97f149 100644 --- a/usr/src/cmd/dfs.cmds/sharemgr/commands.c +++ b/usr/src/cmd/dfs.cmds/sharemgr/commands.c @@ -5898,7 +5898,7 @@ static sa_command_t commands[] = { {"stop", CMD_NODISPLAY, sa_stop_group, USAGE_STOP, SVC_SET|SVC_ACTION}, {"unset", 0, sa_unset, USAGE_UNSET, SVC_SET}, {"unshare", 0, sa_legacy_unshare, USAGE_UNSHARE, SVC_SET|SVC_ACTION}, - {NULL, 0, NULL, NULL} + {NULL, 0, NULL, 0} }; static char * diff --git a/usr/src/cmd/expr/compile.c b/usr/src/cmd/expr/compile.c index 7dbb51dace..92d71f20f3 100644 --- a/usr/src/cmd/expr/compile.c +++ b/usr/src/cmd/expr/compile.c @@ -32,8 +32,8 @@ * table not present. * * Goal is to work with vi and sed/ed. - * Returns expbuf in dhl format (encoding of first two bytes). - * Note also that this is profoundly single threaded. You + * Returns expbuf in dhl format (encoding of first two bytes). + * Note also that this is profoundly single threaded. You * cannot call compile twice with two separate search strings * because the second call will wipe out the earlier stored string. * This must be fixed, plus a general cleanup should be performed @@ -41,8 +41,6 @@ * */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <widec.h> #include <sys/types.h> @@ -58,11 +56,11 @@ * psuedo compile/step/advance global variables */ extern int nbra; -extern char *locs; /* for stopping execess recursion */ -extern char *loc1; /* 1st character which matched RE */ -extern char *loc2; /* char after lst char in matched RE */ -extern char *braslist[]; /* start of nbra subexp */ -extern char *braelist[]; /* end of nbra subexp */ +extern char *locs; /* for stopping execess recursion */ +extern char *loc1; /* 1st character which matched RE */ +extern char *loc2; /* char after lst char in matched RE */ +extern char *braslist[]; /* start of nbra subexp */ +extern char *braelist[]; /* end of nbra subexp */ extern int regerrno; extern int reglength; @@ -73,7 +71,7 @@ static int dhl_step(const char *str, const char *ep); static int dhl_advance(const char *str, const char *ep); static int map_errnos(int); /* Convert regcomp error */ static int dhl_doit(const char *, const regex_t *, const int flags); -static char * dhl_compile(const char *instr, char *ep, char *endbuf); +static char *dhl_compile(const char *instr, char *ep, char *endbuf); /* * # of sub re's: NOTE: For now limit on bra list defined here @@ -89,7 +87,7 @@ static regmatch_t rm[SEPSIZE]; /* ptr to list of RE matches */ * regex structures, one for advance and one for step. */ static struct regex_comp { - char r_head[2]; /* Header for DL encoding for vi */ + char r_head[2]; /* Header for DL encoding for vi */ regex_t r_stp; /* For use by step */ regex_t r_adv; /* For use by advance */ } reg_comp; @@ -139,17 +137,16 @@ advance(const char *instr, const char *expbuf) * I say "apparently" as the code to compile()/step() is poorly written. */ static char * -dhl_compile(instr, expbuf, endbuf) -const char *instr; /* the regular expression */ -char *expbuf; /* where the compiled RE gets placed */ -char *endbuf; /* ending addr of expbuf */ +dhl_compile(const char *instr, /* the regular expression */ + char *expbuf, /* where the compiled RE gets placed */ + char *endbuf) /* ending addr of expbuf */ { int rv; int alloc = 0; char adv_instr[4096]; /* PLENTY big temp buffer */ char *instrp; /* PLENTY big temp buffer */ - if (*instr == (char) NULL) { + if (*instr == '\0') { regerrno = 41; return (NULL); } @@ -198,7 +195,7 @@ char *endbuf; /* ending addr of expbuf */ */ if (instr[0] == '^') - instrp = (char *) instr; /* String already has leading ^ */ + instrp = (char *)instr; /* String already has leading ^ */ else { adv_instr[0] = '^'; strncpy(&adv_instr[1], instr, 2048); @@ -213,14 +210,14 @@ char *endbuf; /* ending addr of expbuf */ /* * update global variables */ - nbra = (int) reg_comp.r_adv.re_nsub > 0 ? - (int) reg_comp.r_adv.re_nsub : 0; + nbra = (int)reg_comp.r_adv.re_nsub > 0 ? + (int)reg_comp.r_adv.re_nsub : 0; regerrno = 0; /* * Set the header flags for use by vi */ - if (instr[0] == '^') /* if beginning of string, */ + if (instr[0] == '^') /* if beginning of string, */ reg_comp.r_head[0] = 1; /* set special flag */ else reg_comp.r_head[0] = 0; /* clear special flag */ @@ -232,7 +229,7 @@ char *endbuf; /* ending addr of expbuf */ /* * Copy our reg_comp structure to expbuf */ - (void) memcpy(expbuf, (char *) ®_comp, regexc_size); + (void) memcpy(expbuf, (char *)®_comp, regexc_size); out: /* @@ -259,9 +256,8 @@ out: * dhl_step: step through a string until a RE match is found, or end of str */ static int -dhl_step(str, ep) -const char *str; /* characters to be checked for a match */ -const char *ep; /* compiled RE from dhl_compile() */ +dhl_step(const char *str, /* characters to be checked for a match */ + const char *ep) /* compiled RE from dhl_compile() */ { /* * Check if we're passed a null ep @@ -273,7 +269,7 @@ const char *ep; /* compiled RE from dhl_compile() */ /* * Call common routine with r_stp (step) structure */ - return (dhl_doit(str, &(((struct regex_comp *) ep)->r_stp), + return (dhl_doit(str, &(((struct regex_comp *)ep)->r_stp), ((locs != NULL) ? REG_NOTBOL : 0))); } @@ -281,9 +277,8 @@ const char *ep; /* compiled RE from dhl_compile() */ * dhl_advance: implement advance */ static int -dhl_advance(str, ep) -const char *str; /* characters to be checked for a match */ -const char *ep; /* compiled RE from dhl_compile() */ +dhl_advance(const char *str, /* characters to be checked for a match */ + const char *ep) /* compiled RE from dhl_compile() */ { int rv; /* @@ -296,7 +291,7 @@ const char *ep; /* compiled RE from dhl_compile() */ /* * Call common routine with r_adv (advance) structure */ - rv = dhl_doit(str, &(((struct regex_comp *) ep)->r_adv), 0); + rv = dhl_doit(str, &(((struct regex_comp *)ep)->r_adv), 0); loc1 = NULL; /* Clear it per the compile man page */ return (rv); } @@ -305,10 +300,9 @@ const char *ep; /* compiled RE from dhl_compile() */ * dhl_doit - common code for step and advance */ static int -dhl_doit(str, rep, flags) -const char *str; /* characters to be checked for a match */ -const regex_t *rep; -const int flags; /* flags to be passed to regexec directly */ +dhl_doit(const char *str, /* characters to be checked for a match */ + const regex_t *rep, + const int flags) /* flags to be passed to regexec directly */ { int rv; int i; @@ -344,7 +338,7 @@ const int flags; /* flags to be passed to regexec directly */ braslist[i] = (char *)str + prm->rm_so; braelist[i] = (char *)str + prm->rm_eo; if (i >= SEPSIZE) { - regerrno = 50; /* regex overflow */ + regerrno = 50; /* regex overflow */ return (0); } } @@ -362,19 +356,19 @@ const int flags; /* flags to be passed to regexec directly */ * regerrno to compile/step error mapping: * This is really a big compromise. Some errors don't map at all * like regcomp error 15 is generated by both compile() error types - * 44 & 46. So which one should we map to? + * 44 & 46. So which one should we map to? * Note REG_ESUB Can't happen- 9 is no longer max num of subexpressions * To do your errors right use xregerr() to get the regcomp error * string and print that. * - * | regcomp/regexec | Compile/step/advance | + * | regcomp/regexec | Compile/step/advance | * +---------------------------------+--------------------------------------+ * 0 REG_OK Pattern matched 1 - Pattern matched * 1 REG_NOMATCH No match 0 - Pattern didn't match * 2 REG_ECOLLATE Bad collation elmnt. 67 - Returned by compile on mbtowc err * 3 REG_EESCAPE trailing \ in patrn 45 - } expected after \. * 4 REG_ENEWLINE \n before end pattrn 36 - Illegal or missing delimiter. - * 5 REG_ENSUB Over 9 \( \) pairs 43 - Too many \( + * 5 REG_ENSUB Over 9 \( \) pairs 43 - Too many \( * 6 REG_ESUBREG Bad number in \[0-9] 25 - ``\digit'' out of range. * 7 REG_EBRACK [ ] inbalance 49 - [ ] imbalance. * 8 REG_EPAREN ( ) inbalance 42 - \(~\) imbalance. @@ -481,13 +475,13 @@ map_errnos(int Errno) */ void -regex_comp_free(void * a) +regex_comp_free(void *a) { /* * Free any data being held for previous search strings */ - if (((struct regex_comp *) a) == NULL) { + if (a == NULL) { return; } diff --git a/usr/src/cmd/expr/expr.c b/usr/src/cmd/expr/expr.c index 873d7bc3f7..2685241a0e 100644 --- a/usr/src/cmd/expr/expr.c +++ b/usr/src/cmd/expr/expr.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* @@ -70,10 +70,6 @@ static void yyerror(char *); static void errxx(); static void *exprmalloc(size_t size); -long atol(); -char *strcpy(), *strncpy(); -void exit(); - static char *ltoa(); static char *lltoa(); static char **Av; @@ -112,8 +108,7 @@ static int pri[] = { * numeric output, e.g., -00001 becomes -1 */ static void -clean_buf(buf) - char *buf; +clean_buf(char *buf) { int i = 0; int is_a_num = 1; @@ -388,7 +383,7 @@ match(char *s, char *p) /* - * ematch - XCU4 mods involve calling compile/advance which simulate + * ematch - XCU4 mods involve calling compile/advance which simulate * the obsolete compile/advance functions using regcomp/regexec */ static int @@ -441,7 +436,7 @@ ematch(char *s, char *p) } memcpy(tmptr, s, nmatch); *(tmptr + nmatch) = '\0'; - if ((nmbchars = mbstowcs(NULL, tmptr, NULL)) == -1) { + if ((nmbchars = mbstowcs(NULL, tmptr, 0)) == -1) { yyerror("invalid multibyte character encountered"); if (tmptr1 != NULL) free(tmptr1); diff --git a/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c b/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c index 8812c6d8ab..e2d6c05b54 100644 --- a/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c +++ b/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * syseventconfd - The sysevent conf daemon * @@ -183,8 +181,8 @@ main(int argc, char **argv) (void) thr_sigsetmask(SIG_BLOCK, &set, NULL); /* Create signal catching thread */ - if (thr_create(NULL, NULL, (void *(*)(void *))sigwait_thr, - (void *)NULL, 0, NULL) < 0) { + if (thr_create(NULL, 0, (void *(*)(void *))sigwait_thr, + NULL, 0, NULL) < 0) { syserrmsg(INIT_THR_CREATE_ERR, strerror(errno)); exit(2); } @@ -287,7 +285,7 @@ exec_cmd(struct cmd *cmd) arg_t *args; pid_t pid; char *lp; - char *p; + char *p; int i; sigset_t set, prior_set; diff --git a/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c b/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c index eac85c38b2..ccabc81635 100644 --- a/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c +++ b/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c @@ -83,7 +83,7 @@ static int door_upcall_retval; /* Kernel event posting return value */ static int fini_pending = 0; /* fini pending flag */ static int deliver_buf = 0; /* Current event buffer from kernel */ static int dispatch_buf = 0; /* Current event buffer dispatched */ -static sysevent_t **eventbuf; /* Global array of event buffers */ +static sysevent_t **eventbuf; /* Global array of event buffers */ static struct ev_completion *event_compq; /* Event completion queue */ static mutex_t ev_comp_lock; /* Event completion queue lock */ static mutex_t err_mutex; /* error logging lock */ @@ -453,19 +453,19 @@ main(int argc, char **argv) syseventd_exit(2); } - if (thr_create(NULL, NULL, (void *(*)(void *))dispatch_message, + if (thr_create(NULL, 0, (void *(*)(void *))dispatch_message, (void *)0, 0, NULL) < 0) { syseventd_err_print(INIT_THR_CREATE_ERR, strerror(errno)); syseventd_exit(2); } - if (thr_create(NULL, NULL, + if (thr_create(NULL, 0, (void *(*)(void *))event_completion_thr, NULL, THR_BOUND, NULL) != 0) { syseventd_err_print(INIT_THR_CREATE_ERR, strerror(errno)); syseventd_exit(2); } /* Create signal catching thread */ - if (thr_create(NULL, NULL, (void *(*)(void *))sigwait_thr, + if (thr_create(NULL, 0, (void *(*)(void *))sigwait_thr, NULL, 0, NULL) < 0) { syseventd_err_print(INIT_THR_CREATE_ERR, strerror(errno)); syseventd_exit(2); diff --git a/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c b/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c index 08d424f6ba..0ec386dca6 100644 --- a/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c +++ b/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c @@ -333,7 +333,7 @@ slm_init() (void) mutex_init(&evq_lock, USYNC_THREAD, NULL); (void) cond_init(&evq_cv, USYNC_THREAD, NULL); - if (thr_create(NULL, NULL, (void *(*)(void *))devfsadmd_deliver_thr, + if (thr_create(NULL, 0, (void *(*)(void *))devfsadmd_deliver_thr, NULL, THR_BOUND, &deliver_thr_id) != 0) { (void) mutex_destroy(&evq_lock); (void) cond_destroy(&evq_cv); diff --git a/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c b/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c index 3aee5c6c51..eae8050d41 100644 --- a/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c +++ b/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c @@ -96,7 +96,7 @@ static int first_event; /* first event since init */ static conftab_t *conftab = NULL; static syseventtab_t *syseventtab = NULL; static syseventtab_t *syseventtab_tail = NULL; -static sysevent_handle_t *confd_handle = NULL; +static sysevent_handle_t *confd_handle = NULL; /* * The cmd queue is a queue of commands ready to be sent @@ -1659,7 +1659,7 @@ queue_event(sysevent_t *ev, syseventtab_t *sep, sysevent_hdr_info_t *hdr) { str_t *line; nvlist_t *nvlist; - char *argv0; + char *argv0; sysevent_t *cmd_event; nvlist_t *cmd_nvlist; cmdqueue_t *new_cmd; @@ -2207,8 +2207,8 @@ slm_init() /* * Create thread to flush cmd queue */ - if ((err = thr_create(NULL, NULL, (void *(*)(void*))queue_flush_thr, - (void *)NULL, 0, &cmdq_thr_id)) != 0) { + if ((err = thr_create(NULL, 0, (void *(*)(void*))queue_flush_thr, + NULL, 0, &cmdq_thr_id)) != 0) { syslog(LOG_ERR, THR_CREATE_ERR, strerror(err)); sysevent_close_channel(confd_handle); confd_handle = NULL; diff --git a/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c b/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c index 146badfd43..b8492764b4 100644 --- a/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c +++ b/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> #include <stdlib.h> #include <string.h> @@ -232,7 +230,7 @@ slm_init() (void) mutex_init(&evq_lock, USYNC_THREAD, NULL); (void) cond_init(&evq_cv, USYNC_THREAD, NULL); - if (thr_create(NULL, NULL, (void *(*)(void *))subscriber_deliver_thr, + if (thr_create(NULL, 0, (void *(*)(void *))subscriber_deliver_thr, NULL, 0, &deliver_thr_id) != 0) { syseventd_err_print(INIT_SUB_THR_CREATE_ERR, strerror(errno)); return (NULL); diff --git a/usr/src/pkg/manifests/system-kernel.mf b/usr/src/pkg/manifests/system-kernel.mf index 8163e9a1ed..58e1aa8ff2 100644 --- a/usr/src/pkg/manifests/system-kernel.mf +++ b/usr/src/pkg/manifests/system-kernel.mf @@ -25,6 +25,7 @@ # Copyright 2015 Nexenta Systems, Inc. All rights reserved. # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> # Copyright 2017 James S Blachly, MD <james.blachly@gmail.com> +# Copyright 2019 RackTop Systems # # @@ -565,8 +566,6 @@ file path=kernel/misc/scsi_vhci/$(ARCH64)/scsi_vhci_f_asym_emc group=sys \ mode=0755 file path=kernel/misc/scsi_vhci/$(ARCH64)/scsi_vhci_f_asym_lsi group=sys \ mode=0755 -file path=kernel/misc/scsi_vhci/$(ARCH64)/scsi_vhci_f_asym_sun group=sys \ - mode=0755 file path=kernel/misc/scsi_vhci/$(ARCH64)/scsi_vhci_f_sym group=sys mode=0755 file path=kernel/misc/scsi_vhci/$(ARCH64)/scsi_vhci_f_sym_emc group=sys \ mode=0755 diff --git a/usr/src/uts/common/Makefile.files b/usr/src/uts/common/Makefile.files index 92f087c3ff..73f064144f 100644 --- a/usr/src/uts/common/Makefile.files +++ b/usr/src/uts/common/Makefile.files @@ -839,8 +839,6 @@ SCSI_VHCI_F_SYM_OBJS += sym.o SCSI_VHCI_F_TPGS_OBJS += tpgs.o -SCSI_VHCI_F_ASYM_SUN_OBJS += asym_sun.o - SCSI_VHCI_F_SYM_HDS_OBJS += sym_hds.o SCSI_VHCI_F_TAPE_OBJS += tape.o diff --git a/usr/src/uts/common/io/scsi/adapters/scsi_vhci/fops/asym_sun.c b/usr/src/uts/common/io/scsi/adapters/scsi_vhci/fops/asym_sun.c deleted file mode 100644 index 4ac6b86d29..0000000000 --- a/usr/src/uts/common/io/scsi/adapters/scsi_vhci/fops/asym_sun.c +++ /dev/null @@ -1,557 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Implementation of "scsi_vhci_f_asym_sun" asymmetric failover_ops. - * - * Note : f_asym_sun method is the same as the one originally used by SUN's - * T3 (Purple) device. - */ - -#include <sys/conf.h> -#include <sys/file.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> -#include <sys/scsi/scsi.h> -#include <sys/scsi/adapters/scsi_vhci.h> - -/* Supported device table entries. */ -char *purple_dev_table[] = { -/* " 111111" */ -/* "012345670123456789012345" */ -/* "|-VID--||-----PID------|" */ - - "SUN T300 ", - "SUN T4 ", - NULL, -}; - -/* Failover module plumbing. */ -SCSI_FAILOVER_OP("f_asym_sun", purple); - -#define PURPLE_FO_CMD_RETRY_DELAY 1000000 /* 1 seconds */ -#define PURPLE_FO_RETRY_DELAY 2000000 /* 2 seconds */ -/* - * max time for failover to complete is 3 minutes. Compute - * number of retries accordingly, to ensure we wait for at least - * 3 minutes - */ -#define PURPLE_FO_MAX_RETRIES (3*60*1000000)/PURPLE_FO_RETRY_DELAY - -/* - * max number of retries for purple failover to complete where the ping - * command is failing due to transport errors or commands being rejected by - * purple. - * PURPLE_FO_MAX_RETRIES takes into account the case where CMD_CMPLTs but - * purple takes time to complete the failover. - */ -#define PURPLE_FO_MAX_CMD_RETRIES 3 - -#define T3_SCSI_ASC_FO_IN_PROGRESS 0x90 -#define T3_SCSI_ASCQ_PATH_ACT2INACT 0x00 -#define T3_SCSI_ASCQ_PATH_INACT2ACT 0x01 -#define T3_SCSI_ASC_PATH_INACTIVE 0x04 -#define T3_SCSI_ASCQ_PATH_INACTIVE 0x88 - -static void purple_get_fo_mode(struct scsi_device *sd, - int *mode, int *ownership, int *xlf_capable); - -/* ARGSUSED */ -static int -purple_device_probe(struct scsi_device *sd, struct scsi_inquiry *stdinq, -void **ctpriv) -{ - char **dt; - int xlf = 0, mode = 0, ownership = 0; - - VHCI_DEBUG(6, (CE_NOTE, NULL, "purple_device_probe: vidpid %s\n", - stdinq->inq_vid)); - - for (dt = purple_dev_table; *dt; dt++) { - if (strncmp(stdinq->inq_vid, *dt, strlen(*dt))) - continue; - - /* match */ - purple_get_fo_mode(sd, &mode, &ownership, &xlf); - if (mode == SCSI_EXPLICIT_FAILOVER) - return (SFO_DEVICE_PROBE_VHCI); - else - return (SFO_DEVICE_PROBE_PHCI); - } - return (SFO_DEVICE_PROBE_PHCI); -} - -/* ARGSUSED */ -static void -purple_device_unprobe(struct scsi_device *sd, void *ctpriv) -{ - /* - * For future use - */ -} - -/* ARGSUSED */ -static void -purple_get_fo_mode(struct scsi_device *sd, int *mode, -int *ownership, int *xlf_capable) -{ - char inqbuf[0xff], *ptr, *end; - int retval = 0; - struct buf *bp; - struct scsi_pkt *pkt; - struct scsi_address *ap; - - *mode = *ownership = *xlf_capable = 0; - bp = getrbuf(KM_NOSLEEP); - if (bp == NULL) - return; - bp->b_un.b_addr = inqbuf; - bp->b_flags = B_READ; - bp->b_bcount = 0xff; - bp->b_resid = 0; - - ap = &sd->sd_address; - pkt = scsi_init_pkt(ap, NULL, bp, CDB_GROUP0, - sizeof (struct scsi_arq_status), 0, 0, NULL, NULL); - if (pkt == NULL) { - freerbuf(bp); - return; - } - - pkt->pkt_cdbp[0] = SCMD_INQUIRY; - pkt->pkt_cdbp[1] = 0x1; - pkt->pkt_cdbp[2] = 0x83; - pkt->pkt_cdbp[4] = 0xff; - pkt->pkt_time = 90; - - retval = vhci_do_scsi_cmd(pkt); - scsi_destroy_pkt(pkt); - freerbuf(bp); - if (retval == 0) { - VHCI_DEBUG(4, (CE_NOTE, NULL, "!(sd:%p)failed to get mode" - " and ownership info\n", (void *)sd)); - return; - } - - ptr = inqbuf; - ptr += 4; /* identification descriptor 0 */ - end = inqbuf + 4 + inqbuf[3]; - while (((ptr[1] & 0x0f) != 0xf) && (ptr < end)) - ptr += ptr[3] + 4; /* next identification descriptor */ - if (ptr >= end) { - VHCI_DEBUG(4, (CE_NOTE, NULL, "!(sd:%p)p_g_m_a_o:assuming" - " implicit mode\n", (void *)sd)); - *mode = SCSI_IMPLICIT_FAILOVER; - *ownership = 0; - return; - } - ptr += 4; /* Port Failover Identifier */ - *mode = ptr[0]; - if ((ptr[1] & 0x3) == 0x01) - *ownership = 0; - else if ((ptr[1] & 0x3) == 0x00) - *ownership = 1; - if (ptr[1] & 0x4) { - *xlf_capable = 1; - } else { - *xlf_capable = 0; - } -} - -static int -purple_activate_explicit(struct scsi_device *sd, int xlf_capable) -{ - char cdb[CDB_GROUP1]; - struct scsi_address *ap; - struct scsi_pkt *pkt; - int retval; - - bzero(cdb, CDB_GROUP1); - - ap = &sd->sd_address; - pkt = scsi_init_pkt(ap, NULL, NULL, CDB_GROUP1, - sizeof (struct scsi_arq_status), 0, 0, NULL, NULL); - if (pkt == NULL) - return (0); - - pkt->pkt_cdbp[0] = 0xD0; - if (xlf_capable) { - /* - * Bit 2/1: 1/0: implicitly drop any reservation - * Bit 0: Grab bit - 1 means an explicit failover will be - * triggered - */ - pkt->pkt_cdbp[1] = 0x05; - } else { - pkt->pkt_cdbp[1] = 0x01; /* no reservation check, "grab" lun */ - } - - retval = vhci_do_scsi_cmd(pkt); - scsi_destroy_pkt(pkt); - - return (retval); -} - -/* ARGSUSED */ -static int -purple_path_activate(struct scsi_device *sd, char *pathclass, -void *ctpriv) -{ - struct buf *bp; - struct scsi_pkt *pkt; - struct scsi_address *ap; - int err, retry_cnt, retry_cmd_cnt; - int mode, ownership, retval, xlf; - uint8_t *sns, skey, asc, ascq; - - ap = &sd->sd_address; - - mode = ownership = 0; - - purple_get_fo_mode(sd, &mode, &ownership, &xlf); - if (ownership == 1) { - VHCI_DEBUG(4, (CE_NOTE, NULL, "!path already active for 0x%p\n", - (void *)sd)); - return (0); - } - - if (mode != SCSI_IMPLICIT_FAILOVER) { - VHCI_DEBUG(4, (CE_NOTE, NULL, - "!mode is EXPLICIT for 0x%p xlf %x\n", - (void *)sd, xlf)); - retval = purple_activate_explicit(sd, xlf); - if (retval == 0) { - VHCI_DEBUG(4, (CE_NOTE, NULL, - "!(sd:%p)purple_path_activate failed(1)\n", - (void *)sd)); - return (1); - } - } else { - VHCI_DEBUG(4, (CE_NOTE, NULL, "!mode is IMPLICIT for 0x%p\n", - (void *)sd)); - } - - bp = scsi_alloc_consistent_buf(ap, (struct buf *)NULL, DEV_BSIZE, - B_READ, NULL, NULL); - if (!bp) { - cmn_err(CE_WARN, "!No resources (buf) to initiate T3 path " - "activation"); - return (1); - } - - pkt = scsi_init_pkt(ap, NULL, bp, CDB_GROUP1, - sizeof (struct scsi_arq_status), 0, PKT_CONSISTENT, NULL, NULL); - if (!pkt) { - cmn_err(CE_WARN, "!Packet alloc failure during T3 " - "path activation"); - scsi_free_consistent_buf(bp); - return (1); - } - - (void) scsi_setup_cdb((union scsi_cdb *)(uintptr_t)pkt->pkt_cdbp, - SCMD_READ, 1, 1, 0); - pkt->pkt_time = 3*30; - pkt->pkt_flags |= FLAG_NOINTR; - - retry_cnt = 0; - retry_cmd_cnt = 0; -retry: - err = scsi_transport(pkt); - if (err != TRAN_ACCEPT) { - /* - * Retry TRAN_BUSY till PURPLE_FO_MAX_RETRIES is exhausted. - * All other errors are fatal and should not be retried. - */ - if ((err == TRAN_BUSY) && - (retry_cnt++ < PURPLE_FO_MAX_RETRIES)) { - drv_usecwait(PURPLE_FO_RETRY_DELAY); - goto retry; - } - cmn_err(CE_WARN, "T3 failover failed, " - "couldn't transport packet"); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - } - - switch (pkt->pkt_reason) { - case CMD_TIMEOUT: - cmn_err(CE_WARN, "!T3 failover failed: timed out "); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - case CMD_CMPLT: - /* - * Re-initialize retry_cmd_cnt. Allow transport and - * cmd errors to go through a full retry count when - * these are encountered. This way TRAN/CMD errors - * retry count is not exhausted due to CMD_CMPLTs - * delay for a T3 fo to finish. This allows the system - * to brave a hick-up on the link at any given time, - * while waiting for the fo to complete. - */ - retry_cmd_cnt = 0; - if (pkt->pkt_state & STATE_ARQ_DONE) { - sns = (uint8_t *) - &(((struct scsi_arq_status *)(uintptr_t) - (pkt->pkt_scbp))->sts_sensedata); - skey = scsi_sense_key(sns); - asc = scsi_sense_asc(sns); - ascq = scsi_sense_ascq(sns); - if (skey == KEY_UNIT_ATTENTION) { - /* - * swallow unit attention - */ - goto retry; - } else if ((skey == KEY_NOT_READY) && - (asc == T3_SCSI_ASC_FO_IN_PROGRESS) && - (ascq == T3_SCSI_ASCQ_PATH_INACT2ACT)) { - if (retry_cnt++ >= - PURPLE_FO_MAX_RETRIES) { - cmn_err(CE_WARN, "!T3 failover" - " failed: timed out " - "waiting for path to " - "become active"); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - } - VHCI_DEBUG(6, (CE_NOTE, NULL, - "!(sd:%p)lun becoming active...\n", - (void *)sd)); - drv_usecwait(PURPLE_FO_RETRY_DELAY); - goto retry; - } - cmn_err(CE_NOTE, "!T3 failover failed;" - " sense key:%x, ASC: %x, " - "ASCQ:%x", skey, asc, ascq); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - } - switch (SCBP_C(pkt)) { - case STATUS_GOOD: - break; - case STATUS_CHECK: - VHCI_DEBUG(4, (CE_WARN, NULL, - "!(sd:%p)T3:" - " cont allegiance during purple " - "activation", (void *)sd)); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - case STATUS_QFULL: - VHCI_DEBUG(6, (CE_NOTE, NULL, "QFULL " - "status returned during purple " - "path activation for 0x%p\n", - (void *)sd)); - drv_usecwait(5000); - goto retry; - case STATUS_BUSY: - VHCI_DEBUG(6, (CE_NOTE, NULL, "BUSY " - "status returned during purple " - "path activation for 0x%p\n", - (void *)sd)); - drv_usecwait(5000); - goto retry; - default: - VHCI_DEBUG(4, (CE_WARN, NULL, - "!(sd:%p) Bad status " - "returned during purple " - "activation (pkt 0x%p, " - "status %x)", - (void *)sd, (void *)pkt, - SCBP_C(pkt))); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - } - break; - case CMD_INCOMPLETE: - case CMD_RESET: - case CMD_ABORTED: - case CMD_TRAN_ERR: - /* - * Increased the number of retries when these error - * cases are encountered. Also added a 1 sec wait - * before retrying. - */ - if (retry_cmd_cnt++ < PURPLE_FO_MAX_CMD_RETRIES) { - drv_usecwait(PURPLE_FO_CMD_RETRY_DELAY); - VHCI_DEBUG(4, (CE_WARN, NULL, - "!Retrying T3 path activation due to " - "pkt reason:%x, retry cnt:%d", - pkt->pkt_reason, retry_cmd_cnt)); - goto retry; - } - /* FALLTHROUGH */ - default: - cmn_err(CE_WARN, "!T3 path activation did not " - "complete successfully," - "(pkt reason %x)", pkt->pkt_reason); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - } - - VHCI_DEBUG(4, (CE_NOTE, NULL, "!T3 path activation success\n")); - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (0); -} - -/* ARGSUSED */ -static int purple_path_deactivate(struct scsi_device *sd, char *pathclass, -void *ctpriv) -{ - return (0); -} - -/* ARGSUSED */ -static int -purple_path_get_opinfo(struct scsi_device *sd, struct scsi_path_opinfo -*opinfo, void *ctpriv) -{ - struct scsi_inquiry *inq; - struct buf *bp; - struct scsi_pkt *pkt; - struct scsi_address *ap; - int retval, mode, ownership, xlf; - - ap = &sd->sd_address; - - bp = scsi_alloc_consistent_buf(ap, (struct buf *)NULL, SUN_INQSIZE, - B_READ, NULL, NULL); - if (!bp) - return (1); - pkt = scsi_init_pkt(ap, NULL, bp, CDB_GROUP0, - sizeof (struct scsi_arq_status), 0, PKT_CONSISTENT, NULL, NULL); - if (!pkt) { - scsi_free_consistent_buf(bp); - return (1); - } - (void) scsi_setup_cdb((union scsi_cdb *)(uintptr_t)pkt->pkt_cdbp, - SCMD_INQUIRY, 0, SUN_INQSIZE, 0); - pkt->pkt_time = 60; - - retval = vhci_do_scsi_cmd(pkt); - if (retval == 0) { - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - return (1); - } - - inq = (struct scsi_inquiry *)bp->b_un.b_addr; - - opinfo->opinfo_rev = OPINFO_REV; - - /* - * Ignore to check inquiry dual port bit. - * T3 can return this bit as 0 when one of its controller goes down. - * Instead relying on inquiry port bit only. - */ - if (inq->inq_port == 0) { - (void) strcpy(opinfo->opinfo_path_attr, "primary"); - } else { - (void) strcpy(opinfo->opinfo_path_attr, "secondary"); - } - - scsi_destroy_pkt(pkt); - scsi_free_consistent_buf(bp); - - purple_get_fo_mode(sd, &mode, &ownership, &xlf); - - if (ownership == 1) - opinfo->opinfo_path_state = SCSI_PATH_ACTIVE; - else - opinfo->opinfo_path_state = SCSI_PATH_INACTIVE; - opinfo->opinfo_xlf_capable = xlf; - opinfo->opinfo_pswtch_best = 30; - opinfo->opinfo_pswtch_worst = 3*30; - opinfo->opinfo_mode = (uint16_t)mode; - opinfo->opinfo_preferred = 1; - - return (0); -} - -/* ARGSUSED */ -static int purple_path_ping(struct scsi_device *sd, void *ctpriv) -{ - /* - * For future use - */ - return (1); -} - -/* ARGSUSED */ -static int -purple_analyze_sense(struct scsi_device *sd, uint8_t *sense, -void *ctpriv) -{ - uint8_t skey, asc, ascq; - - skey = scsi_sense_key(sense); - asc = scsi_sense_asc(sense); - ascq = scsi_sense_ascq(sense); - - if (skey == KEY_NOT_READY) { - if (asc == T3_SCSI_ASC_FO_IN_PROGRESS) { - if (ascq == T3_SCSI_ASCQ_PATH_INACT2ACT) - return (SCSI_SENSE_INACT2ACT); - else if (ascq == T3_SCSI_ASCQ_PATH_ACT2INACT) - return (SCSI_SENSE_ACT2INACT); - } else if ((asc == T3_SCSI_ASC_PATH_INACTIVE) && - (ascq == T3_SCSI_ASCQ_PATH_INACTIVE)) { - return (SCSI_SENSE_INACTIVE); - } - } - - /* - * At this point sense data may be for power-on-reset UNIT ATTN or - * hardware errors, vendor unique sense data etc. For all these cases - * return SCSI_SENSE_UNKNOWN. - */ - VHCI_DEBUG(6, (CE_NOTE, NULL, "!T3 analyze sense UNKNOWN:" - " sense key:%x, ASC: %x, ASCQ:%x\n", skey, asc, ascq)); - return (SCSI_SENSE_UNKNOWN); -} - -/* ARGSUSED */ -static int -purple_pathclass_next(char *cur, char **nxt, void *ctpriv) -{ - if (cur == NULL) { - *nxt = PCLASS_PRIMARY; - return (0); - } else if (strcmp(cur, PCLASS_PRIMARY) == 0) { - *nxt = PCLASS_SECONDARY; - return (0); - } else if (strcmp(cur, PCLASS_SECONDARY) == 0) { - return (ENOENT); - } else { - return (EINVAL); - } -} diff --git a/usr/src/uts/common/io/scsi/adapters/scsi_vhci/scsi_vhci.conf b/usr/src/uts/common/io/scsi/adapters/scsi_vhci/scsi_vhci.conf index 22165a6654..cd1dd29b33 100644 --- a/usr/src/uts/common/io/scsi/adapters/scsi_vhci/scsi_vhci.conf +++ b/usr/src/uts/common/io/scsi/adapters/scsi_vhci/scsi_vhci.conf @@ -20,7 +20,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 RackTop Systems +# # name="scsi_vhci" class="root"; @@ -51,7 +52,6 @@ auto-failback="enable"; # "failover-module-name", which begins with "f_" (like "f_asym_sun"). The # "failover-module-name" is also used in the override mechanism below. ddi-forceload = - "misc/scsi_vhci/scsi_vhci_f_asym_sun", "misc/scsi_vhci/scsi_vhci_f_asym_lsi", "misc/scsi_vhci/scsi_vhci_f_asym_emc", "misc/scsi_vhci/scsi_vhci_f_sym_emc", diff --git a/usr/src/uts/common/io/scsi/targets/sd.c b/usr/src/uts/common/io/scsi/targets/sd.c index 0bc590e5bf..f998d9ef11 100644 --- a/usr/src/uts/common/io/scsi/targets/sd.c +++ b/usr/src/uts/common/io/scsi/targets/sd.c @@ -28,6 +28,7 @@ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright 2016 Joyent, Inc. * Copyright 2017 Nexenta Systems, Inc. + * Copyright 2019 Racktop Systems */ /* * Copyright 2011 cyril.galibern@opensvc.com @@ -433,18 +434,6 @@ static sd_tunables ibm_properties = { 0 }; -static sd_tunables purple_properties = { - PURPLE_THROTTLE_VALUE, - 0, - 0, - PURPLE_BUSY_RETRIES, - PURPLE_RESET_RETRY_COUNT, - PURPLE_RESERVE_RELEASE_TIME, - 0, - 0, - 0 -}; - static sd_tunables sve_properties = { SVE_THROTTLE_VALUE, 0, @@ -673,11 +662,6 @@ static sd_disk_config_t sd_disk_table[] = { SD_CONF_BSET_CACHE_IS_NV, &lsi_oem_properties }, { "Fujitsu SX300", SD_CONF_BSET_THROTTLE, &lsi_oem_properties }, { "LSI", SD_CONF_BSET_NRR_COUNT, &lsi_properties }, - { "SUN T3", SD_CONF_BSET_THROTTLE | - SD_CONF_BSET_BSY_RETRY_COUNT| - SD_CONF_BSET_RST_RETRIES| - SD_CONF_BSET_RSV_REL_TIME, - &purple_properties }, { "SUN SESS01", SD_CONF_BSET_THROTTLE | SD_CONF_BSET_BSY_RETRY_COUNT| SD_CONF_BSET_RST_RETRIES| @@ -685,11 +669,6 @@ static sd_disk_config_t sd_disk_table[] = { SD_CONF_BSET_MIN_THROTTLE| SD_CONF_BSET_DISKSORT_DISABLED, &sve_properties }, - { "SUN T4", SD_CONF_BSET_THROTTLE | - SD_CONF_BSET_BSY_RETRY_COUNT| - SD_CONF_BSET_RST_RETRIES| - SD_CONF_BSET_RSV_REL_TIME, - &purple_properties }, { "SUN SVE01", SD_CONF_BSET_DISKSORT_DISABLED | SD_CONF_BSET_LUN_RESET_ENABLED, &maserati_properties }, @@ -18471,23 +18450,6 @@ sd_sense_key_not_ready(struct sd_lun *un, uint8_t *sense_datap, struct buf *bp, */ goto fail_command; - case 0x88: - /* - * Vendor-unique code for T3/T4: it indicates a - * path problem in a mutipathed config, but as far as - * the target driver is concerned it equates to a fatal - * error, so we should just fail the command right away - * (without printing anything to the console). If this - * is not a T3/T4, fall thru to the default recovery - * action. - * T3/T4 is FC only, don't need to check is_fibre - */ - if (SD_IS_T3(un) || SD_IS_T4(un)) { - sd_return_failed_command(un, bp, EIO); - return; - } - /* FALLTHRU */ - case 0x04: /* LUN NOT READY, FORMAT IN PROGRESS */ case 0x05: /* LUN NOT READY, REBUILD IN PROGRESS */ case 0x06: /* LUN NOT READY, RECALCULATION IN PROGRESS */ diff --git a/usr/src/uts/common/io/tem_safe.c b/usr/src/uts/common/io/tem_safe.c index 9b85c0a03e..65c2635959 100644 --- a/usr/src/uts/common/io/tem_safe.c +++ b/usr/src/uts/common/io/tem_safe.c @@ -516,6 +516,35 @@ tem_safe_setparam(struct tem_vt_state *tem, int count, int newparam) } +static void +tem_select_color(struct tem_vt_state *tem, text_color_t color, boolean_t fg) +{ + if (tems.ts_pdepth >= 24 || + (color < 8 && tems.ts_pdepth < 24)) { + if (fg == B_TRUE) { + tem->tvs_fg_color = color; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + } else { + tem->tvs_bg_color = color; + tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG; + } + return; + } + + if (color > 15) + return; + + /* Bright color and depth < 24 */ + color -= 8; + if (fg == B_TRUE) { + tem->tvs_fg_color = color; + tem->tvs_flags |= TEM_ATTR_BRIGHT_FG; + } else { + tem->tvs_bg_color = color; + tem->tvs_flags |= TEM_ATTR_BRIGHT_BG; + } +} + /* * select graphics mode based on the param vals stored in a_params */ @@ -612,10 +641,8 @@ tem_safe_selgraph(struct tem_vt_state *tem) case 5: /* 256 colors */ count++; curparam--; - if (tems.ts_pdepth < 24) - break; - tem->tvs_fg_color = tem->tvs_params[count]; - tem->tvs_flags &= ~TEM_ATTR_BRIGHT_FG; + tem_select_color(tem, tem->tvs_params[count], + B_TRUE); break; default: break; @@ -661,10 +688,8 @@ tem_safe_selgraph(struct tem_vt_state *tem) case 5: /* 256 colors */ count++; curparam--; - if (tems.ts_pdepth < 24) - break; - tem->tvs_bg_color = tem->tvs_params[count]; - tem->tvs_flags &= ~TEM_ATTR_BRIGHT_BG; + tem_select_color(tem, tem->tvs_params[count], + B_FALSE); break; default: break; diff --git a/usr/src/uts/common/sys/scsi/targets/sddef.h b/usr/src/uts/common/sys/scsi/targets/sddef.h index c4af129a32..df39257ee6 100644 --- a/usr/src/uts/common/sys/scsi/targets/sddef.h +++ b/usr/src/uts/common/sys/scsi/targets/sddef.h @@ -805,17 +805,6 @@ _NOTE(MUTEX_PROTECTS_DATA(sd_lun::un_fi_mutex, #define SD_IS_LSI(un) ((un)->un_f_cfg_is_lsi == TRUE) /* - * Macros to check if the lun is a Sun T3 or a T4 - */ -#define SD_IS_T3(un) \ - ((bcmp(SD_INQUIRY(un)->inq_vid, "SUN", 3) == 0) && \ - (bcmp(SD_INQUIRY(un)->inq_pid, "T3", 2) == 0)) - -#define SD_IS_T4(un) \ - ((bcmp(SD_INQUIRY(un)->inq_vid, "SUN", 3) == 0) && \ - (bcmp(SD_INQUIRY(un)->inq_pid, "T4", 2) == 0)) - -/* * Macros for non-512 byte writes to removable devices. */ #define NOT_DEVBSIZE(un) \ diff --git a/usr/src/uts/i86pc/os/cpuid.c b/usr/src/uts/i86pc/os/cpuid.c index a5e66c2ee3..628ac3a3ac 100644 --- a/usr/src/uts/i86pc/os/cpuid.c +++ b/usr/src/uts/i86pc/os/cpuid.c @@ -3447,14 +3447,14 @@ cpuid_pass2(cpu_t *cpu) * (We already handled n == 0 and n == 1 in pass 1) */ for (n = 2, cp = &cpi->cpi_std[2]; n < nmax; n++, cp++) { - cp->cp_eax = n; - /* * leaves 6 and 7 were handled in pass 1 */ if (n == 6 || n == 7) continue; + cp->cp_eax = n; + /* * CPUID function 4 expects %ecx to be initialized * with an index which indicates which cache to return diff --git a/usr/src/uts/intel/Makefile.intel b/usr/src/uts/intel/Makefile.intel index 5494ae8a30..f23eb0639d 100644 --- a/usr/src/uts/intel/Makefile.intel +++ b/usr/src/uts/intel/Makefile.intel @@ -24,6 +24,7 @@ # Copyright 2019 Joyent, Inc. # Copyright 2016 Garrett D'Amore <garrett@damore.org> # Copyright 2018 Nexenta Systems, Inc. +# Copyright 2019 RackTop Systems # # @@ -646,7 +647,6 @@ MISC_KMODS += usba usba10 usbs49_fw MISC_KMODS += scsi_vhci_f_sym_hds MISC_KMODS += scsi_vhci_f_sym MISC_KMODS += scsi_vhci_f_tpgs -MISC_KMODS += scsi_vhci_f_asym_sun MISC_KMODS += scsi_vhci_f_tape MISC_KMODS += scsi_vhci_f_tpgs_tape MISC_KMODS += fctl diff --git a/usr/src/uts/intel/scsi_vhci_f_asym_sun/Makefile b/usr/src/uts/intel/scsi_vhci_f_asym_sun/Makefile deleted file mode 100644 index 72aa17da78..0000000000 --- a/usr/src/uts/intel/scsi_vhci_f_asym_sun/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -#pragma ident "%Z%%M% %I% %E% SMI" -# -# This makefile drives the production of misc/scsi_vhci/scsi_vhci_f_asym_sun -# intel architecture dependent -# - -# -# Paths to the base of the uts directory trees -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = scsi_vhci_f_asym_sun -OBJECTS = $(SCSI_VHCI_F_ASYM_SUN_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SCSI_VHCI_F_ASYM_SUN_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_SCSI_VHCI_DIR)/$(MODULE) - -# -# Include common rules. -# -include $(UTSBASE)/intel/Makefile.intel - -# -# Define targets. -# -ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) - -# -# Note dependancy on misc/scsi. -# -LDFLAGS += -dy -N"misc/scsi" -N"drv/scsi_vhci" - -# -# Default build targets. -# -.KEEP_STATE: - -def: $(DEF_DEPS) - -all: $(ALL_DEPS) - -clean: $(CLEAN_DEPS) - -clobber: $(CLOBBER_DEPS) - -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - -install: $(INSTALL_DEPS) - -# -# Include common targets. -# -include $(UTSBASE)/intel/Makefile.targ diff --git a/usr/src/uts/sparc/Makefile.sparc b/usr/src/uts/sparc/Makefile.sparc index d171c70175..f2c885cd0c 100644 --- a/usr/src/uts/sparc/Makefile.sparc +++ b/usr/src/uts/sparc/Makefile.sparc @@ -25,6 +25,7 @@ # Copyright 2019 Joyent, Inc. # Copyright 2016 Gary Mills # Copyright 2016 Nexenta Systems, Inc. +# Copyright 2019 RackTop Systems # # @@ -408,7 +409,7 @@ MISC_KMODS += mac dls MISC_KMODS += cmlb MISC_KMODS += tem MISC_KMODS += pcicfg fcodem fcpci -MISC_KMODS += scsi_vhci_f_sym scsi_vhci_f_tpgs scsi_vhci_f_asym_sun +MISC_KMODS += scsi_vhci_f_sym scsi_vhci_f_tpgs MISC_KMODS += scsi_vhci_f_sym_hds MISC_KMODS += scsi_vhci_f_tape scsi_vhci_f_tpgs_tape MISC_KMODS += fctl diff --git a/usr/src/uts/sparc/scsi_vhci_f_asym_sun/Makefile b/usr/src/uts/sparc/scsi_vhci_f_asym_sun/Makefile deleted file mode 100644 index ee88346c4a..0000000000 --- a/usr/src/uts/sparc/scsi_vhci_f_asym_sun/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -#pragma ident "%Z%%M% %I% %E% SMI" -# -# This makefile drives the production of misc/scsi_vhci/scsi_vhci_f_asym_sun -# sparc architecture dependent -# - -# -# Paths to the base of the uts directory trees -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = scsi_vhci_f_asym_sun -OBJECTS = $(SCSI_VHCI_F_ASYM_SUN_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SCSI_VHCI_F_ASYM_SUN_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_SCSI_VHCI_DIR)/$(MODULE) - -# -# Include common rules. -# -include $(UTSBASE)/sparc/Makefile.sparc - -# -# Define targets. -# -ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) - -# -# Note dependancy on misc/scsi. -# -LDFLAGS += -dy -N"misc/scsi" -N"drv/scsi_vhci" - -# -# Default build targets. -# -.KEEP_STATE: - -def: $(DEF_DEPS) - -all: $(ALL_DEPS) - -clean: $(CLEAN_DEPS) - -clobber: $(CLOBBER_DEPS) - -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - -install: $(INSTALL_DEPS) - -# -# Include common targets. -# -include $(UTSBASE)/sparc/Makefile.targ |
