Commit a8a31f61 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: fix CamelCase names in struct channel_header

Fix CamelCase names:
Signature => signature
LegacySignature => legacy_signature
HeaderSize => header_size
Size => size
Features => features
Type => chtype
PartitionHandle => partition_handle
Handle => handle
oChannelSpace => ch_space_offset
VersionId => version_id
PartitionIndex => partition_index
ZoneGuid => zone_uuid
oClientString => cli_str_offset
CliStateBoot => cli_state_boot
CmdStateCli => cmd_state_cli
CliStateOs => cli_state_os
ChannelCharacteristics => ch_characteristic
CmdStateSrv => cmd_state_srv
srvState => srv_state
CliErrorBoot => cli_error_boot
CliErrorOs => cli_error_os
Filler => filler
RecoverChannel => recover_channel
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9fd1b95a
......@@ -52,7 +52,7 @@ visor_signal_insert(struct channel_header __iomem *pChannel, u32 Queue,
SIGNAL_QUEUE_HEADER __iomem *pqhdr =
(SIGNAL_QUEUE_HEADER __iomem *)
((char __iomem *) pChannel + readq(&pChannel->oChannelSpace))
((char __iomem *) pChannel + readq(&pChannel->ch_space_offset))
+ Queue;
/* capture current head and tail */
......@@ -110,7 +110,7 @@ visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
unsigned int head, tail;
SIGNAL_QUEUE_HEADER __iomem *pqhdr =
(SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
readq(&pChannel->oChannelSpace)) + Queue;
readq(&pChannel->ch_space_offset)) + Queue;
/* capture current head and tail */
head = readl(&pqhdr->Head);
......@@ -165,7 +165,7 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
unsigned int head, tail, signalCount = 0;
pSIGNAL_QUEUE_HEADER pqhdr =
(pSIGNAL_QUEUE_HEADER) ((char *) pChannel +
pChannel->oChannelSpace) + Queue;
pChannel->ch_space_offset) + Queue;
/* capture current head and tail */
head = pqhdr->Head;
......@@ -214,7 +214,7 @@ visor_signalqueue_empty(struct channel_header __iomem *pChannel, u32 Queue)
{
SIGNAL_QUEUE_HEADER __iomem *pqhdr =
(SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
readq(&pChannel->oChannelSpace)) + Queue;
readq(&pChannel->ch_space_offset)) + Queue;
return readl(&pqhdr->Head) == readl(&pqhdr->Tail);
}
EXPORT_SYMBOL_GPL(visor_signalqueue_empty);
......
......@@ -750,29 +750,29 @@ typedef struct _ULTRA_IO_CHANNEL_PROTOCOL {
#define QSIZEFROMBYTES(bytes) (QSLOTSFROMBYTES(bytes)*SIZEOF_CMDRSP)
#define SignalQInit(x) \
do { \
x->cmdQ.Size = QSIZEFROMBYTES(x->ChannelHeader.Size); \
x->cmdQ.Size = QSIZEFROMBYTES(x->ChannelHeader.size); \
x->cmdQ.oSignalBase = SIZEOF_PROTOCOL - \
offsetof(ULTRA_IO_CHANNEL_PROTOCOL, cmdQ); \
x->cmdQ.SignalSize = SIZEOF_CMDRSP; \
x->cmdQ.MaxSignalSlots = \
QSLOTSFROMBYTES(x->ChannelHeader.Size); \
QSLOTSFROMBYTES(x->ChannelHeader.size); \
x->cmdQ.MaxSignals = x->cmdQ.MaxSignalSlots - 1; \
x->rspQ.Size = QSIZEFROMBYTES(x->ChannelHeader.Size); \
x->rspQ.Size = QSIZEFROMBYTES(x->ChannelHeader.size); \
x->rspQ.oSignalBase = \
(SIZEOF_PROTOCOL + x->cmdQ.Size) - \
offsetof(ULTRA_IO_CHANNEL_PROTOCOL, rspQ); \
x->rspQ.SignalSize = SIZEOF_CMDRSP; \
x->rspQ.MaxSignalSlots = \
QSLOTSFROMBYTES(x->ChannelHeader.Size); \
QSLOTSFROMBYTES(x->ChannelHeader.size); \
x->rspQ.MaxSignals = x->rspQ.MaxSignalSlots - 1; \
x->ChannelHeader.oChannelSpace = \
x->ChannelHeader.ch_space_offset = \
offsetof(ULTRA_IO_CHANNEL_PROTOCOL, cmdQ); \
} while (0)
#define INIT_CLIENTSTRING(chan, type, clientStr, clientStrLen) \
do { \
if (clientStr) { \
chan->ChannelHeader.oClientString = \
chan->ChannelHeader.cli_str_offset = \
offsetof(type, clientString); \
memcpy(chan->clientString, clientStr, \
MINNUM(clientStrLen, \
......@@ -802,13 +802,13 @@ static inline int ULTRA_VHBA_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
unsigned char *clientStr,
u32 clientStrLen, u64 bytes) {
memset(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
x->ChannelHeader.VersionId = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
x->ChannelHeader.Signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
x->ChannelHeader.SrvState = CHANNELSRV_UNINITIALIZED;
x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader);
x->ChannelHeader.Size = COVER(bytes, 4096);
x->ChannelHeader.Type = spar_vhba_channel_protocol_uuid;
x->ChannelHeader.ZoneGuid = NULL_UUID_LE;
x->ChannelHeader.version_id = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
x->ChannelHeader.signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
x->ChannelHeader.srv_state = CHANNELSRV_UNINITIALIZED;
x->ChannelHeader.header_size = sizeof(x->ChannelHeader);
x->ChannelHeader.size = COVER(bytes, 4096);
x->ChannelHeader.chtype = spar_vhba_channel_protocol_uuid;
x->ChannelHeader.zone_uuid = NULL_UUID_LE;
x->vhba.wwnn = *wwnn;
x->vhba.max = *max;
INIT_CLIENTSTRING(x, ULTRA_IO_CHANNEL_PROTOCOL, clientStr,
......@@ -838,13 +838,13 @@ static inline int ULTRA_VNIC_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
u32 clientStrLen,
u64 bytes) {
memset(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
x->ChannelHeader.VersionId = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
x->ChannelHeader.Signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
x->ChannelHeader.SrvState = CHANNELSRV_UNINITIALIZED;
x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader);
x->ChannelHeader.Size = COVER(bytes, 4096);
x->ChannelHeader.Type = spar_vnic_channel_protocol_uuid;
x->ChannelHeader.ZoneGuid = NULL_UUID_LE;
x->ChannelHeader.version_id = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
x->ChannelHeader.signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
x->ChannelHeader.srv_state = CHANNELSRV_UNINITIALIZED;
x->ChannelHeader.header_size = sizeof(x->ChannelHeader);
x->ChannelHeader.size = COVER(bytes, 4096);
x->ChannelHeader.chtype = spar_vnic_channel_protocol_uuid;
x->ChannelHeader.zone_uuid = NULL_UUID_LE;
memcpy(x->vnic.macaddr, macaddr, MAX_MACADDR_LEN);
x->vnic.num_rcv_bufs = num_rcv_bufs;
x->vnic.mtu = mtu;
......
......@@ -448,7 +448,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
struct channel_header
__iomem *) (dev->
chanptr))->
Type);
chtype);
if (!ULTRA_VHBA_CHANNEL_OK_CLIENT
(dev->chanptr, NULL)) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed:[CLIENT]VHBA dev %d chan invalid.",
......@@ -474,7 +474,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
struct channel_header
__iomem *) (dev->
chanptr))->
Type);
chtype);
if (!ULTRA_VNIC_CHANNEL_OK_CLIENT
(dev->chanptr, NULL)) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: VNIC[CLIENT] dev %d chan invalid.",
......
......@@ -429,9 +429,9 @@ virthba_ISR(int irq, void *dev_id)
return IRQ_NONE;
virthbainfo->interrupts_rcvd++;
pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
if (((readq(&pChannelHeader->Features)
if (((readq(&pChannelHeader->features)
& ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
&& ((readq(&pChannelHeader->Features) &
&& ((readq(&pChannelHeader->features) &
ULTRA_IO_DRIVER_DISABLES_INTS) !=
0)) {
virthbainfo->interrupts_disabled++;
......@@ -444,7 +444,7 @@ virthba_ISR(int irq, void *dev_id)
}
pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
((char __iomem *) pChannelHeader +
readq(&pChannelHeader->oChannelSpace)) + IOCHAN_FROM_IOPART;
readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
writeq(readq(&pqhdr->NumInterruptsReceived) + 1,
&pqhdr->NumInterruptsReceived);
atomic_set(&virthbainfo->interrupt_rcvd, 1);
......@@ -578,9 +578,9 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
INIT_WORK(&virthbainfo->serverdown_completion,
virthba_serverdown_complete);
writeq(readq(&virthbainfo->chinfo.queueinfo->chan->Features) |
writeq(readq(&virthbainfo->chinfo.queueinfo->chan->features) |
ULTRA_IO_CHANNEL_IS_POLLING,
&virthbainfo->chinfo.queueinfo->chan->Features);
&virthbainfo->chinfo.queueinfo->chan->features);
/* start thread that will receive scsicmnd responses */
DBGINF("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
......@@ -588,7 +588,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
((char __iomem *)pChannelHeader +
readq(&pChannelHeader->oChannelSpace)) + IOCHAN_FROM_IOPART;
readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
virthbainfo->flags_addr = &pqhdr->FeatureFlags;
if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
......@@ -622,7 +622,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
} else {
u64 __iomem *Features_addr =
&virthbainfo->chinfo.queueinfo->chan->Features;
&virthbainfo->chinfo.queueinfo->chan->features;
LOGERR("request_irq(%d) uislib_virthba_ISR request succeeded\n",
virthbainfo->interrupt_vector);
mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
......@@ -1453,7 +1453,7 @@ static ssize_t enable_ints_write(struct file *file,
if (VirtHbasOpen[i].virthbainfo != NULL) {
virthbainfo = VirtHbasOpen[i].virthbainfo;
Features_addr =
&virthbainfo->chinfo.queueinfo->chan->Features;
&virthbainfo->chinfo.queueinfo->chan->features;
if (new_value == 1) {
mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
ULTRA_IO_DRIVER_DISABLES_INTS);
......
......@@ -89,10 +89,10 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
}
if (channelBytes == 0)
/* we had better be a CLIENT of this channel */
channelBytes = (ulong) p->chan_hdr.Size;
channelBytes = (ulong) p->chan_hdr.size;
if (uuid_le_cmp(guid, NULL_UUID_LE) == 0)
/* we had better be a CLIENT of this channel */
guid = p->chan_hdr.Type;
guid = p->chan_hdr.chtype;
if (visor_memregion_resize(p->memregion, channelBytes) < 0) {
ERRDRV("visor_memregion_resize failed: (status=0)\n");
rc = NULL;
......@@ -194,14 +194,14 @@ EXPORT_SYMBOL_GPL(visorchannel_id);
char *
visorchannel_zoneid(VISORCHANNEL *channel, char *s)
{
return visorchannel_uuid_id(&channel->chan_hdr.ZoneGuid, s);
return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s);
}
EXPORT_SYMBOL_GPL(visorchannel_zoneid);
HOSTADDRESS
visorchannel_get_clientpartition(VISORCHANNEL *channel)
{
return channel->chan_hdr.PartitionHandle;
return channel->chan_hdr.partition_handle;
}
EXPORT_SYMBOL_GPL(visorchannel_get_clientpartition);
......@@ -295,7 +295,7 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header);
* channel header
*/
#define SIG_QUEUE_OFFSET(chan_hdr, q) \
((chan_hdr)->oChannelSpace + ((q) * sizeof(SIGNAL_QUEUE_HEADER)))
((chan_hdr)->ch_space_offset + ((q) * sizeof(SIGNAL_QUEUE_HEADER)))
/** Return offset of a specific queue entry (data) from the beginning of a
* channel header
......@@ -320,7 +320,7 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
{
BOOL rc = FALSE;
if (channel->chan_hdr.oChannelSpace < sizeof(struct channel_header)) {
if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) {
ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
goto Away;
}
......@@ -591,36 +591,36 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
} else
return;
}
nbytes = (ulong) (phdr->Size);
nbytes = (ulong) (phdr->size);
seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
addr + off, nbytes, nbytes_region);
seq_printf(seq, "Type = %pUL\n", &phdr->Type);
seq_printf(seq, "ZoneGuid = %pUL\n", &phdr->ZoneGuid);
seq_printf(seq, "Type = %pUL\n", &phdr->chtype);
seq_printf(seq, "ZoneGuid = %pUL\n", &phdr->zone_uuid);
seq_printf(seq, "Signature = 0x%-16.16Lx\n",
(long long) phdr->Signature);
seq_printf(seq, "LegacyState = %lu\n", (ulong) phdr->LegacyState);
seq_printf(seq, "SrvState = %lu\n", (ulong) phdr->SrvState);
seq_printf(seq, "CliStateBoot = %lu\n", (ulong) phdr->CliStateBoot);
seq_printf(seq, "CliStateOS = %lu\n", (ulong) phdr->CliStateOS);
seq_printf(seq, "HeaderSize = %lu\n", (ulong) phdr->HeaderSize);
seq_printf(seq, "Size = %llu\n", (long long) phdr->Size);
(long long) phdr->signature);
seq_printf(seq, "LegacyState = %lu\n", (ulong)phdr->legacy_state);
seq_printf(seq, "SrvState = %lu\n", (ulong)phdr->srv_state);
seq_printf(seq, "CliStateBoot = %lu\n", (ulong)phdr->cli_state_boot);
seq_printf(seq, "CliStateOS = %lu\n", (ulong)phdr->cli_state_os);
seq_printf(seq, "HeaderSize = %lu\n", (ulong)phdr->header_size);
seq_printf(seq, "Size = %llu\n", (long long)phdr->size);
seq_printf(seq, "Features = 0x%-16.16llx\n",
(long long) phdr->Features);
(long long) phdr->features);
seq_printf(seq, "PartitionHandle = 0x%-16.16llx\n",
(long long) phdr->PartitionHandle);
(long long) phdr->partition_handle);
seq_printf(seq, "Handle = 0x%-16.16llx\n",
(long long) phdr->Handle);
seq_printf(seq, "VersionId = %lu\n", (ulong) phdr->VersionId);
(long long) phdr->handle);
seq_printf(seq, "VersionId = %lu\n", (ulong) phdr->version_id);
seq_printf(seq, "oChannelSpace = %llu\n",
(long long) phdr->oChannelSpace);
if ((phdr->oChannelSpace == 0) || (errcode < 0))
(long long) phdr->ch_space_offset);
if ((phdr->ch_space_offset == 0) || (errcode < 0))
;
else
for (i = 0; i < nQueues; i++) {
SIGNAL_QUEUE_HEADER q;
errcode = visorchannel_read(channel,
off + phdr->oChannelSpace +
off + phdr->ch_space_offset +
(i * sizeof(q)),
&q, sizeof(q));
if (errcode < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment