at master 1.5 kB view raw
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Support for SATA devices on Serial Attached SCSI (SAS) controllers 4 * 5 * Copyright (C) 2006 IBM Corporation 6 * 7 * Written by: Darrick J. Wong <djwong@us.ibm.com>, IBM Corporation 8 */ 9 10#ifndef _SAS_ATA_H_ 11#define _SAS_ATA_H_ 12 13#include <linux/libata.h> 14#include <scsi/libsas.h> 15 16#ifdef CONFIG_SCSI_SAS_ATA 17 18static inline bool dev_is_sata(struct domain_device *dev) 19{ 20 switch (dev->dev_type) { 21 case SAS_SATA_DEV: 22 case SAS_SATA_PENDING: 23 case SAS_SATA_PM: 24 case SAS_SATA_PM_PORT: 25 return true; 26 default: 27 return false; 28 } 29} 30 31void sas_ata_schedule_reset(struct domain_device *dev); 32void sas_ata_device_link_abort(struct domain_device *dev, bool force_reset); 33int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, int force_phy_id); 34int smp_ata_check_ready_type(struct ata_link *link); 35 36extern const struct attribute_group sas_ata_sdev_attr_group; 37 38#else 39 40static inline bool dev_is_sata(struct domain_device *dev) 41{ 42 return false; 43} 44 45static inline void sas_ata_schedule_reset(struct domain_device *dev) 46{ 47} 48 49static inline void sas_ata_device_link_abort(struct domain_device *dev, 50 bool force_reset) 51{ 52} 53 54static inline int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, 55 int force_phy_id) 56{ 57 return 0; 58} 59 60static inline int smp_ata_check_ready_type(struct ata_link *link) 61{ 62 return 0; 63} 64 65#define sas_ata_sdev_attr_group ((struct attribute_group) {}) 66 67#endif 68 69#endif /* _SAS_ATA_H_ */