~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/pg.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/pg.h (Version linux-6.12-rc7) and /include/uapi/linux/pg.h (Version linux-5.19.17)


  1 /* SPDX-License-Identifier: GPL-1.0+ WITH Linu      1 /* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
  2 /*      pg.h (c) 1998  Grant R. Guenther <gran      2 /*      pg.h (c) 1998  Grant R. Guenther <grant@torque.net>
  3                        Under the terms of the       3                        Under the terms of the GNU General Public License
  4                                                     4 
  5                                                     5 
  6         pg.h defines the user interface to the      6         pg.h defines the user interface to the generic ATAPI packet
  7         command driver for parallel port ATAPI      7         command driver for parallel port ATAPI devices (pg). The
  8         driver is loosely modelled after the g      8         driver is loosely modelled after the generic SCSI driver, sg,
  9         although the actual interface is diffe      9         although the actual interface is different.
 10                                                    10 
 11         The pg driver provides a simple charac     11         The pg driver provides a simple character device interface for
 12         sending ATAPI commands to a device.  W     12         sending ATAPI commands to a device.  With the exception of the
 13         ATAPI reset operation, all operations      13         ATAPI reset operation, all operations are performed by a pair
 14         of read and write operations to the ap     14         of read and write operations to the appropriate /dev/pgN device.
 15         A write operation delivers a command a     15         A write operation delivers a command and any outbound data in
 16         a single buffer.  Normally, the write      16         a single buffer.  Normally, the write will succeed unless the
 17         device is offline or malfunctioning, o     17         device is offline or malfunctioning, or there is already another
 18         command pending.  If the write succeed     18         command pending.  If the write succeeds, it should be followed
 19         immediately by a read operation, to ob     19         immediately by a read operation, to obtain any returned data and
 20         status information.  A read will fail      20         status information.  A read will fail if there is no operation
 21         in progress.                               21         in progress.
 22                                                    22 
 23         As a special case, the device can be r     23         As a special case, the device can be reset with a write operation,
 24         and in this case, no following read is     24         and in this case, no following read is expected, or permitted.
 25                                                    25 
 26         There are no ioctl() operations.  Any      26         There are no ioctl() operations.  Any single operation
 27         may transfer at most PG_MAX_DATA bytes     27         may transfer at most PG_MAX_DATA bytes.  Note that the driver must
 28         copy the data through an internal buff     28         copy the data through an internal buffer.  In keeping with all
 29         current ATAPI devices, command packets     29         current ATAPI devices, command packets are assumed to be exactly
 30         12 bytes in length.                        30         12 bytes in length.
 31                                                    31 
 32         To permit future changes to this inter     32         To permit future changes to this interface, the headers in the
 33         read and write buffers contain a singl     33         read and write buffers contain a single character "magic" flag.
 34         Currently this flag must be the charac     34         Currently this flag must be the character "P".
 35                                                    35 
 36 */                                                 36 */
 37                                                    37 
 38 #ifndef _UAPI_LINUX_PG_H                           38 #ifndef _UAPI_LINUX_PG_H
 39 #define _UAPI_LINUX_PG_H                           39 #define _UAPI_LINUX_PG_H
 40                                                    40 
 41 #define PG_MAGIC        'P'                        41 #define PG_MAGIC        'P'
 42 #define PG_RESET        'Z'                        42 #define PG_RESET        'Z'
 43 #define PG_COMMAND      'C'                        43 #define PG_COMMAND      'C'
 44                                                    44 
 45 #define PG_MAX_DATA     32768                      45 #define PG_MAX_DATA     32768
 46                                                    46 
 47 struct pg_write_hdr {                              47 struct pg_write_hdr {
 48                                                    48 
 49         char    magic;          /* == PG_MAGIC     49         char    magic;          /* == PG_MAGIC */
 50         char    func;           /* PG_RESET or     50         char    func;           /* PG_RESET or PG_COMMAND */
 51         int     dlen;           /* number of b     51         int     dlen;           /* number of bytes expected to transfer */
 52         int     timeout;        /* number of s     52         int     timeout;        /* number of seconds before timeout */
 53         char    packet[12];     /* packet comm     53         char    packet[12];     /* packet command */
 54                                                    54 
 55 };                                                 55 };
 56                                                    56 
 57 struct pg_read_hdr {                               57 struct pg_read_hdr {
 58                                                    58 
 59         char    magic;          /* == PG_MAGIC     59         char    magic;          /* == PG_MAGIC */
 60         char    scsi;           /* "scsi" stat     60         char    scsi;           /* "scsi" status == sense key */
 61         int     dlen;           /* size of dev     61         int     dlen;           /* size of device transfer request */
 62         int     duration;       /* time in sec     62         int     duration;       /* time in seconds command took */
 63         char    pad[12];        /* not used */     63         char    pad[12];        /* not used */
 64                                                    64 
 65 };                                                 65 };
 66                                                    66 
 67 #endif /* _UAPI_LINUX_PG_H */                      67 #endif /* _UAPI_LINUX_PG_H */
 68                                                    68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php