aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-pmp.c12
-rw-r--r--drivers/ata/sata_fsl.c5
-rw-r--r--drivers/ata/sata_highbank.c4
3 files changed, 11 insertions, 10 deletions
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 1c41722bb7e2..20fd337a5731 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -289,24 +289,24 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info)
289 289
290 /* Disable sending Early R_OK. 290 /* Disable sending Early R_OK.
291 * With "cached read" HDD testing and multiple ports busy on a SATA 291 * With "cached read" HDD testing and multiple ports busy on a SATA
292 * host controller, 3726 PMP will very rarely drop a deferred 292 * host controller, 3x26 PMP will very rarely drop a deferred
293 * R_OK that was intended for the host. Symptom will be all 293 * R_OK that was intended for the host. Symptom will be all
294 * 5 drives under test will timeout, get reset, and recover. 294 * 5 drives under test will timeout, get reset, and recover.
295 */ 295 */
296 if (vendor == 0x1095 && devid == 0x3726) { 296 if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) {
297 u32 reg; 297 u32 reg;
298 298
299 err_mask = sata_pmp_read(&ap->link, PMP_GSCR_SII_POL, &reg); 299 err_mask = sata_pmp_read(&ap->link, PMP_GSCR_SII_POL, &reg);
300 if (err_mask) { 300 if (err_mask) {
301 rc = -EIO; 301 rc = -EIO;
302 reason = "failed to read Sil3726 Private Register"; 302 reason = "failed to read Sil3x26 Private Register";
303 goto fail; 303 goto fail;
304 } 304 }
305 reg &= ~0x1; 305 reg &= ~0x1;
306 err_mask = sata_pmp_write(&ap->link, PMP_GSCR_SII_POL, reg); 306 err_mask = sata_pmp_write(&ap->link, PMP_GSCR_SII_POL, reg);
307 if (err_mask) { 307 if (err_mask) {
308 rc = -EIO; 308 rc = -EIO;
309 reason = "failed to write Sil3726 Private Register"; 309 reason = "failed to write Sil3x26 Private Register";
310 goto fail; 310 goto fail;
311 } 311 }
312 } 312 }
@@ -383,8 +383,8 @@ static void sata_pmp_quirks(struct ata_port *ap)
383 u16 devid = sata_pmp_gscr_devid(gscr); 383 u16 devid = sata_pmp_gscr_devid(gscr);
384 struct ata_link *link; 384 struct ata_link *link;
385 385
386 if (vendor == 0x1095 && devid == 0x3726) { 386 if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) {
387 /* sil3726 quirks */ 387 /* sil3x26 quirks */
388 ata_for_each_link(link, ap, EDGE) { 388 ata_for_each_link(link, ap, EDGE) {
389 /* link reports offline after LPM */ 389 /* link reports offline after LPM */
390 link->flags |= ATA_LFLAG_NO_LPM; 390 link->flags |= ATA_LFLAG_NO_LPM;
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 19720a0a4a65..851bd3f43ac6 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -293,6 +293,7 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
293{ 293{
294 struct sata_fsl_host_priv *host_priv = host->private_data; 294 struct sata_fsl_host_priv *host_priv = host->private_data;
295 void __iomem *hcr_base = host_priv->hcr_base; 295 void __iomem *hcr_base = host_priv->hcr_base;
296 unsigned long flags;
296 297
297 if (count > ICC_MAX_INT_COUNT_THRESHOLD) 298 if (count > ICC_MAX_INT_COUNT_THRESHOLD)
298 count = ICC_MAX_INT_COUNT_THRESHOLD; 299 count = ICC_MAX_INT_COUNT_THRESHOLD;
@@ -305,12 +306,12 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
305 (count > ICC_MIN_INT_COUNT_THRESHOLD)) 306 (count > ICC_MIN_INT_COUNT_THRESHOLD))
306 ticks = ICC_SAFE_INT_TICKS; 307 ticks = ICC_SAFE_INT_TICKS;
307 308
308 spin_lock(&host->lock); 309 spin_lock_irqsave(&host->lock, flags);
309 iowrite32((count << 24 | ticks), hcr_base + ICC); 310 iowrite32((count << 24 | ticks), hcr_base + ICC);
310 311
311 intr_coalescing_count = count; 312 intr_coalescing_count = count;
312 intr_coalescing_ticks = ticks; 313 intr_coalescing_ticks = ticks;
313 spin_unlock(&host->lock); 314 spin_unlock_irqrestore(&host->lock, flags);
314 315
315 DPRINTK("interrupt coalescing, count = 0x%x, ticks = %x\n", 316 DPRINTK("interrupt coalescing, count = 0x%x, ticks = %x\n",
316 intr_coalescing_count, intr_coalescing_ticks); 317 intr_coalescing_count, intr_coalescing_ticks);
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index d047d92a456f..e9a4f46d962e 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -86,11 +86,11 @@ struct ecx_plat_data {
86 86
87#define SGPIO_SIGNALS 3 87#define SGPIO_SIGNALS 3
88#define ECX_ACTIVITY_BITS 0x300000 88#define ECX_ACTIVITY_BITS 0x300000
89#define ECX_ACTIVITY_SHIFT 2 89#define ECX_ACTIVITY_SHIFT 0
90#define ECX_LOCATE_BITS 0x80000 90#define ECX_LOCATE_BITS 0x80000
91#define ECX_LOCATE_SHIFT 1 91#define ECX_LOCATE_SHIFT 1
92#define ECX_FAULT_BITS 0x400000 92#define ECX_FAULT_BITS 0x400000
93#define ECX_FAULT_SHIFT 0 93#define ECX_FAULT_SHIFT 2
94static inline int sgpio_bit_shift(struct ecx_plat_data *pdata, u32 port, 94static inline int sgpio_bit_shift(struct ecx_plat_data *pdata, u32 port,
95 u32 shift) 95 u32 shift)
96{ 96{