View | Details | Raw Unified | Return to bug 254884
Collapse All | Expand All

(-)b/sys/dev/usb/net/if_smsc.c (-4 / +14 lines)
Lines 119-129 __FBSDID("$FreeBSD$"); Link Here
119
119
120
#include "miibus_if.h"
120
#include "miibus_if.h"
121
121
122
SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
123
    "USB smsc");
124
125
static bool smsc_rx_packet_batching = 1;
126
127
SYSCTL_BOOL(_hw_usb_smsc, OID_AUTO, smsc_rx_packet_batching, CTLFLAG_RDTUN,
128
    &smsc_rx_packet_batching, 0,
129
    "Multiple frames per RX transaction. Increases throughput and latency");
130
122
#ifdef USB_DEBUG
131
#ifdef USB_DEBUG
123
static int smsc_debug = 0;
132
static int smsc_debug = 0;
124
133
125
SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
126
    "USB smsc");
127
SYSCTL_INT(_hw_usb_smsc, OID_AUTO, debug, CTLFLAG_RWTUN, &smsc_debug, 0,
134
SYSCTL_INT(_hw_usb_smsc, OID_AUTO, debug, CTLFLAG_RWTUN, &smsc_debug, 0,
128
    "Debug level");
135
    "Debug level");
129
#endif
136
#endif
Lines 1377-1383 smsc_chip_init(struct smsc_softc *sc) Link Here
1377
	 * Burst capability is the number of URBs that can be in a burst of data/
1384
	 * Burst capability is the number of URBs that can be in a burst of data/
1378
	 * ethernet frames.
1385
	 * ethernet frames.
1379
	 */
1386
	 */
1380
	if (usbd_get_speed(sc->sc_ue.ue_udev) == USB_SPEED_HIGH)
1387
	if (!smsc_rx_packet_batching)
1388
		burst_cap = 0;
1389
	else if (usbd_get_speed(sc->sc_ue.ue_udev) == USB_SPEED_HIGH)
1381
		burst_cap = 37;
1390
		burst_cap = 37;
1382
	else
1391
	else
1383
		burst_cap = 128;
1392
		burst_cap = 128;
Lines 1404-1410 smsc_chip_init(struct smsc_softc *sc) Link Here
1404
	/* The following setings are used for 'turbo mode', a.k.a multiple frames
1413
	/* The following setings are used for 'turbo mode', a.k.a multiple frames
1405
	 * per Rx transaction (again info taken form Linux driver).
1414
	 * per Rx transaction (again info taken form Linux driver).
1406
	 */
1415
	 */
1407
	reg_val |= (SMSC_HW_CFG_MEF | SMSC_HW_CFG_BCE);
1416
	if (smsc_rx_packet_batching)
1417
		reg_val |= (SMSC_HW_CFG_MEF | SMSC_HW_CFG_BCE);
1408
1418
1409
	smsc_write_reg(sc, SMSC_HW_CFG, reg_val);
1419
	smsc_write_reg(sc, SMSC_HW_CFG, reg_val);
1410
1420

Return to bug 254884