View | Details | Raw Unified | Return to bug 12703 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/ata/libata-core.c (-3 / +3 lines)
Lines 5408-5414 int ata_host_suspend(struct ata_host *host, pm_message_t mesg) Link Here
5408
	 */
5408
	 */
5409
	ata_lpm_enable(host);
5409
	ata_lpm_enable(host);
5410
5410
5411
	rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
5411
	rc = ata_host_request_pm(host, mesg, 0, 0/*ATA_EHI_QUIET*/, 1);
5412
	if (rc == 0)
5412
	if (rc == 0)
5413
		host->dev->power.power_state = mesg;
5413
		host->dev->power.power_state = mesg;
5414
	return rc;
5414
	return rc;
Lines 5428-5434 int ata_host_suspend(struct ata_host *host, pm_message_t mesg) Link Here
5428
void ata_host_resume(struct ata_host *host)
5428
void ata_host_resume(struct ata_host *host)
5429
{
5429
{
5430
	ata_host_request_pm(host, PMSG_ON, ATA_EH_RESET,
5430
	ata_host_request_pm(host, PMSG_ON, ATA_EH_RESET,
5431
			    ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0);
5431
			    ATA_EHI_NO_AUTOPSY/* | ATA_EHI_QUIET*/, 0);
5432
	host->dev->power.power_state = PMSG_ON;
5432
	host->dev->power.power_state = PMSG_ON;
5433
5433
5434
	/* reenable link pm */
5434
	/* reenable link pm */
Lines 6021-6027 static void async_port_probe(void *data, async_cookie_t cookie) Link Here
6021
6021
6022
		ehi->probe_mask |= ATA_ALL_DEVICES;
6022
		ehi->probe_mask |= ATA_ALL_DEVICES;
6023
		ehi->action |= ATA_EH_RESET | ATA_EH_LPM;
6023
		ehi->action |= ATA_EH_RESET | ATA_EH_LPM;
6024
		ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
6024
		ehi->flags |= ATA_EHI_NO_AUTOPSY/* | ATA_EHI_QUIET*/;
6025
6025
6026
		ap->pflags &= ~ATA_PFLAG_INITIALIZING;
6026
		ap->pflags &= ~ATA_PFLAG_INITIALIZING;
6027
		ap->pflags |= ATA_PFLAG_LOADING;
6027
		ap->pflags |= ATA_PFLAG_LOADING;
(-)a/drivers/ata/sata_nv.c (-14 / +22 lines)
Lines 305-312 static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance); Link Here
305
static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
305
static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
306
static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
306
static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
307
307
308
static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
308
static int nv_hardreset(struct ata_link *link, unsigned int *class,
309
				   unsigned long deadline);
309
			unsigned long deadline);
310
static void nv_nf2_freeze(struct ata_port *ap);
310
static void nv_nf2_freeze(struct ata_port *ap);
311
static void nv_nf2_thaw(struct ata_port *ap);
311
static void nv_nf2_thaw(struct ata_port *ap);
312
static void nv_ck804_freeze(struct ata_port *ap);
312
static void nv_ck804_freeze(struct ata_port *ap);
Lines 416-425 static struct ata_port_operations nv_common_ops = { Link Here
416
/* OSDL bz11195 reports that link doesn't come online after hardreset
416
/* OSDL bz11195 reports that link doesn't come online after hardreset
417
 * on generic nv's and there have been several other similar reports
417
 * on generic nv's and there have been several other similar reports
418
 * on linux-ide.  Disable hardreset for generic nv's.
418
 * on linux-ide.  Disable hardreset for generic nv's.
419
 *
420
 * ODSL bz12351#c23 reports that warmplug on MCP61 doesn't work with
421
 * softreset.  Use hardreset only for warmplugs.
419
 */
422
 */
420
static struct ata_port_operations nv_generic_ops = {
423
static struct ata_port_operations nv_generic_ops = {
421
	.inherits		= &nv_common_ops,
424
	.inherits		= &nv_common_ops,
422
	.hardreset		= ATA_OP_NULL,
425
	.hardreset		= nv_hardreset,
423
};
426
};
424
427
425
/* nf2 is ripe with hardreset related problems.
428
/* nf2 is ripe with hardreset related problems.
Lines 430-437 static struct ata_port_operations nv_generic_ops = { Link Here
430
 *
433
 *
431
 * http://thread.gmane.org/gmane.linux.ide/34098
434
 * http://thread.gmane.org/gmane.linux.ide/34098
432
 *
435
 *
433
 * And bz#12176 reports that hardreset simply doesn't work on nf2.
436
 * And bz#12176 reports that hardreset simply doesn't work on nf2.  Do
434
 * Give up on it and just don't do hardreset.
437
 * what generic does - use hardreset only for warmplugs.
435
 */
438
 */
436
static struct ata_port_operations nv_nf2_ops = {
439
static struct ata_port_operations nv_nf2_ops = {
437
	.inherits		= &nv_generic_ops,
440
	.inherits		= &nv_generic_ops,
Lines 448-454 static struct ata_port_operations nv_ck804_ops = { Link Here
448
	.inherits		= &nv_common_ops,
451
	.inherits		= &nv_common_ops,
449
	.freeze			= nv_ck804_freeze,
452
	.freeze			= nv_ck804_freeze,
450
	.thaw			= nv_ck804_thaw,
453
	.thaw			= nv_ck804_thaw,
451
	.hardreset		= nv_noclassify_hardreset,
454
	.hardreset		= nv_hardreset,
452
	.host_stop		= nv_ck804_host_stop,
455
	.host_stop		= nv_ck804_host_stop,
453
};
456
};
454
457
Lines 484-490 static struct ata_port_operations nv_adma_ops = { Link Here
484
 */
487
 */
485
static struct ata_port_operations nv_mcp5x_ops = {
488
static struct ata_port_operations nv_mcp5x_ops = {
486
	.inherits		= &nv_common_ops,
489
	.inherits		= &nv_common_ops,
487
	.hardreset		= nv_noclassify_hardreset,
490
	.hardreset		= nv_hardreset,
488
};
491
};
489
492
490
static struct ata_port_operations nv_swncq_ops = {
493
static struct ata_port_operations nv_swncq_ops = {
Lines 1559-1573 static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) Link Here
1559
	return 0;
1562
	return 0;
1560
}
1563
}
1561
1564
1562
static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
1565
static int nv_hardreset(struct ata_link *link, unsigned int *class,
1563
				   unsigned long deadline)
1566
			unsigned long deadline)
1564
{
1567
{
1565
	bool online;
1568
	struct ata_eh_context *ehc = &link->eh_context;
1566
	int rc;
1569
1570
	if (!(link->ap->pflags & ATA_PFLAG_LOADING) &&
1571
	    !ata_dev_enabled(link->device))
1572
		sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
1573
				    NULL, NULL);
1574
	else if (!(ehc->i.flags & ATA_EHI_QUIET))
1575
		ata_link_printk(link, KERN_INFO,
1576
				"nv: skipping hardreset on occupied port\n");
1567
1577
1568
	rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
1578
	return -EAGAIN;
1569
				 &online, NULL);
1570
	return online ? -EAGAIN : rc;
1571
}
1579
}
1572
1580
1573
static void nv_nf2_freeze(struct ata_port *ap)
1581
static void nv_nf2_freeze(struct ata_port *ap)

Return to bug 12703