diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:08 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:08 -0400 |
commit | fc212bb1fb538f9453d9ea2cca09749e602055a6 (patch) | |
tree | 4f3bbad508c9be75f3823b7059f615e4b01d785e /drivers/ide/pci/siimage.c | |
parent | 1afa65549266a2094d985508a88ab41d9c40ab44 (diff) |
ide: use pci_dev->revision
Some places were using PCI_CLASS_REVISION instead of PCI_REVISION_ID so
they were not converted by commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65.
Cc: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r-- | drivers/ide/pci/siimage.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index eda11050a02d..faf0be31ba57 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -640,13 +640,9 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name) | |||
640 | 640 | ||
641 | static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const char *name) | 641 | static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const char *name) |
642 | { | 642 | { |
643 | u32 class_rev = 0; | 643 | u8 rev = dev->revision, tmpbyte = 0, BA5_EN = 0; |
644 | u8 tmpbyte = 0; | ||
645 | u8 BA5_EN = 0; | ||
646 | 644 | ||
647 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); | 645 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, rev ? 1 : 255); |
648 | class_rev &= 0xff; | ||
649 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (class_rev) ? 1 : 255); | ||
650 | 646 | ||
651 | pci_read_config_byte(dev, 0x8A, &BA5_EN); | 647 | pci_read_config_byte(dev, 0x8A, &BA5_EN); |
652 | if ((BA5_EN & 0x01) || (pci_resource_start(dev, 5))) { | 648 | if ((BA5_EN & 0x01) || (pci_resource_start(dev, 5))) { |
@@ -825,19 +821,14 @@ static void __devinit siimage_fixup(ide_hwif_t *hwif) | |||
825 | 821 | ||
826 | static void __devinit init_iops_siimage(ide_hwif_t *hwif) | 822 | static void __devinit init_iops_siimage(ide_hwif_t *hwif) |
827 | { | 823 | { |
828 | struct pci_dev *dev = hwif->pci_dev; | ||
829 | u32 class_rev = 0; | ||
830 | |||
831 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); | ||
832 | class_rev &= 0xff; | ||
833 | |||
834 | hwif->hwif_data = NULL; | 824 | hwif->hwif_data = NULL; |
835 | 825 | ||
836 | /* Pessimal until we finish probing */ | 826 | /* Pessimal until we finish probing */ |
837 | hwif->rqsize = 15; | 827 | hwif->rqsize = 15; |
838 | 828 | ||
839 | if (pci_get_drvdata(dev) == NULL) | 829 | if (pci_get_drvdata(hwif->pci_dev) == NULL) |
840 | return; | 830 | return; |
831 | |||
841 | init_mmio_iops_siimage(hwif); | 832 | init_mmio_iops_siimage(hwif); |
842 | } | 833 | } |
843 | 834 | ||