glenda.party
term% ls -F
term% pwd
$home/manuals/9front/8/atazz
term% cat index.txt
ATAZZ(8)                    System Manager's Manual                   ATAZZ(8)



NAME
       atazz - ATA target control

SYNOPSIS
       atazz [ -r ] [ sddev ]
       atazz -c cmd

DESCRIPTION
       Atazz  is  an  interactive program for exercising raw ATA devices.  Its
       intended purpose is to support odd and administrative commands  without
       requiring  this functionality be implemented by each device driver.  It
       reads commands from standard input and applies them to an  ATA  target.
       Communication  is in SATA FIS format.  Non-ATA devices accessed through
       the sd(3) interface will not work; ATAPI devices will  respond  to  the
       commands  in  the ACS-2 packet feature set.  If the -c option is given,
       the name of the given numeric ATA command is printed.  sddev  is  given
       on  the command line, an open (see below) is immediately applied to the
       target.  On completion of a command, any errors are printed followed by
       the prompt The response FIS may be printed with the command rfis.  Some
       commands like identify device print processed output by default.  Redi‐
       recting  the  output  to a file will give the raw output as will the -r
       flag.  In addition the following commands are implemented internally

       < > <> file
              Redirect output, input or both to or from a file.   If  file  is
              missing, then the redirection is closed.

       close  Close the currently open device.

       dev    Print device path and basic information.

       issuetr [ command ... ]
              Toggle  command  issue tracing.  With no arguments, issuetr tog‐
              gles tracing for all commands.  Commands  may  be  specified  by
              number.

       open dev
              Open  the  named device.  probe Print a list of available device
              paths, size, sector size and WWNs.  The first column is a  suit‐
              able argument for open.

       rfis   Print the returned FIS, if any.

       For  all  commands, it is possible to manipulate the sata registers di‐
       rectly by specifying the register name and an 8-bit value.  The  regis‐
       ters are

       type   FIS type

       flags  FIS flags

       cmd    command register

       feat   or features

       lba0   or sector

       lba8   or cyl0

       lba16  or cyl8

       lba24  or dh or byte8

       lba32

       lba40

       feat8

       sc     sector count

       sc8

       r      reserved FIS register

       In  addition,  commands that take an LBA and a number of sectors may be
       given those arguments directly, for example to read 1  sector  starting
       at lba 100,

              az> read dma ext 100 1

       Subcommands  are  spelled  out  as  in  ACS-2.  For example, to set the
       transfer mode to UDMA 6, enable the write cache and to enable  and  re‐
       port smart status, one would

              az> set features set transfer mode udma 6
              az> set features enable write cache
              az> smart enable operations
              az> smart return status
              normal

       SCT pseudo-protocol commands are also supported.

              az> sct error recovery time set read timer = 5
              az> sct error recovery time return read timer
              500ms

FILES
       /dev/sdXX/raw

SOURCE
       /sys/src/cmd/atazz

SEE ALSO
       scuzz(8), sd(3), smart(8),
       T13/2015 ACS-2 published online at http://www.t13.org.

BUGS
       Subcommand help doesn't work.  ACS-2 commands are tortuously verbose.



                                                                      ATAZZ(8)