Deleted Added
full compact
cxgb_main.c (217321) cxgb_main.c (218909)
1/**************************************************************************
2
3Copyright (c) 2007-2009, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 14 unchanged lines hidden (view full) ---

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
1/**************************************************************************
2
3Copyright (c) 2007-2009, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 14 unchanged lines hidden (view full) ---

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_main.c 217321 2011-01-12 19:53:44Z mdf $");
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_main.c 218909 2011-02-21 09:01:34Z brucec $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/bus.h>
37#include <sys/module.h>
38#include <sys/pciio.h>
39#include <sys/conf.h>

--- 1863 unchanged lines hidden (view full) ---

1903 /*
1904 * taskqueue_drain may cause a deadlock if the adapter lock is held.
1905 */
1906 ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
1907
1908 /*
1909 * Clear this port's bit from the open device map, and then drain all
1910 * the tasks that can access/manipulate this port's port_info or ifp.
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/bus.h>
37#include <sys/module.h>
38#include <sys/pciio.h>
39#include <sys/conf.h>

--- 1863 unchanged lines hidden (view full) ---

1903 /*
1904 * taskqueue_drain may cause a deadlock if the adapter lock is held.
1905 */
1906 ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
1907
1908 /*
1909 * Clear this port's bit from the open device map, and then drain all
1910 * the tasks that can access/manipulate this port's port_info or ifp.
1911 * We disable this port's interrupts here and so the the slow/ext
1911 * We disable this port's interrupts here and so the slow/ext
1912 * interrupt tasks won't be enqueued. The tick task will continue to
1913 * be enqueued every second but the runs after this drain will not see
1914 * this port in the open device map.
1915 *
1916 * A well behaved task must take open_device_map into account and ignore
1917 * ports that are not open.
1918 */
1919 clrbit(&sc->open_device_map, pi->port_id);

--- 933 unchanged lines hidden (view full) ---

2853 }
2854 case CHELSIO_GET_MEM: {
2855 struct ch_mem_range *t = (struct ch_mem_range *)data;
2856 struct mc7 *mem;
2857 uint8_t *useraddr;
2858 u64 buf[32];
2859
2860 /*
1912 * interrupt tasks won't be enqueued. The tick task will continue to
1913 * be enqueued every second but the runs after this drain will not see
1914 * this port in the open device map.
1915 *
1916 * A well behaved task must take open_device_map into account and ignore
1917 * ports that are not open.
1918 */
1919 clrbit(&sc->open_device_map, pi->port_id);

--- 933 unchanged lines hidden (view full) ---

2853 }
2854 case CHELSIO_GET_MEM: {
2855 struct ch_mem_range *t = (struct ch_mem_range *)data;
2856 struct mc7 *mem;
2857 uint8_t *useraddr;
2858 u64 buf[32];
2859
2860 /*
2861 * Use these to avoid modifying len/addr in the the return
2861 * Use these to avoid modifying len/addr in the return
2862 * struct
2863 */
2864 uint32_t len = t->len, addr = t->addr;
2865
2866 if (!is_offload(sc))
2867 return (EOPNOTSUPP);
2868 if (!(sc->flags & FULL_INIT_DONE))
2869 return (EIO); /* need the memory controllers */

--- 509 unchanged lines hidden ---
2862 * struct
2863 */
2864 uint32_t len = t->len, addr = t->addr;
2865
2866 if (!is_offload(sc))
2867 return (EOPNOTSUPP);
2868 if (!(sc->flags & FULL_INIT_DONE))
2869 return (EIO); /* need the memory controllers */

--- 509 unchanged lines hidden ---