mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-04 01:57:59 +00:00
staging: unisys: Add s-Par visorhba
This driver create a host bus adapter device when s-Par sends a device create message to create a storage adapter on the visorbus. When the message is received by visorbus, the visorhba_probe function is called and the hba device is created and managed by the visorhba driver. Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a6c8746d54
commit
d2c3506be6
@ -14,5 +14,6 @@ if UNISYSSPAR
|
|||||||
source "drivers/staging/unisys/visorbus/Kconfig"
|
source "drivers/staging/unisys/visorbus/Kconfig"
|
||||||
source "drivers/staging/unisys/visornic/Kconfig"
|
source "drivers/staging/unisys/visornic/Kconfig"
|
||||||
source "drivers/staging/unisys/visorhid/Kconfig"
|
source "drivers/staging/unisys/visorhid/Kconfig"
|
||||||
|
source "drivers/staging/unisys/visorhba/Kconfig"
|
||||||
|
|
||||||
endif # UNISYSSPAR
|
endif # UNISYSSPAR
|
||||||
|
@ -4,3 +4,4 @@
|
|||||||
obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
|
obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
|
||||||
obj-$(CONFIG_UNISYS_VISORNIC) += visornic/
|
obj-$(CONFIG_UNISYS_VISORNIC) += visornic/
|
||||||
obj-$(CONFIG_UNISYS_VISORHID) += visorhid/
|
obj-$(CONFIG_UNISYS_VISORHID) += visorhid/
|
||||||
|
obj-$(CONFIG_UNISYS_VISORHBA) += visorhba/
|
||||||
|
@ -147,6 +147,10 @@ struct phys_info {
|
|||||||
u16 pi_len;
|
u16 pi_len;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
#define MIN_NUMSIGNALS 64
|
||||||
|
|
||||||
|
/* structs with pragma pack */
|
||||||
|
|
||||||
struct guest_phys_info {
|
struct guest_phys_info {
|
||||||
u64 address;
|
u64 address;
|
||||||
u64 length;
|
u64 length;
|
||||||
@ -183,7 +187,7 @@ struct vhba_config_max { /* 20 bytes */
|
|||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct uiscmdrsp_scsi {
|
struct uiscmdrsp_scsi {
|
||||||
void *scsicmd; /* the handle to the cmd that was received -
|
u64 handle; /* the handle to the cmd that was received -
|
||||||
* send it back as is in the rsp packet. */
|
* send it back as is in the rsp packet. */
|
||||||
u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */
|
u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */
|
||||||
u32 bufflen; /* length of data to be transferred out or in */
|
u32 bufflen; /* length of data to be transferred out or in */
|
||||||
@ -437,24 +441,22 @@ struct uiscmdrsp_scsitaskmgmt {
|
|||||||
struct uisscsi_dest vdest;
|
struct uisscsi_dest vdest;
|
||||||
|
|
||||||
/* the vdisk for which this task mgmt is generated */
|
/* the vdisk for which this task mgmt is generated */
|
||||||
void *scsicmd;
|
u64 handle;
|
||||||
|
|
||||||
/* This is some handle that the guest has saved off for its own use.
|
/* This is a handle that the guest has saved off for its own use.
|
||||||
* Its value is preserved by iopart & returned as is in the task
|
* Its value is preserved by iopart & returned as is in the task
|
||||||
* mgmt rsp.
|
* mgmt rsp.
|
||||||
*/
|
*/
|
||||||
void *notify;
|
u64 notify_handle;
|
||||||
|
|
||||||
/* For linux guests, this is a pointer to wait_queue_head that a
|
/* For linux guests, this is a pointer to wait_queue_head that a
|
||||||
* thread is waiting on to see if the taskmgmt command has completed.
|
* thread is waiting on to see if the taskmgmt command has completed.
|
||||||
* For windows guests, this is a pointer to a location that a waiting
|
|
||||||
* thread is testing to see if the taskmgmt command has completed.
|
|
||||||
* When the rsp is received by guest, the thread receiving the
|
* When the rsp is received by guest, the thread receiving the
|
||||||
* response uses this to notify the thread waiting for taskmgmt
|
* response uses this to notify the thread waiting for taskmgmt
|
||||||
* command completion. Its value is preserved by iopart & returned
|
* command completion. Its value is preserved by iopart & returned
|
||||||
* as is in the task mgmt rsp.
|
* as is in the task mgmt rsp.
|
||||||
*/
|
*/
|
||||||
void *notifyresult;
|
u64 notifyresult_handle;
|
||||||
|
|
||||||
/* this is a handle to location in guest where the result of the
|
/* this is a handle to location in guest where the result of the
|
||||||
* taskmgmt command (result field) is to saved off when the response
|
* taskmgmt command (result field) is to saved off when the response
|
||||||
@ -486,24 +488,22 @@ struct uiscmdrsp_vdiskmgmt {
|
|||||||
struct uisscsi_dest vdest;
|
struct uisscsi_dest vdest;
|
||||||
|
|
||||||
/* the vdisk for which this task mgmt is generated */
|
/* the vdisk for which this task mgmt is generated */
|
||||||
void *scsicmd;
|
u64 handle;
|
||||||
|
|
||||||
/* This is some handle that the guest has saved off for its own use.
|
/* This is a handle that the guest has saved off for its own use.
|
||||||
* Its value is preserved by iopart & returned as is in the task
|
* Its value is preserved by iopart & returned as is in the task
|
||||||
* mgmt rsp.
|
* mgmt rsp.
|
||||||
*/
|
*/
|
||||||
void *notify;
|
u64 notify_handle;
|
||||||
|
|
||||||
/* For linux guests, this is a pointer to wait_queue_head that a
|
/* For linux guests, this is a pointer to wait_queue_head that a
|
||||||
* thread is waiting on to see if the tskmgmt command has completed.
|
* thread is waiting on to see if the tskmgmt command has completed.
|
||||||
* For win32 guests, this is a pointer to a location that a waiting
|
|
||||||
* thread is testing to see if the taskmgmt command has completed.
|
|
||||||
* When the rsp is received by guest, the thread receiving the
|
* When the rsp is received by guest, the thread receiving the
|
||||||
* response uses this to notify the thread waiting for taskmgmt
|
* response uses this to notify the thread waiting for taskmgmt
|
||||||
* command completion. Its value is preserved by iopart & returned
|
* command completion. Its value is preserved by iopart & returned
|
||||||
* as is in the task mgmt rsp.
|
* as is in the task mgmt rsp.
|
||||||
*/
|
*/
|
||||||
void *notifyresult;
|
u64 notifyresult_handle;
|
||||||
|
|
||||||
/* this is a handle to location in guest where the result of the
|
/* this is a handle to location in guest where the result of the
|
||||||
* taskmgmt command (result field) is to saved off when the response
|
* taskmgmt command (result field) is to saved off when the response
|
||||||
|
14
drivers/staging/unisys/visorhba/Kconfig
Normal file
14
drivers/staging/unisys/visorhba/Kconfig
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# Unisys visorhba configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
config UNISYS_VISORHBA
|
||||||
|
tristate "Unisys visorhba driver"
|
||||||
|
depends on UNISYSSPAR && UNISYS_VISORBUS && SCSI
|
||||||
|
---help---
|
||||||
|
The Unisys visorhba driver provides support for s-Par HBA
|
||||||
|
devices exposed on the s-Par visorbus. When a message is sent
|
||||||
|
to visorbus to create a HBA device, the probe function of
|
||||||
|
visorhba is called to create the scsi device.
|
||||||
|
If you say Y here, you will enable the Unisys visorhba driver.
|
||||||
|
|
10
drivers/staging/unisys/visorhba/Makefile
Normal file
10
drivers/staging/unisys/visorhba/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#
|
||||||
|
# Makefile for Unisys channel
|
||||||
|
#
|
||||||
|
|
||||||
|
obj-$(CONFIG_UNISYS_VISORHBA) += visorhba.o
|
||||||
|
|
||||||
|
visorhba-y := visorhba_main.o
|
||||||
|
|
||||||
|
ccflags-y += -Idrivers/staging/unisys/include
|
||||||
|
|
1241
drivers/staging/unisys/visorhba/visorhba_main.c
Normal file
1241
drivers/staging/unisys/visorhba/visorhba_main.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user