podhd.c (cbecf716ca618fd44feda6bd9a64a8179d031fc5) | podhd.c (f4000b58b64344871d7b27c05e73932f137cfef6) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Line 6 Pod HD 4 * 5 * Copyright (C) 2011 Stefan Hajnoczi <stefanha@gmail.com> 6 * Copyright (C) 2015 Andrej Krutak <dev@andree.sk> 7 * Copyright (C) 2017 Hans P. Moller <hmoller@uc.cl> 8 */ --- 176 unchanged lines hidden (view full) --- 185 int ret; 186 u8 init_bytes[8]; 187 int i; 188 struct usb_device *usbdev = pod->line6.usbdev; 189 190 ret = usb_control_msg_send(usbdev, 0, 191 0x67, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, 192 0x11, 0, | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Line 6 Pod HD 4 * 5 * Copyright (C) 2011 Stefan Hajnoczi <stefanha@gmail.com> 6 * Copyright (C) 2015 Andrej Krutak <dev@andree.sk> 7 * Copyright (C) 2017 Hans P. Moller <hmoller@uc.cl> 8 */ --- 176 unchanged lines hidden (view full) --- 185 int ret; 186 u8 init_bytes[8]; 187 int i; 188 struct usb_device *usbdev = pod->line6.usbdev; 189 190 ret = usb_control_msg_send(usbdev, 0, 191 0x67, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, 192 0x11, 0, |
193 NULL, 0, LINE6_TIMEOUT * HZ, GFP_KERNEL); | 193 NULL, 0, LINE6_TIMEOUT, GFP_KERNEL); |
194 if (ret) { 195 dev_err(pod->line6.ifcdev, "read request failed (error %d)\n", ret); 196 goto exit; 197 } 198 199 /* NOTE: looks like some kind of ping message */ 200 ret = usb_control_msg_recv(usbdev, 0, 0x67, 201 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 202 0x11, 0x0, | 194 if (ret) { 195 dev_err(pod->line6.ifcdev, "read request failed (error %d)\n", ret); 196 goto exit; 197 } 198 199 /* NOTE: looks like some kind of ping message */ 200 ret = usb_control_msg_recv(usbdev, 0, 0x67, 201 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 202 0x11, 0x0, |
203 init_bytes, 3, LINE6_TIMEOUT * HZ, GFP_KERNEL); | 203 init_bytes, 3, LINE6_TIMEOUT, GFP_KERNEL); |
204 if (ret) { 205 dev_err(pod->line6.ifcdev, 206 "receive length failed (error %d)\n", ret); 207 goto exit; 208 } 209 210 pod->firmware_version = 211 (init_bytes[0] << 16) | (init_bytes[1] << 8) | (init_bytes[2] << 0); 212 213 for (i = 0; i <= 16; i++) { 214 ret = line6_read_data(&pod->line6, 0xf000 + 0x08 * i, init_bytes, 8); 215 if (ret < 0) 216 goto exit; 217 } 218 219 ret = usb_control_msg_send(usbdev, 0, 220 USB_REQ_SET_FEATURE, 221 USB_TYPE_STANDARD | USB_RECIP_DEVICE | USB_DIR_OUT, 222 1, 0, | 204 if (ret) { 205 dev_err(pod->line6.ifcdev, 206 "receive length failed (error %d)\n", ret); 207 goto exit; 208 } 209 210 pod->firmware_version = 211 (init_bytes[0] << 16) | (init_bytes[1] << 8) | (init_bytes[2] << 0); 212 213 for (i = 0; i <= 16; i++) { 214 ret = line6_read_data(&pod->line6, 0xf000 + 0x08 * i, init_bytes, 8); 215 if (ret < 0) 216 goto exit; 217 } 218 219 ret = usb_control_msg_send(usbdev, 0, 220 USB_REQ_SET_FEATURE, 221 USB_TYPE_STANDARD | USB_RECIP_DEVICE | USB_DIR_OUT, 222 1, 0, |
223 NULL, 0, LINE6_TIMEOUT * HZ, GFP_KERNEL); | 223 NULL, 0, LINE6_TIMEOUT, GFP_KERNEL); |
224exit: 225 return ret; 226} 227 228static void podhd_startup(struct usb_line6 *line6) 229{ 230 struct usb_line6_podhd *pod = line6_to_podhd(line6); 231 --- 328 unchanged lines hidden --- | 224exit: 225 return ret; 226} 227 228static void podhd_startup(struct usb_line6 *line6) 229{ 230 struct usb_line6_podhd *pod = line6_to_podhd(line6); 231 --- 328 unchanged lines hidden --- |