]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/chelsio/subr.c
[NET] Kconfig: Rename MIKROTIK_RB500 -> MIKROTIK_RB532
[linux-2.6-omap-h63xx.git] / drivers / net / chelsio / subr.c
index 7de9a611e1f7dac5d4582f70a968119797d00198..7adf30230c4f7123d03d91e2f9c500f26d4a49f8 100644 (file)
@@ -563,10 +563,11 @@ struct chelsio_vpd_t {
  * written to the Control register. The hardware device will set the flag to a
  * one when 4B have been transferred to the Data register.
  */
-int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data)
+int t1_seeprom_read(adapter_t *adapter, u32 addr, __le32 *data)
 {
        int i = EEPROM_MAX_POLL;
        u16 val;
+       u32 v;
 
        if (addr >= EEPROMSIZE || (addr & 3))
                return -EINVAL;
@@ -582,8 +583,8 @@ int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data)
                       adapter->name, addr);
                return -EIO;
        }
-       pci_read_config_dword(adapter->pdev, A_PCICFG_VPD_DATA, data);
-       *data = le32_to_cpu(*data);
+       pci_read_config_dword(adapter->pdev, A_PCICFG_VPD_DATA, &v);
+       *data = cpu_to_le32(v);
        return 0;
 }
 
@@ -593,7 +594,7 @@ static int t1_eeprom_vpd_get(adapter_t *adapter, struct chelsio_vpd_t *vpd)
 
        for (addr = 0; !ret && addr < sizeof(*vpd); addr += sizeof(u32))
                ret = t1_seeprom_read(adapter, addr,
-                                     (u32 *)((u8 *)vpd + addr));
+                                     (__le32 *)((u8 *)vpd + addr));
 
        return ret;
 }
@@ -884,7 +885,7 @@ static int asic_slow_intr(adapter_t *adapter)
        if (cause & F_PL_INTR_PCIX)
                t1_pci_intr_handler(adapter);
        if (cause & F_PL_INTR_EXT)
-               t1_elmer0_ext_intr_handler(adapter);
+               t1_elmer0_ext_intr(adapter);
 
        /* Clear the interrupts just processed. */
        writel(cause, adapter->regs + A_PL_CAUSE);