diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
commit | 8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch) | |
tree | be59573c0af3617d0cd8a7d61f0ed119e58b1156 /drivers/scsi/megaraid/megaraid_mbox.c | |
parent | d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff) | |
parent | 01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff) |
Merge ../linux-2.6
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 7ae580f17e64..266b3910846b 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> |
@@ -736,6 +736,7 @@ megaraid_init_mbox(adapter_t *adapter) | |||
736 | struct pci_dev *pdev; | 736 | struct pci_dev *pdev; |
737 | mraid_device_t *raid_dev; | 737 | mraid_device_t *raid_dev; |
738 | int i; | 738 | int i; |
739 | uint32_t magic64; | ||
739 | 740 | ||
740 | 741 | ||
741 | adapter->ito = MBOX_TIMEOUT; | 742 | adapter->ito = MBOX_TIMEOUT; |
@@ -879,12 +880,33 @@ megaraid_init_mbox(adapter_t *adapter) | |||
879 | 880 | ||
880 | // Set the DMA mask to 64-bit. All supported controllers as capable of | 881 | // Set the DMA mask to 64-bit. All supported controllers as capable of |
881 | // DMA in this range | 882 | // DMA in this range |
882 | if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) { | 883 | pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64, &magic64); |
883 | 884 | ||
884 | con_log(CL_ANN, (KERN_WARNING | 885 | if (((magic64 == HBA_SIGNATURE_64_BIT) && |
885 | "megaraid: could not set DMA mask for 64-bit.\n")); | 886 | ((adapter->pdev->subsystem_device != |
887 | PCI_SUBSYS_ID_MEGARAID_SATA_150_6) || | ||
888 | (adapter->pdev->subsystem_device != | ||
889 | PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) || | ||
890 | (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && | ||
891 | adapter->pdev->device == PCI_DEVICE_ID_VERDE) || | ||
892 | (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && | ||
893 | adapter->pdev->device == PCI_DEVICE_ID_DOBSON) || | ||
894 | (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && | ||
895 | adapter->pdev->device == PCI_DEVICE_ID_LINDSAY) || | ||
896 | (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && | ||
897 | adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) || | ||
898 | (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && | ||
899 | adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) { | ||
900 | if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) { | ||
901 | con_log(CL_ANN, (KERN_WARNING | ||
902 | "megaraid: DMA mask for 64-bit failed\n")); | ||
886 | 903 | ||
887 | goto out_free_sysfs_res; | 904 | if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) { |
905 | con_log(CL_ANN, (KERN_WARNING | ||
906 | "megaraid: 32-bit DMA mask failed\n")); | ||
907 | goto out_free_sysfs_res; | ||
908 | } | ||
909 | } | ||
888 | } | 910 | } |
889 | 911 | ||
890 | // setup tasklet for DPC | 912 | // setup tasklet for DPC |
@@ -1638,6 +1660,14 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) | |||
1638 | rdev->last_disp |= (1L << SCP2CHANNEL(scp)); | 1660 | rdev->last_disp |= (1L << SCP2CHANNEL(scp)); |
1639 | } | 1661 | } |
1640 | 1662 | ||
1663 | if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) { | ||
1664 | scp->sense_buffer[0] = 0x70; | ||
1665 | scp->sense_buffer[2] = ILLEGAL_REQUEST; | ||
1666 | scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB; | ||
1667 | scp->result = CHECK_CONDITION << 1; | ||
1668 | return NULL; | ||
1669 | } | ||
1670 | |||
1641 | /* Fall through */ | 1671 | /* Fall through */ |
1642 | 1672 | ||
1643 | case READ_CAPACITY: | 1673 | case READ_CAPACITY: |