aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-07-12 22:57:57 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-07-12 22:57:57 +0000
commitcac33e16cf80983c8c66c541dee4991a00dd090f (patch)
tree417038bbe0bda03e133c8005498537a499f54ad5
parent9886a800fc25314d69ab4e4189e8c84a46fb1328 (diff)
downloadsrc-cac33e16cf80983c8c66c541dee4991a00dd090f.tar.gz
src-cac33e16cf80983c8c66c541dee4991a00dd090f.zip
- Make the maxsize parameter of the data buffer DMA tag match maxio, which
was missed in r209599. Reported and tested by: Michael Moll - Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are used in mpt.c only. Reviewed by: ken MFC after: r209599
Notes
Notes: svn path=/head/; revision=209960
-rw-r--r--sys/dev/mpt/mpt.c8
-rw-r--r--sys/dev/mpt/mpt.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c
index cc0ebd1f41e5..75fa564cd414 100644
--- a/sys/dev/mpt/mpt.c
+++ b/sys/dev/mpt/mpt.c
@@ -128,6 +128,7 @@ static void mpt_send_event_ack(struct mpt_softc *mpt, request_t *ack_req,
static int mpt_send_event_request(struct mpt_softc *mpt, int onoff);
static int mpt_soft_reset(struct mpt_softc *mpt);
static void mpt_hard_reset(struct mpt_softc *mpt);
+static int mpt_dma_buf_alloc(struct mpt_softc *mpt);
static void mpt_dma_buf_free(struct mpt_softc *mpt);
static int mpt_configure_ioc(struct mpt_softc *mpt, int, int);
static int mpt_enable_ioc(struct mpt_softc *mpt, int);
@@ -2475,7 +2476,7 @@ mpt_download_fw(struct mpt_softc *mpt)
return (0);
}
-int
+static int
mpt_dma_buf_alloc(struct mpt_softc *mpt)
{
struct mpt_map_info mi;
@@ -2486,8 +2487,9 @@ mpt_dma_buf_alloc(struct mpt_softc *mpt)
/* Create a child tag for data buffers */
if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1,
0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
- NULL, NULL, MAXBSIZE, mpt->max_cam_seg_cnt,
- BUS_SPACE_MAXSIZE_32BIT, 0, &mpt->buffer_dmat) != 0) {
+ NULL, NULL, (mpt->max_cam_seg_cnt - 1) * PAGE_SIZE,
+ mpt->max_cam_seg_cnt, BUS_SPACE_MAXSIZE_32BIT, 0,
+ &mpt->buffer_dmat) != 0) {
mpt_prt(mpt, "cannot create a dma tag for data buffers\n");
return (1);
}
diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h
index d7f922ced7fe..9026142b9a1e 100644
--- a/sys/dev/mpt/mpt.h
+++ b/sys/dev/mpt/mpt.h
@@ -1279,7 +1279,6 @@ void mpt_check_doorbell(struct mpt_softc *mpt);
void mpt_dump_reply_frame(struct mpt_softc *mpt,
MSG_DEFAULT_REPLY *reply_frame);
-int mpt_dma_buf_alloc(struct mpt_softc *mpt);
void mpt_set_config_regs(struct mpt_softc *);
int mpt_issue_cfg_req(struct mpt_softc */*mpt*/, request_t */*req*/,
cfgparms_t *params,