summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/net/if_axe.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-10-11 19:20:53 +0000
committeryongari <yongari@FreeBSD.org>2010-10-11 19:20:53 +0000
commitac3035ff8b6a599a6685b2d7bf9b392e36bf3028 (patch)
tree68b062dd4aa9f77a517515ac4ecc4b8d3f43a4f5 /sys/dev/usb/net/if_axe.c
parent1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6 (diff)
downloadFreeBSD-src-ac3035ff8b6a599a6685b2d7bf9b392e36bf3028.zip
FreeBSD-src-ac3035ff8b6a599a6685b2d7bf9b392e36bf3028.tar.gz
Do not setup interrupt endpoint for axe(4).
It seems axe(4) controllers support interrupt endpoint such that enabling interrupt endpoint generates about 1000 interrupts/sec. Controllers transfer 8 bytes data through interrupt endpoint and the data include link UP/DOWN state as well as some PHY related information. Previously axe(4) didn't use the transferred data and didn't even try to read the data. Because axe(4) counts on mii(4) to detect link state changes there is no need to use interrupt endpoint here. This change fixes generation of unnecessary interrupts which was seen when interface is brought to UP. No objections from: hselasky
Diffstat (limited to 'sys/dev/usb/net/if_axe.c')
-rw-r--r--sys/dev/usb/net/if_axe.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/sys/dev/usb/net/if_axe.c b/sys/dev/usb/net/if_axe.c
index bc0bac6..9476e5c 100644
--- a/sys/dev/usb/net/if_axe.c
+++ b/sys/dev/usb/net/if_axe.c
@@ -171,7 +171,6 @@ static device_probe_t axe_probe;
static device_attach_t axe_attach;
static device_detach_t axe_detach;
-static usb_callback_t axe_intr_callback;
static usb_callback_t axe_bulk_read_callback;
static usb_callback_t axe_bulk_write_callback;
@@ -215,15 +214,6 @@ static const struct usb_config axe_config[AXE_N_TRANSFER] = {
.callback = axe_bulk_read_callback,
.timeout = 0, /* no timeout */
},
-
- [AXE_INTR_DT_RD] = {
- .type = UE_INTERRUPT,
- .endpoint = UE_ADDR_ANY,
- .direction = UE_DIR_IN,
- .flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
- .bufsize = 0, /* use wMaxPacketSize */
- .callback = axe_intr_callback,
- },
};
static device_method_t axe_methods[] = {
@@ -796,27 +786,6 @@ axe_detach(device_t dev)
return (0);
}
-static void
-axe_intr_callback(struct usb_xfer *xfer, usb_error_t error)
-{
- switch (USB_GET_STATE(xfer)) {
- case USB_ST_TRANSFERRED:
- case USB_ST_SETUP:
-tr_setup:
- usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer));
- usbd_transfer_submit(xfer);
- return;
-
- default: /* Error */
- if (error != USB_ERR_CANCELLED) {
- /* try to clear stall first */
- usbd_xfer_set_stall(xfer);
- goto tr_setup;
- }
- return;
- }
-}
-
#if (AXE_BULK_BUF_SIZE >= 0x10000)
#error "Please update axe_bulk_read_callback()!"
#endif
@@ -1034,7 +1003,6 @@ axe_start(struct usb_ether *ue)
/*
* start the USB transfers, if not already started:
*/
- usbd_transfer_start(sc->sc_xfer[AXE_INTR_DT_RD]);
usbd_transfer_start(sc->sc_xfer[AXE_BULK_DT_RD]);
usbd_transfer_start(sc->sc_xfer[AXE_BULK_DT_WR]);
}
@@ -1139,7 +1107,6 @@ axe_stop(struct usb_ether *ue)
*/
usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_WR]);
usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_RD]);
- usbd_transfer_stop(sc->sc_xfer[AXE_INTR_DT_RD]);
axe_reset(sc);
}
OpenPOWER on IntegriCloud