Skip to contentSkip to conversation

libata updates

PATCH New Jeff Garzik 1 participant 1 message Apr 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata updates

Notables:

- sata_mv fixes

- add definitions for TRIM infrastructure to linux/ata.h (part of "discard" support, for more SSD/flash-friendly operation)

- block/blk-settings.c: code comment speling fix from Alan

- other misc fixes

Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 block/blk-settings.c         |    2 +-
 drivers/ata/ahci.c           |   17 ++-
 drivers/ata/ata_piix.c       |    7 +
 drivers/ata/pata_octeon_cf.c |    6 +-
 drivers/ata/sata_mv.c        |  487 ++++++++++++++++++++++++------------------
 include/linux/ata.h          |   41 ++++
 6 files changed, 344 insertions(+), 216 deletions(-)

Alan Cox (1):
pata_artop: typo

David Daney (1):
libata: Remove some redundant casts from pata_octeon_cf.c

David Milburn (1):
libata: ahci enclosure management bios workaround

Mark Lord (8):
sata_mv: revert SoC irq breakage
sata_mv: fix irq mask races
sata_mv: replace 0x1f with ATA_PIO4 (v2)
sata_mv: workaround errata PCI#7
sata_mv: workaround errata SATA#26
sata_mv: cosmetic renames
sata_mv: workaround errata SATA#13
sata_mv: shorten register names

Matthew Wilcox (1):
ata: Add TRIM infrastructure

Tejun Heo (1):
ata_piix: VGN-BX297XP wants the controller power up on suspend

block/blk-settings.c +1 -1
index 59fd05d..69c42ad 100644
@@ -431,7 +431,7 @@ EXPORT_SYMBOL(blk_queue_segment_boundary);
  *
  * description:
  *    set required memory and length alignment for direct dma transactions.
- *    this is used when buiding direct io requests for the queue.
+ *    this is used when building direct io requests for the queue.
  *
  **/
 void blk_queue_dma_alignment(struct request_queue *q, int mask)
drivers/ata/ahci.c +15 -2
index 788bba2..6ca4bc0 100644
@@ -78,6 +78,7 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
 static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
 					ssize_t size);
 #define MAX_SLOTS 8
+#define MAX_RETRY 15
 
 enum {
 	AHCI_PCI_BAR		= 5,
@@ -1115,6 +1116,8 @@ static void ahci_start_port(struct ata_port *ap)
 	struct ahci_port_priv *pp = ap->private_data;
 	struct ata_link *link;
 	struct ahci_em_priv *emp;
+	ssize_t rc;
+	int i;
 
 	/* enable FIS reception */
 	ahci_start_fis_rx(ap);
@@ -1126,7 +1129,17 @@ static void ahci_start_port(struct ata_port *ap)
 	if (ap->flags & ATA_FLAG_EM) {
 		ata_for_each_link(link, ap, EDGE) {
 			emp = &pp->em_priv[link->pmp];
-			ahci_transmit_led_message(ap, emp->led_state, 4);
+
+			/* EM Transmit bit maybe busy during init */
+			for (i = 0; i < MAX_RETRY; i++) {
+				rc = ahci_transmit_led_message(ap,
+							       emp->led_state,
+							       4);
+				if (rc == -EBUSY)
+					udelay(100);
+				else
+					break;
+			}
 		}
 	}
 
@@ -1331,7 +1344,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,
 	em_ctl = readl(mmio + HOST_EM_CTL);
 	if (em_ctl & EM_CTL_TM) {
 		spin_unlock_irqrestore(ap->lock, flags);
-		return -EINVAL;
+		return -EBUSY;
 	}
 
 	/*
drivers/ata/ata_piix.c +7 -0
index e5cbe80..942d14a 100644
@@ -1053,6 +1053,13 @@ static int piix_broken_suspend(void)
 				DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
 			},
 		},
+		{
+			.ident = "VGN-BX297XP",
+			.matches = {
+				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-BX297XP"),
+			},
+		},
 
 		{ }	/* terminate list */
 	};
drivers/ata/pata_octeon_cf.c +3 -3
index efe2c19..8d9343a 100644
@@ -503,7 +503,7 @@ static void octeon_cf_dma_setup(struct ata_queued_cmd *qc)
 	struct ata_port *ap = qc->ap;
 	struct octeon_cf_port *cf_port;
 
-	cf_port = (struct octeon_cf_port *)ap->private_data;
+	cf_port = ap->private_data;
 	DPRINTK("ENTER\n");
 	/* issue r/w command */
 	qc->cursg = qc->sg;
@@ -596,7 +596,7 @@ static unsigned int octeon_cf_dma_finished(struct ata_port *ap,
 	if (ap->hsm_task_state != HSM_ST_LAST)
 		return 0;
 
-	cf_port = (struct octeon_cf_port *)ap->private_data;
+	cf_port = ap->private_data;
 
 	dma_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine));
 	if (dma_cfg.s.size != 0xfffff) {
@@ -657,7 +657,7 @@ static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
 			continue;
 
 		ocd = ap->dev->platform_data;
-		cf_port = (struct octeon_cf_port *)ap->private_data;
+		cf_port = ap->private_data;
 		dma_int.u64 =
 			cvmx_read_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine));
 		dma_cfg.u64 =
drivers/ata/sata_mv.c +277 -210

1,150 lines not on this page · raw message

include/linux/ata.h +41 -0

77 lines not on this page · raw message