Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
libata-pmp.c File Reference
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/libata.h>
#include <linux/slab.h>
#include "libata.h"
#include "libata-transport.h"

Go to the source code of this file.

Macros

#define PMP_GSCR_SII_POL   129
 

Functions

int sata_pmp_qc_defer_cmd_switch (struct ata_queued_cmd *qc)
 
int sata_pmp_scr_read (struct ata_link *link, int reg, u32 *r_val)
 
int sata_pmp_scr_write (struct ata_link *link, int reg, u32 val)
 
int sata_pmp_set_lpm (struct ata_link *link, enum ata_lpm_policy policy, unsigned hints)
 
int sata_pmp_attach (struct ata_device *dev)
 
void sata_pmp_error_handler (struct ata_port *ap)
 
 EXPORT_SYMBOL_GPL (sata_pmp_port_ops)
 
 EXPORT_SYMBOL_GPL (sata_pmp_qc_defer_cmd_switch)
 
 EXPORT_SYMBOL_GPL (sata_pmp_error_handler)
 

Variables

struct ata_port_operations sata_pmp_port_ops
 

Macro Definition Documentation

#define PMP_GSCR_SII_POL   129

Definition at line 257 of file libata-pmp.c.

Function Documentation

EXPORT_SYMBOL_GPL ( sata_pmp_port_ops  )
EXPORT_SYMBOL_GPL ( sata_pmp_qc_defer_cmd_switch  )
EXPORT_SYMBOL_GPL ( sata_pmp_error_handler  )
int sata_pmp_attach ( struct ata_device dev)

sata_pmp_attach - attach a SATA PMP device : SATA PMP device to attach

Configure and attach SATA PMP device . This function is also responsible for allocating and initializing PMP links.

LOCKING: Kernel thread context (may sleep).

RETURNS: 0 on success, -errno on failure.

Definition at line 475 of file libata-pmp.c.

void sata_pmp_error_handler ( struct ata_port ap)

sata_pmp_error_handler - do standard error handling for PMP-enabled host : host port to handle error for

Perform standard error handling sequence for PMP-enabled host .

LOCKING: Kernel thread context (may sleep).

Definition at line 1092 of file libata-pmp.c.

int sata_pmp_qc_defer_cmd_switch ( struct ata_queued_cmd qc)

sata_pmp_qc_defer_cmd_switch - qc_defer for command switching PMP : ATA command in question

A host which has command switching PMP support cannot issue commands to multiple links simultaneously.

LOCKING: spin_lock_irqsave(host lock)

RETURNS: ATA_DEFER_* if deferring is needed, 0 otherwise.

Definition at line 110 of file libata-pmp.c.

int sata_pmp_scr_read ( struct ata_link link,
int  reg,
u32 r_val 
)

sata_pmp_scr_read - read PSCR ATA link to read PSCR for : PSCR to read : resulting value

Read PSCR into for to be called from ata_scr_read().

LOCKING: Kernel thread context (may sleep).

RETURNS: 0 on success, -errno on failure.

Definition at line 142 of file libata-pmp.c.

int sata_pmp_scr_write ( struct ata_link link,
int  reg,
u32  val 
)

sata_pmp_scr_write - write PSCR ATA link to write PSCR for : PSCR to write : value to be written

Write to PSCR for to be called from ata_scr_write() and ata_scr_write_flush().

LOCKING: Kernel thread context (may sleep).

RETURNS: 0 on success, -errno on failure.

Definition at line 173 of file libata-pmp.c.

int sata_pmp_set_lpm ( struct ata_link link,
enum ata_lpm_policy  policy,
unsigned  hints 
)

sata_pmp_set_lpm - configure LPM for a PMP link PMP link to configure LPM for : target LPM policy : LPM hints

Configure LPM for This function will contain any PMP specific workarounds if necessary.

LOCKING: EH context.

RETURNS: 0 on success, -errno on failure.

Definition at line 204 of file libata-pmp.c.

Variable Documentation

struct ata_port_operations sata_pmp_port_ops
Initial value:
= {
.inherits = &sata_port_ops,
.pmp_prereset = ata_std_prereset,
.pmp_hardreset = sata_std_hardreset,
.pmp_postreset = ata_std_postreset,
.error_handler = sata_pmp_error_handler,
}

Definition at line 17 of file libata-pmp.c.