Robert Richter | 27 May 10:01 2015

[PATCH v3 0/3] AHCI: Add generic MSI-X interrupt support to SATA PCI driver

From: Robert Richter <rrichter <at> cavium.com>

This patch set adds generic support for MSI-X interrupts to the SATA
PCI driver.

The first 2 patches rework the code, one splits msi and intx code into
separate functions, the other changes interrupt initialization to
store the irq number in the ahci data structure (struct
ahci_host_priv). Both changes are needed to implement MSI-X support in
the last 3rd patch.

v3:
 * store irq number in struct ahci_host_priv
 * change initialization order from msix-msi-intx to msi-msix-intx
 * improve comments in ahci_init_msix()
 * improve error message in ahci_init_msix()
 * do not enable MSI-X if MSI is actively disabled for the device

v2:
 * determine irq vector from pci_dev->msi_list

Robert Richter (3):
  ahci: Move interrupt enablement code to separate functions
  ahci: Store irq number in struct ahci_host_priv
  AHCI: Add generic MSI-X interrupt support to SATA PCI driver

 drivers/ata/acard-ahci.c       |   4 +-
 drivers/ata/ahci.c             | 138 ++++++++++++++++++++++++++++++++++++-----
 drivers/ata/ahci.h             |   4 +-
 drivers/ata/libahci.c          |  25 +++-----
(Continue reading)

Lina Tayeb El Safi | 21 May 12:26 2015
Picon

Hello,

Hi,
How are you today? My name is Lina Tayeb El Safi, I saw your email on
my search for a nice and trusted person so i decided to write you. I
will like you to write and tell me more about your Self through my
Private e-mail (linatayeb1989 <at> yahoo.com) for further discussion; from
there i will reply you with more of my details, I will be Waiting to
receive from you, Have a nice day,
Best regard.
Yours sincerely
Lina Tayeb,
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Martin K. Petersen | 20 May 01:44 2015
Picon

[PATCH] libata: Fix regression when the NCQ Send and Receive log page is absent

Commit 5d3abf8ff67f allowed us to fall back to the unqueued READ LOG
variant if the queued version failed. However, if the device did not
support the page at all we would end up looping due to a merge snafu.

Ensure we only take the fallback path once.

Signed-off-by: Martin K. Petersen <martin.petersen <at> oracle.com>
Reported-by: Sergey Senozhatsky <sergey.senozhatsky <at> gmail.com>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky <at> gmail.com>
---
 drivers/ata/libata-eh.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 2893563d0537..2b370ee0ae86 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
 <at>  <at>  -1521,6 +1521,7  <at>  <at>  retry:
 	} else {
 		tf.command = ATA_CMD_READ_LOG_EXT;
 		tf.protocol = ATA_PROT_PIO;
+		dma = false;
 	}
 	tf.lbal = log;
 	tf.lbam = page;
--

-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
(Continue reading)

