flexcop-usb.c (cf9ce948f47640797bd19980e1d99c6d17d0bdc3) | flexcop-usb.c (6c7e346974ad6d20898026f209581fb6dd8ce3f0) |
---|---|
1/* 2 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III 3 * flexcop-usb.c - covers the USB part 4 * see flexcop.c for copyright information 5 */ 6#define FC_LOG_PREFIX "flexcop_usb" 7#include "flexcop-usb.h" 8#include "flexcop-common.h" --- 376 unchanged lines hidden (view full) --- 385 for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) 386 if (fc_usb->iso_urb[i] != NULL) { 387 deb_ts("unlinking/killing urb no. %d\n",i); 388 usb_kill_urb(fc_usb->iso_urb[i]); 389 usb_free_urb(fc_usb->iso_urb[i]); 390 } 391 392 if (fc_usb->iso_buffer != NULL) | 1/* 2 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III 3 * flexcop-usb.c - covers the USB part 4 * see flexcop.c for copyright information 5 */ 6#define FC_LOG_PREFIX "flexcop_usb" 7#include "flexcop-usb.h" 8#include "flexcop-common.h" --- 376 unchanged lines hidden (view full) --- 385 for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) 386 if (fc_usb->iso_urb[i] != NULL) { 387 deb_ts("unlinking/killing urb no. %d\n",i); 388 usb_kill_urb(fc_usb->iso_urb[i]); 389 usb_free_urb(fc_usb->iso_urb[i]); 390 } 391 392 if (fc_usb->iso_buffer != NULL) |
393 pci_free_consistent(NULL, | 393 usb_free_coherent(fc_usb->udev, |
394 fc_usb->buffer_size, fc_usb->iso_buffer, 395 fc_usb->dma_addr); 396} 397 398static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) 399{ 400 u16 frame_size = le16_to_cpu( 401 fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize); 402 int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * 403 frame_size, i, j, ret; 404 int buffer_offset = 0; 405 406 deb_ts("creating %d iso-urbs with %d frames " 407 "each of %d bytes size = %d.\n", B2C2_USB_NUM_ISO_URB, 408 B2C2_USB_FRAMES_PER_ISO, frame_size, bufsize); 409 | 394 fc_usb->buffer_size, fc_usb->iso_buffer, 395 fc_usb->dma_addr); 396} 397 398static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) 399{ 400 u16 frame_size = le16_to_cpu( 401 fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize); 402 int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * 403 frame_size, i, j, ret; 404 int buffer_offset = 0; 405 406 deb_ts("creating %d iso-urbs with %d frames " 407 "each of %d bytes size = %d.\n", B2C2_USB_NUM_ISO_URB, 408 B2C2_USB_FRAMES_PER_ISO, frame_size, bufsize); 409 |
410 fc_usb->iso_buffer = pci_alloc_consistent(NULL, 411 bufsize, &fc_usb->dma_addr); | 410 fc_usb->iso_buffer = usb_alloc_coherent(fc_usb->udev, 411 bufsize, GFP_KERNEL, &fc_usb->dma_addr); |
412 if (fc_usb->iso_buffer == NULL) 413 return -ENOMEM; 414 415 memset(fc_usb->iso_buffer, 0, bufsize); 416 fc_usb->buffer_size = bufsize; 417 418 /* creating iso urbs */ 419 for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) { --- 168 unchanged lines hidden --- | 412 if (fc_usb->iso_buffer == NULL) 413 return -ENOMEM; 414 415 memset(fc_usb->iso_buffer, 0, bufsize); 416 fc_usb->buffer_size = bufsize; 417 418 /* creating iso urbs */ 419 for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) { --- 168 unchanged lines hidden --- |