diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/uapi/linux/pg.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/uapi/linux/pg.h')
| -rw-r--r-- | include/uapi/linux/pg.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/include/uapi/linux/pg.h b/include/uapi/linux/pg.h new file mode 100644 index 000000000000..db994bb0c794 --- /dev/null +++ b/include/uapi/linux/pg.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* pg.h (c) 1998 Grant R. Guenther <grant@torque.net> | ||
| 2 | Under the terms of the GNU General Public License | ||
| 3 | |||
| 4 | |||
| 5 | pg.h defines the user interface to the generic ATAPI packet | ||
| 6 | command driver for parallel port ATAPI devices (pg). The | ||
| 7 | driver is loosely modelled after the generic SCSI driver, sg, | ||
| 8 | although the actual interface is different. | ||
| 9 | |||
| 10 | The pg driver provides a simple character device interface for | ||
| 11 | sending ATAPI commands to a device. With the exception of the | ||
| 12 | ATAPI reset operation, all operations are performed by a pair | ||
| 13 | of read and write operations to the appropriate /dev/pgN device. | ||
| 14 | A write operation delivers a command and any outbound data in | ||
| 15 | a single buffer. Normally, the write will succeed unless the | ||
| 16 | device is offline or malfunctioning, or there is already another | ||
| 17 | command pending. If the write succeeds, it should be followed | ||
| 18 | immediately by a read operation, to obtain any returned data and | ||
| 19 | status information. A read will fail if there is no operation | ||
| 20 | in progress. | ||
| 21 | |||
| 22 | As a special case, the device can be reset with a write operation, | ||
| 23 | and in this case, no following read is expected, or permitted. | ||
| 24 | |||
| 25 | There are no ioctl() operations. Any single operation | ||
| 26 | may transfer at most PG_MAX_DATA bytes. Note that the driver must | ||
| 27 | copy the data through an internal buffer. In keeping with all | ||
| 28 | current ATAPI devices, command packets are assumed to be exactly | ||
| 29 | 12 bytes in length. | ||
| 30 | |||
| 31 | To permit future changes to this interface, the headers in the | ||
| 32 | read and write buffers contain a single character "magic" flag. | ||
| 33 | Currently this flag must be the character "P". | ||
| 34 | |||
| 35 | */ | ||
| 36 | |||
| 37 | #define PG_MAGIC 'P' | ||
| 38 | #define PG_RESET 'Z' | ||
| 39 | #define PG_COMMAND 'C' | ||
| 40 | |||
| 41 | #define PG_MAX_DATA 32768 | ||
| 42 | |||
| 43 | struct pg_write_hdr { | ||
| 44 | |||
| 45 | char magic; /* == PG_MAGIC */ | ||
| 46 | char func; /* PG_RESET or PG_COMMAND */ | ||
| 47 | int dlen; /* number of bytes expected to transfer */ | ||
| 48 | int timeout; /* number of seconds before timeout */ | ||
| 49 | char packet[12]; /* packet command */ | ||
| 50 | |||
| 51 | }; | ||
| 52 | |||
| 53 | struct pg_read_hdr { | ||
| 54 | |||
| 55 | char magic; /* == PG_MAGIC */ | ||
| 56 | char scsi; /* "scsi" status == sense key */ | ||
| 57 | int dlen; /* size of device transfer request */ | ||
| 58 | int duration; /* time in seconds command took */ | ||
| 59 | char pad[12]; /* not used */ | ||
| 60 | |||
| 61 | }; | ||
| 62 | |||
| 63 | /* end of pg.h */ | ||
