diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-11-03 20:08:50 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-11-03 20:08:50 +0000 |
commit | bd5727d3e07572cd73ca98bd3df3a75c420762fa (patch) | |
tree | 17b4a562bd029a51f22f8af076f6c9dfb58a9558 /sys/dev/pci/mpii.c | |
parent | f57decd8224d57a7a4439ad66fb2a10a947c1c65 (diff) |
Backout last change that broke the driver. There's no hardware at hand
to debug it further and it's not nice to have a driver broken for months.
While here, correct calculation of a Reply Post Queue depth -- it has to
be multiple of 16.
ok dlg
Diffstat (limited to 'sys/dev/pci/mpii.c')
-rw-r--r-- | sys/dev/pci/mpii.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 81cbd9b4ea5..7e6843c31f4 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.49 2011/09/12 12:33:26 mikeb Exp $ */ +/* $OpenBSD: mpii.c,v 1.50 2011/11/03 20:08:49 mikeb Exp $ */ /* * Copyright (c) 2010 Mike Belopuhov <mkb@crypt.org.ru> * Copyright (c) 2009 James Giannoules @@ -1747,7 +1747,7 @@ u_int32_t mpii_debug = 0 */ #define MPII_MAX_SGL (32) -#define MPII_MAX_REQUEST_CREDIT (40) +#define MPII_MAX_REQUEST_CREDIT (128) struct mpii_dmamem { bus_dmamap_t mdm_map; @@ -2926,9 +2926,8 @@ mpii_iocfacts(struct mpii_softc *sc) /* must be multiple of 16 */ sc->sc_reply_free_qdepth = sc->sc_num_reply_frames + (16 - (sc->sc_num_reply_frames % 16)); - - sc->sc_reply_post_qdepth = sc->sc_request_depth + - sc->sc_num_reply_frames + 1; + sc->sc_reply_post_qdepth = ((sc->sc_request_depth + + sc->sc_num_reply_frames + 1 + 15) / 16) * 16; if (sc->sc_reply_post_qdepth > ifp.max_reply_descriptor_post_queue_depth) |