.. | .. |
---|
12 | 12 | #include <asm/ccwgroup.h> |
---|
13 | 13 | #include <asm/ccwdev.h> |
---|
14 | 14 | #include <asm/pnet.h> |
---|
| 15 | +#include <asm/ebcdic.h> |
---|
| 16 | + |
---|
| 17 | +#define PNETIDS_LEN 64 /* Total utility string length in bytes |
---|
| 18 | + * to cover up to 4 PNETIDs of 16 bytes |
---|
| 19 | + * for up to 4 device ports |
---|
| 20 | + */ |
---|
| 21 | +#define MAX_PNETID_LEN 16 /* Max.length of a single port PNETID */ |
---|
| 22 | +#define MAX_PNETID_PORTS (PNETIDS_LEN / MAX_PNETID_LEN) |
---|
| 23 | + /* Max. # of ports with a PNETID */ |
---|
15 | 24 | |
---|
16 | 25 | /* |
---|
17 | 26 | * Get the PNETIDs from a device. |
---|
.. | .. |
---|
40 | 49 | if (!util_str) |
---|
41 | 50 | return -ENOMEM; |
---|
42 | 51 | memcpy(pnetids, util_str, PNETIDS_LEN); |
---|
| 52 | + EBCASC(pnetids, PNETIDS_LEN); |
---|
43 | 53 | kfree(util_str); |
---|
44 | 54 | return 0; |
---|
45 | 55 | } |
---|
.. | .. |
---|
47 | 57 | struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); |
---|
48 | 58 | |
---|
49 | 59 | memcpy(pnetids, zdev->util_str, sizeof(zdev->util_str)); |
---|
| 60 | + EBCASC(pnetids, sizeof(zdev->util_str)); |
---|
50 | 61 | return 0; |
---|
51 | 62 | } |
---|
52 | 63 | return -EOPNOTSUPP; |
---|