Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1157388
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.10 34/46] libata: Add helper to determine when PHY events should be ignored |
| Date | 2015-06-03 14:00 +0200 |
| Message-ID | <pxfuW-8s4-5@gated-at.bofh.it> (permalink) |
| References | <pxflf-8gc-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
commit 8393b811f38acdf7fd8da2028708edad3e68ce1f upstream.
This is a preparation commit that will allow to add other criteria
according to which PHY events should be dropped.
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ata/libahci.c | 3 +--
drivers/ata/libata-core.c | 19 +++++++++++++++++++
include/linux/libata.h | 1 +
3 files changed, 21 insertions(+), 2 deletions(-)
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1684,8 +1684,7 @@ static void ahci_handle_port_interrupt(s
if (unlikely(resetting))
status &= ~PORT_IRQ_BAD_PMP;
- /* if LPM is enabled, PHYRDY doesn't mean anything */
- if (ap->link.lpm_policy > ATA_LPM_MAX_POWER) {
+ if (sata_lpm_ignore_phy_events(&ap->link)) {
status &= ~PORT_IRQ_PHYRDY;
ahci_scr_write(&ap->link, SCR_ERROR, SERR_PHYRDY_CHG);
}
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6800,6 +6800,25 @@ u32 ata_wait_register(struct ata_port *a
return tmp;
}
+/**
+ * sata_lpm_ignore_phy_events - test if PHY event should be ignored
+ * @link: Link receiving the event
+ *
+ * Test whether the received PHY event has to be ignored or not.
+ *
+ * LOCKING:
+ * None:
+ *
+ * RETURNS:
+ * True if the event has to be ignored.
+ */
+bool sata_lpm_ignore_phy_events(struct ata_link *link)
+{
+ /* if LPM is enabled, PHYRDY doesn't mean anything */
+ return !!(link->lpm_policy > ATA_LPM_MAX_POWER);
+}
+EXPORT_SYMBOL_GPL(sata_lpm_ignore_phy_events);
+
/*
* Dummy port_ops
*/
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1085,6 +1085,7 @@ extern struct ata_device *ata_dev_pair(s
extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q);
+extern bool sata_lpm_ignore_phy_events(struct ata_link *link);
extern int ata_cable_40wire(struct ata_port *ap);
extern int ata_cable_80wire(struct ata_port *ap);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.10 00/46] 3.10.80-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 07/46] net: socket: Fix the wrong returns for recvmsg and sendmsg Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 42/46] rtlwifi: rtl8192cu: Fix kernel deadlock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 36/46] rt2x00: add new rt2800usb device DWA 130 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 44/46] ACPI / init: Fix the ordering of acpi_reserve_resources() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 11/46] libceph: request a new osdmap if lingering request maps to no osd Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 19/46] ASoC: wm8960: fix "RINPUT3" audio route error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 23/46] xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 22/46] xhci: fix isoc endpoint dequeue from advancing too far on transaction error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 10/46] lguest: fix out-by-one error in address checking. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 31/46] mmc: atmel-mci: fix bad variable type for clkdiv Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 12/46] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 09/46] fs, omfs: add NULL terminator in the end up the token list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 15/46] ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 16/46] ALSA: hda - Add headphone quirk for Lifebook E752 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 14/46] d_walk() might skip too much Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 43/46] Input: elantech - fix semi-mt protocol for v3 HW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 46/46] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 24/46] xhci: gracefully handle xhci_irq dead device Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 01/46] staging: wlags49_h2: fix extern inline functions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 37/46] crypto: s390/ghash - Fix incorrect ghash icv buffer handling. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 08/46] KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 45/46] vfs: read file_handle only once in handle_to_path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 06/46] kernel: use the gnu89 standard explicitly Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 18/46] ASoC: uda1380: Avoid accessing i2c bus when codec is disabled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 13:50 +0200 [PATCH 3.10 34/46] libata: Add helper to determine when PHY events should be ignored Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 25/46] USB: visor: Match I330 phone more precisely Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 20/46] ASoC: wm8994: correct BCLK DIV 348 to 384 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 04/46] staging: rtl8712, rtl8712: avoid lots of build warnings Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 32/46] ext4: convert write_begin methods to stable_page_writes semantics Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 30/46] powerpc: Align TOC to 256 bytes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 13/46] lib: Fix strnlen_user() to not touch memory after specified maximum Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 39/46] ARM: fix missing syscall trace exit Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 05/46] staging, rtl8192e, LLVMLinux: Remove unused inline prototype Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 03/46] staging, rtl8192e, LLVMLinux: Change extern inline to static inline Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 17/46] ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 41/46] md/raid5: dont record new size if resize_stripes fails. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 26/46] USB: pl2303: Remove support for Samsung I330 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 29/46] usb: gadget: configfs: Fix interfaces array NULL-termination Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 33/46] ext4: check for zero length extent explicitly Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 40/46] svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 [PATCH 3.10 27/46] USB: cp210x: add ID for KCF Technologies PRN device Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:00 +0200 Re: [PATCH 3.10 00/46] 3.10.80-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-06-03 19:00 +0200
csiph-web