Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144999124
D26841.id78388.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26841.id78388.diff
View Options
Index: sys/dev/tws/tws.c
===================================================================
--- sys/dev/tws/tws.c
+++ sys/dev/tws/tws.c
@@ -43,6 +43,7 @@
#include <cam/cam.h>
#include <cam/cam_ccb.h>
+#include <cam/cam_xpt.h>
MALLOC_DEFINE(M_TWS, "twsbuf", "buffers used by tws driver");
int tws_queue_depth = TWS_MAX_REQS;
@@ -412,7 +413,7 @@
callout_drain(&sc->stats_timer);
free(sc->reqs, M_TWS);
free(sc->sense_bufs, M_TWS);
- free(sc->scan_ccb, M_TWS);
+ xpt_free_ccb(sc->scan_ccb);
if (sc->ioctl_data_mem)
bus_dmamem_free(sc->data_tag, sc->ioctl_data_mem, sc->ioctl_data_map);
if (sc->data_tag)
@@ -597,7 +598,7 @@
M_WAITOK | M_ZERO);
sc->sense_bufs = malloc(sizeof(struct tws_sense) * tws_queue_depth, M_TWS,
M_WAITOK | M_ZERO);
- sc->scan_ccb = malloc(sizeof(union ccb), M_TWS, M_WAITOK | M_ZERO);
+ sc->scan_ccb = xpt_alloc_ccb();
if (bus_dmamem_alloc(sc->data_tag, (void **)&sc->ioctl_data_mem,
(BUS_DMA_NOWAIT | BUS_DMA_ZERO), &sc->ioctl_data_map)) {
device_printf(sc->tws_dev, "Cannot allocate ioctl data mem\n");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 15, 9:49 PM (14 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28757124
Default Alt Text
D26841.id78388.diff (1 KB)
Attached To
Mode
D26841: tws(4): use xpt_alloc_ccb()
Attached
Detach File
Event Timeline
Log In to Comment