2019-05-27 08:55:05 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2006-10-18 14:43:37 -07:00
|
|
|
/*
|
|
|
|
|
* Support for SATA devices on Serial Attached SCSI (SAS) controllers
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2006 IBM Corporation
|
|
|
|
|
*
|
|
|
|
|
* Written by: Darrick J. Wong <djwong@us.ibm.com>, IBM Corporation
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _SAS_ATA_H_
|
|
|
|
|
#define _SAS_ATA_H_
|
|
|
|
|
|
|
|
|
|
#include <linux/libata.h>
|
|
|
|
|
#include <scsi/libsas.h>
|
|
|
|
|
|
2007-07-22 13:15:55 -05:00
|
|
|
#ifdef CONFIG_SCSI_SAS_ATA
|
|
|
|
|
|
2025-07-25 10:58:14 +09:00
|
|
|
static inline bool dev_is_sata(struct domain_device *dev)
|
2006-10-18 14:43:37 -07:00
|
|
|
{
|
2025-07-25 10:58:14 +09:00
|
|
|
switch (dev->dev_type) {
|
|
|
|
|
case SAS_SATA_DEV:
|
|
|
|
|
case SAS_SATA_PENDING:
|
|
|
|
|
case SAS_SATA_PM:
|
|
|
|
|
case SAS_SATA_PM_PORT:
|
|
|
|
|
return true;
|
|
|
|
|
default:
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2006-10-18 14:43:37 -07:00
|
|
|
}
|
|
|
|
|
|
2011-11-30 23:23:33 -08:00
|
|
|
void sas_ata_schedule_reset(struct domain_device *dev);
|
2022-10-17 17:20:28 +08:00
|
|
|
void sas_ata_device_link_abort(struct domain_device *dev, bool force_reset);
|
2025-07-25 10:58:17 +09:00
|
|
|
int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, int force_phy_id);
|
2022-11-18 16:37:12 +08:00
|
|
|
int smp_ata_check_ready_type(struct ata_link *link);
|
2024-03-07 13:44:13 -08:00
|
|
|
|
|
|
|
|
extern const struct attribute_group sas_ata_sdev_attr_group;
|
|
|
|
|
|
2007-07-22 13:15:55 -05:00
|
|
|
#else
|
|
|
|
|
|
2025-07-25 10:58:14 +09:00
|
|
|
static inline bool dev_is_sata(struct domain_device *dev)
|
2007-07-22 13:15:55 -05:00
|
|
|
{
|
2025-07-25 10:58:14 +09:00
|
|
|
return false;
|
2007-07-22 13:15:55 -05:00
|
|
|
}
|
2011-01-23 09:44:12 -06:00
|
|
|
|
2011-11-30 23:23:33 -08:00
|
|
|
static inline void sas_ata_schedule_reset(struct domain_device *dev)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 17:20:28 +08:00
|
|
|
static inline void sas_ata_device_link_abort(struct domain_device *dev,
|
|
|
|
|
bool force_reset)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-22 20:50:59 +08:00
|
|
|
static inline int sas_execute_ata_cmd(struct domain_device *device, u8 *fis,
|
|
|
|
|
int force_phy_id)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2022-05-12 19:15:32 +08:00
|
|
|
|
2022-11-18 16:37:12 +08:00
|
|
|
static inline int smp_ata_check_ready_type(struct ata_link *link)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2022-12-14 21:38:05 +08:00
|
|
|
|
2024-03-07 13:44:13 -08:00
|
|
|
#define sas_ata_sdev_attr_group ((struct attribute_group) {})
|
|
|
|
|
|
2007-07-22 13:15:55 -05:00
|
|
|
#endif
|
|
|
|
|
|
2006-10-18 14:43:37 -07:00
|
|
|
#endif /* _SAS_ATA_H_ */
|