Lines Matching refs:buffer

127  * lpfc_debugfs_disc_trc_data - Dump discovery logging to a buffer
129 * @buf: The buffer to dump log into.
135 * in the log and process the log until the end of the buffer. Then it will
151 char *buffer;
153 buffer = kmalloc(LPFC_DEBUG_TRC_ENTRY_SIZE, GFP_KERNEL);
154 if (!buffer)
168 snprintf(buffer,
171 len += scnprintf(buf+len, size-len, buffer,
179 snprintf(buffer,
182 len += scnprintf(buf+len, size-len, buffer,
187 kfree(buffer);
193 * lpfc_debugfs_slow_ring_trc_data - Dump slow ring logging to a buffer
195 * @buf: The buffer to dump log into.
201 * in the log and process the log until the end of the buffer. Then it will
217 char *buffer;
219 buffer = kmalloc(LPFC_DEBUG_TRC_ENTRY_SIZE, GFP_KERNEL);
220 if (!buffer)
234 snprintf(buffer,
237 len += scnprintf(buf+len, size-len, buffer,
245 snprintf(buffer,
248 len += scnprintf(buf+len, size-len, buffer,
253 kfree(buffer);
261 * lpfc_debugfs_hbqinfo_data - Dump host buffer queue info to a buffer
262 * @phba: The HBA to gather host buffer info from.
263 * @buf: The buffer to dump log into.
267 * This routine dumps the host buffer queue info from the @phba to @buf up to
338 /* First calculate if slot has an associated posted buffer */
356 /* Get the Buffer info for the posted buffer */
384 * lpfc_debugfs_commonxripools_data - Dump Hardware Queue info to a buffer
385 * @phba: The HBA to gather host buffer info from.
386 * @buf: The buffer to dump log into.
442 * @phba: The HBA to gather host buffer info from.
443 * @buf: The buffer to dump log into.
574 * lpfc_debugfs_lockstat_data - Dump Hardware Queue info to a buffer
575 * @phba: The HBA to gather host buffer info from.
576 * @buf: The buffer to dump log into.
645 * lpfc_debugfs_dumpHBASlim_data - Dump HBA SLIM info to a buffer
647 * @buf: The buffer to dump log into.
668 char *buffer;
670 buffer = kmalloc(1024, GFP_KERNEL);
671 if (!buffer)
678 lpfc_memcpy_from_slim(buffer,
681 ptr = (uint32_t *)&buffer[0];
701 kfree(buffer);
707 * lpfc_debugfs_dumpHostSlim_data - Dump host SLIM info to a buffer
709 * @buf: The buffer to dump log into.
790 * lpfc_debugfs_nodelist_data - Dump target node list to a buffer
792 * @buf: The buffer to dump log into.
1016 * lpfc_debugfs_nvmestat_data - Dump target node list to a buffer
1018 * @buf: The buffer to dump log into.
1192 /* Limit to 32, debugfs display buffer limitation */
1238 * lpfc_debugfs_scsistat_data - Dump target node list to a buffer
1240 * @buf: The buffer to dump log into.
1379 * lpfc_debugfs_ioktime_data - Dump target node list to a buffer
1381 * @buf: The buffer to dump log into.
1579 * lpfc_debugfs_nvmeio_trc_data - Dump NVME IO trace list to a buffer
1581 * @buf: The buffer to dump log into.
1681 * lpfc_debugfs_hdwqstat_data - Dump I/O stats to a buffer
1683 * @buf: The buffer to dump log into.
1815 * discovery trace buffer associated with @vport. Only entries with a @mask that
1858 * discovery trace buffer associated with @vport. @fmt, @data1, @data2, and
1896 * nvme trace buffer associated with @phba. @fmt, @data1, @data2, and
1928 * the vport from the i_private field in @inode, allocates the necessary buffer
1929 * for the log, fills the buffer from the in-memory log for this vport, and then
1957 debug->buffer = kmalloc(size, GFP_KERNEL);
1958 if (!debug->buffer) {
1963 debug->len = lpfc_debugfs_disc_trc_data(vport, debug->buffer, size);
1978 * the vport from the i_private field in @inode, allocates the necessary buffer
1979 * for the log, fills the buffer from the in-memory log for this vport, and then
2007 debug->buffer = kmalloc(size, GFP_KERNEL);
2008 if (!debug->buffer) {
2013 debug->len = lpfc_debugfs_slow_ring_trc_data(phba, debug->buffer, size);
2022 * lpfc_debugfs_hbqinfo_open - Open the hbqinfo debugfs buffer
2028 * the vport from the i_private field in @inode, allocates the necessary buffer
2029 * for the log, fills the buffer from the in-memory log for this vport, and then
2048 debug->buffer = kmalloc(LPFC_HBQINFO_SIZE, GFP_KERNEL);
2049 if (!debug->buffer) {
2054 debug->len = lpfc_debugfs_hbqinfo_data(phba, debug->buffer,
2064 * lpfc_debugfs_multixripools_open - Open the multixripool debugfs buffer
2070 * the hba from the i_private field in @inode, allocates the necessary buffer
2071 * for the log, fills the buffer from the in-memory log for this hba, and then
2090 debug->buffer = kzalloc(LPFC_DUMP_MULTIXRIPOOL_SIZE, GFP_KERNEL);
2091 if (!debug->buffer) {
2097 phba, debug->buffer, LPFC_DUMP_MULTIXRIPOOL_SIZE);
2109 * lpfc_debugfs_lockstat_open - Open the lockstat debugfs buffer
2115 * the vport from the i_private field in @inode, allocates the necessary buffer
2116 * for the log, fills the buffer from the in-memory log for this vport, and then
2135 debug->buffer = kmalloc(LPFC_HDWQINFO_SIZE, GFP_KERNEL);
2136 if (!debug->buffer) {
2141 debug->len = lpfc_debugfs_lockstat_data(phba, debug->buffer,
2192 char *buffer, int size)
2197 memset(buffer, 0, size);
2210 memcpy(buffer + copied, dmabuf->virt,
2215 memcpy(buffer + copied, dmabuf->virt, LPFC_RAS_MAX_ENTRY_SIZE);
2226 vfree(debug->buffer);
2233 * lpfc_debugfs_ras_log_open - Open the RAS log debugfs buffer
2239 * the vport from the i_private field in @inode, allocates the necessary buffer
2240 * for the log, fills the buffer from the in-memory log for this vport, and then
2271 debug->buffer = vmalloc(size);
2272 if (!debug->buffer)
2275 debug->len = lpfc_debugfs_ras_log_data(phba, debug->buffer, size);
2285 vfree(debug->buffer);
2293 * lpfc_debugfs_dumpHBASlim_open - Open the Dump HBA SLIM debugfs buffer
2299 * the vport from the i_private field in @inode, allocates the necessary buffer
2300 * for the log, fills the buffer from the in-memory log for this vport, and then
2319 debug->buffer = kmalloc(LPFC_DUMPHBASLIM_SIZE, GFP_KERNEL);
2320 if (!debug->buffer) {
2325 debug->len = lpfc_debugfs_dumpHBASlim_data(phba, debug->buffer,
2335 * lpfc_debugfs_dumpHostSlim_open - Open the Dump Host SLIM debugfs buffer
2341 * the vport from the i_private field in @inode, allocates the necessary buffer
2342 * for the log, fills the buffer from the in-memory log for this vport, and then
2361 debug->buffer = kmalloc(LPFC_DUMPHOSTSLIM_SIZE, GFP_KERNEL);
2362 if (!debug->buffer) {
2367 debug->len = lpfc_debugfs_dumpHostSlim_data(phba, debug->buffer,
2481 * the vport from the i_private field in @inode, allocates the necessary buffer
2482 * for the log, fills the buffer from the in-memory log for this vport, and then
2501 debug->buffer = kmalloc(LPFC_NODELIST_SIZE, GFP_KERNEL);
2502 if (!debug->buffer) {
2507 debug->len = lpfc_debugfs_nodelist_data(vport, debug->buffer,
2543 * @buf: The buffer to copy the data to.
2548 * This routine reads data from from the buffer indicated in the private_data
2562 return simple_read_from_buffer(buf, nbytes, ppos, debug->buffer,
2567 * lpfc_debugfs_release - Release the buffer used to store debugfs file data
2569 * @file: The file pointer that contains the buffer to release.
2572 * This routine frees the buffer that was allocated when the debugfs file was
2583 kfree(debug->buffer);
2592 * @buf: The buffer to copy the user data from.
2667 debug->buffer = kmalloc(LPFC_NVMESTAT_SIZE, GFP_KERNEL);
2668 if (!debug->buffer) {
2673 debug->len = lpfc_debugfs_nvmestat_data(vport, debug->buffer,
2755 debug->buffer = kzalloc(LPFC_SCSISTAT_SIZE, GFP_KERNEL);
2756 if (!debug->buffer) {
2761 debug->len = lpfc_debugfs_scsistat_data(vport, debug->buffer,
2809 debug->buffer = kmalloc(LPFC_IOKTIME_SIZE, GFP_KERNEL);
2810 if (!debug->buffer) {
2815 debug->len = lpfc_debugfs_ioktime_data(vport, debug->buffer,
2936 debug->buffer = kmalloc(LPFC_NVMEIO_TRC_SIZE, GFP_KERNEL);
2937 if (!debug->buffer) {
2942 debug->len = lpfc_debugfs_nvmeio_trc_data(phba, debug->buffer,
2987 /* We must be off to allocate the trace buffer */
2991 /* If not on or off, the parameter is the trace buffer size */
3013 /* Allocate new trace buffer and initialize */
3019 "nvmeio_trc buffer\n");
3041 debug->buffer = kcalloc(1, LPFC_SCSISTAT_SIZE, GFP_KERNEL);
3042 if (!debug->buffer) {
3047 debug->len = lpfc_debugfs_hdwqstat_data(vport, debug->buffer,
3133 * @buf: The pointer to the user space buffer.
3134 * @nbytes: The number of bytes in the user space buffer.
3137 * This routine reads data from debugfs user space buffer and parses the
3138 * buffer for getting the idiag command and arguments. The while space in
3186 * allocates buffer for the file operation, performs the necessary PCI config
3187 * space read into the allocated buffer according to the idiag user command
3188 * setup, and then returns a pointer to buffer in the private_data field in
3205 debug->buffer = NULL;
3214 * @file: The file pointer that contains the buffer to release.
3218 * operation, it frees the buffer that was allocated when the debugfs file
3230 kfree(debug->buffer);
3239 * @file: The file pointer that contains the buffer to release.
3242 * This routine frees the buffer that was allocated when the debugfs file
3270 kfree(debug->buffer);
3279 * @buf: The buffer to copy the data to.
3315 if (!debug->buffer)
3316 debug->buffer = kmalloc(LPFC_PCI_CFG_SIZE, GFP_KERNEL);
3317 if (!debug->buffer)
3319 pbuffer = debug->buffer;
3400 * @buf: The buffer to copy the user data from.
3577 * @buf: The buffer to copy the data to.
3610 if (!debug->buffer)
3611 debug->buffer = kmalloc(LPFC_PCI_BAR_RD_BUF_SIZE, GFP_KERNEL);
3612 if (!debug->buffer)
3614 pbuffer = debug->buffer;
3724 * @buf: The buffer to copy the user data from.
4030 * @buf: The buffer to copy the data to.
4055 if (!debug->buffer)
4056 debug->buffer = kmalloc(LPFC_QUE_INFO_GET_BUF_SIZE, GFP_KERNEL);
4057 if (!debug->buffer)
4059 pbuffer = debug->buffer;
4193 * @pbuffer: The pointer to buffer to copy the read data into.
4194 * @len: Length of the buffer.
4200 * and copies it into the buffer provided.
4204 * the data read into the buffer provided.
4240 * @buf: The buffer to copy the data to.
4267 if (!debug->buffer)
4268 debug->buffer = kmalloc(LPFC_QUE_ACC_BUF_SIZE, GFP_KERNEL);
4269 if (!debug->buffer)
4271 pbuffer = debug->buffer;
4316 * @buf: The buffer to copy the user data from.
4559 * @pbuffer: The pointer to the buffer to copy the data to.
4565 * user buffer pointed to by @pbuffer.
4614 * @buf: The buffer to copy the data to.
4641 if (!debug->buffer)
4642 debug->buffer = kmalloc(LPFC_DRB_ACC_BUF_SIZE, GFP_KERNEL);
4643 if (!debug->buffer)
4645 pbuffer = debug->buffer;
4669 * @buf: The buffer to copy the user data from.
4769 * @pbuffer: The pointer to the buffer to copy the data to.
4775 * user buffer pointed to by @pbuffer.
4834 * @buf: The buffer to copy the data to.
4859 if (!debug->buffer)
4860 debug->buffer = kmalloc(LPFC_CTL_ACC_BUF_SIZE, GFP_KERNEL);
4861 if (!debug->buffer)
4863 pbuffer = debug->buffer;
4887 * @buf: The buffer to copy the user data from.
4993 * @pbuffer: Pointer to data buffer.
5028 * @buf: The buffer to copy the data to.
5052 if (!debug->buffer)
5053 debug->buffer = kmalloc(LPFC_MBX_ACC_BUF_SIZE, GFP_KERNEL);
5054 if (!debug->buffer)
5056 pbuffer = debug->buffer;
5073 * @buf: The buffer to copy the user data from.
5154 * @pbuffer: pointer to internal buffer.
5155 * @len: length into the internal buffer data has been copied.
5161 * overall length of the data read into the internal buffer.
5205 * @pbuffer: pointer to internal buffer.
5206 * @len: length into the internal buffer data has been copied.
5212 * overall length of the data read into the internal buffer.
5277 * @pbuffer: pointer to internal buffer.
5278 * @len: length into the internal buffer data has been copied.
5284 * overall length of the data read into the internal buffer.
5347 * @buf: The buffer to copy the user data from.
5393 * @buf: The buffer to copy the data to.
5418 if (!debug->buffer)
5419 debug->buffer = kmalloc(LPFC_EXT_ACC_BUF_SIZE, GFP_KERNEL);
5420 if (!debug->buffer)
5422 pbuffer = debug->buffer;
5449 debug->buffer = vmalloc(LPFC_CGN_BUF_SIZE);
5450 if (!debug->buffer) {
5469 char *buffer = debug->buffer;
5474 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5479 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5483 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5488 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5492 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5496 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5506 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5510 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5513 len += scnprintf(buffer + len, LPFC_CGN_BUF_SIZE - len,
5517 return simple_read_from_buffer(buf, nbytes, ppos, buffer, len);
5525 vfree(debug->buffer);
5541 debug->buffer = vmalloc(MAX_DEBUGFS_RX_INFO_SIZE);
5542 if (!debug->buffer) {
5561 char *buffer = debug->buffer;
5564 scnprintf(buffer, MAX_DEBUGFS_RX_INFO_SIZE,
5567 lpfc_rx_monitor_report(phba, phba->rx_monitor, buffer,
5572 return simple_read_from_buffer(buf, nbytes, ppos, buffer,
5573 strlen(buffer));
5581 vfree(debug->buffer);
5836 * @dmabuf: Pointer to a DMA buffer descriptor.
5840 * external buffer.
5883 pr_err("\nRead mbox buffer (x%x), "
5899 pr_err("\nWrite mbox buffer (x%x), "
5905 /* dump buffer content */
5935 * @dmabuf: Pointer to a DMA buffer descriptor.
5969 /* dump buffer content */
6250 "slow_ring buffer\n");
6281 /* Allocate trace buffer and initialize */
6289 "nvmeio_trc buffer\n");
6334 "buffer\n");