2 * Copyright (c) 2010-2011 Solarflare Communications, Inc.
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
33 #include <sys/param.h>
34 #include <sys/kernel.h>
38 #include <sys/module.h>
39 #include <sys/mutex.h>
41 #include <sys/socket.h>
42 #include <sys/taskqueue.h>
43 #include <sys/sockio.h>
44 #include <sys/sysctl.h>
45 #include <sys/syslog.h>
47 #include <dev/pci/pcireg.h>
48 #include <dev/pci/pcivar.h>
50 #include <net/ethernet.h>
52 #include <net/if_var.h>
53 #include <net/if_media.h>
54 #include <net/if_types.h>
56 #include "common/efx.h"
60 #include "sfxge_version.h"
62 #define SFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \
63 IFCAP_RXCSUM | IFCAP_TXCSUM | \
64 IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \
65 IFCAP_TSO4 | IFCAP_TSO6 | \
67 IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS)
68 #define SFXGE_CAP_ENABLE SFXGE_CAP
69 #define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \
70 IFCAP_JUMBO_MTU | IFCAP_LINKSTATE | IFCAP_HWSTATS)
72 MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver");
75 SYSCTL_NODE(_hw, OID_AUTO, sfxge, CTLFLAG_RD, 0,
76 "SFXGE driver parameters");
78 #define SFXGE_PARAM_RX_RING SFXGE_PARAM(rx_ring)
79 static int sfxge_rx_ring_entries = SFXGE_NDESCS;
80 TUNABLE_INT(SFXGE_PARAM_RX_RING, &sfxge_rx_ring_entries);
81 SYSCTL_INT(_hw_sfxge, OID_AUTO, rx_ring, CTLFLAG_RDTUN,
82 &sfxge_rx_ring_entries, 0,
83 "Maximum number of descriptors in a receive ring");
85 #define SFXGE_PARAM_TX_RING SFXGE_PARAM(tx_ring)
86 static int sfxge_tx_ring_entries = SFXGE_NDESCS;
87 TUNABLE_INT(SFXGE_PARAM_TX_RING, &sfxge_tx_ring_entries);
88 SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, CTLFLAG_RDTUN,
89 &sfxge_tx_ring_entries, 0,
90 "Maximum number of descriptors in a transmit ring");
93 sfxge_reset(void *arg, int npending);
96 sfxge_start(struct sfxge_softc *sc)
100 SFXGE_ADAPTER_LOCK_ASSERT_OWNED(sc);
102 if (sc->init_state == SFXGE_STARTED)
105 if (sc->init_state != SFXGE_REGISTERED) {
110 if ((rc = efx_nic_init(sc->enp)) != 0)
113 /* Start processing interrupts. */
114 if ((rc = sfxge_intr_start(sc)) != 0)
117 /* Start processing events. */
118 if ((rc = sfxge_ev_start(sc)) != 0)
121 /* Start the receiver side. */
122 if ((rc = sfxge_rx_start(sc)) != 0)
125 /* Start the transmitter side. */
126 if ((rc = sfxge_tx_start(sc)) != 0)
129 /* Fire up the port. */
130 if ((rc = sfxge_port_start(sc)) != 0)
133 sc->init_state = SFXGE_STARTED;
135 /* Tell the stack we're running. */
136 sc->ifnet->if_drv_flags |= IFF_DRV_RUNNING;
137 sc->ifnet->if_drv_flags &= ~IFF_DRV_OACTIVE;
154 efx_nic_fini(sc->enp);
157 device_printf(sc->dev, "sfxge_start: %d\n", rc);
163 sfxge_if_init(void *arg)
165 struct sfxge_softc *sc;
167 sc = (struct sfxge_softc *)arg;
169 SFXGE_ADAPTER_LOCK(sc);
170 (void)sfxge_start(sc);
171 SFXGE_ADAPTER_UNLOCK(sc);
175 sfxge_stop(struct sfxge_softc *sc)
177 SFXGE_ADAPTER_LOCK_ASSERT_OWNED(sc);
179 if (sc->init_state != SFXGE_STARTED)
182 sc->init_state = SFXGE_REGISTERED;
187 /* Stop the transmitter. */
190 /* Stop the receiver. */
193 /* Stop processing events. */
196 /* Stop processing interrupts. */
199 efx_nic_fini(sc->enp);
201 sc->ifnet->if_drv_flags &= ~IFF_DRV_RUNNING;
205 sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data)
207 struct sfxge_softc *sc;
211 ifr = (struct ifreq *)data;
217 SFXGE_ADAPTER_LOCK(sc);
218 if (ifp->if_flags & IFF_UP) {
219 if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
220 if ((ifp->if_flags ^ sc->if_flags) &
221 (IFF_PROMISC | IFF_ALLMULTI)) {
222 sfxge_mac_filter_set(sc);
227 if (ifp->if_drv_flags & IFF_DRV_RUNNING)
229 sc->if_flags = ifp->if_flags;
230 SFXGE_ADAPTER_UNLOCK(sc);
233 if (ifr->ifr_mtu == ifp->if_mtu) {
236 } else if (ifr->ifr_mtu > SFXGE_MAX_MTU) {
238 } else if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
239 ifp->if_mtu = ifr->ifr_mtu;
242 /* Restart required */
243 SFXGE_ADAPTER_LOCK(sc);
245 ifp->if_mtu = ifr->ifr_mtu;
246 error = sfxge_start(sc);
247 SFXGE_ADAPTER_UNLOCK(sc);
249 ifp->if_flags &= ~IFF_UP;
250 ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
257 if (ifp->if_drv_flags & IFF_DRV_RUNNING)
258 sfxge_mac_filter_set(sc);
262 int reqcap = ifr->ifr_reqcap;
265 SFXGE_ADAPTER_LOCK(sc);
267 /* Capabilities to be changed in accordance with request */
268 capchg_mask = ifp->if_capenable ^ reqcap;
271 * The networking core already rejects attempts to
272 * enable capabilities we don't have. We still have
273 * to reject attempts to disable capabilities that we
274 * can't (yet) disable.
276 KASSERT((reqcap & ~ifp->if_capabilities) == 0,
277 ("Unsupported capabilities %x requested %x vs %x",
278 reqcap & ~ifp->if_capabilities,
279 reqcap , ifp->if_capabilities));
280 if (capchg_mask & SFXGE_CAP_FIXED) {
282 SFXGE_ADAPTER_UNLOCK(sc);
286 /* Check request before any changes */
287 if ((capchg_mask & IFCAP_TSO4) &&
288 (reqcap & (IFCAP_TSO4 | IFCAP_TXCSUM)) == IFCAP_TSO4) {
290 SFXGE_ADAPTER_UNLOCK(sc);
291 if_printf(ifp, "enable txcsum before tso4\n");
294 if ((capchg_mask & IFCAP_TSO6) &&
295 (reqcap & (IFCAP_TSO6 | IFCAP_TXCSUM_IPV6)) == IFCAP_TSO6) {
297 SFXGE_ADAPTER_UNLOCK(sc);
298 if_printf(ifp, "enable txcsum6 before tso6\n");
302 if (reqcap & IFCAP_TXCSUM) {
303 ifp->if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP);
305 ifp->if_hwassist &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP);
306 if (reqcap & IFCAP_TSO4) {
307 reqcap &= ~IFCAP_TSO4;
309 "tso4 disabled due to -txcsum\n");
312 if (reqcap & IFCAP_TXCSUM_IPV6) {
313 ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6);
315 ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6);
316 if (reqcap & IFCAP_TSO6) {
317 reqcap &= ~IFCAP_TSO6;
319 "tso6 disabled due to -txcsum6\n");
324 * The kernel takes both IFCAP_TSOx and CSUM_TSO into
325 * account before using TSO. So, we do not touch
326 * checksum flags when IFCAP_TSOx is modified.
327 * Note that CSUM_TSO is (CSUM_IP_TSO|CSUM_IP6_TSO),
328 * but both bits are set in IPv4 and IPv6 mbufs.
331 ifp->if_capenable = reqcap;
333 SFXGE_ADAPTER_UNLOCK(sc);
338 error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
341 error = ether_ioctl(ifp, command, data);
348 sfxge_ifnet_fini(struct ifnet *ifp)
350 struct sfxge_softc *sc = ifp->if_softc;
352 SFXGE_ADAPTER_LOCK(sc);
354 SFXGE_ADAPTER_UNLOCK(sc);
356 ifmedia_removeall(&sc->media);
362 sfxge_ifnet_init(struct ifnet *ifp, struct sfxge_softc *sc)
364 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sc->enp);
371 if_initname(ifp, device_get_name(dev), device_get_unit(dev));
372 ifp->if_init = sfxge_if_init;
374 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
375 ifp->if_ioctl = sfxge_if_ioctl;
377 ifp->if_capabilities = SFXGE_CAP;
378 ifp->if_capenable = SFXGE_CAP_ENABLE;
381 ifp->if_capabilities |= IFCAP_LRO;
382 ifp->if_capenable |= IFCAP_LRO;
385 ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO |
386 CSUM_TCP_IPV6 | CSUM_UDP_IPV6;
388 ether_ifattach(ifp, encp->enc_mac_addr);
390 ifp->if_transmit = sfxge_if_transmit;
391 ifp->if_qflush = sfxge_if_qflush;
393 ifp->if_get_counter = sfxge_get_counter;
395 if ((rc = sfxge_port_ifmedia_init(sc)) != 0)
401 ether_ifdetach(sc->ifnet);
406 sfxge_sram_buf_tbl_alloc(struct sfxge_softc *sc, size_t n, uint32_t *idp)
408 KASSERT(sc->buffer_table_next + n <=
409 efx_nic_cfg_get(sc->enp)->enc_buftbl_limit,
410 ("buffer table full"));
412 *idp = sc->buffer_table_next;
413 sc->buffer_table_next += n;
417 sfxge_bar_init(struct sfxge_softc *sc)
419 efsys_bar_t *esbp = &sc->bar;
421 esbp->esb_rid = PCIR_BAR(EFX_MEM_BAR);
422 if ((esbp->esb_res = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY,
423 &esbp->esb_rid, RF_ACTIVE)) == NULL) {
424 device_printf(sc->dev, "Cannot allocate BAR region %d\n",
428 esbp->esb_tag = rman_get_bustag(esbp->esb_res);
429 esbp->esb_handle = rman_get_bushandle(esbp->esb_res);
431 SFXGE_BAR_LOCK_INIT(esbp, device_get_nameunit(sc->dev));
437 sfxge_bar_fini(struct sfxge_softc *sc)
439 efsys_bar_t *esbp = &sc->bar;
441 bus_release_resource(sc->dev, SYS_RES_MEMORY, esbp->esb_rid,
443 SFXGE_BAR_LOCK_DESTROY(esbp);
447 sfxge_create(struct sfxge_softc *sc)
452 char rss_param_name[sizeof(SFXGE_PARAM(%d.max_rss_channels))];
456 SFXGE_ADAPTER_LOCK_INIT(sc, device_get_nameunit(sc->dev));
458 sc->max_rss_channels = 0;
459 snprintf(rss_param_name, sizeof(rss_param_name),
460 SFXGE_PARAM(%d.max_rss_channels),
461 (int)device_get_unit(dev));
462 TUNABLE_INT_FETCH(rss_param_name, &sc->max_rss_channels);
464 sc->stats_node = SYSCTL_ADD_NODE(
465 device_get_sysctl_ctx(dev),
466 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
467 OID_AUTO, "stats", CTLFLAG_RD, NULL, "Statistics");
468 if (sc->stats_node == NULL) {
473 TASK_INIT(&sc->task_reset, 0, sfxge_reset, sc);
475 (void) pci_enable_busmaster(dev);
477 /* Initialize DMA mappings. */
478 if ((error = sfxge_dma_init(sc)) != 0)
481 /* Map the device registers. */
482 if ((error = sfxge_bar_init(sc)) != 0)
485 error = efx_family(pci_get_vendor(dev), pci_get_device(dev),
487 KASSERT(error == 0, ("Family should be filtered by sfxge_probe()"));
489 /* Create the common code nic object. */
490 SFXGE_EFSYS_LOCK_INIT(&sc->enp_lock,
491 device_get_nameunit(sc->dev), "nic");
492 if ((error = efx_nic_create(sc->family, (efsys_identifier_t *)sc,
493 &sc->bar, &sc->enp_lock, &enp)) != 0)
497 if (!ISP2(sfxge_rx_ring_entries) ||
498 !(sfxge_rx_ring_entries & EFX_RXQ_NDESCS_MASK)) {
499 log(LOG_ERR, "%s=%d must be power of 2 from %u to %u",
500 SFXGE_PARAM_RX_RING, sfxge_rx_ring_entries,
501 EFX_RXQ_MINNDESCS, EFX_RXQ_MAXNDESCS);
503 goto fail_rx_ring_entries;
505 sc->rxq_entries = sfxge_rx_ring_entries;
507 if (!ISP2(sfxge_tx_ring_entries) ||
508 !(sfxge_tx_ring_entries & EFX_TXQ_NDESCS_MASK)) {
509 log(LOG_ERR, "%s=%d must be power of 2 from %u to %u",
510 SFXGE_PARAM_TX_RING, sfxge_tx_ring_entries,
511 EFX_TXQ_MINNDESCS, EFX_TXQ_MAXNDESCS);
513 goto fail_tx_ring_entries;
515 sc->txq_entries = sfxge_tx_ring_entries;
517 /* Initialize MCDI to talk to the microcontroller. */
518 if ((error = sfxge_mcdi_init(sc)) != 0)
521 /* Probe the NIC and build the configuration data area. */
522 if ((error = efx_nic_probe(enp)) != 0)
525 SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev),
526 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
527 OID_AUTO, "version", CTLFLAG_RD,
528 SFXGE_VERSION_STRING, 0,
531 /* Initialize the NVRAM. */
532 if ((error = efx_nvram_init(enp)) != 0)
535 /* Initialize the VPD. */
536 if ((error = efx_vpd_init(enp)) != 0)
540 if ((error = efx_nic_reset(enp)) != 0)
543 /* Initialize buffer table allocation. */
544 sc->buffer_table_next = 0;
546 /* Set up interrupts. */
547 if ((error = sfxge_intr_init(sc)) != 0)
550 /* Initialize event processing state. */
551 if ((error = sfxge_ev_init(sc)) != 0)
554 /* Initialize receive state. */
555 if ((error = sfxge_rx_init(sc)) != 0)
558 /* Initialize transmit state. */
559 if ((error = sfxge_tx_init(sc)) != 0)
562 /* Initialize port state. */
563 if ((error = sfxge_port_init(sc)) != 0)
566 sc->init_state = SFXGE_INITIALIZED;
589 efx_nic_unprobe(enp);
595 fail_tx_ring_entries:
596 fail_rx_ring_entries:
598 efx_nic_destroy(enp);
599 SFXGE_EFSYS_LOCK_DESTROY(&sc->enp_lock);
603 (void) pci_disable_busmaster(sc->dev);
607 SFXGE_ADAPTER_LOCK_DESTROY(sc);
612 sfxge_destroy(struct sfxge_softc *sc)
616 /* Clean up port state. */
619 /* Clean up transmit state. */
622 /* Clean up receive state. */
625 /* Clean up event processing state. */
628 /* Clean up interrupts. */
631 /* Tear down common code subsystems. */
632 efx_nic_reset(sc->enp);
633 efx_vpd_fini(sc->enp);
634 efx_nvram_fini(sc->enp);
635 efx_nic_unprobe(sc->enp);
637 /* Tear down MCDI. */
640 /* Destroy common code context. */
643 efx_nic_destroy(enp);
645 /* Free DMA memory. */
648 /* Free mapped BARs. */
651 (void) pci_disable_busmaster(sc->dev);
653 taskqueue_drain(taskqueue_thread, &sc->task_reset);
655 /* Destroy the softc lock. */
656 SFXGE_ADAPTER_LOCK_DESTROY(sc);
660 sfxge_vpd_handler(SYSCTL_HANDLER_ARGS)
662 struct sfxge_softc *sc = arg1;
663 efx_vpd_value_t value;
666 value.evv_tag = arg2 >> 16;
667 value.evv_keyword = arg2 & 0xffff;
668 if ((rc = efx_vpd_get(sc->enp, sc->vpd_data, sc->vpd_size, &value))
672 return (SYSCTL_OUT(req, value.evv_value, value.evv_length));
676 sfxge_vpd_try_add(struct sfxge_softc *sc, struct sysctl_oid_list *list,
677 efx_vpd_tag_t tag, const char *keyword)
679 struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->dev);
680 efx_vpd_value_t value;
682 /* Check whether VPD tag/keyword is present */
684 value.evv_keyword = EFX_VPD_KEYWORD(keyword[0], keyword[1]);
685 if (efx_vpd_get(sc->enp, sc->vpd_data, sc->vpd_size, &value) != 0)
689 ctx, list, OID_AUTO, keyword, CTLTYPE_STRING|CTLFLAG_RD,
690 sc, tag << 16 | EFX_VPD_KEYWORD(keyword[0], keyword[1]),
691 sfxge_vpd_handler, "A", "");
695 sfxge_vpd_init(struct sfxge_softc *sc)
697 struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->dev);
698 struct sysctl_oid *vpd_node;
699 struct sysctl_oid_list *vpd_list;
701 efx_vpd_value_t value;
704 if ((rc = efx_vpd_size(sc->enp, &sc->vpd_size)) != 0)
706 sc->vpd_data = malloc(sc->vpd_size, M_SFXGE, M_WAITOK);
707 if ((rc = efx_vpd_read(sc->enp, sc->vpd_data, sc->vpd_size)) != 0)
710 /* Copy ID (product name) into device description, and log it. */
711 value.evv_tag = EFX_VPD_ID;
712 if (efx_vpd_get(sc->enp, sc->vpd_data, sc->vpd_size, &value) == 0) {
713 value.evv_value[value.evv_length] = 0;
714 device_set_desc_copy(sc->dev, value.evv_value);
715 device_printf(sc->dev, "%s\n", value.evv_value);
718 vpd_node = SYSCTL_ADD_NODE(
719 ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)),
720 OID_AUTO, "vpd", CTLFLAG_RD, NULL, "Vital Product Data");
721 vpd_list = SYSCTL_CHILDREN(vpd_node);
723 /* Add sysctls for all expected and any vendor-defined keywords. */
724 sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, "PN");
725 sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, "EC");
726 sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, "SN");
729 for (keyword[1] = '0'; keyword[1] <= '9'; keyword[1]++)
730 sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, keyword);
731 for (keyword[1] = 'A'; keyword[1] <= 'Z'; keyword[1]++)
732 sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, keyword);
737 free(sc->vpd_data, M_SFXGE);
743 sfxge_vpd_fini(struct sfxge_softc *sc)
745 free(sc->vpd_data, M_SFXGE);
749 sfxge_reset(void *arg, int npending)
751 struct sfxge_softc *sc;
756 sc = (struct sfxge_softc *)arg;
758 SFXGE_ADAPTER_LOCK(sc);
760 if (sc->init_state != SFXGE_STARTED)
764 efx_nic_reset(sc->enp);
765 if ((rc = sfxge_start(sc)) != 0)
766 device_printf(sc->dev,
767 "reset failed (%d); interface is now stopped\n",
771 SFXGE_ADAPTER_UNLOCK(sc);
775 sfxge_schedule_reset(struct sfxge_softc *sc)
777 taskqueue_enqueue(taskqueue_thread, &sc->task_reset);
781 sfxge_attach(device_t dev)
783 struct sfxge_softc *sc;
787 sc = device_get_softc(dev);
790 /* Allocate ifnet. */
791 ifp = if_alloc(IFT_ETHER);
793 device_printf(dev, "Couldn't allocate ifnet\n");
799 /* Initialize hardware. */
800 if ((error = sfxge_create(sc)) != 0)
803 /* Create the ifnet for the port. */
804 if ((error = sfxge_ifnet_init(ifp, sc)) != 0)
807 if ((error = sfxge_vpd_init(sc)) != 0)
810 sc->init_state = SFXGE_REGISTERED;
815 sfxge_ifnet_fini(ifp);
827 sfxge_detach(device_t dev)
829 struct sfxge_softc *sc;
831 sc = device_get_softc(dev);
835 /* Destroy the ifnet. */
836 sfxge_ifnet_fini(sc->ifnet);
838 /* Tear down hardware. */
845 sfxge_probe(device_t dev)
847 uint16_t pci_vendor_id;
848 uint16_t pci_device_id;
852 pci_vendor_id = pci_get_vendor(dev);
853 pci_device_id = pci_get_device(dev);
855 rc = efx_family(pci_vendor_id, pci_device_id, &family);
859 KASSERT(family == EFX_FAMILY_SIENA, ("impossible controller family"));
860 device_set_desc(dev, "Solarflare SFC9000 family");
864 static device_method_t sfxge_methods[] = {
865 DEVMETHOD(device_probe, sfxge_probe),
866 DEVMETHOD(device_attach, sfxge_attach),
867 DEVMETHOD(device_detach, sfxge_detach),
872 static devclass_t sfxge_devclass;
874 static driver_t sfxge_driver = {
877 sizeof(struct sfxge_softc)
880 DRIVER_MODULE(sfxge, pci, sfxge_driver, sfxge_devclass, 0, 0);