drivers/message/fusion: use pci_dev->revision
This driver uses PCI_CLASS_REVISION instead of PCI_REVISION_ID, so it
wasn't converted by 44c10138fd
("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>
This commit is contained in:
Родитель
ee5e5683d8
Коммит
9ceb5c16f5
|
@ -1653,7 +1653,6 @@ mpt_mapresources(MPT_ADAPTER *ioc)
|
||||||
unsigned long port;
|
unsigned long port;
|
||||||
u32 msize;
|
u32 msize;
|
||||||
u32 psize;
|
u32 psize;
|
||||||
u8 revision;
|
|
||||||
int r = -ENODEV;
|
int r = -ENODEV;
|
||||||
struct pci_dev *pdev;
|
struct pci_dev *pdev;
|
||||||
|
|
||||||
|
@ -1670,8 +1669,6 @@ mpt_mapresources(MPT_ADAPTER *ioc)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
|
|
||||||
|
|
||||||
if (sizeof(dma_addr_t) > 4) {
|
if (sizeof(dma_addr_t) > 4) {
|
||||||
const uint64_t required_mask = dma_get_required_mask
|
const uint64_t required_mask = dma_get_required_mask
|
||||||
(&pdev->dev);
|
(&pdev->dev);
|
||||||
|
@ -1779,7 +1776,6 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
MPT_ADAPTER *ioc;
|
MPT_ADAPTER *ioc;
|
||||||
u8 cb_idx;
|
u8 cb_idx;
|
||||||
int r = -ENODEV;
|
int r = -ENODEV;
|
||||||
u8 revision;
|
|
||||||
u8 pcixcmd;
|
u8 pcixcmd;
|
||||||
static int mpt_ids = 0;
|
static int mpt_ids = 0;
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
|
@ -1887,8 +1883,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n",
|
dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n",
|
||||||
ioc->name, &ioc->facts, &ioc->pfacts[0]));
|
ioc->name, &ioc->facts, &ioc->pfacts[0]));
|
||||||
|
|
||||||
pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
|
mpt_get_product_name(pdev->vendor, pdev->device, pdev->revision,
|
||||||
mpt_get_product_name(pdev->vendor, pdev->device, revision, ioc->prod_name);
|
ioc->prod_name);
|
||||||
|
|
||||||
switch (pdev->device)
|
switch (pdev->device)
|
||||||
{
|
{
|
||||||
|
@ -1903,7 +1899,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MPI_MANUFACTPAGE_DEVICEID_FC929X:
|
case MPI_MANUFACTPAGE_DEVICEID_FC929X:
|
||||||
if (revision < XL_929) {
|
if (pdev->revision < XL_929) {
|
||||||
/* 929X Chip Fix. Set Split transactions level
|
/* 929X Chip Fix. Set Split transactions level
|
||||||
* for PCIX. Set MOST bits to zero.
|
* for PCIX. Set MOST bits to zero.
|
||||||
*/
|
*/
|
||||||
|
@ -1934,7 +1930,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
/* 1030 Chip Fix. Disable Split transactions
|
/* 1030 Chip Fix. Disable Split transactions
|
||||||
* for PCIX. Set MOST bits to zero if Rev < C0( = 8).
|
* for PCIX. Set MOST bits to zero if Rev < C0( = 8).
|
||||||
*/
|
*/
|
||||||
if (revision < C0_1030) {
|
if (pdev->revision < C0_1030) {
|
||||||
pci_read_config_byte(pdev, 0x6a, &pcixcmd);
|
pci_read_config_byte(pdev, 0x6a, &pcixcmd);
|
||||||
pcixcmd &= 0x8F;
|
pcixcmd &= 0x8F;
|
||||||
pci_write_config_byte(pdev, 0x6a, pcixcmd);
|
pci_write_config_byte(pdev, 0x6a, pcixcmd);
|
||||||
|
|
|
@ -1250,7 +1250,6 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
|
||||||
int iocnum;
|
int iocnum;
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
int cim_rev;
|
int cim_rev;
|
||||||
u8 revision;
|
|
||||||
struct scsi_device *sdev;
|
struct scsi_device *sdev;
|
||||||
VirtDevice *vdevice;
|
VirtDevice *vdevice;
|
||||||
|
|
||||||
|
@ -1324,8 +1323,7 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
|
||||||
pdev = (struct pci_dev *) ioc->pcidev;
|
pdev = (struct pci_dev *) ioc->pcidev;
|
||||||
|
|
||||||
karg->pciId = pdev->device;
|
karg->pciId = pdev->device;
|
||||||
pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
|
karg->hwRev = pdev->revision;
|
||||||
karg->hwRev = revision;
|
|
||||||
karg->subSystemDevice = pdev->subsystem_device;
|
karg->subSystemDevice = pdev->subsystem_device;
|
||||||
karg->subSystemVendor = pdev->subsystem_vendor;
|
karg->subSystemVendor = pdev->subsystem_vendor;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче