[Midnightbsd-cvs] src [8086] trunk/sys/dev/isp: remove dependence on MAXPHYS
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 15 18:42:08 EDT 2016
Revision: 8086
http://svnweb.midnightbsd.org/src/?rev=8086
Author: laffer1
Date: 2016-09-15 18:42:08 -0400 (Thu, 15 Sep 2016)
Log Message:
-----------
remove dependence on MAXPHYS
Modified Paths:
--------------
trunk/sys/dev/isp/isp_freebsd.h
trunk/sys/dev/isp/isp_pci.c
trunk/sys/dev/isp/isp_sbus.c
Modified: trunk/sys/dev/isp/isp_freebsd.h
===================================================================
--- trunk/sys/dev/isp/isp_freebsd.h 2016-09-15 22:41:29 UTC (rev 8085)
+++ trunk/sys/dev/isp/isp_freebsd.h 2016-09-15 22:42:08 UTC (rev 8086)
@@ -726,9 +726,6 @@
#define isp_sim_alloc(a, b, c, d, e, f, g, h) \
cam_sim_alloc(a, b, c, d, e, &(d)->isp_osinfo.lock, f, g, h)
-/* Should be BUS_SPACE_MAXSIZE, but MAXPHYS is larger than BUS_SPACE_MAXSIZE */
-#define ISP_NSEGS ((MAXPHYS / PAGE_SIZE) + 1)
-
#define ISP_PATH_PRT(i, l, p, ...) \
if ((l) == ISP_LOGALL || ((l)& (i)->isp_dblev) != 0) { \
xpt_print(p, __VA_ARGS__); \
Modified: trunk/sys/dev/isp/isp_pci.c
===================================================================
--- trunk/sys/dev/isp/isp_pci.c 2016-09-15 22:41:29 UTC (rev 8085)
+++ trunk/sys/dev/isp/isp_pci.c 2016-09-15 22:42:08 UTC (rev 8086)
@@ -1525,7 +1525,7 @@
isp_pci_mbxdma(ispsoftc_t *isp)
{
caddr_t base;
- uint32_t len;
+ uint32_t len, nsegs;
int i, error, ns, cmap = 0;
bus_size_t slim; /* segment size */
bus_addr_t llim; /* low limit of unavailable dma */
@@ -1567,6 +1567,11 @@
return (1);
}
+ if (isp->isp_osinfo.sixtyfourbit) {
+ nsegs = ISP_NSEG64_MAX;
+ } else {
+ nsegs = ISP_NSEG_MAX;
+ }
#ifdef ISP_TARGET_MODE
/*
* XXX: We don't really support 64 bit target mode for parallel scsi yet
@@ -1579,7 +1584,7 @@
}
#endif
- if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &isp->isp_osinfo.dmat)) {
+ if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, &isp->isp_osinfo.dmat)) {
free(isp->isp_osinfo.pcmd_pool, M_DEVBUF);
ISP_LOCK(isp);
isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
Modified: trunk/sys/dev/isp/isp_sbus.c
===================================================================
--- trunk/sys/dev/isp/isp_sbus.c 2016-09-15 22:41:29 UTC (rev 8085)
+++ trunk/sys/dev/isp/isp_sbus.c 2016-09-15 22:42:08 UTC (rev 8086)
@@ -497,7 +497,7 @@
if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_SBD(isp)), 1,
BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR_32BIT, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT,
- ISP_NSEGS, BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_osinfo.dmat)) {
+ ISP_NSEG_MAX, BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_osinfo.dmat)) {
isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
free(isp->isp_osinfo.pcmd_pool, M_DEVBUF);
free(isp->isp_xflist, M_DEVBUF);
More information about the Midnightbsd-cvs
mailing list