diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog index 31185931039450896c1ca2a29ccac362841d058b..222759edf416150e8790ef8c22a591ff296d4524 100644 --- a/smartmontools/ChangeLog +++ b/smartmontools/ChangeLog @@ -1,5 +1,14 @@ $Id$ +2022-05-26 Christian Franke <franke@computer.org> + + Drop legacy ATA support for Solaris SPARC. + configure.ac: Fail if '--with-solaris-sparc-ata' is specified. + Makefile.am: Remove os_solaris_ata.s and os_solaris.h. + os_solaris.cpp: Remove WITH_SOLARIS_SPARC_ATA sections. + os_solaris_ata.s, os_solaris.h: Remove files. + INSTALL: Update documentation. + 2022-05-22 Christian Franke <franke@computer.org> drivedb.h: diff --git a/smartmontools/INSTALL b/smartmontools/INSTALL index 4b6890fdf235be274916b820ab28c24a82422b22..3e715fe8b6db7cf213737e68c23b62ae35de15bb 100644 --- a/smartmontools/INSTALL +++ b/smartmontools/INSTALL @@ -46,8 +46,7 @@ Table of contents: C) Solaris The SCSI code has been tested on a variety of Solaris 8 or later - systems. ATA/IDE code only works on SPARC platform. All tested - kernels worked correctly. + systems. All tested kernels worked correctly. D) NetBSD/OpenBSD @@ -174,7 +173,6 @@ Table of contents: --with-systemdsystemunitdir=auto --with-systemdenvfile=auto --with-nvme-devicescan (Linux, Windows: yes; Others: no) - --without-solaris-sparc-ata (Solaris SPARC only) --with-signal-func=sigaction --with-working-snprintf --with-mingw-aslr=auto (Windows only) diff --git a/smartmontools/Makefile.am b/smartmontools/Makefile.am index 4ba1cbfbe92cc276e643a637dbcba66f76dc0a49..3c964d81c40a77e613eb166a23f1b58c6f7006c0 100644 --- a/smartmontools/Makefile.am +++ b/smartmontools/Makefile.am @@ -7,9 +7,6 @@ ACLOCAL_AMFLAGS = -I m4 -# Make sure .cpp takes precedence to avoid compiling old .c file -SUFFIXES = .cpp .c .s .o - # BUILD_INFO can be provided by package maintainers (see INSTALL file) BUILD_INFO= "(local build)" @@ -107,7 +104,6 @@ EXTRA_smartctl_SOURCES = \ os_qnxnto.cpp \ os_qnxnto.h \ os_solaris.cpp \ - os_solaris.h \ os_win32.cpp \ os_generic.cpp \ os_generic.h \ @@ -179,7 +175,6 @@ EXTRA_smartd_SOURCES = \ os_qnxnto.cpp \ os_qnxnto.h \ os_solaris.cpp \ - os_solaris.h \ os_win32.cpp \ os_generic.cpp \ os_generic.h \ @@ -218,10 +213,6 @@ smartd_DEPENDENCIES += smartd_res.o endif -# Exclude from source tarball -nodist_EXTRA_smartctl_SOURCES = os_solaris_ata.s -nodist_EXTRA_smartd_SOURCES = os_solaris_ata.s - if NEED_GETOPT_LONG smartctl_SOURCES += \ diff --git a/smartmontools/configure.ac b/smartmontools/configure.ac index c5609b1ad0ae549480768a21b1f36cc540ee56d3..84da2a1063c54d2261865567641e0cbdad0e3855 100644 --- a/smartmontools/configure.ac +++ b/smartmontools/configure.ac @@ -412,22 +412,6 @@ AC_ARG_WITH(nvme-devicescan, [AS_HELP_STRING([--with-nvme-devicescan@<:@=yes|no@:>@], [Include NVMe devices in smartd DEVICESCAN [Linux,Windows:yes;Others:no]])]) -# TODO: Remove after smartmontools 7.3 -AC_ARG_WITH(solaris-sparc-ata, - [AS_HELP_STRING([--with-solaris-sparc-ata@<:@=yes|no@:>@], - [Enable legacy ATA support on Solaris SPARC (requires os_solaris_ata.s from SVN repository) [no]])]) - -case "$host:$with_solaris_sparc_ata" in - sparc-*-solaris*:yes) - if test ! -f "$srcdir/os_solaris_ata.s"; then - AC_MSG_ERROR([Missing source file: $srcdir/os_solaris_ata.s -This file is no longer included in the source tarball but still -available in the SVN repository.]) - fi - AC_DEFINE(WITH_SOLARIS_SPARC_ATA, 1, [Define to 1 to enable legacy ATA support on Solaris SPARC.]) - ;; -esac - # TODO: Remove after smartmontools 7.4 AC_ARG_WITH(signal-func, [AS_HELP_STRING([--with-signal-func=@<:@sigaction|sigset|signal@:>@], @@ -616,6 +600,14 @@ else fi AM_CONDITIONAL(NEED_REGEX, [test "$need_regex" = "yes"]) +# TODO: Remove after smartmontools 7.4 +AC_ARG_WITH(solaris-sparc-ata, + [AS_HELP_STRING([--with-solaris-sparc-ata], [(removed)])], + [AC_MSG_ERROR([ +The option '--with@<:@out@:>@-solaris-sparc-ata' is no longer supported. +If you still need legacy ATA support on Solaris SPARC, please inform +$PACKAGE_BUGREPORT.])]) + # Set platform-specific modules and symbols os_libs= os_dltools='curl wget lynx svn' @@ -647,15 +639,7 @@ case "${host}" in os_man_filter=FreeBSD os_nvme_devicescan=no ;; - sparc-*-solaris*) - os_deps='os_solaris.o' - test "$with_solaris_sparc_ata" = "yes" \ - && os_deps="$os_deps os_solaris_ata.o" - os_mailer='mailx' - os_solaris=yes - os_man_filter=Solaris - ;; - *-pc-solaris*) + *-*-solaris*) os_deps='os_solaris.o' os_mailer='mailx' os_solaris=yes @@ -1004,15 +988,6 @@ Use option '--without-nvme-devicescan' to suppress this warning. ]) ;; esac -# TODO: Remove after smartmontools 7.3 -if test -n "$with_solaris_sparc_ata"; then - AC_MSG_WARN([ -The option '--with-solaris-sparc-ata' is deprecated and will be -removed in a future version of smartmontools. If this option is -still needed, please inform $PACKAGE_BUGREPORT. -]) -fi - # TODO: Remove after smartmontools 7.4 case "$host:$with_signal_func" in *-*-mingw*:*|*:sigaction) ;; diff --git a/smartmontools/os_solaris.cpp b/smartmontools/os_solaris.cpp index abb00249a75016e82f5f255d9553fd284ab0a0d3..8aaeda7f98d672e667a36f2dddbced82839cb604 100644 --- a/smartmontools/os_solaris.cpp +++ b/smartmontools/os_solaris.cpp @@ -15,7 +15,10 @@ #include <dirent.h> #include <stdio.h> #include <unistd.h> +#include <fcntl.h> #include <sys/param.h> +#include <sys/types.h> +#include <sys/stat.h> // These are needed to define prototypes for the functions defined below #include "config.h" @@ -24,13 +27,7 @@ #include "scsicmds.h" #include "utility.h" -// This is to include whatever prototypes you define in os_solaris.h -#include "os_solaris.h" - -#define ARGUSED(x) ((void)(x)) - -const char *os_XXXX_cpp_cvsid = "$Id$" - OS_SOLARIS_H_CVSID; +const char * os_solaris_cpp_cvsid = "$Id$"; // print examples for smartctl void print_smartctl_examples(){ @@ -219,73 +216,11 @@ int deviceclose(int fd){ return close(fd); } -#if defined(WITH_SOLARIS_SPARC_ATA) -// swap each 2-byte pairs in a sector -static void swap_sector(void *p) +// Interface to ATA devices. +int ata_command_interface(int, smart_command_set, int, char *) { - int i; - char t, *cp = static_cast<char*>(p); - for(i = 0; i < 256; i++) { - t = cp[0]; cp[0] = cp[1]; cp[1] = t; - cp += 2; - } -} -#endif - -// Interface to ATA devices. See os_linux.c -int ata_command_interface(int fd, smart_command_set command, int select, char *data){ -#if defined(WITH_SOLARIS_SPARC_ATA) - int err; - - switch (command){ - case CHECK_POWER_MODE: - /* currently not recognized */ - return -1; - case READ_VALUES: - return smart_read_data(fd, data); - case READ_THRESHOLDS: - return smart_read_thresholds(fd, data); - case READ_LOG: - return smart_read_log(fd, select, 1, data); - case IDENTIFY: - err = ata_identify(fd, data); - if(err) return err; - swap_sector(static_cast<void*>(data)); - return 0; - case PIDENTIFY: - err = ata_pidentify(fd, data); - if(err) return err; - swap_sector(static_cast<void*>(data)); - return 0; - case ENABLE: - return smart_enable(fd); - case DISABLE: - return smart_disable(fd); - case STATUS: - return smart_status(fd); - case AUTO_OFFLINE: - return smart_auto_offline(fd, select); - case AUTOSAVE: - return smart_auto_save(fd, select); - case IMMEDIATE_OFFLINE: - return smart_immediate_offline(fd, select); - case STATUS_CHECK: - return smart_status_check(fd); - default: - pout("Unrecognized command %d in ata_command_interface() of os_solaris.cpp\n", command); - errno = EINVAL; - return -1; - } -#else /* WITH_SOLARIS_SPARC_ATA */ - ARGUSED(fd); ARGUSED(command); ARGUSED(select); ARGUSED(data); - - /* Above smart_* routines uses undocumented ioctls of "dada" - * driver, which is specific to SPARC Solaris. See - * os_solaris_ata.s for further details. */ - pout("Device type 'ata' not implemented, try '-d sat' or '-d sat,12' instead.\n"); errno = ENOSYS; -#endif return -1; } @@ -295,7 +230,7 @@ int ata_command_interface(int fd, smart_command_set command, int select, char *d #include <sys/scsi/impl/types.h> #include <sys/scsi/impl/uscsi.h> -// Interface to SCSI devices. See os_linux.c +// Interface to SCSI devices. int do_scsi_cmnd_io(int fd, struct scsi_cmnd_io * iop, int report) { struct uscsi_cmd uscsi; diff --git a/smartmontools/os_solaris.h b/smartmontools/os_solaris.h deleted file mode 100644 index 4afc179ca53b8b533fe2134468ab14102b477582..0000000000000000000000000000000000000000 --- a/smartmontools/os_solaris.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * os_solaris.h - * - * Home page of code is: http://www.smartmontools.org - * - * Copyright (C) 2003-8 SAWADA Keiji - * Copyright (C) 2003-8 Casper Dik - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef OS_SOLARIS_H_ -#define OS_SOLARIS_H_ - -#define OS_SOLARIS_H_CVSID "$Id$\n" - -// Additional material should start here. Note: to keep the '-V' CVS -// reporting option working as intended, you should only #include -// system include files <something.h>. Local #include files -// <"something.h"> should be #included in os_solaris.c - -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> - -// function prototypes for functions defined in os_solaris_ata.s -extern "C" { - int smart_read_data(int fd, void *data); - int smart_read_thresholds(int fd, void *data); - int smart_read_log(int fd, int s, int count, void *data); - int ata_identify(int fd, void *data); - int ata_pidentify(int fd, void *data); - int smart_enable(int fd); - int smart_disable(int fd); - int smart_status(int fd); - int smart_auto_offline(int fd, int s); - int smart_auto_save(int fd, int s); - int smart_immediate_offline(int fd, int s); - int smart_status_check(int fd); -} - -// wrapper macros -#define smart_enable_auto_save(fd) smart_auto_save(fd, 0xf1) -#define smart_disable_auto_save(fd) smart_auto_save(fd, 0x00) - -#endif /* OS_SOLARIS_H_ */ diff --git a/smartmontools/os_solaris_ata.s b/smartmontools/os_solaris_ata.s deleted file mode 100644 index f5d3f0fb94ae5d099b93c0f75e06516707c39200..0000000000000000000000000000000000000000 --- a/smartmontools/os_solaris_ata.s +++ /dev/null @@ -1,685 +0,0 @@ -! -! os_solaris_ata.s -! -! Home page of code is: http://www.smartmontools.org -! -! Copyright (C) 2003-8 SAWADA Keiji -! -! SPDX-License-Identifier: GPL-2.0-or-later -! -! -! -------------------------------------------------------- -! direct access routines to ATA device under Solaris/SPARC -! -------------------------------------------------------- -! -! Information -! ----------- -! -! In Solaris, programmer can pass SCSI command to target device directly -! by using USCSI ioctl or using "scg" generic SCSI driver. But, such -! method does not exist for ATA devices. -! -! However, I can access Solaris kernel source because I am subscriber of -! Source Foundation Program of Solaris. So, I can find method of -! accessing ATA device directly. The method is to pack command in -! undocumented structure and issue ioctl that appears only in kernel -! source. Yes, that is the same way in using USCSI interface. -! -! But, I met difficulty in disclosing this technique. I have signed NDA -! with Sun that inhibits me not to violate their intellectual property. -! -! Fortunately, Sun allows licensees to publish "Interfaces" if: -! -! (1) he/she treats Solaris code as confidential -! -! (2) and he/she doesn't incorporate Sun's code into his/her code -! -! (3) and disclose enough information to use "Interface" to everyone. -! -! So, I publish that technique in assembly code or object code because: -! -! (1) I believe Sun's intellectural property is not invaded because I -! didn't reveal any struct member and ioctl to non-licensee. -! -! (2) no piece of kernel source is included in this code. -! -! (3) And finally, I publish enough information below in order to use -! this code. -! -! For last reason, please don't remove "Calling Interface" section from -! distribution. -! -! -! Calling Interface -! ----------------- -! -! Name of function/macro presents corresponding S.M.A.R.T. command. -! -! Parameters are described below. -! -! int fd -! -! File descriptor of ATA device. Device would be -! /dev/rdsk/cXtXdXsX. -! -! Device should be raw device serviced by "dada" driver. ATAPI -! CD-ROM/R/RW, DVD-ROM, and so on are not allowed because they are -! serviced by "sd" driver. On x86 Solaris, "cmdk" driver services -! them, this routines doesn't work. -! -! int s -! Select sector for service. For example, this indicates log sector -! number for smart_read_log() function. Probably you need to read -! ATA specification for this parameter. -! -! void *data -! Data going to be read/written. It don't have to be word aligned, -! But data shall points valid user memory space. -! -! This is very tiny routines, but if you feel this insufficient, please -! let me know. -! -! ksw / SAWADA Keiji -! <card_captor@users.sourceforge.net> - .file "solaris-ata-in.c" - .section ".rodata" - .align 8 -.LLC0: - .asciz "$Id$" - .global os_solaris_ata_s_cvsid - .section ".data" - .align 4 - .type os_solaris_ata_s_cvsid, #object - .size os_solaris_ata_s_cvsid, 4 -os_solaris_ata_s_cvsid: - .long .LLC0 - .section ".text" - .align 4 - .type ata_cmd, #function - .proc 04 -ata_cmd: - !#PROLOGUE# 0 - save %sp, -184, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - st %i2, [%fp+76] - st %i3, [%fp+80] - st %i4, [%fp+84] - st %i5, [%fp+88] - ld [%fp+92], %g1 - st %g1, [%fp-76] - ld [%fp-76], %g1 - and %g1, 3, %g1 - cmp %g1, 0 - be .LL2 - nop - mov -2, %g1 - st %g1, [%fp-80] - b .LL1 - nop -.LL2: - add %fp, -56, %g1 - mov %g1, %o0 - mov 0, %o1 - mov 36, %o2 - call memset, 0 - nop - add %fp, -72, %g1 - mov %g1, %o0 - mov 0, %o1 - mov 16, %o2 - call memset, 0 - nop - ld [%fp+72], %g1 - stb %g1, [%fp-72] - mov 1, %g1 - stb %g1, [%fp-71] - mov 1, %g1 - stb %g1, [%fp-70] - ld [%fp+76], %g1 - stb %g1, [%fp-69] - ld [%fp+84], %g1 - sll %g1, 9, %g1 - st %g1, [%fp-68] - ld [%fp+80], %g1 - st %g1, [%fp-60] - mov 10, %g1 - sth %g1, [%fp-52] - ld [%fp+88], %g1 - cmp %g1, 0 - be .LL3 - nop - mov 14, %g1 - st %g1, [%fp-84] - b .LL4 - nop -.LL3: - mov 6, %g1 - st %g1, [%fp-84] -.LL4: - ld [%fp-84], %g1 - st %g1, [%fp-48] - ld [%fp+88], %g1 - sll %g1, 9, %g1 - st %g1, [%fp-44] - ld [%fp+88], %g1 - sll %g1, 9, %g1 - st %g1, [%fp-40] - ld [%fp+88], %g1 - cmp %g1, 0 - be .LL5 - nop - ld [%fp+92], %g1 - st %g1, [%fp-88] - b .LL6 - nop -.LL5: - st %g0, [%fp-88] -.LL6: - ld [%fp-88], %g1 - st %g1, [%fp-36] - add %fp, -72, %g1 - st %g1, [%fp-32] - add %fp, -56, %g1 - ld [%fp+68], %o0 - mov 1481, %o1 - mov %g1, %o2 - call ioctl, 0 - nop - mov %o0, %g1 - st %g1, [%fp-80] -.LL1: - ld [%fp-80], %i0 - ret - restore - .size ata_cmd, .-ata_cmd - .align 4 - .global ata_identify - .type ata_identify, #function - .proc 04 -ata_identify: - !#PROLOGUE# 0 - save %sp, -648, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - add %fp, -536, %g1 - st %g1, [%sp+92] - ld [%fp+68], %o0 - mov 236, %o1 - mov 0, %o2 - mov 0, %o3 - mov 1, %o4 - mov 1, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - add %fp, -536, %g1 - ld [%fp+72], %o0 - mov %g1, %o1 - mov 512, %o2 - call memcpy, 0 - nop - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL8 - nop - mov -1, %g1 - st %g1, [%fp-540] - b .LL9 - nop -.LL8: - st %g0, [%fp-540] -.LL9: - ld [%fp-540], %g1 - mov %g1, %i0 - ret - restore - .size ata_identify, .-ata_identify - .align 4 - .global ata_pidentify - .type ata_pidentify, #function - .proc 04 -ata_pidentify: - !#PROLOGUE# 0 - save %sp, -648, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - add %fp, -536, %g1 - st %g1, [%sp+92] - ld [%fp+68], %o0 - mov 161, %o1 - mov 0, %o2 - mov 0, %o3 - mov 1, %o4 - mov 1, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - add %fp, -536, %g1 - ld [%fp+72], %o0 - mov %g1, %o1 - mov 512, %o2 - call memcpy, 0 - nop - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL11 - nop - mov -1, %g1 - st %g1, [%fp-540] - b .LL12 - nop -.LL11: - st %g0, [%fp-540] -.LL12: - ld [%fp-540], %g1 - mov %g1, %i0 - ret - restore - .size ata_pidentify, .-ata_pidentify - .align 4 - .global smart_read_data - .type smart_read_data, #function - .proc 04 -smart_read_data: - !#PROLOGUE# 0 - save %sp, -648, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - add %fp, -536, %g1 - st %g1, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 208, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - mov 0, %o4 - mov 1, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - add %fp, -536, %g1 - ld [%fp+72], %o0 - mov %g1, %o1 - mov 512, %o2 - call memcpy, 0 - nop - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL14 - nop - mov -1, %g1 - st %g1, [%fp-540] - b .LL15 - nop -.LL14: - st %g0, [%fp-540] -.LL15: - ld [%fp-540], %g1 - mov %g1, %i0 - ret - restore - .size smart_read_data, .-smart_read_data - .align 4 - .global smart_read_thresholds - .type smart_read_thresholds, #function - .proc 04 -smart_read_thresholds: - !#PROLOGUE# 0 - save %sp, -648, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - add %fp, -536, %g1 - st %g1, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 209, %o2 - sethi %hi(12733440), %g1 - or %g1, 769, %o3 - mov 1, %o4 - mov 1, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - add %fp, -536, %g1 - ld [%fp+72], %o0 - mov %g1, %o1 - mov 512, %o2 - call memcpy, 0 - nop - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL17 - nop - mov -1, %g1 - st %g1, [%fp-540] - b .LL18 - nop -.LL17: - st %g0, [%fp-540] -.LL18: - ld [%fp-540], %g1 - mov %g1, %i0 - ret - restore - .size smart_read_thresholds, .-smart_read_thresholds - .align 4 - .global smart_auto_save - .type smart_auto_save, #function - .proc 04 -smart_auto_save: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 210, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - ld [%fp+72], %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL20 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL21 - nop -.LL20: - st %g0, [%fp-24] -.LL21: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_auto_save, .-smart_auto_save - .align 4 - .global smart_immediate_offline - .type smart_immediate_offline, #function - .proc 04 -smart_immediate_offline: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - ld [%fp+72], %g1 - and %g1, 255, %o5 - sethi %hi(12733440), %g1 - or %g1, 768, %g1 - or %o5, %g1, %g1 - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 212, %o2 - mov %g1, %o3 - mov 0, %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL23 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL24 - nop -.LL23: - st %g0, [%fp-24] -.LL24: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_immediate_offline, .-smart_immediate_offline - .align 4 - .global smart_read_log - .type smart_read_log, #function - .proc 04 -smart_read_log: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - st %i2, [%fp+76] - st %i3, [%fp+80] - ld [%fp+72], %g1 - and %g1, 255, %o5 - sethi %hi(12733440), %g1 - or %g1, 768, %g1 - or %o5, %g1, %o5 - ld [%fp+80], %g1 - st %g1, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 213, %o2 - mov %o5, %o3 - ld [%fp+76], %o4 - ld [%fp+76], %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL26 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL27 - nop -.LL26: - st %g0, [%fp-24] -.LL27: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_read_log, .-smart_read_log - .align 4 - .global smart_enable - .type smart_enable, #function - .proc 04 -smart_enable: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 216, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - mov 0, %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL29 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL30 - nop -.LL29: - st %g0, [%fp-24] -.LL30: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_enable, .-smart_enable - .align 4 - .global smart_disable - .type smart_disable, #function - .proc 04 -smart_disable: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 217, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - mov 0, %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL32 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL33 - nop -.LL32: - st %g0, [%fp-24] -.LL33: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_disable, .-smart_disable - .align 4 - .global smart_status - .type smart_status, #function - .proc 04 -smart_status: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 218, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - mov 0, %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL35 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL36 - nop -.LL35: - st %g0, [%fp-24] -.LL36: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_status, .-smart_status - .align 4 - .global smart_status_check - .type smart_status_check, #function - .proc 04 -smart_status_check: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 218, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - mov 0, %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL38 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL37 - nop -.LL38: - st %g0, [%fp-24] -.LL37: - ld [%fp-24], %i0 - ret - restore - .size smart_status_check, .-smart_status_check - .align 4 - .global smart_auto_offline - .type smart_auto_offline, #function - .proc 04 -smart_auto_offline: - !#PROLOGUE# 0 - save %sp, -128, %sp - !#PROLOGUE# 1 - st %i0, [%fp+68] - st %i1, [%fp+72] - st %g0, [%sp+92] - ld [%fp+68], %o0 - mov 176, %o1 - mov 219, %o2 - sethi %hi(12733440), %g1 - or %g1, 768, %o3 - ld [%fp+72], %o4 - mov 0, %o5 - call ata_cmd, 0 - nop - mov %o0, %g1 - st %g1, [%fp-20] - ld [%fp-20], %g1 - cmp %g1, 0 - be .LL40 - nop - mov -1, %g1 - st %g1, [%fp-24] - b .LL41 - nop -.LL40: - st %g0, [%fp-24] -.LL41: - ld [%fp-24], %g1 - mov %g1, %i0 - ret - restore - .size smart_auto_offline, .-smart_auto_offline - .ident "GCC: (GNU) 3.4.2"