Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 272100 | Differences between
and this patch

Collapse All | Expand All

(-)bulk.c.orig (+56 lines)
Lines 34-39 Link Here
34
#include <linux/usb.h>
34
#include <linux/usb.h>
35
#include <linux/delay.h>
35
#include <linux/delay.h>
36
#include <linux/version.h>	/* For LINUX_VERSION_CODE */
36
#include <linux/version.h>	/* For LINUX_VERSION_CODE */
37
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
38
#include <linux/slab.h>
39
#endif
37
#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
40
#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
38
#include <sound/driver.h>
41
#include <sound/driver.h>
39
#endif
42
#endif
Lines 461-468 Link Here
461
				(void *)chip);
464
				(void *)chip);
462
465
463
	chip->ctrl_urb->setup_dma = chip->ctl_req_dma;
466
	chip->ctrl_urb->setup_dma = chip->ctl_req_dma;
467
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
468
	/* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
469
	chip->ctrl_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
470
#else
464
	/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
471
	/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
465
	chip->ctrl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
472
	chip->ctrl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
473
#endif
466
474
467
	ret = hdjbulk_submit_urb(chip, chip->ctrl_urb, GFP_KERNEL);
475
	ret = hdjbulk_submit_urb(chip, chip->ctrl_urb, GFP_KERNEL);
468
	if (ret!=0) {
476
	if (ret!=0) {
Lines 553-559 Link Here
553
				output_control_callback,
561
				output_control_callback,
554
				&ubulk->output_control_completion);
562
				&ubulk->output_control_completion);
555
	ubulk->output_control_urb->setup_dma = ubulk->output_control_dma;
563
	ubulk->output_control_urb->setup_dma = ubulk->output_control_dma;
564
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
565
	ubulk->output_control_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
566
#else
556
	ubulk->output_control_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
567
	ubulk->output_control_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
568
#endif
557
	if ((rc =  hdjbulk_submit_urb(ubulk->chip,ubulk->output_control_urb, GFP_KERNEL))!=0) {
569
	if ((rc =  hdjbulk_submit_urb(ubulk->chip,ubulk->output_control_urb, GFP_KERNEL))!=0) {
558
		printk(KERN_WARNING"%s hdjbulk_submit_urb() failed, rc:%d\n",__FUNCTION__,rc);
570
		printk(KERN_WARNING"%s hdjbulk_submit_urb() failed, rc:%d\n",__FUNCTION__,rc);
559
	} else {
571
	} else {
Lines 2675-2681 Link Here
2675
{
2687
{
2676
	if (ubulk->chip->product_code!=DJCONTROLSTEEL_PRODUCT_CODE) {
2688
	if (ubulk->chip->product_code!=DJCONTROLSTEEL_PRODUCT_CODE) {
2677
		if (ubulk->output_control_ctl_req!=NULL && ubulk->control_interface!=NULL) {
2689
		if (ubulk->output_control_ctl_req!=NULL && ubulk->control_interface!=NULL) {
2690
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
2691
			usb_free_coherent(interface_to_usbdev(ubulk->control_interface),
2692
#else
2678
			usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
2693
			usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
2694
#endif
2679
					sizeof(*(ubulk->output_control_ctl_req)),
2695
					sizeof(*(ubulk->output_control_ctl_req)),
2680
					ubulk->output_control_ctl_req,
2696
					ubulk->output_control_ctl_req,
2681
					ubulk->output_control_dma);
2697
					ubulk->output_control_dma);
Lines 2684-2690 Link Here
2684
2700
2685
		if (ubulk->output_control_buffer!=NULL && ubulk->control_interface!=NULL &&
2701
		if (ubulk->output_control_buffer!=NULL && ubulk->control_interface!=NULL &&
2686
		    ubulk->output_control_urb!=NULL) {
2702
		    ubulk->output_control_urb!=NULL) {
2703
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
2704
			usb_free_coherent(interface_to_usbdev(ubulk->control_interface),
2705
#else
2687
			usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
2706
			usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
2707
#endif
2688
					ubulk->output_control_urb->transfer_buffer_length,
2708
					ubulk->output_control_urb->transfer_buffer_length,
2689
					ubulk->output_control_buffer,
2709
					ubulk->output_control_buffer,
2690
					ubulk->output_control_urb->transfer_dma);
2710
					ubulk->output_control_urb->transfer_dma);
Lines 2712-2718 Link Here
2712
		usb_kill_urb(ubulk->bulk_out_urb);
2732
		usb_kill_urb(ubulk->bulk_out_urb);
2713
		if (free_urbs!=0) {
2733
		if (free_urbs!=0) {
2714
			if (ubulk->bulk_out_buffer!=NULL) {
2734
			if (ubulk->bulk_out_buffer!=NULL) {
2735
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
2736
				usb_free_coherent(ubulk->chip->dev, ubulk->bulk_out_size,
2737
#else
2715
				usb_buffer_free(ubulk->chip->dev, ubulk->bulk_out_size,
2738
				usb_buffer_free(ubulk->chip->dev, ubulk->bulk_out_size,
2739
#endif
2716
						ubulk->bulk_out_urb->transfer_buffer,
2740
						ubulk->bulk_out_urb->transfer_buffer,
2717
						ubulk->bulk_out_urb->transfer_dma);
2741
						ubulk->bulk_out_urb->transfer_dma);
2718
				ubulk->bulk_out_buffer = NULL;
2742
				ubulk->bulk_out_buffer = NULL;
Lines 3065-3075 Link Here
3065
	init_MUTEX(&ubulk->bulk_out_buffer_mutex);
3089
	init_MUTEX(&ubulk->bulk_out_buffer_mutex);
3066
	
3090
	
3067
	ubulk->bulk_out_buffer =
3091
	ubulk->bulk_out_buffer =
3092
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3093
		usb_alloc_coherent(ubulk->chip->dev, ubulk->bulk_out_size,
3094
#else
3068
		usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
3095
		usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
3096
#endif
3069
			GFP_KERNEL, &ubulk->bulk_out_urb->transfer_dma);
3097
			GFP_KERNEL, &ubulk->bulk_out_urb->transfer_dma);
3070
3098
3071
	if (ubulk->bulk_out_buffer==NULL) {
3099
	if (ubulk->bulk_out_buffer==NULL) {
3100
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3101
		printk(KERN_WARNING"%s() usb_alloc_coherent() failed\n",__FUNCTION__);
3102
#else
3072
		printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
3103
		printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
3104
#endif
3073
3105
3074
		retval = -ENOMEM;
3106
		retval = -ENOMEM;
3075
		goto hdj_create_bulk_interface_error;
3107
		goto hdj_create_bulk_interface_error;
Lines 3609-3620 Link Here
3609
	 *  control state */
