aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb/gs_usb.c
Commit message (Collapse)AuthorAge
* net: can: usb: gs_usb: Fix buffer on stackMaksim Salau2017-05-03
| | | | | | | | | | | | commit b05c73bd1e3ec60357580eb042ee932a5ed754d5 upstream. Allocate buffers on HEAP instead of STACK for local structures that are to be sent using usb_control_msg(). Signed-off-by: Maksim Salau <maksim.salau@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* can: gs_usb: Don't use stack memory for USB transfersEthan Zonca2017-03-12
| | | | | | | | | | | | | | | commit c919a3069c775c1c876bec55e00b2305d5125caa upstream. Fixes: 05ca5270005c can: gs_usb: add ethtool set_phys_id callback to locate physical device The gs_usb driver is performing USB transfers using buffers allocated on the stack. This causes the driver to not function with vmapped stacks. Instead, allocate memory for the transfer buffers. Signed-off-by: Ethan Zonca <e@ethanzonca.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net: can: usb: gs_usb: don't print error when allocating urb failsWolfram Sang2016-08-13
| | | | | | | kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2016-06-30
|\ | | | | | | | | | | | | | | Several cases of overlapping changes, except the packet scheduler conflicts which deal with the addition of the free list parameter to qdisc_enqueue(). Signed-off-by: David S. Miller <davem@davemloft.net>
| * can: gs_usb: Add Basic support for the bytewerk.org candleLight interfaceMaximilian Schneider2016-06-20
| | | | | | | | | | | | | | | | | | This patchs adds basic support for the bytewerk.org candleLight interface, a open hardware (CERN OHL) USB CAN adapter. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | can: gs_usb: add ethtool set_phys_id callback to locate physical deviceMaximilian Schneider2016-06-17
| | | | | | | | | | | | | | | | | | | | | | This patch Implements the ethtool set_phys_id callback to ease the locating of specific physical devices. Currently only supported on candleLight interfaces. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle change sinto separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | can: gs_usb: codingstyle: introduce use of BIT() + fix indentionMaximilian Schneider2016-06-17
|/ | | | | | | | | | This patch converts "1 << n" by BIT(n) and fixes the indention. No functional change. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle changes into separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: modify the usb device table to use only the first usb interfaceMaximilian Schneider2016-05-09
| | | | | | | | | Modified the USB device table to use only the first USB interface, as is the case with GS USB devices. This allows other GS USB compatible devices to be more flexible with their remaining interfaces. Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: fixed disconnect bug by removing erroneous use of kfree()Maximilain Schneider2016-02-26
| | | | | | | | | | | | | | | | gs_destroy_candev() erroneously calls kfree() on a struct gs_can *, which is allocated through alloc_candev() and should instead be freed using free_candev() alone. The inappropriate use of kfree() causes the kernel to hang when gs_destroy_candev() is called. Only the struct gs_usb * which is allocated through kzalloc() should be freed using kfree() when the device is disconnected. Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: Fix typo in function nameNik Nyby2015-08-20
| | | | | | | | This fixes typos in gs_usb.c where 'receive' is misspelled as 'recieve'. Signed-off-by: Nik Nyby <nikolas@gnu.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: check for kzalloc allocation failureColin Ian King2015-03-22
| | | | | | | | | | | smatch detected the following issue: drivers/net/can/usb/gs_usb.c:904 gs_usb_probe() error: potential null dereference 'dev'. (kzalloc returns null) Add a check for null return from kzalloc and return -ENOMEM Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: add .ndo_change_mtu functionMarc Kleine-Budde2014-11-18
| | | | | | Use common can_change_mtu function. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: gs_destroy_candev(): fix use after freeMarc Kleine-Budde2014-05-21
| | | | | | | This patch fixes a use after free of "dev" in gs_destroy_candev(). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: gs_usb: Added support for the GS_USB CAN devicesMaximilian Schneider2014-05-19
The Geschwister Schneider Family of devices are galvanically isolated USB2.0 to CAN2.0A/B adapters. Currently two form factors are available, a tethered dongle in a rugged enclosure, and mini-pci-e card. Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>