vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| can someone with a megaraid card from the mid to late 90s test this diff out for me and let me know if anything bad happens? it reduces the number of commands that get allocated for cards that cant support high numbers of them. Index: ami.c ================================================== ================= RCS file: /cvs/src/sys/dev/ic/ami.c,v retrieving revision 1.162 diff -u -p -r1.162 ami.c --- ami.c 21 May 2006 19:48:51 -0000 1.162 +++ ami.c 21 May 2006 20:15:07 -0000 @@ -365,6 +365,7 @@ ami_attach(struct ami_softc *sc) struct ami_mem *am; const char *p; paddr_t pa; + int openings; int s; am = ami_allocmem(sc, NBPG); @@ -473,24 +474,23 @@ ami_attach(struct ami_softc *sc) * processors/enclosures by lowering the number of * openings available for logical units. */ - sc->sc_maxcmds -= AMI_MAXIOCTLCMDS + AMI_MAXPROCS * - AMI_MAXRAWCMDS * sc->sc_channels; + openings = sc->sc_maxcmds - (AMI_MAXIOCTLCMDS + + AMI_MAXPROCS * AMI_MAXRAWCMDS * sc->sc_channels); if (sc->sc_nunits) - sc->sc_link.openings = - sc->sc_maxcmds / sc->sc_nunits; + sc->sc_link.openings = openings / sc->sc_nunits; else - sc->sc_link.openings = sc->sc_maxcmds; + sc->sc_link.openings = openings; } splx(s); - ami_freemem(sc, am); - - if (ami_alloc_ccbs(sc, AMI_MAXCMDS) != 0) { + if (ami_alloc_ccbs(sc, sc->sc_maxcmds) != 0) { /* error already printed */ goto free_mbox; } + + ami_freemem(sc, am); /* hack for hp netraid version encoding */ if ('A' <= sc->sc_fwver[2] && sc->sc_fwver[2] <= 'Z' && |