mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
Redo dma tag creation to correctly reflect the boundary and segment
limitations inherent to the isp1000 on SBus cards.
This commit is contained in:
parent
435a93378f
commit
f777264584
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103823
@ -477,7 +477,6 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
|
|||||||
caddr_t base;
|
caddr_t base;
|
||||||
u_int32_t len;
|
u_int32_t len;
|
||||||
int i, error, ns;
|
int i, error, ns;
|
||||||
bus_size_t bl;
|
|
||||||
struct imush im;
|
struct imush im;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -488,17 +487,16 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ISP_UNLOCK(isp);
|
ISP_UNLOCK(isp);
|
||||||
bl = BUS_SPACE_MAXADDR_24BIT;
|
|
||||||
|
|
||||||
if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR,
|
if (bus_dma_tag_create(NULL, 1, BUS_SPACE_MAXADDR_24BIT-1,
|
||||||
BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE,
|
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR_32BIT,
|
||||||
ISP_NSEGS, bl, 0, &sbs->dmat)) {
|
NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, ISP_NSEGS,
|
||||||
|
BUS_SPACE_MAXADDR_24BIT, 0, &sbs->dmat)) {
|
||||||
isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
|
isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
|
||||||
ISP_LOCK(isp);
|
ISP_LOCK(isp);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
len = sizeof (XS_T **) * isp->isp_maxcmds;
|
len = sizeof (XS_T **) * isp->isp_maxcmds;
|
||||||
isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
|
isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
|
||||||
if (isp->isp_xflist == NULL) {
|
if (isp->isp_xflist == NULL) {
|
||||||
@ -522,8 +520,9 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
|
|||||||
len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
|
len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
|
||||||
|
|
||||||
ns = (len / PAGE_SIZE) + 1;
|
ns = (len / PAGE_SIZE) + 1;
|
||||||
if (bus_dma_tag_create(sbs->dmat, QENTRY_LEN, 0, BUS_SPACE_MAXADDR,
|
if (bus_dma_tag_create(sbs->dmat, QENTRY_LEN, BUS_SPACE_MAXADDR_24BIT-1,
|
||||||
BUS_SPACE_MAXADDR, NULL, NULL, len, ns, bl, 0, &isp->isp_cdmat)) {
|
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR_32BIT, NULL, NULL,
|
||||||
|
len, ns, BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_cdmat)) {
|
||||||
isp_prt(isp, ISP_LOGERR,
|
isp_prt(isp, ISP_LOGERR,
|
||||||
"cannot create a dma tag for control spaces");
|
"cannot create a dma tag for control spaces");
|
||||||
free(sbs->dmaps, M_DEVBUF);
|
free(sbs->dmaps, M_DEVBUF);
|
||||||
|
Loading…
Reference in New Issue
Block a user