/* Write @val to SCR register @reg of  This function is guaranteed to succeed if  */
int sata_scr_write(struct ata_link *link, int reg, u32 val)
/* Write @val to SCR register @reg of  This function is guaranteed to succeed if  */
int sata_scr_write(struct ata_link *link, int reg, u32 val)
{
	if (ata_is_host_link(link)) {
		if (sata_scr_valid(link))
			return link->ap->ops->scr_write(link, reg, val);
		return -EOPNOTSUPP;
	}
	return sata_pmp_scr_write(link, reg, val);
}