Loading drivers/char/diag/diag_memorydevice.c +6 −1 Original line number Diff line number Diff line Loading @@ -25,11 +25,13 @@ #include "diag_memorydevice.h" #include "diagfwd_bridge.h" #include "diag_mux.h" #include "diagmem.h" struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_LOCAL, .ctx = 0, .mempool = POOL_TYPE_MUX_APPS, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading @@ -38,6 +40,7 @@ struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_MDM, .ctx = 0, .mempool = POOL_TYPE_MDM_MUX, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading @@ -45,6 +48,7 @@ struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_MDM2, .ctx = 0, .mempool = POOL_TYPE_MDM2_MUX, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading @@ -52,6 +56,7 @@ struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_SMUX, .ctx = 0, .mempool = POOL_TYPE_QSC_MUX, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading Loading @@ -241,7 +246,7 @@ int diag_md_init() for (i = 0; i < NUM_DIAG_MD_DEV; i++) { ch = &diag_md[i]; ch->num_tbl_entries = driver->poolsize; ch->num_tbl_entries = diag_mempools[ch->mempool].poolsize; ch->tbl = kzalloc(ch->num_tbl_entries * sizeof(struct diag_buf_tbl_t), GFP_KERNEL); Loading drivers/char/diag/diag_memorydevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ struct diag_buf_tbl_t { struct diag_md_info { int id; int ctx; int mempool; int num_tbl_entries; struct diag_buf_tbl_t *tbl; struct diag_mux_ops *ops; Loading drivers/char/diag/diag_usb.c +4 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_LEGACY, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_USB_APPS, .mempool = POOL_TYPE_MUX_APPS, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading @@ -52,7 +52,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_MDM, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_MDM_USB, .mempool = POOL_TYPE_MDM_MUX, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading @@ -67,7 +67,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_MDM2, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_MDM2_USB, .mempool = POOL_TYPE_MDM2_MUX, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading @@ -82,7 +82,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_QSC, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_QSC_USB, .mempool = POOL_TYPE_QSC_MUX, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading drivers/char/diag/diagchar_core.c +6 −6 Original line number Diff line number Diff line Loading @@ -608,13 +608,13 @@ static int diag_remote_init(void) diagmem_setsize(POOL_TYPE_MDM_DCI, itemsize_mdm_dci, poolsize_mdm_dci); diagmem_setsize(POOL_TYPE_MDM2_DCI, itemsize_mdm_dci, poolsize_mdm_dci); diagmem_setsize(POOL_TYPE_MDM_USB, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM2_USB, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM_MUX, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM2_MUX, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM_DCI_WRITE, itemsize_mdm_dci_write, poolsize_mdm_dci_write); diagmem_setsize(POOL_TYPE_MDM2_DCI_WRITE, itemsize_mdm_dci_write, poolsize_mdm_dci_write); diagmem_setsize(POOL_TYPE_QSC_USB, itemsize_qsc_usb, diagmem_setsize(POOL_TYPE_QSC_MUX, itemsize_qsc_usb, poolsize_qsc_usb); driver->cb_buf = kzalloc(HDLC_OUT_BUF_SIZE, GFP_KERNEL); if (!driver->cb_buf) Loading Loading @@ -2285,13 +2285,13 @@ static int __init diagchar_init(void) diagmem_setsize(POOL_TYPE_HDLC, itemsize_hdlc, poolsize_hdlc); diagmem_setsize(POOL_TYPE_USER, itemsize_user, poolsize_user); /* * POOL_TYPE_USB_APPS is for USB write structures for the Local * USB channel. The number of items encompasses Diag data generated on * POOL_TYPE_MUX_APPS is for the buffers in the Diag MUX layer. * The number of buffers encompasses Diag data generated on * the Apss processor + 1 for the responses generated exclusively on * the Apps processor + data from SMD data channels (2 channels per * peripheral) + data from SMD command channels */ diagmem_setsize(POOL_TYPE_USB_APPS, itemsize_usb_apps, diagmem_setsize(POOL_TYPE_MUX_APPS, itemsize_usb_apps, poolsize_usb_apps + 1 + (NUM_SMD_DATA_CHANNELS * 2) + NUM_SMD_CMD_CHANNELS); diagmem_setsize(POOL_TYPE_DCI, itemsize_dci, poolsize_dci); Loading drivers/char/diag/diagmem.c +8 −8 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ struct diag_mempool_t diag_mempools[NUM_MEMORY_POOLS] = { .count = 0 }, { .id = POOL_TYPE_USB_APPS, .name = "POOL_USB_APPS", .id = POOL_TYPE_MUX_APPS, .name = "POOL_MUX_APPS", .pool = NULL, .itemsize = 0, .poolsize = 0, Loading Loading @@ -101,16 +101,16 @@ struct diag_mempool_t diag_mempools[NUM_MEMORY_POOLS] = { .count = 0 }, { .id = POOL_TYPE_MDM_USB, .name = "POOL_MDM_USB", .id = POOL_TYPE_MDM_MUX, .name = "POOL_MDM_MUX", .pool = NULL, .itemsize = 0, .poolsize = 0, .count = 0 }, { .id = POOL_TYPE_MDM2_USB, .name = "POOL_MDM2_USB", .id = POOL_TYPE_MDM2_MUX, .name = "POOL_MDM2_MUX", .pool = NULL, .itemsize = 0, .poolsize = 0, Loading @@ -133,8 +133,8 @@ struct diag_mempool_t diag_mempools[NUM_MEMORY_POOLS] = { .count = 0 }, { .id = POOL_TYPE_QSC_USB, .name = "POOL_QSC_USB", .id = POOL_TYPE_QSC_MUX, .name = "POOL_QSC_MUX", .pool = NULL, .itemsize = 0, .poolsize = 0, Loading Loading
drivers/char/diag/diag_memorydevice.c +6 −1 Original line number Diff line number Diff line Loading @@ -25,11 +25,13 @@ #include "diag_memorydevice.h" #include "diagfwd_bridge.h" #include "diag_mux.h" #include "diagmem.h" struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_LOCAL, .ctx = 0, .mempool = POOL_TYPE_MUX_APPS, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading @@ -38,6 +40,7 @@ struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_MDM, .ctx = 0, .mempool = POOL_TYPE_MDM_MUX, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading @@ -45,6 +48,7 @@ struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_MDM2, .ctx = 0, .mempool = POOL_TYPE_MDM2_MUX, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading @@ -52,6 +56,7 @@ struct diag_md_info diag_md[NUM_DIAG_MD_DEV] = { { .id = DIAG_MD_SMUX, .ctx = 0, .mempool = POOL_TYPE_QSC_MUX, .num_tbl_entries = 0, .tbl = NULL, .ops = NULL, Loading Loading @@ -241,7 +246,7 @@ int diag_md_init() for (i = 0; i < NUM_DIAG_MD_DEV; i++) { ch = &diag_md[i]; ch->num_tbl_entries = driver->poolsize; ch->num_tbl_entries = diag_mempools[ch->mempool].poolsize; ch->tbl = kzalloc(ch->num_tbl_entries * sizeof(struct diag_buf_tbl_t), GFP_KERNEL); Loading
drivers/char/diag/diag_memorydevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ struct diag_buf_tbl_t { struct diag_md_info { int id; int ctx; int mempool; int num_tbl_entries; struct diag_buf_tbl_t *tbl; struct diag_mux_ops *ops; Loading
drivers/char/diag/diag_usb.c +4 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_LEGACY, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_USB_APPS, .mempool = POOL_TYPE_MUX_APPS, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading @@ -52,7 +52,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_MDM, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_MDM_USB, .mempool = POOL_TYPE_MDM_MUX, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading @@ -67,7 +67,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_MDM2, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_MDM2_USB, .mempool = POOL_TYPE_MDM2_MUX, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading @@ -82,7 +82,7 @@ struct diag_usb_info diag_usb[NUM_DIAG_USB_DEV] = { .name = DIAG_QSC, .connected = 0, .enabled = 0, .mempool = POOL_TYPE_QSC_USB, .mempool = POOL_TYPE_QSC_MUX, .hdl = NULL, .ops = NULL, .read_buf = NULL, Loading
drivers/char/diag/diagchar_core.c +6 −6 Original line number Diff line number Diff line Loading @@ -608,13 +608,13 @@ static int diag_remote_init(void) diagmem_setsize(POOL_TYPE_MDM_DCI, itemsize_mdm_dci, poolsize_mdm_dci); diagmem_setsize(POOL_TYPE_MDM2_DCI, itemsize_mdm_dci, poolsize_mdm_dci); diagmem_setsize(POOL_TYPE_MDM_USB, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM2_USB, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM_MUX, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM2_MUX, itemsize_mdm_usb, poolsize_mdm_usb); diagmem_setsize(POOL_TYPE_MDM_DCI_WRITE, itemsize_mdm_dci_write, poolsize_mdm_dci_write); diagmem_setsize(POOL_TYPE_MDM2_DCI_WRITE, itemsize_mdm_dci_write, poolsize_mdm_dci_write); diagmem_setsize(POOL_TYPE_QSC_USB, itemsize_qsc_usb, diagmem_setsize(POOL_TYPE_QSC_MUX, itemsize_qsc_usb, poolsize_qsc_usb); driver->cb_buf = kzalloc(HDLC_OUT_BUF_SIZE, GFP_KERNEL); if (!driver->cb_buf) Loading Loading @@ -2285,13 +2285,13 @@ static int __init diagchar_init(void) diagmem_setsize(POOL_TYPE_HDLC, itemsize_hdlc, poolsize_hdlc); diagmem_setsize(POOL_TYPE_USER, itemsize_user, poolsize_user); /* * POOL_TYPE_USB_APPS is for USB write structures for the Local * USB channel. The number of items encompasses Diag data generated on * POOL_TYPE_MUX_APPS is for the buffers in the Diag MUX layer. * The number of buffers encompasses Diag data generated on * the Apss processor + 1 for the responses generated exclusively on * the Apps processor + data from SMD data channels (2 channels per * peripheral) + data from SMD command channels */ diagmem_setsize(POOL_TYPE_USB_APPS, itemsize_usb_apps, diagmem_setsize(POOL_TYPE_MUX_APPS, itemsize_usb_apps, poolsize_usb_apps + 1 + (NUM_SMD_DATA_CHANNELS * 2) + NUM_SMD_CMD_CHANNELS); diagmem_setsize(POOL_TYPE_DCI, itemsize_dci, poolsize_dci); Loading
drivers/char/diag/diagmem.c +8 −8 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ struct diag_mempool_t diag_mempools[NUM_MEMORY_POOLS] = { .count = 0 }, { .id = POOL_TYPE_USB_APPS, .name = "POOL_USB_APPS", .id = POOL_TYPE_MUX_APPS, .name = "POOL_MUX_APPS", .pool = NULL, .itemsize = 0, .poolsize = 0, Loading Loading @@ -101,16 +101,16 @@ struct diag_mempool_t diag_mempools[NUM_MEMORY_POOLS] = { .count = 0 }, { .id = POOL_TYPE_MDM_USB, .name = "POOL_MDM_USB", .id = POOL_TYPE_MDM_MUX, .name = "POOL_MDM_MUX", .pool = NULL, .itemsize = 0, .poolsize = 0, .count = 0 }, { .id = POOL_TYPE_MDM2_USB, .name = "POOL_MDM2_USB", .id = POOL_TYPE_MDM2_MUX, .name = "POOL_MDM2_MUX", .pool = NULL, .itemsize = 0, .poolsize = 0, Loading @@ -133,8 +133,8 @@ struct diag_mempool_t diag_mempools[NUM_MEMORY_POOLS] = { .count = 0 }, { .id = POOL_TYPE_QSC_USB, .name = "POOL_QSC_USB", .id = POOL_TYPE_QSC_MUX, .name = "POOL_QSC_MUX", .pool = NULL, .itemsize = 0, .poolsize = 0, Loading