drivers/s390/net/ctcm_mpc.c
Source file repositories/reference/linux-study-clean/drivers/s390/net/ctcm_mpc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/net/ctcm_mpc.c- Extension
.c- Size
- 58712 bytes
- Lines
- 2128
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/module.hlinux/init.hlinux/kernel.hlinux/slab.hlinux/errno.hlinux/types.hlinux/interrupt.hlinux/timer.hlinux/sched.hlinux/signal.hlinux/string.hlinux/proc_fs.hlinux/ip.hlinux/if_arp.hlinux/tcp.hlinux/skbuff.hlinux/ctype.hlinux/netdevice.hnet/dst.hlinux/io.hlinux/bitops.hlinux/uaccess.hlinux/wait.hlinux/moduleparam.hasm/ccwdev.hasm/ccwgroup.hasm/idals.hctcm_main.hctcm_mpc.hctcm_fsms.h
Detected Declarations
function ctcmpc_dumpitfunction ctcmpc_dump_skbfunction ctc_mpc_alloc_channelfunction ctc_mpc_establish_connectivityfunction ctc_mpc_dealloc_chfunction ctc_mpc_flow_controlfunction mpc_rcvd_sweep_respfunction ctcmpc_send_sweep_respfunction mpc_rcvd_sweep_reqfunction mpc_action_go_readyfunction mpc_group_readyfunction dev_actionfunction ctcmpc_unpack_skbfunction ctcmpc_bhfunction mpc_action_nopfunction mpc_action_timeoutfunction mpc_action_discontactfunction mpc_action_send_discontactfunction mpc_validate_xidfunction mpc_action_side_xidfunction mpc_action_xside_xidfunction mpc_action_yside_xidfunction mpc_action_doxid0function mpc_action_doxid7function mpc_action_rcvd_xid0function mpc_action_rcvd_xid7function mpc_send_qllc_discontactexport ctc_mpc_alloc_channelexport ctc_mpc_establish_connectivityexport ctc_mpc_dealloc_chexport ctc_mpc_flow_controlexport ctc_mpc_alloc_channelexport ctc_mpc_establish_connectivityexport ctc_mpc_dealloc_chexport ctc_mpc_flow_control
Annotated Snippet
if (sw == 0) {
scnprintf(addr, sizeof(addr), "%16.16llx", (__u64)rptr);
scnprintf(boff, sizeof(boff), "%4.4X", (__u32)ct);
bhex[0] = '\0';
basc[0] = '\0';
}
if ((sw == 4) || (sw == 12))
strcat(bhex, " ");
if (sw == 8)
strcat(bhex, " ");
scnprintf(tbuf, sizeof(tbuf), "%2.2llX", (__u64)*ptr);
tbuf[2] = '\0';
strcat(bhex, tbuf);
if ((0 != isprint(*ptr)) && (*ptr >= 0x20))
basc[sw] = *ptr;
else
basc[sw] = '.';
basc[sw+1] = '\0';
sw++;
rm--;
if (sw != 16)
continue;
if ((strcmp(duphex, bhex)) != 0) {
if (dup != 0) {
scnprintf(tdup, sizeof(tdup),
"Duplicate as above to %s", addr);
ctcm_pr_debug(" --- %s ---\n",
tdup);
}
ctcm_pr_debug(" %s (+%s) : %s [%s]\n",
addr, boff, bhex, basc);
dup = 0;
strscpy(duphex, bhex);
} else
dup++;
sw = 0;
rm = 16;
} /* endfor */
if (sw != 0) {
for ( ; rm > 0; rm--, sw++) {
if ((sw == 4) || (sw == 12))
strcat(bhex, " ");
if (sw == 8)
strcat(bhex, " ");
strcat(bhex, " ");
strcat(basc, " ");
}
if (dup != 0) {
scnprintf(tdup, sizeof(tdup),
"Duplicate as above to %s", addr);
ctcm_pr_debug(" --- %s ---\n", tdup);
}
ctcm_pr_debug(" %s (+%s) : %s [%s]\n",
addr, boff, bhex, basc);
} else {
if (dup >= 1) {
scnprintf(tdup, sizeof(tdup),
"Duplicate as above to %s", addr);
ctcm_pr_debug(" --- %s ---\n", tdup);
}
if (dup != 0) {
ctcm_pr_debug(" %s (+%s) : %s [%s]\n",
addr, boff, bhex, basc);
}
}
return;
} /* end of ctcmpc_dumpit */
#endif
#ifdef DEBUGDATA
/*
* Dump header and first 16 bytes of an sk_buff for debugging purposes.
*
* skb The sk_buff to dump.
* offset Offset relative to skb-data, where to start the dump.
*/
void ctcmpc_dump_skb(struct sk_buff *skb, int offset)
{
__u8 *p = skb->data;
struct th_header *header;
struct pdu *pheader;
int bl = skb->len;
Annotation
- Immediate include surface: `linux/export.h`, `linux/module.h`, `linux/init.h`, `linux/kernel.h`, `linux/slab.h`, `linux/errno.h`, `linux/types.h`, `linux/interrupt.h`.
- Detected declarations: `function ctcmpc_dumpit`, `function ctcmpc_dump_skb`, `function ctc_mpc_alloc_channel`, `function ctc_mpc_establish_connectivity`, `function ctc_mpc_dealloc_ch`, `function ctc_mpc_flow_control`, `function mpc_rcvd_sweep_resp`, `function ctcmpc_send_sweep_resp`, `function mpc_rcvd_sweep_req`, `function mpc_action_go_ready`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.