diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2019-02-12 14:42:42 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-02-18 19:55:55 +0100 |
commit | c2908a0dfd7ab13381f09fde636f1429d4bb5eaa (patch) | |
tree | b68d8028538c168633fd3ed61e8fbacea60cf26a | |
parent | f752294946ae79aa610dda08413e3d5721faed27 (diff) | |
download | linux-c2908a0dfd7ab13381f09fde636f1429d4bb5eaa.tar.bz2 |
mt76: usb: introduce disable_usb_sg parameter
Add disable_usb_sg module parameter to disable scatter-gather on demand
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/usb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c index 0970a53d6ed5..c9f095c1f161 100644 --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c @@ -22,6 +22,10 @@ #define MT_VEND_REQ_MAX_RETRY 10 #define MT_VEND_REQ_TOUT_MS 300 +static bool disable_usb_sg; +module_param_named(disable_usb_sg, disable_usb_sg, bool, 0644); +MODULE_PARM_DESC(disable_usb_sg, "Disable usb scatter-gather support"); + /* should be called with usb_ctrl_mtx locked */ static int __mt76u_vendor_request(struct mt76_dev *dev, u8 req, u8 req_type, u16 val, u16 offset, @@ -246,7 +250,7 @@ static bool mt76u_check_sg(struct mt76_dev *dev) struct usb_interface *intf = to_usb_interface(dev->dev); struct usb_device *udev = interface_to_usbdev(intf); - return (udev->bus->sg_tablesize > 0 && + return (!disable_usb_sg && udev->bus->sg_tablesize > 0 && (udev->bus->no_sg_constraint || udev->speed == USB_SPEED_WIRELESS)); } |