diff options
author | yong tan - Sun Microsystems - Beijing China <Yong.Tan@Sun.COM> | 2009-05-27 10:29:49 +0800 |
---|---|---|
committer | yong tan - Sun Microsystems - Beijing China <Yong.Tan@Sun.COM> | 2009-05-27 10:29:49 +0800 |
commit | 4d6eaea5019b5d24b19a812b20291ec4f8b8fa3d (patch) | |
tree | a6e3e1629e19557c4b39c89dfad0a153e1105f98 /usr/src/uts/common/io/bge/bge_main2.c | |
parent | 48056c53c7a3d65cab2626a67418401d97b58c1a (diff) | |
download | illumos-gate-4d6eaea5019b5d24b19a812b20291ec4f8b8fa3d.tar.gz |
6649689 bge private properties for interrupt coalescing should check for negative input values
6828220 mismatch device IDs between Broadcom bcm5703 copper and serdes
6793252 IBM eServer fma incorrectly shows fault.io.pciex.device-interr
Diffstat (limited to 'usr/src/uts/common/io/bge/bge_main2.c')
-rw-r--r-- | usr/src/uts/common/io/bge/bge_main2.c | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/usr/src/uts/common/io/bge/bge_main2.c b/usr/src/uts/common/io/bge/bge_main2.c index 3ab38a6a05..4a7d0c0dde 100644 --- a/usr/src/uts/common/io/bge/bge_main2.c +++ b/usr/src/uts/common/io/bge/bge_main2.c @@ -37,7 +37,7 @@ static char bge_ident[] = "Broadcom Gb Ethernet"; /* * Make sure you keep the version ID up to date! */ -static char bge_version[] = "Broadcom Gb Ethernet v1.06"; +static char bge_version[] = "Broadcom Gb Ethernet v1.07"; /* * Property names @@ -1183,20 +1183,53 @@ bge_set_priv_prop(bge_t *bgep, const char *pr_name, uint_t pr_valsize, } return (err); } - if (strcmp(pr_name, "_intr_coalesce_blank_time") == 0) { + if (strcmp(pr_name, "_rx_intr_coalesce_blank_time") == 0) { if (ddi_strtol(pr_val, (char **)NULL, 0, &result) != 0) return (EINVAL); + if (result < 0) + err = EINVAL; + else { + bgep->chipid.rx_ticks_norm = (uint32_t)result; + bge_chip_coalesce_update(bgep); + } + return (err); + } - bgep->chipid.rx_ticks_norm = (uint32_t)result; - return (0); + if (strcmp(pr_name, "_rx_intr_coalesce_pkt_cnt") == 0) { + if (ddi_strtol(pr_val, (char **)NULL, 0, &result) != 0) + return (EINVAL); + + if (result < 0) + err = EINVAL; + else { + bgep->chipid.rx_count_norm = (uint32_t)result; + bge_chip_coalesce_update(bgep); + } + return (err); + } + if (strcmp(pr_name, "_tx_intr_coalesce_blank_time") == 0) { + if (ddi_strtol(pr_val, (char **)NULL, 0, &result) != 0) + return (EINVAL); + if (result < 0) + err = EINVAL; + else { + bgep->chipid.tx_ticks_norm = (uint32_t)result; + bge_chip_coalesce_update(bgep); + } + return (err); } - if (strcmp(pr_name, "_intr_coalesce_pkt_cnt") == 0) { + if (strcmp(pr_name, "_tx_intr_coalesce_pkt_cnt") == 0) { if (ddi_strtol(pr_val, (char **)NULL, 0, &result) != 0) return (EINVAL); - bgep->chipid.rx_count_norm = (uint32_t)result; - return (0); + if (result < 0) + err = EINVAL; + else { + bgep->chipid.tx_count_norm = (uint32_t)result; + bge_chip_coalesce_update(bgep); + } + return (err); } return (ENOTSUP); } |