Deleted Added
full compact
oce_if.c (246482) oce_if.c (246799)
1/*-
2 * Copyright (C) 2012 Emulex
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

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

31 * Contact Information:
32 * freebsd-drivers@emulex.com
33 *
34 * Emulex
35 * 3333 Susan Street
36 * Costa Mesa, CA 92626
37 */
38
1/*-
2 * Copyright (C) 2012 Emulex
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

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

31 * Contact Information:
32 * freebsd-drivers@emulex.com
33 *
34 * Emulex
35 * 3333 Susan Street
36 * Costa Mesa, CA 92626
37 */
38
39/* $FreeBSD: head/sys/dev/oce/oce_if.c 246482 2013-02-07 15:20:54Z rrs $ */
39/* $FreeBSD: head/sys/dev/oce/oce_if.c 246799 2013-02-14 17:34:17Z jpaetzel $ */
40
41#include "opt_inet6.h"
42#include "opt_inet.h"
43
44#include "oce_if.h"
45
46
47/* Driver entry points prototypes */

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

1812 /* TX Watch Dog*/
1813 for (i = 0; i < sc->nwqs; i++)
1814 oce_tx_restart(sc, sc->wq[i]);
1815
1816 callout_reset(&sc->timer, hz, oce_local_timer, sc);
1817}
1818
1819
40
41#include "opt_inet6.h"
42#include "opt_inet.h"
43
44#include "oce_if.h"
45
46
47/* Driver entry points prototypes */

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

1812 /* TX Watch Dog*/
1813 for (i = 0; i < sc->nwqs; i++)
1814 oce_tx_restart(sc, sc->wq[i]);
1815
1816 callout_reset(&sc->timer, hz, oce_local_timer, sc);
1817}
1818
1819
1820/* NOTE : This should only be called holding
1821 * DEVICE_LOCK.
1822*/
1820static void
1821oce_if_deactivate(POCE_SOFTC sc)
1822{
1823 int i, mtime = 0;
1824 int wait_req = 0;
1825 struct oce_rq *rq;
1826 struct oce_wq *wq;
1827 struct oce_eq *eq;

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

1841 mtime += 1;
1842 if (!wait_req)
1843 break;
1844 }
1845
1846 /* Stop intrs and finish any bottom halves pending */
1847 oce_hw_intr_disable(sc);
1848
1823static void
1824oce_if_deactivate(POCE_SOFTC sc)
1825{
1826 int i, mtime = 0;
1827 int wait_req = 0;
1828 struct oce_rq *rq;
1829 struct oce_wq *wq;
1830 struct oce_eq *eq;

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

1844 mtime += 1;
1845 if (!wait_req)
1846 break;
1847 }
1848
1849 /* Stop intrs and finish any bottom halves pending */
1850 oce_hw_intr_disable(sc);
1851
1852 /* Since taskqueue_drain takes a Giant Lock, We should not acquire
1853 any other lock. So unlock device lock and require after
1854 completing taskqueue_drain.
1855 */
1856 UNLOCK(&sc->dev_lock);
1849 for (i = 0; i < sc->intr_count; i++) {
1850 if (sc->intrs[i].tq != NULL) {
1851 taskqueue_drain(sc->intrs[i].tq, &sc->intrs[i].task);
1852 }
1853 }
1857 for (i = 0; i < sc->intr_count; i++) {
1858 if (sc->intrs[i].tq != NULL) {
1859 taskqueue_drain(sc->intrs[i].tq, &sc->intrs[i].task);
1860 }
1861 }
1862 LOCK(&sc->dev_lock);
1854
1855 /* Delete RX queue in card with flush param */
1856 oce_stop_rx(sc);
1857
1858 /* Invalidate any pending cq and eq entries*/
1859 for_all_evnt_queues(sc, eq, i)
1860 oce_drain_eq(eq);
1861 for_all_rq_queues(sc, rq, i)

--- 164 unchanged lines hidden ---
1863
1864 /* Delete RX queue in card with flush param */
1865 oce_stop_rx(sc);
1866
1867 /* Invalidate any pending cq and eq entries*/
1868 for_all_evnt_queues(sc, eq, i)
1869 oce_drain_eq(eq);
1870 for_all_rq_queues(sc, rq, i)

--- 164 unchanged lines hidden ---