* [PATCH 1/2] libata: Kill unused ATA_DFLAG_{H|D}IPM flags
@ 2011-03-16 10:14 Tejun Heo
2011-03-16 10:14 ` [PATCH 2/2] libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65 Tejun Heo
0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2011-03-16 10:14 UTC (permalink / raw)
To: Jeff Garzik, linux-ide; +Cc: Stefan Bader
ATA_DFLAG_{H|D}IPM flags are no longer used. Kill them.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
include/linux/libata.h | 2 --
1 file changed, 2 deletions(-)
Index: work/include/linux/libata.h
===================================================================
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -137,8 +137,6 @@ enum {
ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */
ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */
ATA_DFLAG_AN = (1 << 7), /* AN configured */
- ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */
- ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */
ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */
ATA_DFLAG_CFG_MASK = (1 << 12) - 1,
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65 2011-03-16 10:14 [PATCH 1/2] libata: Kill unused ATA_DFLAG_{H|D}IPM flags Tejun Heo @ 2011-03-16 10:14 ` Tejun Heo 2011-04-15 7:20 ` Stefan Bader 0 siblings, 1 reply; 4+ messages in thread From: Tejun Heo @ 2011-03-16 10:14 UTC (permalink / raw) To: Jeff Garzik, linux-ide; +Cc: Stefan Bader NVIDIA mcp65 familiy of controllers cause command timeouts when DIPM is used. Implement ATA_FLAG_NO_DIPM and apply it. This problem was reported by Stefan Bader in the following thread. http://thread.gmane.org/gmane.linux.ide/48841 stable: applicable to 2.6.37 and 38. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Stefan Bader <stefan.bader@canonical.com> Cc: stable@kernel.org --- drivers/ata/ahci.c | 2 +- drivers/ata/libata-eh.c | 6 ++++-- include/linux/libata.h | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) Index: work/drivers/ata/ahci.c =================================================================== --- work.orig/drivers/ata/ahci.c +++ work/drivers/ata/ahci.c @@ -150,7 +150,7 @@ static const struct ata_port_info ahci_p { AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ), - .flags = AHCI_FLAG_COMMON, + .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM, .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, Index: work/drivers/ata/libata-eh.c =================================================================== --- work.orig/drivers/ata/libata-eh.c +++ work/drivers/ata/libata-eh.c @@ -3276,6 +3276,7 @@ static int ata_eh_set_lpm(struct ata_lin struct ata_eh_context *ehc = &link->eh_context; struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL; enum ata_lpm_policy old_policy = link->lpm_policy; + bool no_dipm = ap->flags & ATA_FLAG_NO_DIPM; unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM; unsigned int err_mask; int rc; @@ -3292,7 +3293,7 @@ static int ata_eh_set_lpm(struct ata_lin */ ata_for_each_dev(dev, link, ENABLED) { bool hipm = ata_id_has_hipm(dev->id); - bool dipm = ata_id_has_dipm(dev->id); + bool dipm = ata_id_has_dipm(dev->id) && !no_dipm; /* find the first enabled and LPM enabled devices */ if (!link_dev) @@ -3349,7 +3350,8 @@ static int ata_eh_set_lpm(struct ata_lin /* host config updated, enable DIPM if transitioning to MIN_POWER */ ata_for_each_dev(dev, link, ENABLED) { - if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) { + if (policy == ATA_LPM_MIN_POWER && !no_dipm && + ata_id_has_dipm(dev->id)) { err_mask = ata_dev_set_feature(dev, SETFEATURES_SATA_ENABLE, SATA_DIPM); if (err_mask && err_mask != AC_ERR_DEV) { Index: work/include/linux/libata.h =================================================================== --- work.orig/include/linux/libata.h +++ work/include/linux/libata.h @@ -201,6 +201,7 @@ enum { * management */ ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity * led */ + ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ /* bits 24:31 of ap->flags are reserved for LLD specific flags */ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65 2011-03-16 10:14 ` [PATCH 2/2] libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65 Tejun Heo @ 2011-04-15 7:20 ` Stefan Bader 2011-04-15 7:32 ` Jeff Garzik 0 siblings, 1 reply; 4+ messages in thread From: Stefan Bader @ 2011-04-15 7:20 UTC (permalink / raw) To: Tejun Heo; +Cc: Jeff Garzik, linux-ide, Andy Whitcroft On 03/16/2011 11:14 AM, Tejun Heo wrote: > NVIDIA mcp65 familiy of controllers cause command timeouts when DIPM > is used. Implement ATA_FLAG_NO_DIPM and apply it. > > This problem was reported by Stefan Bader in the following thread. > Just wondering what happened to this. Were there objections or just fell through some cracks somehow? Thanks, Stefan > http://thread.gmane.org/gmane.linux.ide/48841 > > stable: applicable to 2.6.37 and 38. > > Signed-off-by: Tejun Heo <tj@kernel.org> > Reported-by: Stefan Bader <stefan.bader@canonical.com> > Cc: stable@kernel.org > --- > drivers/ata/ahci.c | 2 +- > drivers/ata/libata-eh.c | 6 ++++-- > include/linux/libata.h | 1 + > 3 files changed, 6 insertions(+), 3 deletions(-) > > Index: work/drivers/ata/ahci.c > =================================================================== > --- work.orig/drivers/ata/ahci.c > +++ work/drivers/ata/ahci.c > @@ -150,7 +150,7 @@ static const struct ata_port_info ahci_p > { > AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP | > AHCI_HFLAG_YES_NCQ), > - .flags = AHCI_FLAG_COMMON, > + .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM, > .pio_mask = ATA_PIO4, > .udma_mask = ATA_UDMA6, > .port_ops = &ahci_ops, > Index: work/drivers/ata/libata-eh.c > =================================================================== > --- work.orig/drivers/ata/libata-eh.c > +++ work/drivers/ata/libata-eh.c > @@ -3276,6 +3276,7 @@ static int ata_eh_set_lpm(struct ata_lin > struct ata_eh_context *ehc = &link->eh_context; > struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL; > enum ata_lpm_policy old_policy = link->lpm_policy; > + bool no_dipm = ap->flags & ATA_FLAG_NO_DIPM; > unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM; > unsigned int err_mask; > int rc; > @@ -3292,7 +3293,7 @@ static int ata_eh_set_lpm(struct ata_lin > */ > ata_for_each_dev(dev, link, ENABLED) { > bool hipm = ata_id_has_hipm(dev->id); > - bool dipm = ata_id_has_dipm(dev->id); > + bool dipm = ata_id_has_dipm(dev->id) && !no_dipm; > > /* find the first enabled and LPM enabled devices */ > if (!link_dev) > @@ -3349,7 +3350,8 @@ static int ata_eh_set_lpm(struct ata_lin > > /* host config updated, enable DIPM if transitioning to MIN_POWER */ > ata_for_each_dev(dev, link, ENABLED) { > - if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) { > + if (policy == ATA_LPM_MIN_POWER && !no_dipm && > + ata_id_has_dipm(dev->id)) { > err_mask = ata_dev_set_feature(dev, > SETFEATURES_SATA_ENABLE, SATA_DIPM); > if (err_mask && err_mask != AC_ERR_DEV) { > Index: work/include/linux/libata.h > =================================================================== > --- work.orig/include/linux/libata.h > +++ work/include/linux/libata.h > @@ -201,6 +201,7 @@ enum { > * management */ > ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity > * led */ > + ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ > > /* bits 24:31 of ap->flags are reserved for LLD specific flags */ > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65 2011-04-15 7:20 ` Stefan Bader @ 2011-04-15 7:32 ` Jeff Garzik 0 siblings, 0 replies; 4+ messages in thread From: Jeff Garzik @ 2011-04-15 7:32 UTC (permalink / raw) To: Stefan Bader; +Cc: Tejun Heo, linux-ide, Andy Whitcroft On 04/15/2011 03:20 AM, Stefan Bader wrote: > On 03/16/2011 11:14 AM, Tejun Heo wrote: >> NVIDIA mcp65 familiy of controllers cause command timeouts when DIPM >> is used. Implement ATA_FLAG_NO_DIPM and apply it. >> >> This problem was reported by Stefan Bader in the following thread. >> > > Just wondering what happened to this. Were there objections or just fell through > some cracks somehow? hrm... that should have been queued a long time ago. Sorry about that. Jeff ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-15 7:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-16 10:14 [PATCH 1/2] libata: Kill unused ATA_DFLAG_{H|D}IPM flags Tejun Heo
2011-03-16 10:14 ` [PATCH 2/2] libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65 Tejun Heo
2011-04-15 7:20 ` Stefan Bader
2011-04-15 7:32 ` Jeff Garzik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).