Blame src/ahci.h

Packit Service db8df9
/*
Packit Service db8df9
 * Intel(R) Enclosure LED Utilities
Packit Service db8df9
 * Copyright (C) 2009-2017 Intel Corporation.
Packit Service db8df9
 *
Packit Service db8df9
 * This program is free software; you can redistribute it and/or modify it
Packit Service db8df9
 * under the terms and conditions of the GNU General Public License,
Packit Service db8df9
 * version 2, as published by the Free Software Foundation.
Packit Service db8df9
 *
Packit Service db8df9
 * This program is distributed in the hope it will be useful, but WITHOUT
Packit Service db8df9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Packit Service db8df9
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
Packit Service db8df9
 * more details.
Packit Service db8df9
 *
Packit Service db8df9
 * You should have received a copy of the GNU General Public License along with
Packit Service db8df9
 * this program; if not, write to the Free Software Foundation, Inc.,
Packit Service db8df9
 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
Packit Service db8df9
 *
Packit Service db8df9
 */
Packit Service db8df9
Packit Service db8df9
#ifndef _AHCI_H_INCLUDED_
Packit Service db8df9
#define _AHCI_H_INCLUDED_
Packit Service db8df9
Packit Service db8df9
#include "block.h"
Packit Service db8df9
#include "ibpi.h"
Packit Service db8df9
Packit Service db8df9
/**
Packit Service db8df9
 * @brief Gets sysfs path to SATA port.
Packit Service db8df9
 *
Packit Service db8df9
 * The function returns a path to SATA port in sysfs tree the given block device
Packit Service db8df9
 * is connected to.
Packit Service db8df9
 *
Packit Service db8df9
 * @param[in]      path           Path to block device in sysfs tree.
Packit Service db8df9
 *
Packit Service db8df9
 * @return Canonical path if successful, otherwise NULL pointer if an error occurred.
Packit Service db8df9
 */
Packit Service db8df9
char *ahci_get_port_path(const char *path);
Packit Service db8df9
Packit Service db8df9
/**
Packit Service db8df9
 * @brief Sends LED control message using SGPIO.
Packit Service db8df9
 *
Packit Service db8df9
 * This function visualizes IBPI pattern on LEDs associated with a slot in
Packit Service db8df9
 * drive bay. This function is designed to send messaged to AHCI controller
Packit Service db8df9
 * only.
Packit Service db8df9
 *
Packit Service db8df9
 * @param[in]      path           Path in sysfs tree to slot in drive bay.
Packit Service db8df9
 * @param[in]      ibpi           IBPI pattern to visualize on LEDs associated
Packit Service db8df9
 *                                with the given slot.
Packit Service db8df9
 *
Packit Service db8df9
 * @return Number of bytes send to controller, -1 means error occurred and
Packit Service db8df9
 *         errno has additional error information.
Packit Service db8df9
 */
Packit Service db8df9
int ahci_sgpio_write(struct block_device *path, enum ibpi_pattern ibpi);
Packit Service db8df9
Packit Service db8df9
#endif				/* _AHCI_H_INCLUDED_ */