diff options
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mbox.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 92715130ac09..cd982c877da0 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 |
@@ -1622,6 +1644,14 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) | |||
1622 | rdev->last_disp |= (1L << SCP2CHANNEL(scp)); | 1644 | rdev->last_disp |= (1L << SCP2CHANNEL(scp)); |
1623 | } | 1645 | } |
1624 | 1646 | ||
1647 | if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) { | ||
1648 | scp->sense_buffer[0] = 0x70; | ||
1649 | scp->sense_buffer[2] = ILLEGAL_REQUEST; | ||
1650 | scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB; | ||
1651 | scp->result = CHECK_CONDITION << 1; | ||
1652 | return NULL; | ||
1653 | } | ||
1654 | |||
1625 | /* Fall through */ | 1655 | /* Fall through */ |
1626 | 1656 | ||
1627 | case READ_CAPACITY: | 1657 | case READ_CAPACITY: |