Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <asm/fcx.h>
#include <asm/irq.h>
Go to the source code of this file.
Data Structures | |
struct | ccw_device |
struct | ccw_driver |
Macros | |
#define | CCW_DEVICE(cu, cum) |
#define | CCW_DEVICE_DEVTYPE(cu, cum, dev, devm) |
#define | PE_NONE 0x0 |
#define | PE_PATH_GONE 0x1 /* A path is no longer available. */ |
#define | PE_PATH_AVAILABLE |
#define | PE_PATHGROUP_ESTABLISHED |
#define | CCWDEV_EARLY_NOTIFICATION 0x0001 |
#define | CCWDEV_REPORT_ALL 0x0002 |
#define | CCWDEV_DO_PATHGROUP 0x0004 |
#define | CCWDEV_ALLOW_FORCE 0x0008 |
#define | CCWDEV_DO_MULTIPATH 0x0010 |
#define | get_ccwdev_lock(x) (x)->ccwlock |
#define | to_ccwdev(n) container_of(n, struct ccw_device, dev) |
#define | to_ccwdrv(n) container_of(n, struct ccw_driver, driver) |
Enumerations | |
enum | uc_todo { UC_TODO_RETRY, UC_TODO_RETRY_ON_NEW_PATH, UC_TODO_STOP } |
#define CCW_DEVICE | ( | cu, | |
cum | |||
) |
#define CCW_DEVICE_DEVTYPE | ( | cu, | |
cum, | |||
dev, | |||
devm | |||
) |
#define PE_PATH_AVAILABLE |
#define PE_PATH_GONE 0x1 /* A path is no longer available. */ |
#define PE_PATHGROUP_ESTABLISHED |
#define to_ccwdev | ( | n | ) | container_of(n, struct ccw_device, dev) |
#define to_ccwdrv | ( | n | ) | container_of(n, struct ccw_driver, driver) |
enum uc_todo |
int _ccw_device_get_subchannel_number | ( | struct ccw_device * | ) |
Definition at line 761 of file device_ops.c.
int ccw_device_clear | ( | struct ccw_device * | cdev, |
unsigned long | intparm | ||
) |
ccw_device_clear() - terminate I/O request processing : target ccw device : interruption parameter; value is only used if no I/O is outstanding, otherwise the intparm associated with the I/O request is returned
ccw_device_clear() calls csch on 's subchannel. Returns: %0 on success, -ENODEV on device not operational, -EINVAL on invalid device state. Context: Interrupts disabled, ccw device lock held
Definition at line 138 of file device_ops.c.
void ccw_device_clear_options | ( | struct ccw_device * | cdev, |
unsigned long | flags | ||
) |
ccw_device_clear_options() - clear some options : device for which the options are to be cleared : options to be cleared
All flags specified in are cleared, the remainder is left untouched.
Definition at line 90 of file device_ops.c.
void* ccw_device_get_chp_desc | ( | struct ccw_device * | , |
int | |||
) |
Definition at line 566 of file device_ops.c.
|
read |
ccw_device_get_ciw() - Search for CIW command in extended sense data. : ccw device to inspect : command type to look for
During SenseID, command information words (CIWs) describing special commands available to the device may have been stored in the extended sense data. This function searches for CIWs of a specified command type in the extended sense data. Returns: NULL if no extended sense data has been stored or if no CIW of the specified command type could be found, else a pointer to the CIW of the specified command type.
Definition at line 475 of file device_ops.c.
void ccw_device_get_id | ( | struct ccw_device * | cdev, |
struct ccw_dev_id * | dev_id | ||
) |
ccw_device_get_id - obtain a ccw device id : device to obtain the id for : where to fill in the values
Definition at line 582 of file device_ops.c.
int ccw_device_get_mdc | ( | struct ccw_device * | cdev, |
u8 | mask | ||
) |
ccw_device_get_mdc - accumulate max data count : ccw device for which the max data count is accumulated : mask of paths to use
Return the number of 64K-bytes blocks all paths at least support for a transport command. Return values <= 0 indicate failures.
Definition at line 704 of file device_ops.c.
__u8 ccw_device_get_path_mask | ( | struct ccw_device * | cdev | ) |
ccw_device_get_path_mask() - get currently available paths : ccw device to be queried Returns: %0 if no subchannel for the device is available, else the mask of currently available paths for the ccw device's subchannel.
Definition at line 494 of file device_ops.c.
int ccw_device_halt | ( | struct ccw_device * | cdev, |
unsigned long | intparm | ||
) |
ccw_device_halt() - halt I/O request processing : target ccw device : interruption parameter; value is only used if no I/O is outstanding, otherwise the intparm associated with the I/O request is returned
ccw_device_halt() calls hsch on 's subchannel. Returns: %0 on success, -ENODEV on device not operational, -EINVAL on invalid device state, -EBUSY on device busy or interrupt pending. Context: Interrupts disabled, ccw device lock held
Definition at line 363 of file device_ops.c.
int ccw_device_is_multipath | ( | struct ccw_device * | cdev | ) |
ccw_device_is_multipath - determine if device is operating in multipath mode : ccw device
Return non-zero if device is operating in multipath mode, zero otherwise.
Definition at line 117 of file device_ops.c.
int ccw_device_is_pathgroup | ( | struct ccw_device * | cdev | ) |
ccw_device_is_pathgroup - determine if paths to this device are grouped : ccw device
Return non-zero if there is a path group, zero otherwise.
Definition at line 105 of file device_ops.c.
|
read |
int ccw_device_resume | ( | struct ccw_device * | cdev | ) |
ccw_device_resume() - resume channel program execution : target ccw device
ccw_device_resume() calls rsch on 's subchannel. Returns: %0 on success, -ENODEV on device not operational, -EINVAL on invalid device state, -EBUSY on device busy or interrupt pending. Context: Interrupts disabled, ccw device lock held
Definition at line 398 of file device_ops.c.
int ccw_device_set_offline | ( | struct ccw_device * | cdev | ) |
ccw_device_set_offline() - disable a ccw device for I/O : target ccw device
This function calls the driver's set_offline() function for , if given, and then disables . Returns: %0 on success and a negative error value on failure. Context: enabled, ccw device lock not held
int ccw_device_set_online | ( | struct ccw_device * | cdev | ) |
ccw_device_set_online() - enable a ccw device for I/O : target ccw device
This function first enables and then calls the driver's set_online() function for , if given. If set_online() returns an error, is disabled again. Returns: %0 on success and a negative error value on failure. Context: enabled, ccw device lock not held
int ccw_device_set_options | ( | struct ccw_device * | cdev, |
unsigned long | flags | ||
) |
ccw_device_set_options() - set some options : device for which the options are to be set : options to be set
All flags specified in are set, the remainder is left untouched. Returns: %0 on success, -EINVAL if an invalid flag combination would ensue.
Definition at line 63 of file device_ops.c.
int ccw_device_set_options_mask | ( | struct ccw_device * | cdev, |
unsigned long | flags | ||
) |
ccw_device_set_options_mask() - set some options and unset the rest : device for which the options are to be set : options to be set
All flags specified in are set, all flags not specified in are cleared. Returns: %0 on success, -EINVAL on an invalid flag combination.
Definition at line 38 of file device_ops.c.
int ccw_device_siosl | ( | struct ccw_device * | cdev | ) |
ccw_device_siosl() - initiate logging : ccw device
This function is used to invoke model-dependent logging within the channel subsystem.
int ccw_device_start | ( | struct ccw_device * | cdev, |
struct ccw1 * | cpa, | ||
unsigned long | intparm, | ||
__u8 | lpm, | ||
unsigned long | flags | ||
) |
ccw_device_start() - start a s390 channel program : target ccw device : logical start address of channel program : user specific interruption parameter; will be presented back to 's interrupt handler. Allows a device driver to associate the interrupt with a particular I/O request. : defines the channel path to be used for a specific I/O request. A value of 0 will make cio use the opm. : additional flags; defines the action to be performed for I/O processing.
Start a S/390 channel program. When the interrupt arrives, the IRQ handler is called, either immediately, delayed (dev-end missing, or sense required) or never (no IRQ handler registered). Returns: %0, if the operation was successful; -EBUSY, if the device is busy, or status pending; -EACCES, if no path specified in is operational; -ENODEV, if the device is not operational. Context: Interrupts disabled, ccw device lock held
Definition at line 302 of file device_ops.c.
int ccw_device_start_key | ( | struct ccw_device * | cdev, |
struct ccw1 * | cpa, | ||
unsigned long | intparm, | ||
__u8 | lpm, | ||
__u8 | key, | ||
unsigned long | flags | ||
) |
ccw_device_start_key() - start a s390 channel program with key : target ccw device : logical start address of channel program : user specific interruption parameter; will be presented back to 's interrupt handler. Allows a device driver to associate the interrupt with a particular I/O request. : defines the channel path to be used for a specific I/O request. A value of 0 will make cio use the opm. : storage key to be used for the I/O : additional flags; defines the action to be performed for I/O processing.
Start a S/390 channel program. When the interrupt arrives, the IRQ handler is called, either immediately, delayed (dev-end missing, or sense required) or never (no IRQ handler registered). Returns: %0, if the operation was successful; -EBUSY, if the device is busy, or status pending; -EACCES, if no path specified in is operational; -ENODEV, if the device is not operational. Context: Interrupts disabled, ccw device lock held
Definition at line 184 of file device_ops.c.
int ccw_device_start_timeout | ( | struct ccw_device * | cdev, |
struct ccw1 * | cpa, | ||
unsigned long | intparm, | ||
__u8 | lpm, | ||
unsigned long | flags, | ||
int | expires | ||
) |
ccw_device_start_timeout() - start a s390 channel program with timeout : target ccw device : logical start address of channel program : user specific interruption parameter; will be presented back to 's interrupt handler. Allows a device driver to associate the interrupt with a particular I/O request. : defines the channel path to be used for a specific I/O request. A value of 0 will make cio use the opm. : additional flags; defines the action to be performed for I/O processing. : timeout value in jiffies
Start a S/390 channel program. When the interrupt arrives, the IRQ handler is called, either immediately, delayed (dev-end missing, or sense required) or never (no IRQ handler registered). This function notifies the device driver if the channel program has not completed during the time specified by . If a timeout occurs, the channel program is terminated via xsch, hsch or csch, and the device's interrupt handler will be called with an irb containing ERR_PTR(-ETIMEDOUT). Returns: %0, if the operation was successful; -EBUSY, if the device is busy, or status pending; -EACCES, if no path specified in is operational; -ENODEV, if the device is not operational. Context: Interrupts disabled, ccw device lock held
Definition at line 337 of file device_ops.c.
int ccw_device_start_timeout_key | ( | struct ccw_device * | cdev, |
struct ccw1 * | cpa, | ||
unsigned long | intparm, | ||
__u8 | lpm, | ||
__u8 | key, | ||
unsigned long | flags, | ||
int | expires | ||
) |
ccw_device_start_timeout_key() - start a s390 channel program with timeout and key : target ccw device : logical start address of channel program : user specific interruption parameter; will be presented back to 's interrupt handler. Allows a device driver to associate the interrupt with a particular I/O request. : defines the channel path to be used for a specific I/O request. A value of 0 will make cio use the opm. : storage key to be used for the I/O : additional flags; defines the action to be performed for I/O processing. : timeout value in jiffies
Start a S/390 channel program. When the interrupt arrives, the IRQ handler is called, either immediately, delayed (dev-end missing, or sense required) or never (no IRQ handler registered). This function notifies the device driver if the channel program has not completed during the time specified by . If a timeout occurs, the channel program is terminated via xsch, hsch or csch, and the device's interrupt handler will be called with an irb containing ERR_PTR(-ETIMEDOUT). Returns: %0, if the operation was successful; -EBUSY, if the device is busy, or status pending; -EACCES, if no path specified in is operational; -ENODEV, if the device is not operational. Context: Interrupts disabled, ccw device lock held
Definition at line 264 of file device_ops.c.
int ccw_device_tm_intrg | ( | struct ccw_device * | cdev | ) |
ccw_device_tm_intrg - perform interrogate function : ccw device on which to perform the interrogate function
Perform an interrogate function on the given ccw device. Return zero on success, non-zero otherwise.
Definition at line 743 of file device_ops.c.
int ccw_device_tm_start | ( | struct ccw_device * | cdev, |
struct tcw * | tcw, | ||
unsigned long | intparm, | ||
u8 | lpm | ||
) |
ccw_device_tm_start - perform start function : ccw device on which to perform the start function : transport-command word to be started : user defined parameter to be passed to the interrupt handler : mask of paths to use
Start the tcw on the given ccw device. Return zero on success, non-zero otherwise.
Definition at line 669 of file device_ops.c.
int ccw_device_tm_start_key | ( | struct ccw_device * | cdev, |
struct tcw * | tcw, | ||
unsigned long | intparm, | ||
u8 | lpm, | ||
u8 | key | ||
) |
ccw_device_tm_start_key - perform start function : ccw device on which to perform the start function : transport-command word to be started : user defined parameter to be passed to the interrupt handler : mask of paths to use : storage key to use for storage access
Start the tcw on the given ccw device. Return zero on success, non-zero otherwise.
Definition at line 599 of file device_ops.c.
int ccw_device_tm_start_timeout | ( | struct ccw_device * | cdev, |
struct tcw * | tcw, | ||
unsigned long | intparm, | ||
u8 | lpm, | ||
int | expires | ||
) |
ccw_device_tm_start_timeout - perform start function : ccw device on which to perform the start function : transport-command word to be started : user defined parameter to be passed to the interrupt handler : mask of paths to use : time span in jiffies after which to abort request
Start the tcw on the given ccw device. Return zero on success, non-zero otherwise.
Definition at line 688 of file device_ops.c.
int ccw_device_tm_start_timeout_key | ( | struct ccw_device * | cdev, |
struct tcw * | tcw, | ||
unsigned long | intparm, | ||
u8 | lpm, | ||
u8 | key, | ||
int | expires | ||
) |
ccw_device_tm_start_timeout_key - perform start function : ccw device on which to perform the start function : transport-command word to be started : user defined parameter to be passed to the interrupt handler : mask of paths to use : storage key to use for storage access : time span in jiffies after which to abort request
Start the tcw on the given ccw device. Return zero on success, non-zero otherwise.
Definition at line 645 of file device_ops.c.
int ccw_driver_register | ( | struct ccw_driver * | cdriver | ) |
ccw_driver_register() - register a ccw driver : driver to be registered
This function is mainly a wrapper around driver_register(). Returns: %0 on success and a negative error value on failure.
void ccw_driver_unregister | ( | struct ccw_driver * | cdriver | ) |
ccw_driver_unregister() - deregister a ccw driver : driver to be deregistered
This function is mainly a wrapper around driver_unregister().
|
read |
get_ccwdev_by_busid() - obtain device from a bus id : driver the device is owned by : bus id of the device to be searched
This function searches all devices owned by for a device with a bus id matching . Returns: If a match is found, its reference count of the found device is increased and it is returned; else NULL is returned.