3641
	 *  control state */
3610
	if (ubulk->chip->product_code != DJCONTROLSTEEL_PRODUCT_CODE) {	
3642
	if (ubulk->chip->product_code != DJCONTROLSTEEL_PRODUCT_CODE) {	
3611
		/* allocate memory for setup packet for our control requests */
3643
		/* allocate memory for setup packet for our control requests */
3644
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3645
		ubulk->output_control_ctl_req = usb_alloc_coherent(interface_to_usbdev(ubulk->control_interface), 
3646
#else
3612
		ubulk->output_control_ctl_req = usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface), 
3647
		ubulk->output_control_ctl_req = usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface), 
3648
#endif
3613
						 		sizeof(*(ubulk->output_control_ctl_req)),
3649
						 		sizeof(*(ubulk->output_control_ctl_req)),
3614
						 		GFP_KERNEL, 
3650
						 		GFP_KERNEL, 
3615
								 &ubulk->output_control_dma);
3651
								 &ubulk->output_control_dma);
3616
		if (ubulk->output_control_ctl_req==NULL) {
3652
		if (ubulk->output_control_ctl_req==NULL) {
3653
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3654
			printk(KERN_WARNING"%s() usb_alloc_coherent failed (ctl req)\n",__FUNCTION__);
3655
#else
3617
			printk(KERN_WARNING"%s() usb_buffer_alloc failed (ctl req)\n",__FUNCTION__);
3656
			printk(KERN_WARNING"%s() usb_buffer_alloc failed (ctl req)\n",__FUNCTION__);
3657
#endif
3618
			ret = -ENOMEM;
3658
			ret = -ENOMEM;
3619
			goto hdjbulk_init_output_control_state_error;
3659
			goto hdjbulk_init_output_control_state_error;
3620
		} else {
3660
		} else {
Lines 3628-3634 Link Here
3628
			goto hdjbulk_init_output_control_state_error;
3668
			goto hdjbulk_init_output_control_state_error;
3629
		}
3669
		}
3630
3670
3671
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3672
		ubulk->output_control_buffer = usb_alloc_coherent(interface_to_usbdev(ubulk->control_interface),
3673
#else
3631
		ubulk->output_control_buffer = usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface),
3674
		ubulk->output_control_buffer = usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface),
3675
#endif
3632
								ubulk->output_control_buffer_size, 
3676
								ubulk->output_control_buffer_size, 
3633
								GFP_KERNEL,
3677
								GFP_KERNEL,
3634
								&ubulk->output_control_urb->transfer_dma);
3678
								&ubulk->output_control_urb->transfer_dma);
Lines 3773-3782 Link Here
3773
		}
3817
		}
3774
3818
3775
		ep[i]->max_transfer = ubulk->continuous_reader_packet_size;
3819
		ep[i]->max_transfer = ubulk->continuous_reader_packet_size;
