Skip to content

Commit 89b53e5

Browse files
committed
Merge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo: "This contains three commits all of which are updates for specific devices which aren't too widespread. Pretty limited scope and nothing too interesting or dangerous" * 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: sata_fsl: save irqs while coalescing libata: apply behavioral quirks to sil3826 PMP sata, highbank: fix ordering of SGPIO signals
2 parents e2982a0 + 99bbdfa commit 89b53e5

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

‎drivers/ata/libata-pmp.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,24 +289,24 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info)
289289

290290
/* Disable sending Early R_OK.
291291
* 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
293293
* R_OK that was intended for the host. Symptom will be all
294294
* 5 drives under test will timeout, get reset, and recover.
295295
*/
296-
if (vendor == 0x1095 && devid == 0x3726) {
296+
if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) {
297297
u32 reg;
298298

299299
err_mask = sata_pmp_read(&ap->link, PMP_GSCR_SII_POL, &reg);
300300
if (err_mask) {
301301
rc = -EIO;
302-
reason = "failed to read Sil3726 Private Register";
302+
reason = "failed to read Sil3x26 Private Register";
303303
goto fail;
304304
}
305305
reg &= ~0x1;
306306
err_mask = sata_pmp_write(&ap->link, PMP_GSCR_SII_POL, reg);
307307
if (err_mask) {
308308
rc = -EIO;
309-
reason = "failed to write Sil3726 Private Register";
309+
reason = "failed to write Sil3x26 Private Register";
310310
goto fail;
311311
}
312312
}
@@ -383,8 +383,8 @@ static void sata_pmp_quirks(struct ata_port *ap)
383383
u16 devid = sata_pmp_gscr_devid(gscr);
384384
struct ata_link *link;
385385

386-
if (vendor == 0x1095 && devid == 0x3726) {
387-
/* sil3726 quirks */
386+
if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) {
387+
/* sil3x26 quirks */
388388
ata_for_each_link(link, ap, EDGE) {
389389
/* link reports offline after LPM */
390390
link->flags |= ATA_LFLAG_NO_LPM;

‎drivers/ata/sata_fsl.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
293293
{
294294
struct sata_fsl_host_priv *host_priv = host->private_data;
295295
void __iomem *hcr_base = host_priv->hcr_base;
296+
unsigned long flags;
296297

297298
if (count > ICC_MAX_INT_COUNT_THRESHOLD)
298299
count = ICC_MAX_INT_COUNT_THRESHOLD;
@@ -305,12 +306,12 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
305306
(count > ICC_MIN_INT_COUNT_THRESHOLD))
306307
ticks = ICC_SAFE_INT_TICKS;
307308

308-
spin_lock(&host->lock);
309+
spin_lock_irqsave(&host->lock, flags);
309310
iowrite32((count << 24 | ticks), hcr_base + ICC);
310311

311312
intr_coalescing_count = count;
312313
intr_coalescing_ticks = ticks;
313-
spin_unlock(&host->lock);
314+
spin_unlock_irqrestore(&host->lock, flags);
314315

315316
DPRINTK("interrupt coalescing, count = 0x%x, ticks = %x\n",
316317
intr_coalescing_count, intr_coalescing_ticks);

‎drivers/ata/sata_highbank.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ struct ecx_plat_data {
8686

8787
#define SGPIO_SIGNALS 3
8888
#define ECX_ACTIVITY_BITS 0x300000
89-
#define ECX_ACTIVITY_SHIFT 2
89+
#define ECX_ACTIVITY_SHIFT 0
9090
#define ECX_LOCATE_BITS 0x80000
9191
#define ECX_LOCATE_SHIFT 1
9292
#define ECX_FAULT_BITS 0x400000
93-
#define ECX_FAULT_SHIFT 0
93+
#define ECX_FAULT_SHIFT 2
9494
static inline int sgpio_bit_shift(struct ecx_plat_data *pdata, u32 port,
9595
u32 shift)
9696
{

0 commit comments

Comments
 (0)