mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
s390/cio: Helper functions to read CSSID, IID, and CHID
Add helper functions to expose Channel Subsystem ID (CSSID), MIF Image Id (IID), Channel ID (CHID) and Channel Path ID (CHPID). These values are required by the qeth driver's exploitation of network- address-change-notifications to determine which entries belong to this interface. Store the Partition identifier in System log, as this may be used to map a Linux view to a Hardware view for debugging purpose. Signed-off-by: Alexandra Winter <wintera@linux.ibm.com> Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4fea49a79e
commit
b983aa1f7d
@@ -854,7 +854,7 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
|
||||
if (css_general_characteristics.mcss) {
|
||||
css->global_pgid.pgid_high.ext_cssid.version = 0x80;
|
||||
css->global_pgid.pgid_high.ext_cssid.cssid =
|
||||
(css->cssid < 0) ? 0 : css->cssid;
|
||||
css->id_valid ? css->cssid : 0;
|
||||
} else {
|
||||
css->global_pgid.pgid_high.cpu_addr = stap();
|
||||
}
|
||||
@@ -877,7 +877,7 @@ static ssize_t real_cssid_show(struct device *dev, struct device_attribute *a,
|
||||
{
|
||||
struct channel_subsystem *css = to_css(dev);
|
||||
|
||||
if (css->cssid < 0)
|
||||
if (!css->id_valid)
|
||||
return -EINVAL;
|
||||
|
||||
return sprintf(buf, "%x\n", css->cssid);
|
||||
@@ -975,7 +975,12 @@ static int __init setup_css(int nr)
|
||||
css->device.dma_mask = &css->device.coherent_dma_mask;
|
||||
|
||||
mutex_init(&css->mutex);
|
||||
css->cssid = chsc_get_cssid(nr);
|
||||
ret = chsc_get_cssid_iid(nr, &css->cssid, &css->iid);
|
||||
if (!ret) {
|
||||
css->id_valid = true;
|
||||
pr_info("Partition identifier %01x.%01x\n", css->cssid,
|
||||
css->iid);
|
||||
}
|
||||
css_generate_pgid(css, (u32) (get_tod_clock() >> 32));
|
||||
|
||||
ret = device_register(&css->device);
|
||||
|
||||
Reference in New Issue
Block a user