flexcop-usb.c (f62dc8f6bf82d1b307fc37d8d22cc79f67856c2f) | flexcop-usb.c (48016551e0a73bcf24ddfae5f59e28ce922f84bb) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III 4 * flexcop-usb.c - covers the USB part 5 * see flexcop.c for copyright information 6 */ 7#define FC_LOG_PREFIX "flexcop_usb" 8#include "flexcop-usb.h" --- 183 unchanged lines hidden (view full) --- 192 break; 193 case B2C2_USB_FLASH_BLOCK: 194 wMax = USB_FLASH_MAX; 195 break; 196 default: 197 return -EINVAL; 198 } 199 for (i = 0; i < len;) { | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III 4 * flexcop-usb.c - covers the USB part 5 * see flexcop.c for copyright information 6 */ 7#define FC_LOG_PREFIX "flexcop_usb" 8#include "flexcop-usb.h" --- 183 unchanged lines hidden (view full) --- 192 break; 193 case B2C2_USB_FLASH_BLOCK: 194 wMax = USB_FLASH_MAX; 195 break; 196 default: 197 return -EINVAL; 198 } 199 for (i = 0; i < len;) { |
200 pagechunk = 201 wMax < bytes_left_to_read_on_page(addr, len) ? 202 wMax : 203 bytes_left_to_read_on_page(addr, len); | 200 pagechunk = min(wMax, bytes_left_to_read_on_page(addr, len)); |
204 deb_info("%x\n", 205 (addr & V8_MEMORY_PAGE_MASK) | 206 (V8_MEMORY_EXTENDED*extended)); 207 208 ret = flexcop_usb_v8_memory_req(fc_usb, req, 209 page_start + (addr / V8_MEMORY_PAGE_SIZE), 210 (addr & V8_MEMORY_PAGE_MASK) | 211 (V8_MEMORY_EXTENDED*extended), --- 428 unchanged lines hidden --- | 201 deb_info("%x\n", 202 (addr & V8_MEMORY_PAGE_MASK) | 203 (V8_MEMORY_EXTENDED*extended)); 204 205 ret = flexcop_usb_v8_memory_req(fc_usb, req, 206 page_start + (addr / V8_MEMORY_PAGE_SIZE), 207 (addr & V8_MEMORY_PAGE_MASK) | 208 (V8_MEMORY_EXTENDED*extended), --- 428 unchanged lines hidden --- |