diff options
-rw-r--r-- | Documentation/scsi/ChangeLog.megaraid | 61 | ||||
-rw-r--r-- | drivers/scsi/megaraid/mega_common.h | 3 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 34 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.h | 4 |
4 files changed, 94 insertions, 8 deletions
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid index c173806c91fa..fd8939e0045d 100644 --- a/Documentation/scsi/ChangeLog.megaraid +++ b/Documentation/scsi/ChangeLog.megaraid | |||
@@ -1,3 +1,64 @@ | |||
1 | Release Date : Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@lsil.com> | ||
2 | Current Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module) | ||
3 | Older Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) | ||
4 | |||
5 | 1. Fixed a bug in megaraid_init_mbox(). | ||
6 | Customer reported "garbage in file on x86_64 platform". | ||
7 | Root Cause: the driver registered controllers as 64-bit DMA capable | ||
8 | for those which are not support it. | ||
9 | Fix: Made change in the function inserting identification machanism | ||
10 | identifying 64-bit DMA capable controllers. | ||
11 | |||
12 | > -----Original Message----- | ||
13 | > From: Vasily Averin [mailto:vvs@sw.ru] | ||
14 | > Sent: Thursday, May 04, 2006 2:49 PM | ||
15 | > To: linux-scsi@vger.kernel.org; Kolli, Neela; Mukker, Atul; | ||
16 | > Ju, Seokmann; Bagalkote, Sreenivas; | ||
17 | > James.Bottomley@SteelEye.com; devel@openvz.org | ||
18 | > Subject: megaraid_mbox: garbage in file | ||
19 | > | ||
20 | > Hello all, | ||
21 | > | ||
22 | > I've investigated customers claim on the unstable work of | ||
23 | > their node and found a | ||
24 | > strange effect: reading from some files leads to the | ||
25 | > "attempt to access beyond end of device" messages. | ||
26 | > | ||
27 | > I've checked filesystem, memory on the node, motherboard BIOS | ||
28 | > version, but it | ||
29 | > does not help and issue still has been reproduced by simple | ||
30 | > file reading. | ||
31 | > | ||
32 | > Reproducer is simple: | ||
33 | > | ||
34 | > echo 0xffffffff >/proc/sys/dev/scsi/logging_level ; | ||
35 | > cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt ; | ||
36 | > echo 0 >/proc/sys/dev/scsi/logging | ||
37 | > | ||
38 | > It leads to the following messages in dmesg | ||
39 | > | ||
40 | > sd_init_command: disk=sda, block=871769260, count=26 | ||
41 | > sda : block=871769260 | ||
42 | > sda : reading 26/26 512 byte blocks. | ||
43 | > scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420) | ||
44 | > sd 0:1:0:0: send 0xf79ed980 sd 0:1:0:0: | ||
45 | > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 | ||
46 | > buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40, | ||
47 | > queuecommand 0xc0344010 | ||
48 | > leaving scsi_dispatch_cmnd() | ||
49 | > scsi_delete_timer: scmd: f79ed980, rtn: 1 | ||
50 | > sd 0:1:0:0: done 0xf79ed980 SUCCESS 0 sd 0:1:0:0: | ||
51 | > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 | ||
52 | > scsi host busy 1 failed 0 | ||
53 | > sd 0:1:0:0: Notifying upper driver of completion (result 0) | ||
54 | > sd_rw_intr: sda: res=0x0 | ||
55 | > 26 sectors total, 13312 bytes done. | ||
56 | > use_sg is 4 | ||
57 | > attempt to access beyond end of device | ||
58 | > sda6: rw=0, want=1044134458, limit=951401367 | ||
59 | > Buffer I/O error on device sda6, logical block 522067228 | ||
60 | > attempt to access beyond end of device | ||
61 | |||
1 | Release Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com> | 62 | Release Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com> |
2 | Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) | 63 | Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) |
3 | Older Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) | 64 | Older Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) |
diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h index 4675343228ad..12e38125b123 100644 --- a/drivers/scsi/megaraid/mega_common.h +++ b/drivers/scsi/megaraid/mega_common.h | |||
@@ -37,6 +37,9 @@ | |||
37 | #define LSI_MAX_CHANNELS 16 | 37 | #define LSI_MAX_CHANNELS 16 |
38 | #define LSI_MAX_LOGICAL_DRIVES_64LD (64+1) | 38 | #define LSI_MAX_LOGICAL_DRIVES_64LD (64+1) |
39 | 39 | ||
40 | #define HBA_SIGNATURE_64_BIT 0x299 | ||
41 | #define PCI_CONF_AMISIG64 0xa4 | ||
42 | |||
40 | 43 | ||
41 | /** | 44 | /** |
42 | * scb_t - scsi command control block | 45 | * scb_t - scsi command control block |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 92715130ac09..e671af0b4f58 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * FILE : megaraid_mbox.c | 12 | * FILE : megaraid_mbox.c |
13 | * Version : v2.20.4.8 (Apr 11 2006) | 13 | * Version : v2.20.4.9 (Jul 16 2006) |
14 | * | 14 | * |
15 | * Authors: | 15 | * Authors: |
16 | * Atul Mukker <Atul.Mukker@lsil.com> | 16 | * Atul Mukker <Atul.Mukker@lsil.com> |
@@ -720,6 +720,7 @@ megaraid_init_mbox(adapter_t *adapter) | |||
720 | struct pci_dev *pdev; | 720 | struct pci_dev *pdev; |
721 | mraid_device_t *raid_dev; | 721 | mraid_device_t *raid_dev; |
722 | int i; | 722 | int i; |
723 | uint32_t magic64; | ||
723 | 724 | ||
724 | 725 | ||
725 | adapter->ito = MBOX_TIMEOUT; | 726 | adapter->ito = MBOX_TIMEOUT; |
@@ -863,12 +864,33 @@ megaraid_init_mbox(adapter_t *adapter) | |||
863 | 864 | ||
864 | // Set the DMA mask to 64-bit. All supported controllers as capable of | 865 | // Set the DMA mask to 64-bit. All supported controllers as capable of |
865 | // DMA in this range | 866 | // DMA in this range |
866 | if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) { | 867 | pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64, &magic64); |
867 | 868 | ||
868 | con_log(CL_ANN, (KERN_WARNING | 869 | if (((magic64 == HBA_SIGNATURE_64_BIT) && |
869 | "megaraid: could not set DMA mask for 64-bit.\n")); | 870 | ((adapter->pdev->subsystem_device != |
871 | PCI_SUBSYS_ID_MEGARAID_SATA_150_6) || | ||
872 | (adapter->pdev->subsystem_device != | ||
873 | PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) || | ||
874 | (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && | ||
875 | adapter->pdev->device == PCI_DEVICE_ID_VERDE) || | ||
876 | (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && | ||
877 | adapter->pdev->device == PCI_DEVICE_ID_DOBSON) || | ||
878 | (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && | ||
879 | adapter->pdev->device == PCI_DEVICE_ID_LINDSAY) || | ||
880 | (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && | ||
881 | adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) || | ||
882 | (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && | ||
883 | adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) { | ||
884 | if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) { | ||
885 | con_log(CL_ANN, (KERN_WARNING | ||
886 | "megaraid: DMA mask for 64-bit failed\n")); | ||
870 | 887 | ||
871 | goto out_free_sysfs_res; | 888 | if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) { |
889 | con_log(CL_ANN, (KERN_WARNING | ||
890 | "megaraid: 32-bit DMA mask failed\n")); | ||
891 | goto out_free_sysfs_res; | ||
892 | } | ||
893 | } | ||
872 | } | 894 | } |
873 | 895 | ||
874 | // setup tasklet for DPC | 896 | // setup tasklet for DPC |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h index 868fb0ec93e7..2b5a3285f799 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.h +++ b/drivers/scsi/megaraid/megaraid_mbox.h | |||
@@ -21,8 +21,8 @@ | |||
21 | #include "megaraid_ioctl.h" | 21 | #include "megaraid_ioctl.h" |
22 | 22 | ||
23 | 23 | ||
24 | #define MEGARAID_VERSION "2.20.4.8" | 24 | #define MEGARAID_VERSION "2.20.4.9" |
25 | #define MEGARAID_EXT_VERSION "(Release Date: Mon Apr 11 12:27:22 EST 2006)" | 25 | #define MEGARAID_EXT_VERSION "(Release Date: Sun Jul 16 12:27:22 EST 2006)" |
26 | 26 | ||
27 | 27 | ||
28 | /* | 28 | /* |