Andy Falanga (afalanga | 19 May 22:26 2015

Best way to store struct ata_host objects for later use

Hi,

What's the most advisable means of storing struct ata_host objects for
later reference?  Can they be constructed relatively easily from other,
more basic, kernel structures which should exist after the ahci.ko
driver has loaded?

Briefly, what's prompting this is that I'm writing a character driver to
act as a pass through from user space to ahci.ko (actually, a modified
version of ahci.ko).  One of the mods I've made is a linked list of
struct ata_host objects which is used by my character driver to know how
many device nodes to instantiate (1 for each port on however many HBAs
the LLD is driving).  At this location, http://lxr.linux.no/linux

+*/drivers/ata/ahci.c#L3230 , I placed a call to a function I added
which simply allocates, via kalloc(), a new ata_host structure.  I then
simply memcpy() the contents of what the driver has dutifully
instantiated.  I figured that copying the structure at this point was
safe because it was fully built.

The reason for all of this is so that the character driver can keep
track of which ata host owns the port, etc.  One of the things my
character driver allows is access to HBA and port registers.  In my very
early drafts, I'm calling pci_get_device(), but this just isn't workable
because I don't want the upper layer driver tied to specific hardware.
I use the ata_host, and its ata_port, objects to get access to the
iomapped memory.

Essentially, the idea was that the character driver would pass the
ata_host structure to the LLD driver for HBA registers, and an ata_port
structure for the port registers.  Apparently, however, there's more
(Continue reading)

Arnd Bergmann | 19 May 16:34 2015
Picon

[PATCH] ata: hpt366: fix constant cast warning

gcc-5.x warns about a preexisting problem in the hpt36x pata driver:

drivers/ata/pata_hpt366.c: In function 'hpt36x_init_one':
drivers/ata/pata_hpt366.c:376:9: warning: assignment discards 'const' qualifier from pointer
target type [-Wdiscarded-array-qualifiers]

Other ata drivers have the same problem, as ata_pci_bmdma_init_one
takes a non-const pointer, and they solve it by using a cast to
turn that pointer into a normal non-const pointer.

I also tried to change the ata core code to make host->private_data
a const pointer, but that quickly got out of hand, as some other
drivers expect it to be writable, so I ended up using the same
hack as the others here.

Signed-off-by: Arnd Bergmann <arnd <at> arndb.de>

diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index cbc3de793d1d..0038dc4c06c7 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
 <at>  <at>  -352,7 +352,7  <at>  <at>  static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	const struct ata_port_info *ppi[] = { &info_hpt366, NULL };

-	void *hpriv = NULL;
+	const void *hpriv = NULL;
 	u32 reg1;
 	int rc;

(Continue reading)

Sergey Senozhatsky | 19 May 13:33 2015
Picon

READ LOG DMA EXT failed, trying unqueued

Hello,

my laptop doesn't boot anymore, spinning in "READ LOG DMA EXT failed, trying unqueued".
any reason it loops forever?

	-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Dan Carpenter | 15 May 11:24 2015
Picon

[patch] ata: ahci_xgene: potential NULL dereference in probe

Smatch complains about this potential NULL dereference of "acpi_id".

Fixes: c9802a4be661 ('ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.')
Signed-off-by: Dan Carpenter <dan.carpenter <at> oracle.com>

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 2add250..e2c6d9e 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
 <at>  <at>  -732,9 +732,7  <at>  <at>  static int xgene_ahci_probe(struct platform_device *pdev)
 		if (!acpi_id) {
 			dev_warn(&pdev->dev, "No node entry in ACPI table. Assume version1\n");
 			version = XGENE_AHCI_V1;
-		}
-
-		if (acpi_id->driver_data) {
+		} else if (acpi_id->driver_data) {
 			version = (enum xgene_ahci_version) acpi_id->driver_data;
 			status = acpi_get_object_info(ACPI_HANDLE(&pdev->dev), &info);
 			if (ACPI_FAILURE(status)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

wenxiong | 14 May 18:55 2015
Picon

[PATCH V2] ahci: Add support for EEH error recovery

From: Wen Xiong <wenxiong <at> linux.vnet.ibm.com>

On the Power platform, the pci_error_handlers map to our EEH recovery.
In that case, without this patch, if we hit any sort of PCIe error, we
won't be able to recover and we'll lose all access to the ahci disks.
This could be the adapter trying to access an invalid DMA address due
to a transient hardware issue, or it could be due to a driver bug giving
the adapter an invalid address. It could also be other various PCIe
errors that cause our PCIe bridge chip to isolate the device and
place it into the EEH "frozen" state. When this occurs, if the driver
associated with the hardware does not have these handlers registered,
powerpc arch kernel code will hotplug remove the adapter, recover the
adapter, then hotplug add it back. This works OK for some devices,
but generally not so well for storage devices with mounted filesystems,
which would tend to go readonly in this case.

This patch adds the callback functions to support EEH(Extended Error
Handling) error recovery in ahci driver. Also adds the code in
ahci_error_handler to issue an MMIO load then check if it is in EEH.
If it is in EEH, ahci_error_handler will wait until EEH recovery is completed.

Signed-off-by: Wen Xiong <wenxiong <at> linux.vnet.ibm.com>
Signed-off-by: Brian King <bjking <at> linux.vnet.ibm.com>

---
 drivers/ata/ahci.c    |   70 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/ata/ahci.h    |    3 ++
 drivers/ata/libahci.c |   11 +++++++
 3 files changed, 84 insertions(+), 0 deletions(-)

(Continue reading)

wenxiong | 14 May 03:35 2015
Picon

[PATCH] ahci: Add support for EEH error recovery

From: Wen Xiong <wenxiong <at> linux.vnet.ibm.com>

This patch adds the callback functions to support EEH error
recovery in ahci driver. Also adds the code in ahci_error_handler
to issue an MMIO load then check if it is in EEH. If it is in EEH,
ahci_error_handler will wait until EEH recovery is completed.

Signed-off-by: Wen Xiong <wenxiong <at> linux.vnet.ibm.com>
---
 drivers/ata/ahci.c    |   70 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/ata/ahci.h    |    3 ++
 drivers/ata/libahci.c |   11 +++++++
 3 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 65ee944..0184677 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
 <at>  <at>  -96,6 +96,10  <at>  <at>  static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
 static int ahci_pci_device_resume(struct pci_dev *pdev);
 #endif

+static pci_ers_result_t ahci_pci_error_detected(struct pci_dev *pdev,
+					       pci_channel_state_t state);
+static pci_ers_result_t ahci_pci_slot_reset(struct pci_dev *pdev);
+
 static struct scsi_host_template ahci_sht = {
 	AHCI_SHT("ahci"),
 };
 <at>  <at>  -520,6 +524,10  <at>  <at>  static const struct pci_device_id ahci_pci_tbl[] = {
(Continue reading)

Brian Norris | 13 May 01:28 2015
Picon

[PATCH v3 0/5] AHCI and SATA PHY support for Broadcom STB SoCs

Few changes since v2, and the changes are *only* to the SATA driver, not to any
of the DT bindings or the PHY driver. I'm resending the whole series for
completeness.

I'll list the changelog in each patch, but in summary:

v2 -> v3:
 - straighten out endianness for big endian MIPS and ARM in AHCI driver
 - rename sata_brcmstb.c to ahci_brcmstb.c
 - bind ahci_brcmstb.c against the specific string, "brcm,bcm7445-ahci" instead
   of the generic one

Brian

Brian Norris (5):
  Documentation: devicetree: add Broadcom SATA binding
  Documentation: devicetree: add Broadcom SATA PHY binding
  ata: add Broadcom AHCI SATA3 driver for STB chips
  phy: add Broadcom SATA3 PHY driver for Broadcom STB SoCs
  ARM: dts: brcmstb: add nodes for SATA controller and PHY

 .../devicetree/bindings/ata/brcm,sata-brcmstb.txt  |  35 +++
 .../bindings/phy/brcm,brcmstb-sata-phy.txt         |  40 +++
 arch/arm/boot/dts/bcm7445.dtsi                     |  37 +++
 drivers/ata/Kconfig                                |   9 +
 drivers/ata/Makefile                               |   1 +
 drivers/ata/ahci_brcmstb.c                         | 322 +++++++++++++++++++++
 drivers/phy/Kconfig                                |   9 +
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-brcmstb-sata.c                     | 216 ++++++++++++++
(Continue reading)

Tejun Heo | 11 May 17:14 2015

[GIT PULL] libata fixes for v4.1-rc3

Hello, Linus.

libata fixes for v4.1-rc3.  Rather big for fixes pull.

* SCC controllers never lived to see the light of the day.  Both
  libata and ide drivers removed.

* In some configurations, link power management policy changes
  sometimes cause delayed spurious PHY events which can develop into
  noticeable failures.  This has been reported several times over the
  years.  Gabriele's patches suppress PHY events for a while after LPM
  policy changes which should help most of these failures without
  causing too much problem for hotplug use cases.

* A few controller specific fixes.

Thanks.

The following changes since commit 31f7dc796998d2967e999a0f9229d8a50c7b348d:

  ACPI / battery: Fix doubly added battery on system suspend (2015-04-14 09:03:33 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git for-4.1-fixes

for you to fetch changes up to dbfe8ef5599a5370abc441fcdbb382b656563eb4:

  ahci: avoton port-disable reset-quirk (2015-05-10 11:39:16 -0400)

(Continue reading)


Gmane