On Tue, Feb 04, 2014 at 02:34:22AM +0100, gregkh@xxxxxxxxxxxxxxxxxxx wrote: > > This is a note to let you know that I've just added the patch titled > > ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs > > to the 3.4-stable tree which can be found at: > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary > > The filename of the patch is: > ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch > and it can be found in the queue-3.4 subdirectory. > > If you, or anyone else, feels it should not be added to the stable tree, > please let <stable@xxxxxxxxxxxxxxx> know about it. > > > >From 9013d64e661fc2a37a1742670202171c27fef4b5 Mon Sep 17 00:00:00 2001 > From: Lior Amsalem <alior@xxxxxxxxxxx> > Date: Tue, 14 Jan 2014 20:09:57 +0100 > Subject: ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs > > From: Lior Amsalem <alior@xxxxxxxxxxx> > > commit 9013d64e661fc2a37a1742670202171c27fef4b5 upstream. > > On Armada 370/XP SoCs, once a disk is removed from a SATA port, then the > re-plug events are not detected by the sata_mv driver. This patch fixes > the issue by updating the PHY speed in the LP_PHY_CTL register (0x58) > according to the SControl speed. > > Note that this fix is only applied if the compatible string > "marvell,armada-370-sata" is found in the SATA DT node. > > Fixes: 9ae6f740b49f ("arm: mach-mvebu: add support for Armada 370 and Armada XP with DT") Hi Greg, As the Armada 370 and XP SoCs are not supported by Linux 3.4, I think you should not apply this patch to the 3.4-stable tree. Please, let me know if there is something wrong the "Fixes:" notation above. I'd try to improve for the next time. Regards, Simon > Signed-off-by: Lior Amsalem <alior@xxxxxxxxxxx> > Signed-off-by: Nadav Haklai <nadavh@xxxxxxxxxxx> > Signed-off-by: Simon Guinot <simon.guinot@xxxxxxxxxxxx> > Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> > Cc: Jason Cooper <jason@xxxxxxxxxxxxxx> > Cc: Andrew Lunn <andrew@xxxxxxx> > Cc: Gregory Clement <gregory.clement@xxxxxxxxxxxxxxxxxx> > Cc: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx> > Acked-by: Jason Cooper <jason@xxxxxxxxxxxxxx> > Signed-off-by: Tejun Heo <tj@xxxxxxxxxx> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > > --- > drivers/ata/sata_mv.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > --- a/drivers/ata/sata_mv.c > +++ b/drivers/ata/sata_mv.c > @@ -302,6 +302,7 @@ enum { > MV5_LTMODE = 0x30, > MV5_PHY_CTL = 0x0C, > SATA_IFCFG = 0x050, > + LP_PHY_CTL = 0x058, > > MV_M2_PREAMP_MASK = 0x7e0, > > @@ -429,6 +430,7 @@ enum { > MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ > MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */ > MV_HP_QUIRK_LED_BLINK_EN = (1 << 12), /* is led blinking enabled? */ > + MV_HP_FIX_LP_PHY_CTL = (1 << 13), /* fix speed in LP_PHY_CTL ? */ > > /* Port private flags (pp_flags) */ > MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ > @@ -1348,6 +1350,7 @@ static int mv_scr_write(struct ata_link > > if (ofs != 0xffffffffU) { > void __iomem *addr = mv_ap_base(link->ap) + ofs; > + struct mv_host_priv *hpriv = link->ap->host->private_data; > if (sc_reg_in == SCR_CONTROL) { > /* > * Workaround for 88SX60x1 FEr SATA#26: > @@ -1364,6 +1367,18 @@ static int mv_scr_write(struct ata_link > */ > if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1) > val |= 0xf000; > + > + if (hpriv->hp_flags & MV_HP_FIX_LP_PHY_CTL) { > + void __iomem *lp_phy_addr = > + mv_ap_base(link->ap) + LP_PHY_CTL; > + /* > + * Set PHY speed according to SControl speed. > + */ > + if ((val & 0xf0) == 0x10) > + writelfl(0x7, lp_phy_addr); > + else > + writelfl(0x227, lp_phy_addr); > + } > } > writelfl(val, addr); > return 0; > @@ -4082,6 +4097,15 @@ static int mv_platform_probe(struct plat > if (rc) > goto err; > > + /* > + * To allow disk hotplug on Armada 370/XP SoCs, the PHY speed must be > + * updated in the LP_PHY_CTL register. > + */ > + if (pdev->dev.of_node && > + of_device_is_compatible(pdev->dev.of_node, > + "marvell,armada-370-sata")) > + hpriv->hp_flags |= MV_HP_FIX_LP_PHY_CTL; > + > /* initialize adapter */ > rc = mv_init_host(host); > if (rc) > > > Patches currently in stable-queue which might be from alior@xxxxxxxxxxx are > > queue-3.4/ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch
Attachment:
signature.asc
Description: Digital signature