- scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     scsi: megaraid_{mm,mbox}: a fix on 64-bit DMA capability check

has been removed from the -mm tree.  Its filename is

     scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
Subject: scsi: megaraid_{mm,mbox}: a fix on 64-bit DMA capability check
From: "Ju, Seokmann" <Seokmann.Ju@xxxxxxxx>


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.

Signed-off-by: Seokmann Ju <seokmann.ju@xxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 Documentation/scsi/ChangeLog.megaraid |   61 ++++++++++++++++++++++++
 drivers/scsi/megaraid/mega_common.h   |    3 -
 drivers/scsi/megaraid/megaraid_mbox.c |   25 +++++++--
 drivers/scsi/megaraid/megaraid_mbox.h |    4 -
 4 files changed, 84 insertions(+), 9 deletions(-)

diff -puN Documentation/scsi/ChangeLog.megaraid~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check Documentation/scsi/ChangeLog.megaraid
--- 25/Documentation/scsi/ChangeLog.megaraid~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check	Fri May 19 14:19:32 2006
+++ 25-akpm/Documentation/scsi/ChangeLog.megaraid	Fri May 19 14:19:32 2006
@@ -1,3 +1,64 @@
+Release Date	: Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@xxxxxxxx>
+Current Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
+Older Version	: 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
+
+1.	Fixed a bug in megaraid_init_mbox().
+	Customer reported "garbage in file on x86_64 platform".
+	Root Cause: the driver registered controllers as 64-bit DMA capable
+	for those which are not support it.
+	Fix: Made change in the function inserting identification machanism
+	identifying 64-bit DMA capable controllers.
+
+	> -----Original Message-----
+	> From: Vasily Averin [mailto:vvs@xxxxx]
+	> Sent: Thursday, May 04, 2006 2:49 PM
+	> To: linux-scsi@xxxxxxxxxxxxxxx; Kolli, Neela; Mukker, Atul;
+	> Ju, Seokmann; Bagalkote, Sreenivas;
+	> James.Bottomley@xxxxxxxxxxxx; devel@xxxxxxxxxx
+	> Subject: megaraid_mbox: garbage in file
+	>
+	> Hello all,
+	>
+	> I've investigated customers claim on the unstable work of
+	> their node and found a
+	> strange effect: reading from some files leads to the
+	>  "attempt to access beyond end of device" messages.
+	>
+	> I've checked filesystem, memory on the node, motherboard BIOS
+	> version, but it
+	> does not help and issue still has been reproduced by simple
+	> file reading.
+	>
+	> Reproducer is simple:
+	>
+	> echo 0xffffffff >/proc/sys/dev/scsi/logging_level ;
+	> cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt  ;
+	> echo 0 >/proc/sys/dev/scsi/logging
+	>
+	> It leads to the following messages in dmesg
+	>
+	> sd_init_command: disk=sda, block=871769260, count=26
+	> sda : block=871769260
+	> sda : reading 26/26 512 byte blocks.
+	> scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420)
+	> sd 0:1:0:0: send 0xf79ed980                  sd 0:1:0:0:
+	>         command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00
+	> buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40,
+	> queuecommand 0xc0344010
+	> leaving scsi_dispatch_cmnd()
+	> scsi_delete_timer: scmd: f79ed980, rtn: 1
+	> sd 0:1:0:0: done 0xf79ed980 SUCCESS        0 sd 0:1:0:0:
+	>         command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00
+	> scsi host busy 1 failed 0
+	> sd 0:1:0:0: Notifying upper driver of completion (result 0)
+	> sd_rw_intr: sda: res=0x0
+	> 26 sectors total, 13312 bytes done.
+	> use_sg is 4
+	> attempt to access beyond end of device
+	> sda6: rw=0, want=1044134458, limit=951401367
+	> Buffer I/O error on device sda6, logical block 522067228
+	> attempt to access beyond end of device
+
 Release Date	: Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@xxxxxxxx>
 Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
 Older Version	: 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
diff -puN drivers/scsi/megaraid/mega_common.h~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check drivers/scsi/megaraid/mega_common.h
--- 25/drivers/scsi/megaraid/mega_common.h~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check	Fri May 19 14:19:32 2006
+++ 25-akpm/drivers/scsi/megaraid/mega_common.h	Fri May 19 14:19:32 2006
@@ -37,7 +37,8 @@
 #define LSI_MAX_CHANNELS		16
 #define LSI_MAX_LOGICAL_DRIVES_64LD	(64+1)
 
-
+#define HBA_SIGNATURE_64BIT		0x0299
+#define PCI_CONF_AMISIG64		0xa4
 /**
  * scb_t - scsi command control block
  * @param ccb		: command control block for individual driver
diff -puN drivers/scsi/megaraid/megaraid_mbox.c~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check drivers/scsi/megaraid/megaraid_mbox.c
--- 25/drivers/scsi/megaraid/megaraid_mbox.c~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check	Fri May 19 14:19:32 2006
+++ 25-akpm/drivers/scsi/megaraid/megaraid_mbox.c	Fri May 19 14:19:32 2006
@@ -10,7 +10,7 @@
  *	   2 of the License, or (at your option) any later version.
  *
  * FILE		: megaraid_mbox.c
- * Version	: v2.20.4.8 (Apr 11 2006)
+ * Version	: v2.20.4.9 (May 19 2006)
  *
  * Authors:
  * 	Atul Mukker		<Atul.Mukker@xxxxxxxx>
@@ -720,7 +720,7 @@ megaraid_init_mbox(adapter_t *adapter)
 	struct pci_dev		*pdev;
 	mraid_device_t		*raid_dev;
 	int			i;
-
+	unsigned int		magic64;
 
 	adapter->ito	= MBOX_TIMEOUT;
 	pdev		= adapter->pdev;
@@ -863,12 +863,25 @@ megaraid_init_mbox(adapter_t *adapter)
 
 	// Set the DMA mask to 64-bit. All supported controllers as capable of
 	// DMA in this range
-	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) {
+			con_log(CL_ANN, (KERN_WARNING
+				"megaraid: could not set DMA mask for 64-bit.\n"));
 
-		goto out_free_sysfs_res;
+			goto out_free_sysfs_res;
+		}
 	}
 
 	// setup tasklet for DPC
diff -puN drivers/scsi/megaraid/megaraid_mbox.h~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check drivers/scsi/megaraid/megaraid_mbox.h
--- 25/drivers/scsi/megaraid/megaraid_mbox.h~scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check	Fri May 19 14:19:32 2006
+++ 25-akpm/drivers/scsi/megaraid/megaraid_mbox.h	Fri May 19 14:19:32 2006
@@ -21,8 +21,8 @@
 #include "megaraid_ioctl.h"
 
 
-#define MEGARAID_VERSION	"2.20.4.8"
-#define MEGARAID_EXT_VERSION	"(Release Date: Mon Apr 11 12:27:22 EST 2006)"
+#define MEGARAID_VERSION	"2.20.4.9"
+#define MEGARAID_EXT_VERSION	"(Release Date: Fri May 19 09:45:22 EST 2006)"
 
 
 /*
_

Patches currently in -mm which might be from Seokmann.Ju@xxxxxxxx are

scsi-megaraid_mmmbox-a-fix-on-64-bit-dma-capability-check.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux