Page MenuHomeFreeBSD

D30798.id.diff
No OneTemporary

D30798.id.diff

diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c
--- a/sys/dev/aacraid/aacraid.c
+++ b/sys/dev/aacraid/aacraid.c
@@ -579,7 +579,7 @@
BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
- sc->aac_max_sectors << 9, /* maxsize */
+ AAC_MAXIO_SIZE(sc), /* maxsize */
sc->aac_sg_tablesize, /* nsegments */
BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
BUS_DMA_ALLOCNOW, /* flags */
@@ -1807,7 +1807,7 @@
}
ip->MaxIoCommands = sc->aac_max_fibs;
- ip->MaxIoSize = sc->aac_max_sectors << 9;
+ ip->MaxIoSize = AAC_MAXIO_SIZE(sc);
ip->MaxFibSize = sc->aac_max_fib_size;
aac_adapter_init_tole(ip);
diff --git a/sys/dev/aacraid/aacraid_cam.c b/sys/dev/aacraid/aacraid_cam.c
--- a/sys/dev/aacraid/aacraid_cam.c
+++ b/sys/dev/aacraid/aacraid_cam.c
@@ -1011,7 +1011,7 @@
cpi->max_lun = 7; /* Per the controller spec */
cpi->initiator_id = camsc->inf->InitiatorBusId;
cpi->bus_id = camsc->inf->BusNumber;
- cpi->maxio = sc->aac_max_sectors << 9;
+ cpi->maxio = AAC_MAXIO_SIZE(sc);
/*
* Resetting via the passthrough or parallel bus scan
diff --git a/sys/dev/aacraid/aacraid_var.h b/sys/dev/aacraid/aacraid_var.h
--- a/sys/dev/aacraid/aacraid_var.h
+++ b/sys/dev/aacraid/aacraid_var.h
@@ -470,6 +470,14 @@
u_int32_t FwDebugBufferSize; /* FW Debug Buffer size */
};
+/*
+ * Max. I/O size in bytes.
+ * Reserve one page for the DMA subsystem, that may need it when the
+ * I/O buffer is not page aligned.
+ */
+#define AAC_MAXIO_SIZE(sc) MIN(((sc)->aac_max_sectors << 9) - PAGE_SIZE, \
+ maxphys)
+
/*
* Event callback mechanism for the driver
*/

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 22, 5:02 PM (1 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28940246
Default Alt Text
D30798.id.diff (1 KB)

Event Timeline