svn commit: r345530 - stable/12/sys/dev/isci
Konstantin Belousov
kib at FreeBSD.org
Tue Mar 26 11:03:10 UTC 2019
Author: kib
Date: Tue Mar 26 11:03:09 2019
New Revision: 345530
URL: https://svnweb.freebsd.org/changeset/base/345530
Log:
MFC r345070:
isci(4): Use controller->lock for busdma tags.
Modified:
stable/12/sys/dev/isci/isci.c
stable/12/sys/dev/isci/isci.h
stable/12/sys/dev/isci/isci_controller.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/isci/isci.c
==============================================================================
--- stable/12/sys/dev/isci/isci.c Tue Mar 26 11:01:29 2019 (r345529)
+++ stable/12/sys/dev/isci/isci.c Tue Mar 26 11:03:09 2019 (r345530)
@@ -408,7 +408,8 @@ isci_allocate_dma_buffer_callback(void *arg, bus_dma_s
}
int
-isci_allocate_dma_buffer(device_t device, struct ISCI_MEMORY *memory)
+isci_allocate_dma_buffer(device_t device, struct ISCI_CONTROLLER *controller,
+ struct ISCI_MEMORY *memory)
{
uint32_t status;
@@ -416,7 +417,8 @@ isci_allocate_dma_buffer(device_t device, struct ISCI_
0x40 /* cacheline alignment */, 0x0, BUS_SPACE_MAXADDR,
BUS_SPACE_MAXADDR, NULL, NULL, memory->size,
0x1 /* we want physically contiguous */,
- memory->size, 0, NULL, NULL, &memory->dma_tag);
+ memory->size, 0, busdma_lock_mutex, &controller->lock,
+ &memory->dma_tag);
if(status == ENOMEM) {
isci_log_message(0, "ISCI", "bus_dma_tag_create failed\n");
Modified: stable/12/sys/dev/isci/isci.h
==============================================================================
--- stable/12/sys/dev/isci/isci.h Tue Mar 26 11:01:29 2019 (r345529)
+++ stable/12/sys/dev/isci/isci.h Tue Mar 26 11:03:09 2019 (r345530)
@@ -253,7 +253,8 @@ struct isci_softc {
int isci_allocate_resources(device_t device);
-int isci_allocate_dma_buffer(device_t device, struct ISCI_MEMORY *memory);
+int isci_allocate_dma_buffer(device_t device, struct ISCI_CONTROLLER *lock,
+ struct ISCI_MEMORY *memory);
void isci_remote_device_reset(struct ISCI_REMOTE_DEVICE *remote_device,
union ccb *ccb);
Modified: stable/12/sys/dev/isci/isci_controller.c
==============================================================================
--- stable/12/sys/dev/isci/isci_controller.c Tue Mar 26 11:01:29 2019 (r345529)
+++ stable/12/sys/dev/isci/isci_controller.c Tue Mar 26 11:03:09 2019 (r345530)
@@ -428,7 +428,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO
uncached_controller_memory->size = sci_mdl_decorator_get_memory_size(
controller->mdl, SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS);
- error = isci_allocate_dma_buffer(device, uncached_controller_memory);
+ error = isci_allocate_dma_buffer(device, controller,
+ uncached_controller_memory);
if (error != 0)
return (error);
@@ -443,7 +444,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO
SCI_MDE_ATTRIBUTE_CACHEABLE | SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS
);
- error = isci_allocate_dma_buffer(device, cached_controller_memory);
+ error = isci_allocate_dma_buffer(device, controller,
+ cached_controller_memory);
if (error != 0)
return (error);
@@ -456,7 +458,7 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO
request_memory->size =
controller->queue_depth * isci_io_request_get_object_size();
- error = isci_allocate_dma_buffer(device, request_memory);
+ error = isci_allocate_dma_buffer(device, controller, request_memory);
if (error != 0)
return (error);
@@ -478,7 +480,8 @@ int isci_controller_allocate_memory(struct ISCI_CONTRO
status = bus_dma_tag_create(bus_get_dma_tag(device), 0x1, 0x0,
BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL,
isci_io_request_get_max_io_size(),
- SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0, NULL, NULL,
+ SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0,
+ busdma_lock_mutex, &controller->lock,
&controller->buffer_dma_tag);
sci_pool_initialize(controller->request_pool);
More information about the svn-src-all
mailing list