---
name: "sata_link_hardreset"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/sata_link_hardreset"
---

# sata\_link\_hardreset(9)

reset link via SATA phy reset

## NAME

sata\_link\_hardreset - reset link via SATA phy reset

## SYNOPSIS

**int sata\_link\_hardreset(struct ata\_link \*** *link***, const unsigned long \*** *timing***, unsigned long** *deadline***, bool \*** *online***, int (\****check\_ready***) (struct ata\_link \*));**

## ARGUMENTS

*link*

link to reset

*timing*

timing parameters { interval, duration, timeout } in msec

*deadline*

deadline jiffies for the operation

*online*

optional out parameter indicating link onlineness

*check\_ready*

optional callback to check link readiness

## DESCRIPTION

SATA phy-reset *link* using DET bits of SControl register. After hardreset, link readiness is waited upon using **ata\_wait\_ready** if *check\_ready* is specified. LLDs are allowed to not specify *check\_ready* and wait itself after this function returns. Device classification is LLD's responsibility.

\**online* is set to one iff reset succeeded and *link* is online after reset.

LOCKING: Kernel thread context (may sleep)

## RETURN

0 on success, -errno otherwise.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
