public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@sw.ru>
To: "Ju, Seokmann" <Seokmann.Ju@lsil.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@openvz.org
Subject: Re: [PATCH 1/1] scsi : megaraid_{mm,mbox}: a fix on 64-bit DMA capability check
Date: Tue, 20 Jun 2006 17:53:03 +0400	[thread overview]
Message-ID: <4497FDBF.8010500@sw.ru> (raw)
In-Reply-To: <890BF3111FB9484E9526987D912B261901BD91@NAMAIL3.ad.lsil.com>

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@sw.ru]. 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) {

  parent reply	other threads:[~2006-06-20 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 15:09 [PATCH 1/1] scsi : megaraid_{mm,mbox}: a fix on 64-bit DMA capability check Ju, Seokmann
2006-05-19 21:28 ` James Bottomley
2006-06-20 13:53 ` Vasily Averin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-20 14:06 Ju, Seokmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4497FDBF.8010500@sw.ru \
    --to=vvs@sw.ru \
    --cc=James.Bottomley@SteelEye.com \
    --cc=Seokmann.Ju@lsil.com \
    --cc=akpm@osdl.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox