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

struct ata_link * link

link to reset

const unsigned long * timing

timing parameters { interval, duration, timeout } in msec

unsigned long deadline

deadline jiffies for the operation

bool * online

optional out parameter indicating link onlineness

int (*)(struct ata_link *) 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.