Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[pandora-kernel.git] / drivers / net / chelsio / espi.c
index 44d2603..1e0749e 100644 (file)
@@ -202,9 +202,9 @@ static void espi_setup_for_pm3393(adapter_t *adapter)
 
 static void espi_setup_for_vsc7321(adapter_t *adapter)
 {
-        writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN0);
-        writel(0x1f401f4, adapter->regs + A_ESPI_SCH_TOKEN1);
-        writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN2);
+       writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN0);
+       writel(0x1f401f4, adapter->regs + A_ESPI_SCH_TOKEN1);
+       writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN2);
        writel(0xa00, adapter->regs + A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK);
        writel(0x1ff, adapter->regs + A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK);
        writel(1, adapter->regs + A_ESPI_CALENDAR_LENGTH);
@@ -247,10 +247,10 @@ int t1_espi_init(struct peespi *espi, int mac_type, int nports)
                writel(V_OUT_OF_SYNC_COUNT(4) |
                       V_DIP2_PARITY_ERR_THRES(3) |
                       V_DIP4_THRES(1), adapter->regs + A_ESPI_MISC_CONTROL);
-               writel(nports == 4 ? 0x200040 : 0x1000080,
+               writel(nports == 4 ? 0x200040 : 0x1000080,
                       adapter->regs + A_ESPI_MAXBURST1_MAXBURST2);
        } else
-               writel(0x800100, adapter->regs + A_ESPI_MAXBURST1_MAXBURST2);
+               writel(0x800100, adapter->regs + A_ESPI_MAXBURST1_MAXBURST2);
 
        if (mac_type == CHBT_MAC_PM3393)
                espi_setup_for_pm3393(adapter);
@@ -297,6 +297,7 @@ struct peespi *t1_espi_create(adapter_t *adapter)
        return espi;
 }
 
+#if 0
 void t1_espi_set_misc_ctrl(adapter_t *adapter, u32 val)
 {
        struct peespi *espi = adapter->espi;
@@ -309,6 +310,7 @@ void t1_espi_set_misc_ctrl(adapter_t *adapter, u32 val)
        writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL);
        spin_unlock(&espi->lock);
 }
+#endif  /*  0  */
 
 u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait)
 {
@@ -341,32 +343,31 @@ u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait)
  * compare with t1_espi_get_mon(), it reads espiInTxSop[0 ~ 3] in
  * one shot, since there is no per port counter on the out side.
  */
-int
-t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait)
+int t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait)
 {
-        struct peespi *espi = adapter->espi;
+       struct peespi *espi = adapter->espi;
        u8 i, nport = (u8)adapter->params.nports;
 
-        if (!wait) {
-                if (!spin_trylock(&espi->lock))
-                        return -1;
-        } else
-                spin_lock(&espi->lock);
+       if (!wait) {
+               if (!spin_trylock(&espi->lock))
+                       return -1;
+       } else
+               spin_lock(&espi->lock);
 
-       if ( (espi->misc_ctrl & MON_MASK) != F_MONITORED_DIRECTION ) {
+       if ((espi->misc_ctrl & MON_MASK) != F_MONITORED_DIRECTION) {
                espi->misc_ctrl = (espi->misc_ctrl & ~MON_MASK) |
                                        F_MONITORED_DIRECTION;
-                writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL);
-       }
+               writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL);
+       }
        for (i = 0 ; i < nport; i++, valp++) {
                if (i) {
                        writel(espi->misc_ctrl | V_MONITORED_PORT_NUM(i),
                               adapter->regs + A_ESPI_MISC_CONTROL);
                }
-                *valp = readl(adapter->regs + A_ESPI_SCH_TOKEN3);
-        }
+               *valp = readl(adapter->regs + A_ESPI_SCH_TOKEN3);
+       }
 
-        writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL);
-        spin_unlock(&espi->lock);
-        return 0;
+       writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL);
+       spin_unlock(&espi->lock);
+       return 0;
 }