diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2014-09-25 06:06:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-28 17:22:09 -0400 |
commit | 8a189f1288b654e45f2ec9393abfb1390b261ae9 (patch) | |
tree | b421103d11f5a6a00c36162bb513d6460c41582e | |
parent | f5c7e1a47aeca2b31106aa94e7f4daa218e6c478 (diff) |
defxx: Correct DEFEA's ESIC port I/O accesses
Reverse the order of arguments to `outb', data to write comes first.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/fddi/defxx.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c index c44eaf019dea..6068db874281 100644 --- a/drivers/net/fddi/defxx.c +++ b/drivers/net/fddi/defxx.c | |||
@@ -719,28 +719,28 @@ static void dfx_bus_init(struct net_device *dev) | |||
719 | 719 | ||
720 | /* Set the decode range of the board. */ | 720 | /* Set the decode range of the board. */ |
721 | val = ((bp->base.port >> 12) << PI_IO_CMP_V_SLOT); | 721 | val = ((bp->base.port >> 12) << PI_IO_CMP_V_SLOT); |
722 | outb(base_addr + PI_ESIC_K_IO_ADD_CMP_0_1, val); | 722 | outb(val, base_addr + PI_ESIC_K_IO_ADD_CMP_0_1); |
723 | outb(base_addr + PI_ESIC_K_IO_ADD_CMP_0_0, 0); | 723 | outb(0, base_addr + PI_ESIC_K_IO_ADD_CMP_0_0); |
724 | outb(base_addr + PI_ESIC_K_IO_ADD_CMP_1_1, val); | 724 | outb(val, base_addr + PI_ESIC_K_IO_ADD_CMP_1_1); |
725 | outb(base_addr + PI_ESIC_K_IO_ADD_CMP_1_0, 0); | 725 | outb(0, base_addr + PI_ESIC_K_IO_ADD_CMP_1_0); |
726 | val = PI_ESIC_K_CSR_IO_LEN - 1; | 726 | val = PI_ESIC_K_CSR_IO_LEN - 1; |
727 | outb(base_addr + PI_ESIC_K_IO_ADD_MASK_0_1, (val >> 8) & 0xff); | 727 | outb(val, base_addr + PI_ESIC_K_IO_ADD_MASK_0_1); |
728 | outb(base_addr + PI_ESIC_K_IO_ADD_MASK_0_0, val & 0xff); | 728 | outb(0, base_addr + PI_ESIC_K_IO_ADD_MASK_0_0); |
729 | outb(base_addr + PI_ESIC_K_IO_ADD_MASK_1_1, (val >> 8) & 0xff); | 729 | outb(val, base_addr + PI_ESIC_K_IO_ADD_MASK_1_1); |
730 | outb(base_addr + PI_ESIC_K_IO_ADD_MASK_1_0, val & 0xff); | 730 | outb(0, base_addr + PI_ESIC_K_IO_ADD_MASK_1_0); |
731 | 731 | ||
732 | /* Enable the decoders. */ | 732 | /* Enable the decoders. */ |
733 | val = PI_FUNCTION_CNTRL_M_IOCS1 | PI_FUNCTION_CNTRL_M_IOCS0; | 733 | val = PI_FUNCTION_CNTRL_M_IOCS1 | PI_FUNCTION_CNTRL_M_IOCS0; |
734 | if (dfx_use_mmio) | 734 | if (dfx_use_mmio) |
735 | val |= PI_FUNCTION_CNTRL_M_MEMCS0; | 735 | val |= PI_FUNCTION_CNTRL_M_MEMCS0; |
736 | outb(base_addr + PI_ESIC_K_FUNCTION_CNTRL, val); | 736 | outb(val, base_addr + PI_ESIC_K_FUNCTION_CNTRL); |
737 | 737 | ||
738 | /* | 738 | /* |
739 | * Enable access to the rest of the module | 739 | * Enable access to the rest of the module |
740 | * (including PDQ and packet memory). | 740 | * (including PDQ and packet memory). |
741 | */ | 741 | */ |
742 | val = PI_SLOT_CNTRL_M_ENB; | 742 | val = PI_SLOT_CNTRL_M_ENB; |
743 | outb(base_addr + PI_ESIC_K_SLOT_CNTRL, val); | 743 | outb(val, base_addr + PI_ESIC_K_SLOT_CNTRL); |
744 | 744 | ||
745 | /* | 745 | /* |
746 | * Map PDQ registers into memory or port space. This is | 746 | * Map PDQ registers into memory or port space. This is |
@@ -751,12 +751,12 @@ static void dfx_bus_init(struct net_device *dev) | |||
751 | val |= PI_BURST_HOLDOFF_V_MEM_MAP; | 751 | val |= PI_BURST_HOLDOFF_V_MEM_MAP; |
752 | else | 752 | else |
753 | val &= ~PI_BURST_HOLDOFF_V_MEM_MAP; | 753 | val &= ~PI_BURST_HOLDOFF_V_MEM_MAP; |
754 | outb(base_addr + PI_DEFEA_K_BURST_HOLDOFF, val); | 754 | outb(val, base_addr + PI_DEFEA_K_BURST_HOLDOFF); |
755 | 755 | ||
756 | /* Enable interrupts at EISA bus interface chip (ESIC) */ | 756 | /* Enable interrupts at EISA bus interface chip (ESIC) */ |
757 | val = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); | 757 | val = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
758 | val |= PI_CONFIG_STAT_0_M_INT_ENB; | 758 | val |= PI_CONFIG_STAT_0_M_INT_ENB; |
759 | outb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0, val); | 759 | outb(val, base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
760 | } | 760 | } |
761 | if (dfx_bus_pci) { | 761 | if (dfx_bus_pci) { |
762 | struct pci_dev *pdev = to_pci_dev(bdev); | 762 | struct pci_dev *pdev = to_pci_dev(bdev); |
@@ -825,7 +825,7 @@ static void dfx_bus_uninit(struct net_device *dev) | |||
825 | /* Disable interrupts at EISA bus interface chip (ESIC) */ | 825 | /* Disable interrupts at EISA bus interface chip (ESIC) */ |
826 | val = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); | 826 | val = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
827 | val &= ~PI_CONFIG_STAT_0_M_INT_ENB; | 827 | val &= ~PI_CONFIG_STAT_0_M_INT_ENB; |
828 | outb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0, val); | 828 | outb(val, base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
829 | } | 829 | } |
830 | if (dfx_bus_pci) { | 830 | if (dfx_bus_pci) { |
831 | /* Disable interrupts at PCI bus interface chip (PFI) */ | 831 | /* Disable interrupts at PCI bus interface chip (PFI) */ |
@@ -1917,7 +1917,7 @@ static irqreturn_t dfx_interrupt(int irq, void *dev_id) | |||
1917 | 1917 | ||
1918 | /* Disable interrupts at the ESIC */ | 1918 | /* Disable interrupts at the ESIC */ |
1919 | status &= ~PI_CONFIG_STAT_0_M_INT_ENB; | 1919 | status &= ~PI_CONFIG_STAT_0_M_INT_ENB; |
1920 | outb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0, status); | 1920 | outb(status, base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
1921 | 1921 | ||
1922 | /* Call interrupt service routine for this adapter */ | 1922 | /* Call interrupt service routine for this adapter */ |
1923 | dfx_int_common(dev); | 1923 | dfx_int_common(dev); |
@@ -1925,7 +1925,7 @@ static irqreturn_t dfx_interrupt(int irq, void *dev_id) | |||
1925 | /* Reenable interrupts at the ESIC */ | 1925 | /* Reenable interrupts at the ESIC */ |
1926 | status = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); | 1926 | status = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
1927 | status |= PI_CONFIG_STAT_0_M_INT_ENB; | 1927 | status |= PI_CONFIG_STAT_0_M_INT_ENB; |
1928 | outb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0, status); | 1928 | outb(status, base_addr + PI_ESIC_K_IO_CONFIG_STAT_0); |
1929 | 1929 | ||
1930 | spin_unlock(&bp->lock); | 1930 | spin_unlock(&bp->lock); |
1931 | } | 1931 | } |