diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
| commit | 53279f36dccffc26ff536003fd6bb97cc21c3b82 (patch) | |
| tree | 9d16e497c0e4158c7c054c479bd0e9ff0388d7bb /include/linux/pg.h | |
| parent | a6e8c0a25377e27958b11b20e1927885ae7c9857 (diff) | |
| parent | 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff) | |
Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changes
Diffstat (limited to 'include/linux/pg.h')
| -rw-r--r-- | include/linux/pg.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/include/linux/pg.h b/include/linux/pg.h deleted file mode 100644 index db994bb0c794..000000000000 --- a/include/linux/pg.h +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 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 */ | ||
