diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/mfi.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/qla.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/sti.c | 21 |
3 files changed, 30 insertions, 11 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index e73ccf2d33a..987800ee141 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.149 2013/12/04 05:21:57 dlg Exp $ */ +/* $OpenBSD: mfi.c,v 1.150 2014/02/20 11:09:48 kettenis Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -1330,9 +1330,11 @@ mfi_do_mgmt(struct mfi_softc *sc, struct mfi_ccb *ccb, uint32_t opc, DNPRINTF(MFI_D_MISC, "%s: mfi_do_mgmt %#x\n", DEVNAME(sc), opc); - dma_buf = dma_alloc(len, PR_WAITOK); - if (dma_buf == NULL) - goto done; + if (len > 0) { + dma_buf = dma_alloc(len, cold ? PR_NOWAIT : PR_WAITOK); + if (dma_buf == NULL) + goto done; + } dcmd = &ccb->ccb_frame->mfr_dcmd; memset(dcmd->mdf_mbox, 0, MFI_MBOX_SIZE); diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c index 9a42cffc2bc..b60e2ddf475 100644 --- a/sys/dev/ic/qla.c +++ b/sys/dev/ic/qla.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qla.c,v 1.26 2014/02/20 03:39:07 dlg Exp $ */ +/* $OpenBSD: qla.c,v 1.27 2014/02/20 11:09:48 kettenis Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -1977,7 +1977,13 @@ qla_read_nvram(struct qla_softc *sc) if (sc->sc_nvram.id[0] != 'I' || sc->sc_nvram.id[1] != 'S' || sc->sc_nvram.id[2] != 'P' || sc->sc_nvram.id[3] != ' ' || sc->sc_nvram.nvram_version < 1 || (csum != 0)) { - printf("%s: nvram corrupt\n", DEVNAME(sc)); + /* + * onboard 2200s on Sun hardware don't have an nvram + * fitted, but will provide us with node and port name + * through Open Firmware; don't complain in that case. + */ + if (sc->sc_node_name == 0 || sc->sc_port_name == 0) + printf("%s: nvram corrupt\n", DEVNAME(sc)); return (1); } return (0); diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 87b6a707659..48a2b2c4471 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti.c,v 1.67 2013/10/20 20:07:29 miod Exp $ */ +/* $OpenBSD: sti.c,v 1.68 2014/02/20 11:09:48 kettenis Exp $ */ /* * Copyright (c) 2000-2003 Michael Shalayeff @@ -467,6 +467,7 @@ sti_region_setup(struct sti_screen *scr) if (regno == 1) { scr->fbaddr = addr; scr->fblen = r->length << PGSHIFT; + printf("0x%x/0x%x\n", scr->fbaddr, scr->fblen); } } @@ -1068,14 +1069,24 @@ sti_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) } paddr_t -sti_mmap(void *v, off_t offset, int prot) +sti_mmap(void *v, off_t off, int prot) { -#if 0 struct sti_screen *scr = (struct sti_screen *)v; + + if (off & PGOFSET) + return (-1); + + if (scr->scr_wsmode == WSDISPLAYIO_MODE_DUMBFB) { +#if 0 + if (off >= 0 && off < scr->fblen) + return (bus_space_mmap(scr->scr_rom->memt, scr->fbaddr, + off, prot, BUS_SPACE_MAP_LINEAR)); +#else + return (scr->fbaddr + off); #endif + } - /* XXX not finished */ - return -1; + return (-1); } int |