mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
linux-can-fixes-for-4.7-20160623
-----BEGIN PGP SIGNATURE----- iQEcBAABCgAGBQJXa6kLAAoJED07qiWsqSVqRsIH/RiHvKa9VB7yYQaXV3YqUPIo iizU6mQCeODqZsDw9bXce232RevKBteYDyr4YpC4f9mX54CrQI7WRN7ev5fKU49a FB4M9uz8v3kS5XX8gADkuDvSwtrQ7pMz1fXM2rkEyHT/xf6egCOT/lpI/mWQuNcM 3mkMFLy5ZUAaVHAsfqu8TrDgeWMDXNxbVwGtB/AuoFJ62pqVf5M+TwzKrYaOFM4r Rbl3NINKwFwk41KCOz20GiVvvahCp05SPHmK0OMwxsffKZmmkUOdHvusOZx7Zxnw RY7Mc/j+OvvAHYnRaZmfdDEPXc2hKQP0ATjVsW/bju7PWoVpG+87mYqubIFuTSY= =B2gO -----END PGP SIGNATURE----- Merge tag 'linux-can-fixes-for-4.7-20160623' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-06-23 this is a pull request of 3 patches for the upcoming linux-4.7 release. The first two patches are by Oliver Hartkopp fixing oopes in the generic CAN device netlink handling. Jimmy Assarsson's patch for the kvaser_usb driver adds support for more devices by adding their USB product ids. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
5aa3e24928
3 changed files with 18 additions and 1 deletions
|
@ -798,6 +798,9 @@ static int can_validate(struct nlattr *tb[], struct nlattr *data[])
|
|||
* - control mode with CAN_CTRLMODE_FD set
|
||||
*/
|
||||
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
if (data[IFLA_CAN_CTRLMODE]) {
|
||||
struct can_ctrlmode *cm = nla_data(data[IFLA_CAN_CTRLMODE]);
|
||||
|
||||
|
@ -1008,6 +1011,11 @@ static int can_newlink(struct net *src_net, struct net_device *dev,
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static void can_dellink(struct net_device *dev, struct list_head *head)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static struct rtnl_link_ops can_link_ops __read_mostly = {
|
||||
.kind = "can",
|
||||
.maxtype = IFLA_CAN_MAX,
|
||||
|
@ -1016,6 +1024,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = {
|
|||
.validate = can_validate,
|
||||
.newlink = can_newlink,
|
||||
.changelink = can_changelink,
|
||||
.dellink = can_dellink,
|
||||
.get_size = can_get_size,
|
||||
.fill_info = can_fill_info,
|
||||
.get_xstats_size = can_get_xstats_size,
|
||||
|
|
|
@ -47,6 +47,8 @@ config CAN_KVASER_USB
|
|||
- Kvaser USBcan R
|
||||
- Kvaser Leaf Light v2
|
||||
- Kvaser Mini PCI Express HS
|
||||
- Kvaser Mini PCI Express 2xHS
|
||||
- Kvaser USBcan Light 2xHS
|
||||
- Kvaser USBcan II HS/HS
|
||||
- Kvaser USBcan II HS/LS
|
||||
- Kvaser USBcan Rugged ("USBcan Rev B")
|
||||
|
|
|
@ -59,11 +59,14 @@
|
|||
#define USB_CAN_R_PRODUCT_ID 39
|
||||
#define USB_LEAF_LITE_V2_PRODUCT_ID 288
|
||||
#define USB_MINI_PCIE_HS_PRODUCT_ID 289
|
||||
#define USB_LEAF_LIGHT_HS_V2_OEM_PRODUCT_ID 290
|
||||
#define USB_USBCAN_LIGHT_2HS_PRODUCT_ID 291
|
||||
#define USB_MINI_PCIE_2HS_PRODUCT_ID 292
|
||||
|
||||
static inline bool kvaser_is_leaf(const struct usb_device_id *id)
|
||||
{
|
||||
return id->idProduct >= USB_LEAF_DEVEL_PRODUCT_ID &&
|
||||
id->idProduct <= USB_MINI_PCIE_HS_PRODUCT_ID;
|
||||
id->idProduct <= USB_MINI_PCIE_2HS_PRODUCT_ID;
|
||||
}
|
||||
|
||||
/* Kvaser USBCan-II devices */
|
||||
|
@ -537,6 +540,9 @@ static const struct usb_device_id kvaser_usb_table[] = {
|
|||
.driver_info = KVASER_HAS_TXRX_ERRORS },
|
||||
{ USB_DEVICE(KVASER_VENDOR_ID, USB_LEAF_LITE_V2_PRODUCT_ID) },
|
||||
{ USB_DEVICE(KVASER_VENDOR_ID, USB_MINI_PCIE_HS_PRODUCT_ID) },
|
||||
{ USB_DEVICE(KVASER_VENDOR_ID, USB_LEAF_LIGHT_HS_V2_OEM_PRODUCT_ID) },
|
||||
{ USB_DEVICE(KVASER_VENDOR_ID, USB_USBCAN_LIGHT_2HS_PRODUCT_ID) },
|
||||
{ USB_DEVICE(KVASER_VENDOR_ID, USB_MINI_PCIE_2HS_PRODUCT_ID) },
|
||||
|
||||
/* USBCANII family IDs */
|
||||
{ USB_DEVICE(KVASER_VENDOR_ID, USB_USBCAN2_PRODUCT_ID),
|
||||
|
|
Loading…
Reference in a new issue