From 60e3c7067047cbb6c9f0fa5bfcb0ad9d19fe721d Mon Sep 17 00:00:00 2001 From: gallatin Date: Wed, 31 Jan 2007 15:29:31 +0000 Subject: Abandon using sleepable locks in favor of mutexes for mxge's if_ioctl locking in preparation for adding a watchdog handler (callouts must not use sleepable locks). This required shuffling memory and interrupt allocation to the attach routine rather than if_ioctl so as to avoid potential sleeps while bringing up the interface. --- sys/dev/mxge/if_mxge_var.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/dev/mxge/if_mxge_var.h') diff --git a/sys/dev/mxge/if_mxge_var.h b/sys/dev/mxge/if_mxge_var.h index 82beda1..cf3c0d4 100644 --- a/sys/dev/mxge/if_mxge_var.h +++ b/sys/dev/mxge/if_mxge_var.h @@ -114,7 +114,7 @@ typedef struct typedef struct { struct ifnet* ifp; int big_bytes; - struct mtx tx_lock; + struct mtx tx_mtx; int csum_flag; /* rx_csums? */ uint8_t mac_addr[6]; /* eeprom mac address */ mxge_tx_buf_t tx; /* transmit ring */ @@ -138,8 +138,8 @@ typedef struct { int intr_coal_delay; volatile uint32_t *intr_coal_delay_ptr; int wc; - struct mtx cmd_lock; - struct sx driver_lock; + struct mtx cmd_mtx; + struct mtx driver_mtx; int wake_queue; int stop_queue; int down_cnt; @@ -159,10 +159,14 @@ typedef struct { int read_write_dma; int fw_multicast_support; int link_width; + mxge_dma_t dmabench_dma; char *mac_addr_string; char product_code_string[64]; char serial_number_string[64]; char scratch[256]; + char tx_mtx_name[16]; + char cmd_mtx_name[16]; + char driver_mtx_name[16]; } mxge_softc_t; #define MXGE_PCI_VENDOR_MYRICOM 0x14c1 -- cgit v1.1