RE: [PATCH 1/1] scsi : megaraid_{mm,mbox}: a fix on 64-bit DMA capability check



Hi Vasily,

Tuesday, June 20, 2006 9:53 AM, Vasily Averin wrote:
As far as I see the 64-bit magic is set, pci(0xA4) == 0x0299
and driver tries to
enable 64-bit DMA. However the controller is not supported
64-bit DMA, and I
still have the same error messages.

Could you please check this issue and update your patch properly.
I'll double check with F/W team for further clarification and will submit updated patch, soon.
Thank you for pointing out and sorry for inconvenience.

Seokmann

-----Original Message-----
From: Vasily Averin [mailto:vvs@xxxxx]
Sent: Tuesday, June 20, 2006 9:53 AM
To: Ju, Seokmann
Cc: James Bottomley; Andrew Morton;
linux-scsi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
devel@xxxxxxxxxx
Subject: Re: [PATCH 1/1] scsi : megaraid_{mm,mbox}: a fix on
64-bit DMA capability check

Hello Seokmann,

I would like to tell you that your patch is wrong, at least for
MegaRAID SATA 150-4 RAID Controller

06:02.0 RAID bus controller: LSI Logic / Symbios Logic
MegaRAID (rev 01)
Subsystem: LSI Logic / Symbios Logic MegaRAID SATA
150-4 RAID Controller
00: 00 10 60 19 16 03 b0 04 01 00 04 01 08 20 00 00
10: 08 00 20 df 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 10 23 45
30: 00 00 00 00 80 00 00 00 00 00 00 00 0a 01 00 00
40: 00 00 ff ff 00 00 00 d0 08 00 00 fc 00 00 00 fc
50: 00 00 00 d0 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 88 1f 00 00 00 00 00 f8 00 00 00 00
70: 00 00 00 00 00 00 ff ff 00 00 f4 fe 00 00 00 00
80: 01 00 02 00 00 00 00 00 06 01 38 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 06 01 00 20 9c 00 00 00
a0: cc cc 00 00 99 02 00 00 00 06 00 80 00 00 00 00
b0: 00 00 00 6e 00 00 00 00 00 00 00 00 fd 01 00 00
c0: fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

As far as I see the 64-bit magic is set, pci(0xA4) == 0x0299
and driver tries to
enable 64-bit DMA. However the controller is not supported
64-bit DMA, and I
still have the same error messages.

Could you please check this issue and update your patch properly.

Thank you,
Vasily Averin

SWsoft Virtuozzo/OpenVZ Linux kernel team

Ju, Seokmann wrote:
Hi,

This patch contains a fix for 64-bit DMA capability check in
megaraid_{mm,mbox} driver. With patch, the driver access PCI
configuration space with dedicated offset to read a
signature. If the
signature read, it means that the controller has capability
to handle
64-bit DMA. Before this patch, the driver blindly claimed
the capability
without checking with controller.
The issue has been reported by Vasily Averin [vvs@xxxxx]. Thank you
Vasily for the reporting.

+#define HBA_SIGNATURE_64BIT 0x0299
+#define PCI_CONF_AMISIG64 0xa4
...
- if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) {
+ pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64,
&magic64);

- con_log(CL_ANN, (KERN_WARNING
- "megaraid: could not set DMA mask for
64-bit.\n"));
+ if ((magic64 == HBA_SIGNATURE_64BIT) ||
+ (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
+ adapter->pdev->device ==
PCI_DEVICE_ID_PERC4_DI_EVERGLADES) ||
+ (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
+ adapter->pdev->device == PCI_DEVICE_ID_VERDE) ||
+ (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
+ adapter->pdev->device == PCI_DEVICE_ID_DOBSON) ||
+ (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
+ adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)
||
+ (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
+ adapter->pdev->device == PCI_DEVICE_ID_LINDSAY)) {
+ if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) !=
0) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] Blackfin: blackfin on-chip SPI controller driver
    ... patch, rather than initial-plus-cleanups. ... Please put this in Kconfig up with the other SPI controller drivers, ... relevant points in the driver. ... place to reverse any DMA mappings ... ...
    (Linux-Kernel)
  • Re: [RFC v2 2/5] dmaengine: Add slave DMA interface
    ... is that these options vary from controller to controller, ... Not all options are specific to DMA slave transfers either, ... DMA engine driver is free to decide on its own. ...
    (Linux-Kernel)
  • Re: [PATCH] 2.6.22 - Documentation Cleanup
    ... comments below, new patch coming separately. ... dma code can be given an dma ordering structure which ... allows the order of channel search to be specified, ... The driver ...
    (Linux-Kernel)
  • [PATCH v4 6/6] Atmel MCI: Driver for Atmel on-chip MMC controllers
    ... This is a driver for the MMC controller on the AP7000 chips from ... entirely clear if it's worth merging this with the at91_mci driver. ... provided by Atmel, but this particular version uses the generic DMA ...
    (Linux-Kernel)
  • Re: 21st Century ISA goals?
    ... register of interest, then yes, there could be timing penalties. ... also depends on whether the target controller is dma capable. ... A dma based driver sets up the controller with a few register ...
    (comp.arch)