3820
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3821
		buffer = usb_alloc_coherent(ubulk->chip->dev, ep[i]->max_transfer,
3822
#else
3776
		buffer = usb_buffer_alloc(ubulk->chip->dev, ep[i]->max_transfer,
3823
		buffer = usb_buffer_alloc(ubulk->chip->dev, ep[i]->max_transfer,
3824
#endif
3777
					GFP_KERNEL, &ep[i]->urb->transfer_dma);
3825
					GFP_KERNEL, &ep[i]->urb->transfer_dma);
3778
		if (!buffer) {
3826
		if (!buffer) {
3827
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
3828
			printk(KERN_WARNING"%s() usb_alloc_coherent() failed\n",__FUNCTION__);
3829
#else
3779
			printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
3830
			printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
3831
#endif
3780
			
3832
			
3781
			ret = -ENOMEM;
3833
			ret = -ENOMEM;
3782
			goto init_continuous_reader_error;
3834
			goto init_continuous_reader_error;
Lines 4250-4256 Link Here
4250
{
4302
{
4251
	if (ep->urb) {
4303
	if (ep->urb) {
4252
		if (ep->urb->transfer_buffer) {
4304
		if (ep->urb->transfer_buffer) {
4305
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
4306
			usb_free_coherent(ep->ubulk->chip->dev, ep->max_transfer,
4307
#else
4253
			usb_buffer_free(ep->ubulk->chip->dev, ep->max_transfer,
4308
			usb_buffer_free(ep->ubulk->chip->dev, ep->max_transfer,
4309
#endif
4254
					ep->urb->transfer_buffer,
4310
					ep->urb->transfer_buffer,
4255
					ep->urb->transfer_dma);
4311
					ep->urb->transfer_dma);
4256
		}
4312
		}
(-)configuration_manager.c.orig (+3 lines)
Lines 26-31 Link Here
26
#include <linux/usb.h>
26
#include <linux/usb.h>
27
#include <linux/version.h>	/* For LINUX_VERSION_CODE */
27
#include <linux/version.h>	/* For LINUX_VERSION_CODE */
28
#include <asm/atomic.h>
28
#include <asm/atomic.h>
29
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
30
#include <linux/slab.h>
31
#endif
29
#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
32
#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
30
#include <sound/driver.h>
33
#include <sound/driver.h>
31
#endif
34
#endif
(-)device.c.orig (+24 lines)
Lines 1559-1565 Link Here
1559
1559
1560
	if(chip->ctrl_req_buffer != NULL)
1560
	if(chip->ctrl_req_buffer != NULL)
1561
	{
1561
	{
1562
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1563
		usb_free_coherent(chip->dev,
1564
#else
1562
		usb_buffer_free(chip->dev,
1565
		usb_buffer_free(chip->dev,
1566
#endif
1563
				chip->ctrl_urb->transfer_buffer_length,
1567
				chip->ctrl_urb->transfer_buffer_length,
1564
				chip->ctrl_req_buffer,
1568
				chip->ctrl_req_buffer,
1565
				chip->ctrl_urb->transfer_dma);
1569
				chip->ctrl_urb->transfer_dma);
Lines 1575-1581 Link Here
1575
	
1579
	
1576
	if(chip->ctl_req != NULL)
1580
	if(chip->ctl_req != NULL)
1577
	{
1581
	{
1582
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1583
		usb_free_coherent(chip->dev,
1584
#else
1578
		usb_buffer_free(chip->dev,
1585
		usb_buffer_free(chip->dev,
1586
#endif
1579
			sizeof(*(chip->ctl_req)),
1587
			sizeof(*(chip->ctl_req)),
1580
			chip->ctl_req,
1588
			chip->ctl_req,
1581
			chip->ctl_req_dma);
1589
			chip->ctl_req_dma);
Lines 1736-1747 Link Here
1736
	}
1744
	}
1737
1745
1738
	/* allocate memory for setup packet for our control requests */
1746
	/* allocate memory for setup packet for our control requests */
1747
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1748
	chip->ctl_req = usb_alloc_coherent(chip->dev, 
1749
#else
1739
	chip->ctl_req = usb_buffer_alloc(chip->dev, 
1750
	chip->ctl_req = usb_buffer_alloc(chip->dev, 
1751
#endif
1740
					 sizeof(*(chip->ctl_req)),
1752
					 sizeof(*(chip->ctl_req)),
1741
					 GFP_KERNEL, 
1753
					 GFP_KERNEL, 
1742
					 &chip->ctl_req_dma);
1754
					 &chip->ctl_req_dma);
1743
	if(chip->ctl_req == NULL) {
1755
	if(chip->ctl_req == NULL) {
1756
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1757
		printk(KERN_WARNING"snd_hdj_chip_create(): usb_alloc_coherent() failed for setup DMA\n");
1758
#else
1744
		printk(KERN_WARNING"snd_hdj_chip_create(): usb_buffer_alloc() failed for setup DMA\n");
1759
		printk(KERN_WARNING"snd_hdj_chip_create(): usb_buffer_alloc() failed for setup DMA\n");
1760
#endif
1745
		return err;
1761
		return err;
1746
	}
1762
	}
1747
	
1763
	
Lines 1751-1762 Link Here
1751
1767
1752
	chip->ctrl_req_buffer_len =  sizeof(u16);
1768
	chip->ctrl_req_buffer_len =  sizeof(u16);
1753
	chip->ctrl_urb->transfer_buffer_length = chip->ctrl_req_buffer_len;
1769
	chip->ctrl_urb->transfer_buffer_length = chip->ctrl_req_buffer_len;
1770
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1771
	chip->ctrl_req_buffer = usb_alloc_coherent(chip->dev, 
1772
#else
1754
	chip->ctrl_req_buffer = usb_buffer_alloc(chip->dev, 
1773
	chip->ctrl_req_buffer = usb_buffer_alloc(chip->dev, 
1774
#endif
1755
						 chip->ctrl_urb->transfer_buffer_length,
1775
						 chip->ctrl_urb->transfer_buffer_length,
1756
						 GFP_KERNEL, 
1776
						 GFP_KERNEL, 
1757
						 &chip->ctrl_urb->transfer_dma);
1777
						 &chip->ctrl_urb->transfer_dma);
1758
	if (chip->ctrl_req_buffer == NULL) {
1778
	if (chip->ctrl_req_buffer == NULL) {
1779
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1780
		printk(KERN_WARNING"snd_hdj_chip_create(): usb_alloc_coherent() failed\n");
1781
#else
1759
		printk(KERN_WARNING"snd_hdj_chip_create(): usb_buffer_alloc() failed\n");
1782
		printk(KERN_WARNING"snd_hdj_chip_create(): usb_buffer_alloc() failed\n");
1783
#endif
1760
		return err;
1784
		return err;
1761
	}
1785
	}
1762
1786
(-)midi.c.orig (+131 lines)
Lines 34-39 Link Here
34
#include <linux/module.h>
34
#include <linux/module.h>
35
#include <linux/usb.h>
35
#include <linux/usb.h>
36
#include <linux/kthread.h>
36
#include <linux/kthread.h>
37
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
38
#include <linux/slab.h>
39
#endif
37
#include <asm/byteorder.h>
40
#include <asm/byteorder.h>
38
#include <asm/atomic.h>
41
#include <asm/atomic.h>
39
#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
42
#if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
Lines 367-373 Link Here
367
{
370
{
368
	if (ep->urb) {
371
	if (ep->urb) {
369
		if (ep->urb->transfer_buffer) {
372
		if (ep->urb->transfer_buffer) {
373
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
374
			usb_free_coherent(ep->umidi->chip->dev,
375
#else
370
			usb_buffer_free(ep->umidi->chip->dev,
376
			usb_buffer_free(ep->umidi->chip->dev,
377
#endif
371
					ep->urb->transfer_buffer_length,
378
					ep->urb->transfer_buffer_length,
372
					ep->urb->transfer_buffer,
379
					ep->urb->transfer_buffer,
373
					ep->urb->transfer_dma);
380
					ep->urb->transfer_dma);
Lines 503-512 Link Here
503
		pipe = usb_rcvbulkpipe(umidi->chip->dev, ep_info->in_ep);
510
		pipe = usb_rcvbulkpipe(umidi->chip->dev, ep_info->in_ep);
504
	}
511
	}
505
	length = usb_maxpacket(umidi->chip->dev, pipe, 0);
512
	length = usb_maxpacket(umidi->chip->dev, pipe, 0);
513
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
514
	buffer = usb_alloc_coherent(umidi->chip->dev, length, GFP_KERNEL,
515
#else
506
	buffer = usb_buffer_alloc(umidi->chip->dev, length, GFP_KERNEL,
516
	buffer = usb_buffer_alloc(umidi->chip->dev, length, GFP_KERNEL,
517
#endif
507
				  &ep->urb->transfer_dma);
518
				  &ep->urb->transfer_dma);
508
	if (!buffer) {
519
	if (!buffer) {
520
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
521
		snd_printk(KERN_WARNING"%s() usb_alloc_coherent failed\n",__FUNCTION__);
522
#else
509
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed\n",__FUNCTION__);
523
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed\n",__FUNCTION__);
524
#endif
510
		snd_hdjmidi_in_endpoint_delete(ep);
525
		snd_hdjmidi_in_endpoint_delete(ep);
511
		return -ENOMEM;
526
		return -ENOMEM;
512
	}
527
	}
Lines 536-542 Link Here
536
#endif
551
#endif
537
	if (ep->urb) {
552
	if (ep->urb) {
538
		if (ep->urb->transfer_buffer) {
553
		if (ep->urb->transfer_buffer) {
554
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
555
			usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
556
#else
539
			usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
557
			usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
558
#endif
540
					ep->urb->transfer_buffer,
559
					ep->urb->transfer_buffer,
541
					ep->urb->transfer_dma);
560
					ep->urb->transfer_dma);
542
		}
561
		}
Lines 544-570 Link Here
544
	}
563
	}
545
	if (ep->urb_led) {
564
	if (ep->urb_led) {
546
		if (ep->urb_led->transfer_buffer) {
565
		if (ep->urb_led->transfer_buffer) {
566
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
567
			usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
568
#else
547
			usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
569
			usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
570
#endif
548
					ep->urb_led->transfer_buffer,
571
					ep->urb_led->transfer_buffer,
549
					ep->urb_led->transfer_dma);
572
					ep->urb_led->transfer_dma);
550
		}
573
		}
551
		usb_free_urb(ep->urb_led);	
574
		usb_free_urb(ep->urb_led);	
552
	}
575
	}
553
	if (ep->ctrl_req_led) {
576
	if (ep->ctrl_req_led) {
577
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
578
		usb_free_coherent(ep->umidi->chip->dev, sizeof(*(ep->ctrl_req_led)),
579
#else
554
		usb_buffer_free(ep->umidi->chip->dev, sizeof(*(ep->ctrl_req_led)),
580
		usb_buffer_free(ep->umidi->chip->dev, sizeof(*(ep->ctrl_req_led)),
581
#endif
555
						ep->ctrl_req_led, ep->ctrl_req_led_dma);
582
						ep->ctrl_req_led, ep->ctrl_req_led_dma);
556
	}
583
	}
557
	if (ep->controller_state) {
584
	if (ep->controller_state) {
558
		if (ep->controller_state->output_control_ctl_urb &&
585
		if (ep->controller_state->output_control_ctl_urb &&
559
			 ep->controller_state->output_control_ctl_urb->transfer_buffer &&
586
			 ep->controller_state->output_control_ctl_urb->transfer_buffer &&
560
			 ep->controller_state->output_control_ctl_urb->transfer_dma) {
587
			 ep->controller_state->output_control_ctl_urb->transfer_dma) {
588
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
589
			usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
590
#else
561
			usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
591
			usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
592
#endif
562
					ep->controller_state->output_control_ctl_urb->transfer_buffer,
593
					ep->controller_state->output_control_ctl_urb->transfer_buffer,
563
					ep->controller_state->output_control_ctl_urb->transfer_dma);
594
					ep->controller_state->output_control_ctl_urb->transfer_dma);
564
		}
595
		}
565
		if (ep->controller_state->output_control_ctl_req &&
596
		if (ep->controller_state->output_control_ctl_req &&
566
			 ep->controller_state->output_control_ctl_dma) {
597
			 ep->controller_state->output_control_ctl_dma) {
598
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
599
			usb_free_coherent(ep->umidi->chip->dev, 
600
#else
567
			usb_buffer_free(ep->umidi->chip->dev, 
601
			usb_buffer_free(ep->umidi->chip->dev, 
602
#endif
568
					sizeof(*(ep->controller_state->output_control_ctl_req)),
603
					sizeof(*(ep->controller_state->output_control_ctl_req)),
569
					ep->controller_state->output_control_ctl_req,
604
					ep->controller_state->output_control_ctl_req,
570
					ep->controller_state->output_control_ctl_dma);
605
					ep->controller_state->output_control_ctl_dma);
Lines 573-579 Link Here
573
			usb_free_urb(ep->controller_state->output_control_ctl_urb);
608
			usb_free_urb(ep->controller_state->output_control_ctl_urb);
574
		}
609
		}
575
		if (ep->controller_state->ctl_req) {
610
		if (ep->controller_state->ctl_req) {
611
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
612
			usb_free_coherent(ep->umidi->chip->dev, 
613
#else
576
			usb_buffer_free(ep->umidi->chip->dev, 
614
			usb_buffer_free(ep->umidi->chip->dev, 
615
#endif
577
					sizeof(*(ep->controller_state->ctl_req)),
616
					sizeof(*(ep->controller_state->ctl_req)),
578
					ep->controller_state->ctl_req,
617
					ep->controller_state->ctl_req,
579
					ep->controller_state->ctl_req_dma);
618
					ep->controller_state->ctl_req_dma);
Lines 584-597 Link Here
584
		}
623
		}
585
		if (ep->controller_state->urb_kt) {
624
		if (ep->controller_state->urb_kt) {
586
			if (ep->controller_state->urb_kt->transfer_buffer) {
625
			if (ep->controller_state->urb_kt->transfer_buffer) {
626
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
627
				usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
628
#else
587
				usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
629
				usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
630
#endif
588
						ep->controller_state->urb_kt->transfer_buffer,
631
						ep->controller_state->urb_kt->transfer_buffer,
589
						ep->controller_state->urb_kt->transfer_dma);
632
						ep->controller_state->urb_kt->transfer_dma);
590
			}
633
			}
591
			usb_free_urb(ep->controller_state->urb_kt);
634
			usb_free_urb(ep->controller_state->urb_kt);
592
		}
635
		}
593
		if (ep->controller_state->ctl_req_kt) {
636
		if (ep->controller_state->ctl_req_kt) {
637
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
638
			usb_free_coherent(ep->umidi->chip->dev, 
639
#else
594
			usb_buffer_free(ep->umidi->chip->dev, 
640
			usb_buffer_free(ep->umidi->chip->dev, 
641
#endif
595
					sizeof(*(ep->controller_state->ctl_req_kt)),
642
					sizeof(*(ep->controller_state->ctl_req_kt)),
596
					ep->controller_state->ctl_req_kt,
643
					ep->controller_state->ctl_req_kt,
597
					ep->controller_state->ctl_req_dma_kt);
644
					ep->controller_state->ctl_req_dma_kt);
Lines 666-677 Link Here
666
		controller_state->is_weltrend = is_mp3_weltrend(ep->umidi->chip->usb_id);
713
		controller_state->is_weltrend = is_mp3_weltrend(ep->umidi->chip->usb_id);
667
	}
714
	}
668
	
715
	
716
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
717
	controller_state->ctl_req = usb_alloc_coherent(ep->umidi->chip->dev, 
718
#else
669
	controller_state->ctl_req = usb_buffer_alloc(ep->umidi->chip->dev, 
719
	controller_state->ctl_req = usb_buffer_alloc(ep->umidi->chip->dev, 
720
#endif
670
							sizeof(*(controller_state->ctl_req)),
721
							sizeof(*(controller_state->ctl_req)),
671
							GFP_KERNEL, 
722
							GFP_KERNEL, 
672
							&controller_state->ctl_req_dma);
723
							&controller_state->ctl_req_dma);
673
	if (controller_state->ctl_req==NULL) {
724
	if (controller_state->ctl_req==NULL) {
725
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
726
		snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for setup DMA\n",__FUNCTION__);
727
#else
674
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA\n",__FUNCTION__);
728
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA\n",__FUNCTION__);
729
#endif
675
		return -ENOMEM;
730
		return -ENOMEM;
676
	}
731
	}
677
	
732
	
Lines 679-690 Link Here
679
	 *  mouse setting or setting LEDs */
734
	 *  mouse setting or setting LEDs */
680
	init_MUTEX(&controller_state->output_control_ctl_mutex);
735
	init_MUTEX(&controller_state->output_control_ctl_mutex);
681
	init_completion(&controller_state->output_control_ctl_completion);
736
	init_completion(&controller_state->output_control_ctl_completion);
737
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
738
	controller_state->output_control_ctl_req = usb_alloc_coherent(ep->umidi->chip->dev, 
739
#else
682
	controller_state->output_control_ctl_req = usb_buffer_alloc(ep->umidi->chip->dev, 
740
	controller_state->output_control_ctl_req = usb_buffer_alloc(ep->umidi->chip->dev, 
741
#endif
683
							sizeof(*(controller_state->output_control_ctl_req)),
742
							sizeof(*(controller_state->output_control_ctl_req)),
684
							GFP_KERNEL, 
743
							GFP_KERNEL, 
685
							&controller_state->output_control_ctl_dma);
744
							&controller_state->output_control_ctl_dma);
686
	if (controller_state->output_control_ctl_req==NULL) {
745
	if (controller_state->output_control_ctl_req==NULL) {
746
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
747
		snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for general setup DMA\n",
748
#else
687
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for general setup DMA\n",
749
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for general setup DMA\n",
750
#endif
688
				__FUNCTION__);
751
				__FUNCTION__);
689
		return -ENOMEM;
752
		return -ENOMEM;
690
	}
753
	}
Lines 700-709 Link Here
700
	max_transfer = usb_maxpacket(ep->umidi->chip->dev, 
763
	max_transfer = usb_maxpacket(ep->umidi->chip->dev, 
701
					controller_state->output_control_ctl_pipe, 1);
764
					controller_state->output_control_ctl_pipe, 1);
702
	
765
	
766
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
767
	buffer = usb_alloc_coherent(ep->umidi->chip->dev, max_transfer,
768
#else
703
	buffer = usb_buffer_alloc(ep->umidi->chip->dev, max_transfer,
769
	buffer = usb_buffer_alloc(ep->umidi->chip->dev, max_transfer,
770
#endif
704
				  GFP_KERNEL, &controller_state->output_control_ctl_urb->transfer_dma);
771
				  GFP_KERNEL, &controller_state->output_control_ctl_urb->transfer_dma);
705
	if (buffer==NULL) {
772
	if (buffer==NULL) {
773
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
774
		snd_printk(KERN_WARNING"%s() usb_alloc_coherent failed (general URB buffer)\n",
775
#else
706
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed (general URB buffer)\n",
776
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed (general URB buffer)\n",
777
#endif
707
					__FUNCTION__);
778
					__FUNCTION__);
708
		return -ENOMEM;	
779
		return -ENOMEM;	
709
	}
780
	}
Lines 726-733 Link Here
726
	controller_state->output_control_ctl_req->wIndex = cpu_to_le16(ep->umidi->iface->cur_altsetting->desc.bInterfaceNumber);
797
	controller_state->output_control_ctl_req->wIndex = cpu_to_le16(ep->umidi->iface->cur_altsetting->desc.bInterfaceNumber);
727
	controller_state->output_control_ctl_req->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
798
	controller_state->output_control_ctl_req->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
728
	controller_state->output_control_ctl_urb->setup_dma = controller_state->output_control_ctl_dma;
799
	controller_state->output_control_ctl_urb->setup_dma = controller_state->output_control_ctl_dma;
800
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
801
	/* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
802
	controller_state->output_control_ctl_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
803
#else
729
	/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
804
	/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
730
	controller_state->output_control_ctl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
805
	controller_state->output_control_ctl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
806
#endif
731
	
807
	
732
	return 0;
808
	return 0;
733
}
809
}
Lines 772-783 Link Here
772
	}
848
	}
773
	
849
	
774
	if (ep->umidi->chip->caps.leds_hid_controlled) {
850
	if (ep->umidi->chip->caps.leds_hid_controlled) {
851
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
852
		ep->ctrl_req_led = usb_alloc_coherent(ep->umidi->chip->dev, 
853
#else
775
		ep->ctrl_req_led = usb_buffer_alloc(ep->umidi->chip->dev, 
854
		ep->ctrl_req_led = usb_buffer_alloc(ep->umidi->chip->dev, 
855
#endif
776
								sizeof(*(ep->ctrl_req_led)),
856
								sizeof(*(ep->ctrl_req_led)),
777
								GFP_KERNEL, 
857
								GFP_KERNEL, 
778
								&ep->ctrl_req_led_dma);
858
								&ep->ctrl_req_led_dma);
779
		if (ep->ctrl_req_led==NULL) {
859
		if (ep->ctrl_req_led==NULL) {
860
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
861
			snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for setup DMA\n",__FUNCTION__);
862
#else
780
			snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA\n",__FUNCTION__);
863
			snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA\n",__FUNCTION__);
864
#endif
781
			return -ENOMEM;
865
			return -ENOMEM;
782
		}
866
		}
783
	}
867
	}
Lines 806-823 Link Here
806
		pipe = usb_sndctrlpipe(umidi->chip->dev, 0);
890
		pipe = usb_sndctrlpipe(umidi->chip->dev, 0);
807
	}
891
	}
808
	ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1);
892
	ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1);
893
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
894
	buffer = usb_alloc_coherent(umidi->chip->dev, ep->max_transfer,
895
#else
809
	buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
896
	buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
897
#endif
810
				  GFP_KERNEL, &ep->urb->transfer_dma);
898
				  GFP_KERNEL, &ep->urb->transfer_dma);
811
	if (!buffer) {
899
	if (!buffer) {
900
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
901
		snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed\n",__FUNCTION__);
902
#else
812
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
903
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
904
#endif
813
		snd_hdjmidi_out_endpoint_delete(ep);
905
		snd_hdjmidi_out_endpoint_delete(ep);
814
		return -ENOMEM;
906
		return -ENOMEM;
815
	}
907
	}
816
	
908
	
909
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
910
	buffer_led = usb_alloc_coherent(umidi->chip->dev, ep->max_transfer,
911
#else
817
	buffer_led = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
912
	buffer_led = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
913
#endif
818
				  GFP_KERNEL, &ep->urb_led->transfer_dma);
914
				  GFP_KERNEL, &ep->urb_led->transfer_dma);
819
	if (!buffer_led) {
915
	if (!buffer_led) {
916
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
917
		snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for LED buffer\n",
918
#else
820
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for LED buffer\n",
919
		snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for LED buffer\n",
920
#endif
821
					__FUNCTION__);
921
					__FUNCTION__);
822
		snd_hdjmidi_out_endpoint_delete(ep);
922
		snd_hdjmidi_out_endpoint_delete(ep);
823
		return -ENOMEM;
923
		return -ENOMEM;
Lines 853-860 Link Here
853
		ep->controller_state->ctl_req->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
953
		ep->controller_state->ctl_req->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
854
		ep->controller_state->ctl_req->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
954
		ep->controller_state->ctl_req->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
855
		ep->urb->setup_dma = ep->controller_state->ctl_req_dma;
955
		ep->urb->setup_dma = ep->controller_state->ctl_req_dma;
956
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
957
		/* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
958
		ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
959
#else
856
		/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
960
		/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
857
		ep->urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
961
		ep->urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
962
#endif
858
	}
963
	}
859
	
964
	
860
	if (ep->umidi->chip->caps.leds_hid_controlled) {
965
	if (ep->umidi->chip->caps.leds_hid_controlled) {
Lines 874-881 Link Here
874
		ep->ctrl_req_led->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
979
		ep->ctrl_req_led->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
875
		ep->ctrl_req_led->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
980
		ep->ctrl_req_led->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
876
		ep->urb_led->setup_dma = ep->ctrl_req_led_dma;
981
		ep->urb_led->setup_dma = ep->ctrl_req_led_dma;
982
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
983
		/* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
984
		ep->urb_led->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
985
#else
877
		/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
986
		/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
878
		ep->urb_led->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
987
		ep->urb_led->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
988
#endif
879
	}
989
	}
880
	
990
	
881
	if (ep->umidi->chip->caps.leds_bulk_controlled) {
991
	if (ep->umidi->chip->caps.leds_bulk_controlled) {
Lines 913-932 Link Here
913
			return -ENOMEM;
1023
			return -ENOMEM;
914
		}
1024
		}
915
1025
1026
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1027
		buffer = usb_alloc_coherent(umidi->chip->dev, ep->max_transfer,
1028
#else
916
		buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
1029
		buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
1030
#endif
917
				  GFP_KERNEL, &ep->controller_state->urb_kt->transfer_dma);
1031
				  GFP_KERNEL, &ep->controller_state->urb_kt->transfer_dma);
918
		if (!buffer) {
1032
		if (!buffer) {
1033
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1034
			snd_printk(KERN_WARNING"%s() usb_alloc_coherent() for wq failed\n",__FUNCTION__);
1035
#else
919
			snd_printk(KERN_WARNING"%s() usb_buffer_alloc() for wq failed\n",__FUNCTION__);
1036
			snd_printk(KERN_WARNING"%s() usb_buffer_alloc() for wq failed\n",__FUNCTION__);
1037
#endif
920
			snd_hdjmidi_out_endpoint_delete(ep);
1038
			snd_hdjmidi_out_endpoint_delete(ep);
921
			return -ENOMEM;
1039
			return -ENOMEM;
922
		}
1040
		}
923
1041
1042
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1043
		ep->controller_state->ctl_req_kt = usb_alloc_coherent(umidi->chip->dev, 
1044
#else
924
		ep->controller_state->ctl_req_kt = usb_buffer_alloc(umidi->chip->dev, 
1045
		ep->controller_state->ctl_req_kt = usb_buffer_alloc(umidi->chip->dev, 
1046
#endif
925
							sizeof(*(ep->controller_state->ctl_req_kt)),
1047
							sizeof(*(ep->controller_state->ctl_req_kt)),
926
							GFP_KERNEL, 
1048
							GFP_KERNEL, 
927
							&ep->controller_state->ctl_req_dma_kt);
1049
							&ep->controller_state->ctl_req_dma_kt);
928
		if (!ep->controller_state->ctl_req_kt) {
1050
		if (!ep->controller_state->ctl_req_kt) {
1051
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1052
			snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for setup DMA for wq\n",__FUNCTION__);
1053
#else
929
			snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA for wq\n",__FUNCTION__);
1054
			snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA for wq\n",__FUNCTION__);
1055
#endif
930
			snd_hdjmidi_out_endpoint_delete(ep);
1056
			snd_hdjmidi_out_endpoint_delete(ep);
931
			return -ENOMEM;
1057
			return -ENOMEM;
932
		}
1058
		}
Lines 946-953 Link Here
946
		ep->controller_state->ctl_req_kt->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
1072
		ep->controller_state->ctl_req_kt->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
947
		ep->controller_state->ctl_req_kt->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
1073
		ep->controller_state->ctl_req_kt->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
948
		ep->controller_state->urb_kt->setup_dma = ep->controller_state->ctl_req_dma_kt;
1074
		ep->controller_state->urb_kt->setup_dma = ep->controller_state->ctl_req_dma_kt;
1075
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) )
1076
		/* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
1077
		ep->controller_state->urb_kt->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
1078
#else
949
		/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
1079
		/* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
950
		ep->controller_state->urb_kt->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
1080
		ep->controller_state->urb_kt->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
1081
#endif
951
	
1082
	
952
		init_completion(&ep->controller_state->ctl_req_completion_kt);
1083
		init_completion(&ep->controller_state->ctl_req_completion_kt);
953
		init_completion(&ep->controller_state->mp3w_kthread_started);
1084
		init_completion(&ep->controller_state->mp3w_kthread_started);

Return to bug 272100