summaryrefslogtreecommitdiffstats
path: root/sys/dev/sym
diff options
context:
space:
mode:
authorgroudier <groudier@FreeBSD.org>2001-07-01 16:04:07 +0000
committergroudier <groudier@FreeBSD.org>2001-07-01 16:04:07 +0000
commitdba395db942da199f3520931ac8e1ed73597246f (patch)
treea22fca1540353a11efe23f07e9460cb7f7bcd1d4 /sys/dev/sym
parent1219a35719184de1244982add3d3eb7d2a688e7b (diff)
downloadFreeBSD-src-dba395db942da199f3520931ac8e1ed73597246f.zip
FreeBSD-src-dba395db942da199f3520931ac8e1ed73597246f.tar.gz
Submitted by: Chip Salzenberg <chip@perlsupport.com>.
MFC after: 5 days - Mask GPCNTL against 0x1c (was 0xfc) for the reading of the NVRAM. This ensures LEDC bit will not be set on 896 and later chips. Submitted by Chip Salzenberg <chip@perlsupport.com>. - Add probe for Tekram 390 U2B/U2W SCSI (53C895) LED handling. Submitted by Chip Salzenberg <chip@valinux.com>
Diffstat (limited to 'sys/dev/sym')
-rw-r--r--sys/dev/sym/sym_hipd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 60957de..2113da8 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -2930,7 +2930,10 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram)
* specific GPIO wiring and for the 895A, 896
* and 1010 that drive the LED directly.
*/
- if ((SYM_SETUP_SCSI_LED || nvram->type == SYM_SYMBIOS_NVRAM) &&
+ if ((SYM_SETUP_SCSI_LED ||
+ (nvram->type == SYM_SYMBIOS_NVRAM ||
+ (nvram->type == SYM_TEKRAM_NVRAM &&
+ np->device_id == PCI_ID_SYM53C895))) &&
!(np->features & FE_LEDC) && !(np->sv_gpcntl & 0x01))
np->features |= FE_LED0;
@@ -10124,7 +10127,7 @@ static int sym_read_S24C16_nvram (hcb_p np, int offset, u_char *data, int len)
/* save current state of GPCNTL and GPREG */
old_gpreg = INB (nc_gpreg);
old_gpcntl = INB (nc_gpcntl);
- gpcntl = old_gpcntl & 0xfc;
+ gpcntl = old_gpcntl & 0x1c;
/* set up GPREG & GPCNTL to set GPIO0 and GPIO1 in to known state */
OUTB (nc_gpreg, old_gpreg);
OpenPOWER on IntegriCloud