diff options
| author | 2007-02-28 19:40:38 +0000 | |
|---|---|---|
| committer | 2007-02-28 19:40:38 +0000 | |
| commit | 0acf981a0ec977a927dec7b4b4c8779df49d7f3a (patch) | |
| tree | b47cb1e458a696803a0422ffcbd1cef367186ae6 /sys/dev/pci/isp_pci.c | |
| parent | do not bother printing 5 lines of cpu information which is always, on (diff) | |
| download | wireguard-openbsd-0acf981a0ec977a927dec7b4b4c8779df49d7f3a.tar.xz wireguard-openbsd-0acf981a0ec977a927dec7b4b4c8779df49d7f3a.zip | |
Set ISP_CFG_NOVRAM for Sun-branded ISP2200's that don't have an NVRAM fitted.
Avoids the "invalid NVRAM" message on the Blade 1000 and other machines with
onboard isp(4).
ok deraadt@
Diffstat (limited to 'sys/dev/pci/isp_pci.c')
| -rw-r--r-- | sys/dev/pci/isp_pci.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c index 507e4156631..cb7319863eb 100644 --- a/sys/dev/pci/isp_pci.c +++ b/sys/dev/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_pci.c,v 1.38 2005/09/11 18:17:08 mickey Exp $ */ +/* $OpenBSD: isp_pci.c,v 1.39 2007/02/28 19:40:38 kettenis Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * @@ -40,6 +40,10 @@ #include <dev/pci/pcivar.h> #include <dev/pci/pcidevs.h> +#ifdef __sparc64__ +#include <dev/ofw/openfirm.h> +#endif + static u_int16_t isp_pci_rd_reg(struct ispsoftc *, int); static void isp_pci_wr_reg(struct ispsoftc *, int, u_int16_t); #if !(defined(ISP_DISABLE_1080_SUPPORT) && defined(ISP_DISABLE_12160_SUPPORT)) @@ -399,6 +403,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux) const char *intrstr; int ioh_valid, memh_valid; bus_size_t iosize, msize; + u_int32_t confopts = 0; ioh_valid = memh_valid = 0; @@ -573,6 +578,17 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux) pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2100_OFF; data = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_CLASS_REG); +#ifdef __sparc64__ + { + char name[32]; + + bzero(name, sizeof(name)); + OF_getprop(PCITAG_NODE(pa->pa_tag), + "name", name, sizeof(name)); + if (strcmp(name, "SUNW,qlc") == 0) + confopts |= ISP_CFG_NONVRAM; + } +#endif } #endif #ifndef ISP_DISABLE_2300_SUPPORT @@ -682,7 +698,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux) DEFAULT_PORTWWN(isp) = 0x400000007F000003ULL; } - isp->isp_confopts = self->dv_cfdata->cf_flags; + isp->isp_confopts = confopts | self->dv_cfdata->cf_flags; isp->isp_role = ISP_DEFAULT_ROLES; ISP_LOCK(isp); isp->isp_osinfo.no_mbox_ints = 1; |
