diff options
Diffstat (limited to 'drivers/staging/unisys/visorbus')
-rw-r--r-- | drivers/staging/unisys/visorbus/Kconfig | 7 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/controlvmcompletionstatus.h | 24 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/periodic_work.c | 11 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/vbuschannel.h | 9 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/visorbus_main.c | 15 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchannel.c | 4 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/vmcallinterface.h | 34 |
7 files changed, 60 insertions, 44 deletions
diff --git a/drivers/staging/unisys/visorbus/Kconfig b/drivers/staging/unisys/visorbus/Kconfig index 9b299ac86015..511388075ffa 100644 --- a/drivers/staging/unisys/visorbus/Kconfig +++ b/drivers/staging/unisys/visorbus/Kconfig @@ -6,4 +6,9 @@ config UNISYS_VISORBUS tristate "Unisys visorbus driver" depends on UNISYSSPAR ---help--- - If you say Y here, you will enable the Unisys visorbus driver. + The visorbus driver is a virtualized bus for the Unisys s-Par firmware. + Virtualized devices allow Linux guests on a system to share disks and + network cards that do not have SR-IOV support, and to be accessed using + the partition desktop application. The visorbus driver is required to + discover devices on an s-Par guest, and must be present for any other + s-Par guest driver to function correctly. diff --git a/drivers/staging/unisys/visorbus/controlvmcompletionstatus.h b/drivers/staging/unisys/visorbus/controlvmcompletionstatus.h index 3c97ebac4f32..23ad0ea6c9fc 100644 --- a/drivers/staging/unisys/visorbus/controlvmcompletionstatus.h +++ b/drivers/staging/unisys/visorbus/controlvmcompletionstatus.h @@ -39,7 +39,8 @@ #define CONTROLVM_RESP_ERROR_MAX_DEVICES 202 /* DEVICE_CREATE */ /* Payload and Parameter Related------------------------------------[400-499] */ #define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID 400 /* SWITCH_ATTACHEXTPORT, - * DEVICE_CONFIGURE */ + * DEVICE_CONFIGURE + */ #define CONTROLVM_RESP_ERROR_INITIATOR_PARAMETER_INVALID 401 /* Multiple */ #define CONTROLVM_RESP_ERROR_TARGET_PARAMETER_INVALID 402 /* DEVICE_CONFIGURE */ #define CONTROLVM_RESP_ERROR_CLIENT_PARAMETER_INVALID 403 /* DEVICE_CONFIGURE */ @@ -48,36 +49,43 @@ * BUS_CONFIGURE, * DEVICE_CREATE, * DEVICE_CONFIG - * DEVICE_DESTROY */ + * DEVICE_DESTROY + */ #define CONTROLVM_RESP_ERROR_DEVICE_INVALID 501 /* SWITCH_ATTACHINTPORT */ /* DEVICE_CREATE, * DEVICE_CONFIGURE, - * DEVICE_DESTROY */ + * DEVICE_DESTROY + */ #define CONTROLVM_RESP_ERROR_CHANNEL_INVALID 502 /* DEVICE_CREATE, - * DEVICE_CONFIGURE */ + * DEVICE_CONFIGURE + */ /* Partition Driver Callback Interface----------------------[600-699] */ #define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE 604 /* BUS_CREATE, * BUS_DESTROY, * DEVICE_CREATE, - * DEVICE_DESTROY */ + * DEVICE_DESTROY + */ /* Unable to invoke VIRTPCI callback */ #define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR 605 /* BUS_CREATE, * BUS_DESTROY, * DEVICE_CREATE, - * DEVICE_DESTROY */ + * DEVICE_DESTROY + */ /* VIRTPCI Callback returned error */ #define CONTROLVM_RESP_ERROR_GENERIC_DRIVER_CALLBACK_ERROR 606 /* SWITCH_ATTACHEXTPORT, * SWITCH_DETACHEXTPORT - * DEVICE_CONFIGURE */ + * DEVICE_CONFIGURE + */ /* generic device callback returned error */ /* Bus Related------------------------------------------------------[700-799] */ #define CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED 700 /* BUS_DESTROY */ /* Channel Related--------------------------------------------------[800-899] */ #define CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN 800 /* GET_CHANNELINFO, - * DEVICE_DESTROY */ + * DEVICE_DESTROY + */ #define CONTROLVM_RESP_ERROR_CHANNEL_SIZE_TOO_SMALL 801 /* DEVICE_CREATE */ /* Chipset Shutdown Related---------------------------------------[1000-1099] */ #define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_FAILED 1000 diff --git a/drivers/staging/unisys/visorbus/periodic_work.c b/drivers/staging/unisys/visorbus/periodic_work.c index 115b7aa9560a..00b152764f84 100644 --- a/drivers/staging/unisys/visorbus/periodic_work.c +++ b/drivers/staging/unisys/visorbus/periodic_work.c @@ -43,11 +43,12 @@ static void periodic_work_func(struct work_struct *work) (*pw->workfunc)(pw->workfuncarg); } -struct periodic_work *visor_periodic_work_create(ulong jiffy_interval, - struct workqueue_struct *workqueue, - void (*workfunc)(void *), - void *workfuncarg, - const char *devnam) +struct periodic_work +*visor_periodic_work_create(ulong jiffy_interval, + struct workqueue_struct *workqueue, + void (*workfunc)(void *), + void *workfuncarg, + const char *devnam) { struct periodic_work *pw; diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h index 80e64477e547..90fa12e62f26 100644 --- a/drivers/staging/unisys/visorbus/vbuschannel.h +++ b/drivers/staging/unisys/visorbus/vbuschannel.h @@ -36,10 +36,11 @@ static const uuid_le spar_vbus_channel_protocol_uuid = #define SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE ULTRA_CHANNEL_PROTOCOL_SIGNATURE /* Must increment this whenever you insert or delete fields within this channel -* struct. Also increment whenever you change the meaning of fields within this -* channel struct so as to break pre-existing software. Note that you can -* usually add fields to the END of the channel struct withOUT needing to -* increment this. */ + * struct. Also increment whenever you change the meaning of fields within this + * channel struct so as to break pre-existing software. Note that you can + * usually add fields to the END of the channel struct withOUT needing to + * increment this. + */ #define SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID 1 #define SPAR_VBUS_CHANNEL_OK_CLIENT(ch) \ diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index a272b48bab28..eac97d22278a 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -1078,7 +1078,8 @@ away: } /* Write the contents of <info> to the struct - * spar_vbus_channel_protocol.chp_info. */ + * spar_vbus_channel_protocol.chp_info. + */ static int write_vbus_chp_info(struct visorchannel *chan, @@ -1096,7 +1097,8 @@ write_vbus_chp_info(struct visorchannel *chan, } /* Write the contents of <info> to the struct - * spar_vbus_channel_protocol.bus_info. */ + * spar_vbus_channel_protocol.bus_info. + */ static int write_vbus_bus_info(struct visorchannel *chan, @@ -1370,7 +1372,8 @@ pause_state_change_complete(struct visor_device *dev, int status) /* Notify the chipset driver that the pause is complete, which * will presumably want to send some sort of response to the - * initiator. */ + * initiator. + */ (*chipset_responders.device_pause) (dev, status); } @@ -1390,7 +1393,8 @@ resume_state_change_complete(struct visor_device *dev, int status) /* Notify the chipset driver that the resume is complete, * which will presumably want to send some sort of response to - * the initiator. */ + * the initiator. + */ (*chipset_responders.device_resume) (dev, status); } @@ -1437,7 +1441,8 @@ initiate_chipset_device_pause_resume(struct visor_device *dev, bool is_pause) * existing problem prevents us from ever getting a bus * resume... This hack would fail to work should we * ever have a bus that contains NO devices, since we - * would never even get here in that case. */ + * would never even get here in that case. + */ fix_vbus_dev_info(dev); if (!drv->resume) goto away; diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index a4e117f101cf..891b8db7c5ec 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -41,8 +41,8 @@ struct visorchannel { struct channel_header chan_hdr; uuid_le guid; ulong size; - bool needs_lock; /* channel creator knows if more than one - * thread will be inserting or removing */ + bool needs_lock; /* channel creator knows if more than one */ + /* thread will be inserting or removing */ spinlock_t insert_lock; /* protect head writes in chan_hdr */ spinlock_t remove_lock; /* protect tail writes in chan_hdr */ diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h b/drivers/staging/unisys/visorbus/vmcallinterface.h index c8d8483bd4df..c043fa41ceda 100644 --- a/drivers/staging/unisys/visorbus/vmcallinterface.h +++ b/drivers/staging/unisys/visorbus/vmcallinterface.h @@ -43,20 +43,15 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */ * - the 0x01 identifies it as the 1st instance of a VMCALL_VIRTPART * type of VMCALL */ - - VMCALL_IO_CONTROLVM_ADDR = 0x0501, /* used by all Guests, not just - * IO */ - VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET = 0x0708, /* Allow caller to - * query virtual time - * offset */ - VMCALL_POST_CODE_LOGEVENT = 0x070B, /* LOGEVENT Post Code (RDX) with - * specified subsystem mask (RCX - * - monitor_subsystems.h) and - * severity (RDX) */ - VMCALL_UPDATE_PHYSICAL_TIME = 0x0a02 /* Allow - * ULTRA_SERVICE_CAPABILITY_TIME - * capable guest to make - * VMCALL */ + /* used by all Guests, not just IO */ + VMCALL_IO_CONTROLVM_ADDR = 0x0501, + /* Allow caller to query virtual time offset */ + VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET = 0x0708, + /* LOGEVENT Post Code (RDX) with specified subsystem mask */ + /* (RCX - monitor_subsystems.h) and severity (RDX) */ + VMCALL_POST_CODE_LOGEVENT = 0x070B, + /* Allow ULTRA_SERVICE_CAPABILITY_TIME capable guest to make VMCALL */ + VMCALL_UPDATE_PHYSICAL_TIME = 0x0a02 }; #define VMCALL_SUCCESS 0 @@ -74,7 +69,8 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */ unisys_extended_vmcall(method, param1, param2, param3) /* The following uses VMCALL_POST_CODE_LOGEVENT interface but is currently - * not used much */ + * not used much + */ #define ISSUE_IO_VMCALL_POSTCODE_SEVERITY(postcode, severity) \ ISSUE_IO_EXTENDED_VMCALL(VMCALL_POST_CODE_LOGEVENT, severity, \ MDS_APPOS, postcode) @@ -84,11 +80,11 @@ enum vmcall_monitor_interface_method_tuple { /* VMCALL identification tuples */ /* Parameters to VMCALL_IO_CONTROLVM_ADDR interface */ struct vmcall_io_controlvm_addr_params { - /* The Guest-relative physical address of the ControlVm channel. - * This VMCall fills this in with the appropriate address. */ + /* The Guest-relative physical address of the ControlVm channel. */ + /* This VMCall fills this in with the appropriate address. */ u64 address; /* contents provided by this VMCALL (OUT) */ - /* the size of the ControlVm channel in bytes This VMCall fills this - * in with the appropriate address. */ + /* the size of the ControlVm channel in bytes This VMCall fills this */ + /* in with the appropriate address. */ u32 channel_bytes; /* contents provided by this VMCALL (OUT) */ u8 unused[4]; /* Unused Bytes in the 64-Bit Aligned Struct */ } __packed; |