Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e10117d3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (26 commits)
  include/linux/libata.h: fix typo
  pata_bf54x: fix return type of bfin_set_devctl
  Drivers: ata: Makefile: replace the use of <module>-objs with <module>-y
  libahci: fix result_tf handling after an ATA PIO data-in command
  pata_sl82c105: implement sff_irq_check() method
  pata_sil680: implement sff_irq_check() method
  pata_pdc202xx_old: implement sff_irq_check() method
  pata_cmd640: implement sff_irq_check() method
  ata_piix: Add device ID for ICH4-L
  pata_sil680: make sil680_sff_exec_command() 'static'
  ata: Intel IDE-R support
  libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds
  libata: Signal that our SATL supports WRITE SAME(16) with UNMAP
  ata_piix: remove SIDPR locking
  libata: implement cross-port EH exclusion
  libata: add @ap to ata_wait_register() and introduce ata_msleep()
  ata_piix: implement LPM support
  libata: implement LPM support for port multipliers
  libata: reimplement link power management
  libata: implement sata_link_scr_lpm() and make ata_dev_set_feature() global
  ...
parents f3270b16 89692c03
Loading
Loading
Loading
Loading
+99 −0
Original line number Original line Diff line number Diff line
What:		/sys/class/ata_...
Date:		August 2008
Contact:	Gwendal Grignou<gwendal@google.com>
Description:

Provide a place in sysfs for storing the ATA topology of the system.  This allows
retrieving various information about ATA objects.

Files under /sys/class/ata_port
-------------------------------

	For each port, a directory ataX is created where X is the ata_port_id of
	the port. The device parent is the ata host device.

idle_irq (read)

	Number of IRQ received by the port while idle [some ata HBA only].

nr_pmp_links (read)

	If a SATA Port Multiplier (PM) is connected, number of link behind it.

Files under /sys/class/ata_link
-------------------------------

	Behind each port, there is a ata_link. If there is a SATA PM in the
	topology, 15 ata_link objects are created.

	If a link is behind a port, the directory name is linkX, where X is
	ata_port_id of the port.
	If a link is behind a PM, its name is linkX.Y where X is ata_port_id
	of the parent port and Y the PM port.

hw_sata_spd_limit

	Maximum speed supported by the connected SATA device.

sata_spd_limit

	Maximum speed imposed by libata.

sata_spd

	Current speed of the link [1.5, 3Gps,...].

Files under /sys/class/ata_device
---------------------------------

	Behind each link, up to two ata device are created.
	The name of the directory is devX[.Y].Z where:
	- X is ata_port_id of the port where the device is connected,
	- Y the port of the PM if any, and
	- Z the device id: for PATA, there is usually 2 devices [0,1],
	only 1 for SATA.

class
	Device class. Can be "ata" for disk, "atapi" for packet device,
	"pmp" for PM, or "none" if no device was found behind the link.

dma_mode

	Transfer modes supported by the device when in DMA mode.
	Mostly used by PATA device.

pio_mode

	Transfer modes supported by the device when in PIO mode.
	Mostly used by PATA device.

xfer_mode

	Current transfer mode.

id

	Cached result of IDENTIFY command, as described in ATA8 7.16 and 7.17.
	Only valid if the device is not a PM.

gscr

	Cached result of the dump of PM GSCR register.
	Valid registers are:
	0: 	SATA_PMP_GSCR_PROD_ID,
	1: 	SATA_PMP_GSCR_REV,
	2: 	SATA_PMP_GSCR_PORT_INFO,
	32:	SATA_PMP_GSCR_ERROR,
	33:	SATA_PMP_GSCR_ERROR_EN,
	64:	SATA_PMP_GSCR_FEAT,
	96:	SATA_PMP_GSCR_FEAT_EN,
	130:	SATA_PMP_GSCR_SII_GPIO
	Only valid if the device is a PM.

spdn_cnt

	Number of time libata decided to lower the speed of link due to errors.

ering

	Formatted output of the error ring of the device.
+1 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
# Should be last libata driver
# Should be last libata driver
obj-$(CONFIG_PATA_LEGACY)	+= pata_legacy.o
obj-$(CONFIG_PATA_LEGACY)	+= pata_legacy.o


