diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2012-05-31 19:26:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-31 20:49:26 -0400 |
commit | 9ceb5c16f5aa1021e9ef8f5e6c41feba288f963b (patch) | |
tree | c46f47dbb86ee69005b47169847adf8f42db66d8 /drivers | |
parent | ee5e5683d8ac3fec876cb6c26792212f773d5898 (diff) |
drivers/message/fusion: use pci_dev->revision
This driver uses PCI_CLASS_REVISION instead of PCI_REVISION_ID, so it
wasn't converted by 44c10138fd4bbc ("PCI: Change all drivers to use
pci_device->revision").
In one case, it even reads PCI revision ID without using it -- that code
is now removed...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Cc: Eric Moore <eric.moore@lsi.com>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 12 | ||||
-rw-r--r-- | drivers/message/fusion/mptctl.c | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index a5c591ffe395..48052b62ee08 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1653,7 +1653,6 @@ mpt_mapresources(MPT_ADAPTER *ioc) | |||
1653 | unsigned long port; | 1653 | unsigned long port; |
1654 | u32 msize; | 1654 | u32 msize; |
1655 | u32 psize; | 1655 | u32 psize; |
1656 | u8 revision; | ||
1657 | int r = -ENODEV; | 1656 | int r = -ENODEV; |
1658 | struct pci_dev *pdev; | 1657 | struct pci_dev *pdev; |
1659 | 1658 | ||
@@ -1670,8 +1669,6 @@ mpt_mapresources(MPT_ADAPTER *ioc) | |||
1670 | return r; | 1669 | return r; |
1671 | } | 1670 | } |
1672 | 1671 | ||
1673 | pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); | ||
1674 | |||
1675 | if (sizeof(dma_addr_t) > 4) { | 1672 | if (sizeof(dma_addr_t) > 4) { |
1676 | const uint64_t required_mask = dma_get_required_mask | 1673 | const uint64_t required_mask = dma_get_required_mask |
1677 | (&pdev->dev); | 1674 | (&pdev->dev); |
@@ -1779,7 +1776,6 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1779 | MPT_ADAPTER *ioc; | 1776 | MPT_ADAPTER *ioc; |
1780 | u8 cb_idx; | 1777 | u8 cb_idx; |
1781 | int r = -ENODEV; | 1778 | int r = -ENODEV; |
1782 | u8 revision; | ||
1783 | u8 pcixcmd; | 1779 | u8 pcixcmd; |
1784 | static int mpt_ids = 0; | 1780 | static int mpt_ids = 0; |
1785 | #ifdef CONFIG_PROC_FS | 1781 | #ifdef CONFIG_PROC_FS |
@@ -1887,8 +1883,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1887 | dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n", | 1883 | dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n", |
1888 | ioc->name, &ioc->facts, &ioc->pfacts[0])); | 1884 | ioc->name, &ioc->facts, &ioc->pfacts[0])); |
1889 | 1885 | ||
1890 | pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); | 1886 | mpt_get_product_name(pdev->vendor, pdev->device, pdev->revision, |
1891 | mpt_get_product_name(pdev->vendor, pdev->device, revision, ioc->prod_name); | 1887 | ioc->prod_name); |
1892 | 1888 | ||
1893 | switch (pdev->device) | 1889 | switch (pdev->device) |
1894 | { | 1890 | { |
@@ -1903,7 +1899,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1903 | break; | 1899 | break; |
1904 | 1900 | ||
1905 | case MPI_MANUFACTPAGE_DEVICEID_FC929X: | 1901 | case MPI_MANUFACTPAGE_DEVICEID_FC929X: |
1906 | if (revision < XL_929) { | 1902 | if (pdev->revision < XL_929) { |
1907 | /* 929X Chip Fix. Set Split transactions level | 1903 | /* 929X Chip Fix. Set Split transactions level |
1908 | * for PCIX. Set MOST bits to zero. | 1904 | * for PCIX. Set MOST bits to zero. |
1909 | */ | 1905 | */ |
@@ -1934,7 +1930,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1934 | /* 1030 Chip Fix. Disable Split transactions | 1930 | /* 1030 Chip Fix. Disable Split transactions |
1935 | * for PCIX. Set MOST bits to zero if Rev < C0( = 8). | 1931 | * for PCIX. Set MOST bits to zero if Rev < C0( = 8). |
1936 | */ | 1932 | */ |
1937 | if (revision < C0_1030) { | 1933 | if (pdev->revision < C0_1030) { |
1938 | pci_read_config_byte(pdev, 0x6a, &pcixcmd); | 1934 | pci_read_config_byte(pdev, 0x6a, &pcixcmd); |
1939 | pcixcmd &= 0x8F; | 1935 | pcixcmd &= 0x8F; |
1940 | pci_write_config_byte(pdev, 0x6a, pcixcmd); | 1936 | pci_write_config_byte(pdev, 0x6a, pcixcmd); |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 6e6e16aab9da..b383b6961e59 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -1250,7 +1250,6 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size) | |||
1250 | int iocnum; | 1250 | int iocnum; |
1251 | unsigned int port; | 1251 | unsigned int port; |
1252 | int cim_rev; | 1252 | int cim_rev; |
1253 | u8 revision; | ||
1254 | struct scsi_device *sdev; | 1253 | struct scsi_device *sdev; |
1255 | VirtDevice *vdevice; | 1254 | VirtDevice *vdevice; |
1256 | 1255 | ||
@@ -1324,8 +1323,7 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size) | |||
1324 | pdev = (struct pci_dev *) ioc->pcidev; | 1323 | pdev = (struct pci_dev *) ioc->pcidev; |
1325 | 1324 | ||
1326 | karg->pciId = pdev->device; | 1325 | karg->pciId = pdev->device; |
1327 | pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); | 1326 | karg->hwRev = pdev->revision; |
1328 | karg->hwRev = revision; | ||
1329 | karg->subSystemDevice = pdev->subsystem_device; | 1327 | karg->subSystemDevice = pdev->subsystem_device; |
1330 | karg->subSystemVendor = pdev->subsystem_vendor; | 1328 | karg->subSystemVendor = pdev->subsystem_vendor; |
1331 | 1329 | ||