summaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.h
diff options
context:
space:
mode:
authorAnanda Raju <Ananda.Raju@neterion.com>2006-04-21 19:18:03 -0400
committerJeff Garzik <jeff@garzik.org>2006-05-02 15:16:36 -0400
commitc92ca04b2a21852fbc6842e8a7c6fff3ae255b30 (patch)
tree9c161719d811a693d1ee3b202494e5a6d446c42e /drivers/net/s2io.h
parent9dc737a77353920a67337aa627f7d9dae8dade05 (diff)
downloadlinux-c92ca04b2a21852fbc6842e8a7c6fff3ae255b30.tar.gz
linux-c92ca04b2a21852fbc6842e8a7c6fff3ae255b30.tar.bz2
linux-c92ca04b2a21852fbc6842e8a7c6fff3ae255b30.zip
[PATCH] s2io: fixes
Hi, This patch contains some of the bug fixes done for S2io driver. Following are the brief description of changes 1. Continuing with initialization if we get minimum required MSI-X vectors 2. fix for ethtool online link test fails 3. make wait_for_cmd_complete generic for all command status registers 4. Print "Device is on PCI-E bus" for Xframe-E card 5. CX4 requires additional delay after sw_reset, and requires higher value for igp 6. Fixed panic due to non-TCP and/or LLC/SNAP traffic in case of lro 7. remove legacy code for old transponder 8. SPECIAL_REG_WRITE made to use 32-bit writes irrespective of system type 9. handle link interrupt as per user guide for Xframe II 10. Wait till all interrupts hndled Signed-off-by: Ananda Raju <ananda.raju@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r--drivers/net/s2io.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index a83a1d85f72e..fb46a4fed334 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -661,8 +661,8 @@ typedef struct {
/* Default Tunable parameters of the NIC. */
#define DEFAULT_FIFO_0_LEN 4096
#define DEFAULT_FIFO_1_7_LEN 512
-#define SMALL_BLK_CNT 30
-#define LARGE_BLK_CNT 100
+#define SMALL_BLK_CNT 30
+#define LARGE_BLK_CNT 100
/*
* Structure to keep track of the MSI-X vectors and the corresponding
@@ -733,7 +733,7 @@ struct s2io_nic {
int device_close_flag;
int device_enabled_once;
- char name[50];
+ char name[60];
struct tasklet_struct task;
volatile unsigned long tasklet_status;
@@ -804,6 +804,8 @@ struct s2io_nic {
char desc1[35];
char desc2[35];
+ int avail_msix_vectors; /* No. of MSI-X vectors granted by system */
+
struct msix_info_st msix_info[0x3f];
#define XFRAME_I_DEVICE 1
@@ -851,28 +853,32 @@ static inline void writeq(u64 val, void __iomem *addr)
writel((u32) (val), addr);
writel((u32) (val >> 32), (addr + 4));
}
+#endif
-/* In 32 bit modes, some registers have to be written in a
- * particular order to expect correct hardware operation. The
- * macro SPECIAL_REG_WRITE is used to perform such ordered
- * writes. Defines UF (Upper First) and LF (Lower First) will
- * be used to specify the required write order.
+/*
+ * Some registers have to be written in a particular order to
+ * expect correct hardware operation. The macro SPECIAL_REG_WRITE
+ * is used to perform such ordered writes. Defines UF (Upper First)
+ * and LF (Lower First) will be used to specify the required write order.
*/
#define UF 1
#define LF 2
static inline void SPECIAL_REG_WRITE(u64 val, void __iomem *addr, int order)
{
+ u32 ret;
+
if (order == LF) {
writel((u32) (val), addr);
+ ret = readl(addr);
writel((u32) (val >> 32), (addr + 4));
+ ret = readl(addr + 4);
} else {
writel((u32) (val >> 32), (addr + 4));
+ ret = readl(addr + 4);
writel((u32) (val), addr);
+ ret = readl(addr);
}
}
-#else
-#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr)
-#endif
/* Interrupt related values of Xena */
@@ -968,7 +974,7 @@ static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
static struct ethtool_ops netdev_ethtool_ops;
static void s2io_set_link(unsigned long data);
static int s2io_set_swapper(nic_t * sp);
-static void s2io_card_down(nic_t *nic);
+static void s2io_card_down(nic_t *nic, int flag);
static int s2io_card_up(nic_t *nic);
static int get_xena_rev_id(struct pci_dev *pdev);
static void restore_xmsi_data(nic_t *nic);