libata-objs	:= libata-core.o libata-scsi.o libata-eh.o
libata-y	:= libata-core.o libata-scsi.o libata-eh.o libata-transport.o
libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
+0 −3
Original line number Original line Diff line number Diff line
@@ -1208,9 +1208,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
		ata_port_pbar_desc(ap, AHCI_PCI_BAR,
		ata_port_pbar_desc(ap, AHCI_PCI_BAR,
				   0x100 + ap->port_no * 0x80, "port");
				   0x100 + ap->port_no * 0x80, "port");


		/* set initial link pm policy */
		ap->pm_policy = NOT_AVAILABLE;

		/* set enclosure management message type */
		/* set enclosure management message type */
		if (ap->flags & ATA_FLAG_EM)
		if (ap->flags & ATA_FLAG_EM)
			ap->em_message_type = hpriv->em_msg_type;
			ap->em_message_type = hpriv->em_msg_type;
+2 −2
Original line number Original line Diff line number Diff line
@@ -72,6 +72,7 @@ enum {
	AHCI_CMD_RESET		= (1 << 8),
	AHCI_CMD_RESET		= (1 << 8),
	AHCI_CMD_CLR_BUSY	= (1 << 10),
	AHCI_CMD_CLR_BUSY	= (1 << 10),


	RX_FIS_PIO_SETUP	= 0x20,	/* offset of PIO Setup FIS data */
	RX_FIS_D2H_REG		= 0x40,	/* offset of D2H Register FIS data */
	RX_FIS_D2H_REG		= 0x40,	/* offset of D2H Register FIS data */
	RX_FIS_SDB		= 0x58, /* offset of SDB FIS data */
	RX_FIS_SDB		= 0x58, /* offset of SDB FIS data */
	RX_FIS_UNK		= 0x60, /* offset of Unknown FIS data */
	RX_FIS_UNK		= 0x60, /* offset of Unknown FIS data */
@@ -201,7 +202,6 @@ enum {
	AHCI_HFLAG_MV_PATA		= (1 << 4), /* PATA port */
	AHCI_HFLAG_MV_PATA		= (1 << 4), /* PATA port */
	AHCI_HFLAG_NO_MSI		= (1 << 5), /* no PCI MSI */
	AHCI_HFLAG_NO_MSI		= (1 << 5), /* no PCI MSI */
	AHCI_HFLAG_NO_PMP		= (1 << 6), /* no PMP */
	AHCI_HFLAG_NO_PMP		= (1 << 6), /* no PMP */
	AHCI_HFLAG_NO_HOTPLUG		= (1 << 7), /* ignore PxSERR.DIAG.N */
	AHCI_HFLAG_SECT255		= (1 << 8), /* max 255 sectors */
	AHCI_HFLAG_SECT255		= (1 << 8), /* max 255 sectors */
	AHCI_HFLAG_YES_NCQ		= (1 << 9), /* force NCQ cap on */
	AHCI_HFLAG_YES_NCQ		= (1 << 9), /* force NCQ cap on */
	AHCI_HFLAG_NO_SUSPEND		= (1 << 10), /* don't suspend */
	AHCI_HFLAG_NO_SUSPEND		= (1 << 10), /* don't suspend */
@@ -216,7 +216,7 @@ enum {
	AHCI_FLAG_COMMON		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
	AHCI_FLAG_COMMON		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
					  ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
					  ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
					  ATA_FLAG_ACPI_SATA | ATA_FLAG_AN |
					  ATA_FLAG_ACPI_SATA | ATA_FLAG_AN |
					  ATA_FLAG_IPM,
					  ATA_FLAG_LPM,


	ICH_MAP				= 0x90, /* ICH MAP register */
	ICH_MAP				= 0x90, /* ICH MAP register */


+0 −3
Original line number Original line Diff line number Diff line
@@ -129,9 +129,6 @@ static int __init ahci_probe(struct platform_device *pdev)
		ata_port_desc(ap, "mmio %pR", mem);
		ata_port_desc(ap, "mmio %pR", mem);
		ata_port_desc(ap, "port 0x%x", 0x100 + ap->port_no * 0x80);
		ata_port_desc(ap, "port 0x%x", 0x100 + ap->port_no * 0x80);


		/* set initial link pm policy */
		ap->pm_policy = NOT_AVAILABLE;

		/* set enclosure management message type */
		/* set enclosure management message type */
		if (ap->flags & ATA_FLAG_EM)
		if (ap->flags & ATA_FLAG_EM)
			ap->em_message_type = hpriv->em_msg_type;
			ap->em_message_type = hpriv->em_msg_type;
Loading