Hi
Will I still need to install the kernel module from the hercules site or just the deb you have kindly created?
Regards
Moderators: garth, User Customization Moderators
--- device.c 2009-01-27 15:25:50.000000000 +0100
+++ device.ok.c 2010-09-22 21:50:44.176388000 +0200
@@ -23,7 +23,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/version.h> /* For LINUX_VERSION_CODE */
@@ -66,7 +65,7 @@
module_param_array(id, charp, NULL, 0444);
MODULE_PARM_DESC(id, "ID string for the Hercules DJ Series adapter.");
-static DECLARE_MUTEX(register_mutex);
+static DEFINE_SEMAPHORE(register_mutex, 1);
static struct snd_hdj_chip *usb_chip[SNDRV_CARDS];
/* reference count for the socket */
@@ -1097,6 +1096,7 @@
}
if (chip->caps.talkover_atten==1 &&
snd_card_proc_new(chip->card, "talkover_atten", &entry)==0) {
+
snd_info_set_text_ops(entry,
(void*)(unsigned long)chip->index,
proc_talkover_atten_read);
@@ -1660,10 +1660,10 @@
/* let the kernel option override custom id */
strncpy(card_id,id[idx],sizeof(card_id)-1);
}
- card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0);
- if (card == NULL) {
+ err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, &card);
+ if (err < 0) {
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
- return -ENOMEM;
+ return err;
}
/* save the index, so people who have the card can reference the chip */
@@ -1682,7 +1682,7 @@
chip->card = card;
chip->product_code = product_code;
- init_MUTEX(&chip->vendor_request_mutex);
+ sema_init(&chip->vendor_request_mutex, 1);
/* initialise the atomic variables */
atomic_set(&chip->locked_io, 0);
@@ -1697,7 +1697,7 @@
INIT_LIST_HEAD(&chip->bulk_list);
chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));
- init_MUTEX(&chip->netlink_list_mutex);
+ sema_init(&chip->netlink_list_mutex, 1);
INIT_LIST_HEAD(&chip->netlink_registered_processes);
/* fill in DJ capabilities for this device */
@@ -1829,6 +1829,8 @@
return DJCONTROLLER_PRODUCT_CODE;
} else if (usbid == USB_ID(USB_HDJ_VENDOR_ID, DJ_CONTROL_MP3W_PID)) {
return DJCONTROLLER_PRODUCT_CODE;
+ } else if (usbid == USB_ID(USB_HDJ_VENDOR_ID, DJ_CONTROL_MP3E2_PID)) {
+ return DJCONTROLSTEEL_PRODUCT_CODE;
} else {
return DJCONSOLE_PRODUCT_UNKNOWN;
}
@@ -1860,6 +1862,7 @@
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_MK2_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_RMX_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3_PID)&&
+ (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3E2_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3W_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_STEEL_PID))
{
--- device.h 2009-01-27 15:25:50.000000000 +0100
+++ device.ok.h 2010-09-22 21:51:23.217138000 +0200
@@ -37,6 +37,7 @@
#define DJ_CONSOLE_MK2_PID 0xb100
#define DJ_CONSOLE_RMX_PID 0xb101
#define DJ_CONTROL_MP3_PID 0xd000
+#define DJ_CONTROL_MP3E2_PID 0xb105
#define DJ_CONTROL_MP3W_PID 0xd001
#define DJ_CONSOLE_STEEL_PID 0xb102
--- bulk.c 2009-01-27 15:25:50.000000000 +0100
+++ bulk.ok.c 2010-09-22 21:44:14.485144000 +0200
@@ -3062,7 +3062,7 @@
goto hdj_create_bulk_interface_error;
}
/* allocate the buffer for bulk_out_urb */
- init_MUTEX(&ubulk->bulk_out_buffer_mutex);
+ sema_init(&ubulk->bulk_out_buffer_mutex, 1);
ubulk->bulk_out_buffer =
usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
@@ -3601,7 +3601,7 @@
return -EINVAL;
}
- init_MUTEX(&ubulk->output_control_mutex);
+ sema_init(&ubulk->output_control_mutex, 1);
init_completion(&ubulk->output_control_completion);
/* Every product here except the Steel targets HID. Since the steel does not target HID, we don't
@@ -3855,7 +3855,7 @@
u16 value = 0;
struct hdj_console_context *dc = ((struct hdj_console_context *)ubulk->device_context);
- init_MUTEX(&dc->device_config_mutex);
+ sema_init(&dc->device_config_mutex, 1);
ret = hdjbulk_init_common_context(ubulk,&ubulk->hdj_common);
if (ret!=0) {
@@ -4133,7 +4133,7 @@
spin_lock_init(&dc->bulk_buffer_lock);
init_completion(&dc->bulk_request_completion);
- init_MUTEX(&dc->bulk_request_mutex);
+ sema_init(&dc->bulk_request_mutex, 1);
if ((ret = init_continuous_reader(ubulk))!=0) {
printk(KERN_WARNING"%s() init_continuous_reader() failed, rc:%d\n",
--- midi.c 2009-01-27 15:25:50.000000000 +0100
+++ midi.ok.c 2010-09-22 21:44:54.553132000 +0200
@@ -677,7 +677,7 @@
/* this buffer and URB below are for general control requests, like changing the
* mouse setting or setting LEDs */
- init_MUTEX(&controller_state->output_control_ctl_mutex);
+ sema_init(&controller_state->output_control_ctl_mutex, 1);
init_completion(&controller_state->output_control_ctl_completion);
controller_state->output_control_ctl_req = usb_buffer_alloc(ep->umidi->chip->dev,
sizeof(*(controller_state->output_control_ctl_req)),
Hercules DJ Console On Ubuntu Lucid Or Maverick With Kernel 2.6.35
I think you will need this soon:
https://sites.google.com/site/lightrush ... tumaverick
I still can't get it work on my computer. I'm running 2.6.32 kernel, getting very confused as to what I should do (I'm a linux novice). Could any one give clear instructions about which drivers/patches to download, how to install and how to configure the Console MK2 with Mixxx?
diff -rupNB original/bulk.c patched/bulk.c
--- original/bulk.c 2010-10-31 14:11:41.306255003 +0000
+++ patched/bulk.c 2010-10-31 00:24:19.000000000 +0100
@@ -312,7 +312,7 @@ int firmware_send_bulk(struct usb_hdjbul
/*indicate that a bulk output request is in progress.*/
atomic_inc(&ubulk->bulk_out_command_in_progress);
- /* Since we allocated our buffer with usb_buffer_alloc, do a copy- surely less of a penalty than using
+ /* Since we allocated our buffer with usb_alloc_coherent, do a copy- surely less of a penalty than using
* a kmalloc buffer which DMA setup for it, especially with our small buffer sizes */
memcpy(ubulk->bulk_out_buffer,buffer,buffer_size);
@@ -461,8 +461,8 @@ int send_vendor_request(int chip_index,
(void *)chip);
chip->ctrl_urb->setup_dma = chip->ctl_req_dma;
- /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
- chip->ctrl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+ /* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
+ chip->ctrl_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
ret = hdjbulk_submit_urb(chip, chip->ctrl_urb, GFP_KERNEL);
if (ret!=0) {
@@ -553,7 +553,7 @@ int usb_set_report(struct usb_hdjbulk *u
output_control_callback,
&ubulk->output_control_completion);
ubulk->output_control_urb->setup_dma = ubulk->output_control_dma;
- ubulk->output_control_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+ ubulk->output_control_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
if ((rc = hdjbulk_submit_urb(ubulk->chip,ubulk->output_control_urb, GFP_KERNEL))!=0) {
printk(KERN_WARNING"%s hdjbulk_submit_urb() failed, rc:%d\n",__FUNCTION__,rc);
} else {
@@ -1045,6 +1045,7 @@ long hdjbulk_ioctl(struct file *file,
}
} else {
printk(KERN_WARNING"%s() ioctl access_ok failed\n",__FUNCTION__);
+
result = -EFAULT;
}
break;
@@ -2675,7 +2676,7 @@ static void uninit_output_control_state(
{
if (ubulk->chip->product_code!=DJCONTROLSTEEL_PRODUCT_CODE) {
if (ubulk->output_control_ctl_req!=NULL && ubulk->control_interface!=NULL) {
- usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
+ usb_free_coherent(interface_to_usbdev(ubulk->control_interface),
sizeof(*(ubulk->output_control_ctl_req)),
ubulk->output_control_ctl_req,
ubulk->output_control_dma);
@@ -2684,7 +2685,7 @@ static void uninit_output_control_state(
if (ubulk->output_control_buffer!=NULL && ubulk->control_interface!=NULL &&
ubulk->output_control_urb!=NULL) {
- usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
+ usb_free_coherent(interface_to_usbdev(ubulk->control_interface),
ubulk->output_control_urb->transfer_buffer_length,
ubulk->output_control_buffer,
ubulk->output_control_urb->transfer_dma);
@@ -2712,7 +2713,7 @@ void kill_bulk_urbs(struct usb_hdjbulk *
usb_kill_urb(ubulk->bulk_out_urb);
if (free_urbs!=0) {
if (ubulk->bulk_out_buffer!=NULL) {
- usb_buffer_free(ubulk->chip->dev, ubulk->bulk_out_size,
+ usb_free_coherent(ubulk->chip->dev, ubulk->bulk_out_size,
ubulk->bulk_out_urb->transfer_buffer,
ubulk->bulk_out_urb->transfer_dma);
ubulk->bulk_out_buffer = NULL;
@@ -3065,11 +3066,11 @@ int hdj_create_bulk_interface(struct snd
init_MUTEX(&ubulk->bulk_out_buffer_mutex);
ubulk->bulk_out_buffer =
- usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
+ usb_alloc_coherent(ubulk->chip->dev, ubulk->bulk_out_size,
GFP_KERNEL, &ubulk->bulk_out_urb->transfer_dma);
if (ubulk->bulk_out_buffer==NULL) {
- printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
+ printk(KERN_WARNING"%s() usb_alloc_coherent() failed\n",__FUNCTION__);
retval = -ENOMEM;
goto hdj_create_bulk_interface_error;
@@ -3272,6 +3273,7 @@ static int hdjbulk_in_urb_complete_steel
spin_unlock(&dc->bulk_buffer_lock);
}
return 0;
+
}
/* fix for mk2 fw hm issue */
@@ -3609,12 +3611,12 @@ static int init_output_control_state(str
* control state */
if (ubulk->chip->product_code != DJCONTROLSTEEL_PRODUCT_CODE) {
/* allocate memory for setup packet for our control requests */
- ubulk->output_control_ctl_req = usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface),
+ ubulk->output_control_ctl_req = usb_alloc_coherent(interface_to_usbdev(ubulk->control_interface),
sizeof(*(ubulk->output_control_ctl_req)),
GFP_KERNEL,
&ubulk->output_control_dma);
if (ubulk->output_control_ctl_req==NULL) {
- printk(KERN_WARNING"%s() usb_buffer_alloc failed (ctl req)\n",__FUNCTION__);
+ printk(KERN_WARNING"%s() usb_alloc_coherent failed (ctl req)\n",__FUNCTION__);
ret = -ENOMEM;
goto hdjbulk_init_output_control_state_error;
} else {
@@ -3628,7 +3630,7 @@ static int init_output_control_state(str
goto hdjbulk_init_output_control_state_error;
}
- ubulk->output_control_buffer = usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface),
+ ubulk->output_control_buffer = usb_alloc_coherent(interface_to_usbdev(ubulk->control_interface),
ubulk->output_control_buffer_size,
GFP_KERNEL,
&ubulk->output_control_urb->transfer_dma);
@@ -3773,10 +3775,10 @@ static int init_continuous_reader(struct
}
ep[i]->max_transfer = ubulk->continuous_reader_packet_size;
- buffer = usb_buffer_alloc(ubulk->chip->dev, ep[i]->max_transfer,
+ buffer = usb_alloc_coherent(ubulk->chip->dev, ep[i]->max_transfer,
GFP_KERNEL, &ep[i]->urb->transfer_dma);
if (!buffer) {
- printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
+ printk(KERN_WARNING"%s() usb_alloc_coherent() failed\n",__FUNCTION__);
ret = -ENOMEM;
goto init_continuous_reader_error;
@@ -4250,7 +4252,7 @@ void hdjbulk_in_endpoint_delete(struct h
{
if (ep->urb) {
if (ep->urb->transfer_buffer) {
- usb_buffer_free(ep->ubulk->chip->dev, ep->max_transfer,
+ usb_free_coherent(ep->ubulk->chip->dev, ep->max_transfer,
ep->urb->transfer_buffer,
ep->urb->transfer_dma);
}
diff -rupNB original/configuration_manager.c patched/configuration_manager.c
--- original/configuration_manager.c 2010-10-31 14:11:41.308255003 +0000
+++ patched/configuration_manager.c 2010-10-31 00:25:27.000000000 +0100
@@ -21,6 +21,7 @@
*
*/
+#include <linux/slab.h> /* For kfree */
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/usb.h>
diff -rupNB original/device.c patched/device.c
--- original/device.c 2010-10-31 14:11:41.309255003 +0000
+++ patched/device.c 2010-10-31 00:19:11.000000000 +0100
@@ -24,6 +24,7 @@
*
*/
+#include <linux/slab.h> /* For kfree */
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/version.h> /* For LINUX_VERSION_CODE */
@@ -1559,7 +1560,7 @@ static int snd_hdj_chip_free(struct snd_
if(chip->ctrl_req_buffer != NULL)
{
- usb_buffer_free(chip->dev,
+ usb_free_coherent(chip->dev,
chip->ctrl_urb->transfer_buffer_length,
chip->ctrl_req_buffer,
chip->ctrl_urb->transfer_dma);
@@ -1575,7 +1576,7 @@ static int snd_hdj_chip_free(struct snd_
if(chip->ctl_req != NULL)
{
- usb_buffer_free(chip->dev,
+ usb_free_coherent(chip->dev,
sizeof(*(chip->ctl_req)),
chip->ctl_req,
chip->ctl_req_dma);
@@ -1660,10 +1661,10 @@ static int snd_hdj_chip_create(struct us
/* let the kernel option override custom id */
strncpy(card_id,id[idx],sizeof(card_id)-1);
}
- card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0);
- if (card == NULL) {
+ err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, &card);
+ if (err < 0) {
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
- return -ENOMEM;
+ return err;
}
/* save the index, so people who have the card can reference the chip */
@@ -1728,12 +1729,12 @@ static int snd_hdj_chip_create(struct us
}
/* allocate memory for setup packet for our control requests */
- chip->ctl_req = usb_buffer_alloc(chip->dev,
+ chip->ctl_req = usb_alloc_coherent(chip->dev,
sizeof(*(chip->ctl_req)),
GFP_KERNEL,
&chip->ctl_req_dma);
if(chip->ctl_req == NULL) {
- printk(KERN_WARNING"snd_hdj_chip_create(): usb_buffer_alloc() failed for setup DMA\n");
+ printk(KERN_WARNING"snd_hdj_chip_create(): usb_alloc_coherent() failed for setup DMA\n");
return err;
}
@@ -1743,12 +1744,12 @@ static int snd_hdj_chip_create(struct us
chip->ctrl_req_buffer_len = sizeof(u16);
chip->ctrl_urb->transfer_buffer_length = chip->ctrl_req_buffer_len;
- chip->ctrl_req_buffer = usb_buffer_alloc(chip->dev,
+ chip->ctrl_req_buffer = usb_alloc_coherent(chip->dev,
chip->ctrl_urb->transfer_buffer_length,
GFP_KERNEL,
&chip->ctrl_urb->transfer_dma);
if (chip->ctrl_req_buffer == NULL) {
- printk(KERN_WARNING"snd_hdj_chip_create(): usb_buffer_alloc() failed\n");
+ printk(KERN_WARNING"snd_hdj_chip_create(): usb_alloc_coherent() failed\n");
return err;
}
diff -rupNB original/.git/COMMIT_EDITMSG patched/.git/COMMIT_EDITMSG
--- original/.git/COMMIT_EDITMSG 2010-10-31 14:08:33.237255003 +0000
+++ patched/.git/COMMIT_EDITMSG 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-
-# Please enter the commit message for your changes. Lines starting
-# with '#' will be ignored, and an empty message aborts the commit.
-# On branch master
-# Changes to be committed:
-# (use "git reset HEAD^1 <file>..." to unstage)
-#
-# modified: bulk.c
-# modified: configuration_manager.c
-# modified: device.c
-# modified: midi.c
-#
diff -rupNB original/.git/config patched/.git/config
--- original/.git/config 2010-10-31 14:00:45.018255003 +0000
+++ patched/.git/config 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-[core]
- repositoryformatversion = 0
- filemode = true
- bare = false
- logallrefupdates = true
diff -rupNB original/.git/description patched/.git/description
--- original/.git/description 2010-10-31 14:00:45.010255003 +0000
+++ patched/.git/description 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-Unnamed repository; edit this file 'description' to name the repository.
diff -rupNB original/.git/HEAD patched/.git/HEAD
--- original/.git/HEAD 2010-10-31 14:00:45.010255003 +0000
+++ patched/.git/HEAD 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ref: refs/heads/master
diff -rupNB original/.git/hooks/applypatch-msg.sample patched/.git/hooks/applypatch-msg.sample
--- original/.git/hooks/applypatch-msg.sample 2010-10-31 14:00:45.007255003 +0000
+++ patched/.git/hooks/applypatch-msg.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to check the commit log message taken by
-# applypatch from an e-mail message.
-#
-# The hook should exit with non-zero status after issuing an
-# appropriate message if it wants to stop the commit. The hook is
-# allowed to edit the commit message file.
-#
-# To enable this hook, rename this file to "applypatch-msg".
-
-. git-sh-setup
-test -x "$GIT_DIR/hooks/commit-msg" &&
- exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
-:
diff -rupNB original/.git/hooks/commit-msg.sample patched/.git/hooks/commit-msg.sample
--- original/.git/hooks/commit-msg.sample 2010-10-31 14:00:45.009255003 +0000
+++ patched/.git/hooks/commit-msg.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to check the commit log message.
-# Called by "git commit" with one argument, the name of the file
-# that has the commit message. The hook should exit with non-zero
-# status after issuing an appropriate message if it wants to stop the
-# commit. The hook is allowed to edit the commit message file.
-#
-# To enable this hook, rename this file to "commit-msg".
-
-# Uncomment the below to add a Signed-off-by line to the message.
-# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
-# hook is more suited to it.
-#
-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-
-# This example catches duplicate Signed-off-by lines.
-
-test "" = "$(grep '^Signed-off-by: ' "$1" |
- sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
- echo >&2 Duplicate Signed-off-by lines.
- exit 1
-}
diff -rupNB original/.git/hooks/post-commit.sample patched/.git/hooks/post-commit.sample
--- original/.git/hooks/post-commit.sample 2010-10-31 14:00:45.007255003 +0000
+++ patched/.git/hooks/post-commit.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# An example hook script that is called after a successful
-# commit is made.
-#
-# To enable this hook, rename this file to "post-commit".
-
-: Nothing
diff -rupNB original/.git/hooks/post-receive.sample patched/.git/hooks/post-receive.sample
--- original/.git/hooks/post-receive.sample 2010-10-31 14:00:45.009255003 +0000
+++ patched/.git/hooks/post-receive.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# An example hook script for the "post-receive" event.
-#
-# The "post-receive" script is run after receive-pack has accepted a pack
-# and the repository has been updated. It is passed arguments in through
-# stdin in the form
-# <oldrev> <newrev> <refname>
-# For example:
-# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
-#
-# see contrib/hooks/ for a sample, or uncomment the next line and
-# rename the file to "post-receive".
-
-#. /usr/share/git-core/contrib/hooks/post-receive-email
diff -rupNB original/.git/hooks/post-update.sample patched/.git/hooks/post-update.sample
--- original/.git/hooks/post-update.sample 2010-10-31 14:00:45.009255003 +0000
+++ patched/.git/hooks/post-update.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to prepare a packed repository for use over
-# dumb transports.
-#
-# To enable this hook, rename this file to "post-update".
-
-exec git update-server-info
diff -rupNB original/.git/hooks/pre-applypatch.sample patched/.git/hooks/pre-applypatch.sample
--- original/.git/hooks/pre-applypatch.sample 2010-10-31 14:00:45.010255003 +0000
+++ patched/.git/hooks/pre-applypatch.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to verify what is about to be committed
-# by applypatch from an e-mail message.
-#
-# The hook should exit with non-zero status after issuing an
-# appropriate message if it wants to stop the commit.
-#
-# To enable this hook, rename this file to "pre-applypatch".
-
-. git-sh-setup
-test -x "$GIT_DIR/hooks/pre-commit" &&
- exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
-:
diff -rupNB original/.git/hooks/pre-commit.sample patched/.git/hooks/pre-commit.sample
--- original/.git/hooks/pre-commit.sample 2010-10-31 14:00:44.995255003 +0000
+++ patched/.git/hooks/pre-commit.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to verify what is about to be committed.
-# Called by "git commit" with no arguments. The hook should
-# exit with non-zero status after issuing an appropriate message if
-# it wants to stop the commit.
-#
-# To enable this hook, rename this file to "pre-commit".
-
-if git rev-parse --verify HEAD >/dev/null 2>&1
-then
- against=HEAD
-else
- # Initial commit: diff against an empty tree object
- against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
-fi
-
-# If you want to allow non-ascii filenames set this variable to true.
-allownonascii=$(git config hooks.allownonascii)
-
-# Cross platform projects tend to avoid non-ascii filenames; prevent
-# them from being added to the repository. We exploit the fact that the
-# printable range starts at the space character and ends with tilde.
-if [ "$allownonascii" != "true" ] &&
- # Note that the use of brackets around a tr range is ok here, (it's
- # even required, for portability to Solaris 10's /usr/bin/tr), since
- # the square bracket bytes happen to fall in the designated range.
- test "$(git diff --cached --name-only --diff-filter=A -z $against |
- LC_ALL=C tr -d '[ -~]\0')"
-then
- echo "Error: Attempt to add a non-ascii file name."
- echo
- echo "This can cause problems if you want to work"
- echo "with people on other platforms."
- echo
- echo "To be portable it is advisable to rename the file ..."
- echo
- echo "If you know what you are doing you can disable this"
- echo "check using:"
- echo
- echo " git config hooks.allownonascii true"
- echo
- exit 1
-fi
-
-exec git diff-index --check --cached $against --
diff -rupNB original/.git/hooks/prepare-commit-msg.sample patched/.git/hooks/prepare-commit-msg.sample
--- original/.git/hooks/prepare-commit-msg.sample 2010-10-31 14:00:44.995255003 +0000
+++ patched/.git/hooks/prepare-commit-msg.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to prepare the commit log message.
-# Called by "git commit" with the name of the file that has the
-# commit message, followed by the description of the commit
-# message's source. The hook's purpose is to edit the commit
-# message file. If the hook fails with a non-zero status,
-# the commit is aborted.
-#
-# To enable this hook, rename this file to "prepare-commit-msg".
-
-# This hook includes three examples. The first comments out the
-# "Conflicts:" part of a merge commit.
-#
-# The second includes the output of "git diff --name-status -r"
-# into the message, just before the "git status" output. It is
-# commented because it doesn't cope with --amend or with squashed
-# commits.
-#
-# The third example adds a Signed-off-by line to the message, that can
-# still be edited. This is rarely a good idea.
-
-case "$2,$3" in
- merge,)
- /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
-
-# ,|template,)
-# /usr/bin/perl -i.bak -pe '
-# print "\n" . `git diff --cached --name-status -r`
-# if /^#/ && $first++ == 0' "$1" ;;
-
- *) ;;
-esac
-
-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
diff -rupNB original/.git/hooks/pre-rebase.sample patched/.git/hooks/pre-rebase.sample
--- original/.git/hooks/pre-rebase.sample 2010-10-31 14:00:45.008255003 +0000
+++ patched/.git/hooks/pre-rebase.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,169 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2006, 2008 Junio C Hamano
-#
-# The "pre-rebase" hook is run just before "git rebase" starts doing
-# its job, and can prevent the command from running by exiting with
-# non-zero status.
-#
-# The hook is called with the following parameters:
-#
-# $1 -- the upstream the series was forked from.
-# $2 -- the branch being rebased (or empty when rebasing the current branch).
-#
-# This sample shows how to prevent topic branches that are already
-# merged to 'next' branch from getting rebased, because allowing it
-# would result in rebasing already published history.
-
-publish=next
-basebranch="$1"
-if test "$#" = 2
-then
- topic="refs/heads/$2"
-else
- topic=`git symbolic-ref HEAD` ||
- exit 0 ;# we do not interrupt rebasing detached HEAD
-fi
-
-case "$topic" in
-refs/heads/??/*)
- ;;
-*)
- exit 0 ;# we do not interrupt others.
- ;;
-esac
-
-# Now we are dealing with a topic branch being rebased
-# on top of master. Is it OK to rebase it?
-
-# Does the topic really exist?
-git show-ref -q "$topic" || {
- echo >&2 "No such branch $topic"
- exit 1
-}
-
-# Is topic fully merged to master?
-not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
-if test -z "$not_in_master"
-then
- echo >&2 "$topic is fully merged to master; better remove it."
- exit 1 ;# we could allow it, but there is no point.
-fi
-
-# Is topic ever merged to next? If so you should not be rebasing it.
-only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
-only_next_2=`git rev-list ^master ${publish} | sort`
-if test "$only_next_1" = "$only_next_2"
-then
- not_in_topic=`git rev-list "^$topic" master`
- if test -z "$not_in_topic"
- then
- echo >&2 "$topic is already up-to-date with master"
- exit 1 ;# we could allow it, but there is no point.
- else
- exit 0
- fi
-else
- not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
- /usr/bin/perl -e '
- my $topic = $ARGV[0];
- my $msg = "* $topic has commits already merged to public branch:\n";
- my (%not_in_next) = map {
- /^([0-9a-f]+) /;
- ($1 => 1);
- } split(/\n/, $ARGV[1]);
- for my $elem (map {
- /^([0-9a-f]+) (.*)$/;
- [$1 => $2];
- } split(/\n/, $ARGV[2])) {
- if (!exists $not_in_next{$elem->[0]}) {
- if ($msg) {
- print STDERR $msg;
- undef $msg;
- }
- print STDERR " $elem->[1]\n";
- }
- }
- ' "$topic" "$not_in_next" "$not_in_master"
- exit 1
-fi
-
-exit 0
-
-################################################################
-
-This sample hook safeguards topic branches that have been
-published from being rewound.
-
-The workflow assumed here is:
-
- * Once a topic branch forks from "master", "master" is never
- merged into it again (either directly or indirectly).
-
- * Once a topic branch is fully cooked and merged into "master",
- it is deleted. If you need to build on top of it to correct
- earlier mistakes, a new topic branch is created by forking at
- the tip of the "master". This is not strictly necessary, but
- it makes it easier to keep your history simple.
-
- * Whenever you need to test or publish your changes to topic
- branches, merge them into "next" branch.
-
-The script, being an example, hardcodes the publish branch name
-to be "next", but it is trivial to make it configurable via
-$GIT_DIR/config mechanism.
-
-With this workflow, you would want to know:
-
-(1) ... if a topic branch has ever been merged to "next". Young
- topic branches can have stupid mistakes you would rather
- clean up before publishing, and things that have not been
- merged into other branches can be easily rebased without
- affecting other people. But once it is published, you would
- not want to rewind it.
-
-(2) ... if a topic branch has been fully merged to "master".
- Then you can delete it. More importantly, you should not
- build on top of it -- other people may already want to
- change things related to the topic as patches against your
- "master", so if you need further changes, it is better to
- fork the topic (perhaps with the same name) afresh from the
- tip of "master".
-
-Let's look at this example:
-
- o---o---o---o---o---o---o---o---o---o "next"
- / / / /
- / a---a---b A / /
- / / / /
- / / c---c---c---c B /
- / / / \ /
- / / / b---b C \ /
- / / / / \ /
- ---o---o---o---o---o---o---o---o---o---o---o "master"
-
-
-A, B and C are topic branches.
-
- * A has one fix since it was merged up to "next".
-
- * B has finished. It has been fully merged up to "master" and "next",
- and is ready to be deleted.
-
- * C has not merged to "next" at all.
-
-We would want to allow C to be rebased, refuse A, and encourage
-B to be deleted.
-
-To compute (1):
-
- git rev-list ^master ^topic next
- git rev-list ^master next
-
- if these match, topic has not merged in next at all.
-
-To compute (2):
-
- git rev-list master..topic
-
- if this is empty, it is fully merged to "master".
diff -rupNB original/.git/hooks/update.sample patched/.git/hooks/update.sample
--- original/.git/hooks/update.sample 2010-10-31 14:00:45.008255003 +0000
+++ patched/.git/hooks/update.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,128 +0,0 @@
-#!/bin/sh
-#
-# An example hook script to blocks unannotated tags from entering.
-# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
-#
-# To enable this hook, rename this file to "update".
-#
-# Config
-# ------
-# hooks.allowunannotated
-# This boolean sets whether unannotated tags will be allowed into the
-# repository. By default they won't be.
-# hooks.allowdeletetag
-# This boolean sets whether deleting tags will be allowed in the
-# repository. By default they won't be.
-# hooks.allowmodifytag
-# This boolean sets whether a tag may be modified after creation. By default
-# it won't be.
-# hooks.allowdeletebranch
-# This boolean sets whether deleting branches will be allowed in the
-# repository. By default they won't be.
-# hooks.denycreatebranch
-# This boolean sets whether remotely creating branches will be denied
-# in the repository. By default this is allowed.
-#
-
-# --- Command line
-refname="$1"
-oldrev="$2"
-newrev="$3"
-
-# --- Safety check
-if [ -z "$GIT_DIR" ]; then
- echo "Don't run this script from the command line." >&2
- echo " (if you want, you could supply GIT_DIR then run" >&2
- echo " $0 <ref> <oldrev> <newrev>)" >&2
- exit 1
-fi
-
-if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
- echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
- exit 1
-fi
-
-# --- Config
-allowunannotated=$(git config --bool hooks.allowunannotated)
-allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
-denycreatebranch=$(git config --bool hooks.denycreatebranch)
-allowdeletetag=$(git config --bool hooks.allowdeletetag)
-allowmodifytag=$(git config --bool hooks.allowmodifytag)
-
-# check for no description
-projectdesc=$(sed -e '1q' "$GIT_DIR/description")
-case "$projectdesc" in
-"Unnamed repository"* | "")
- echo "*** Project description file hasn't been set" >&2
- exit 1
- ;;
-esac
-
-# --- Check types
-# if $newrev is 0000...0000, it's a commit to delete a ref.
-zero="0000000000000000000000000000000000000000"
-if [ "$newrev" = "$zero" ]; then
- newrev_type=delete
-else
- newrev_type=$(git cat-file -t $newrev)
-fi
-
-case "$refname","$newrev_type" in
- refs/tags/*,commit)
- # un-annotated tag
- short_refname=${refname##refs/tags/}
- if [ "$allowunannotated" != "true" ]; then
- echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
- echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
- exit 1
- fi
- ;;
- refs/tags/*,delete)
- # delete tag
- if [ "$allowdeletetag" != "true" ]; then
- echo "*** Deleting a tag is not allowed in this repository" >&2
- exit 1
- fi
- ;;
- refs/tags/*,tag)
- # annotated tag
- if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
- then
- echo "*** Tag '$refname' already exists." >&2
- echo "*** Modifying a tag is not allowed in this repository." >&2
- exit 1
- fi
- ;;
- refs/heads/*,commit)
- # branch
- if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
- echo "*** Creating a branch is not allowed in this repository" >&2
- exit 1
- fi
- ;;
- refs/heads/*,delete)
- # delete branch
- if [ "$allowdeletebranch" != "true" ]; then
- echo "*** Deleting a branch is not allowed in this repository" >&2
- exit 1
- fi
- ;;
- refs/remotes/*,commit)
- # tracking branch
- ;;
- refs/remotes/*,delete)
- # delete tracking branch
- if [ "$allowdeletebranch" != "true" ]; then
- echo "*** Deleting a tracking branch is not allowed in this repository" >&2
- exit 1
- fi
- ;;
- *)
- # Anything else (is there anything else?)
- echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
- exit 1
- ;;
-esac
-
-# --- Finished
-exit 0
Binary files original/.git/index and patched/.git/index differ
diff -rupNB original/.git/info/exclude patched/.git/info/exclude
--- original/.git/info/exclude 2010-10-31 14:00:44.994255003 +0000
+++ patched/.git/info/exclude 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-# git ls-files --others --exclude-from=.git/info/exclude
-# Lines that start with '#' are comments.
-# For a project mostly in C, the following would be a good set of
-# exclude patterns (uncomment them if you want to use them):
-# *.[oa]
-# *~
diff -rupNB original/.git/logs/HEAD patched/.git/logs/HEAD
--- original/.git/logs/HEAD 2010-10-31 14:08:33.284255003 +0000
+++ patched/.git/logs/HEAD 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-0000000000000000000000000000000000000000 84665669ca1dbbea32356df5703d5b6624bee8fa Jamie Nicol <[email protected]> 1288533652 +0000 commit (initial): initial
-84665669ca1dbbea32356df5703d5b6624bee8fa 59d1d998ab535465cae7d6ccbc629eaf8ee91d9a Jamie Nicol <[email protected]> 1288533693 +0000 commit: patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-59d1d998ab535465cae7d6ccbc629eaf8ee91d9a 3363cce9d9a187ba4afe88fb8701f7c5ad842869 Jamie Nicol <[email protected]> 1288534008 +0000 commit (amend): patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-3363cce9d9a187ba4afe88fb8701f7c5ad842869 66ae3558d7be0d8499f33dbf2aa1dfa727a84bd3 Jamie Nicol <[email protected]> 1288534078 +0000 commit (amend): patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-66ae3558d7be0d8499f33dbf2aa1dfa727a84bd3 48974fc15edc47c2148fb26c898baec348cbad83 Jamie Nicol <[email protected]> 1288534107 +0000 commit (amend): patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
diff -rupNB original/.git/logs/refs/heads/master patched/.git/logs/refs/heads/master
--- original/.git/logs/refs/heads/master 2010-10-31 14:08:33.284255003 +0000
+++ patched/.git/logs/refs/heads/master 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-0000000000000000000000000000000000000000 84665669ca1dbbea32356df5703d5b6624bee8fa Jamie Nicol <[email protected]> 1288533652 +0000 commit (initial): initial
-84665669ca1dbbea32356df5703d5b6624bee8fa 59d1d998ab535465cae7d6ccbc629eaf8ee91d9a Jamie Nicol <[email protected]> 1288533693 +0000 commit: patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-59d1d998ab535465cae7d6ccbc629eaf8ee91d9a 3363cce9d9a187ba4afe88fb8701f7c5ad842869 Jamie Nicol <[email protected]> 1288534008 +0000 commit (amend): patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-3363cce9d9a187ba4afe88fb8701f7c5ad842869 66ae3558d7be0d8499f33dbf2aa1dfa727a84bd3 Jamie Nicol <[email protected]> 1288534078 +0000 commit (amend): patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
-66ae3558d7be0d8499f33dbf2aa1dfa727a84bd3 48974fc15edc47c2148fb26c898baec348cbad83 Jamie Nicol <[email protected]> 1288534107 +0000 commit (amend): patched for fedora 14 kernel 2.6.35.6-48.fc14.x86_64
Binary files original/.git/objects/0c/4aa657a79ff499df3513e37916306a6b8cdc41 and patched/.git/objects/0c/4aa657a79ff499df3513e37916306a6b8cdc41 differ
Binary files original/.git/objects/1b/d070fe38cc8fa6792221cec88aae69d32d87a2 and patched/.git/objects/1b/d070fe38cc8fa6792221cec88aae69d32d87a2 differ
Binary files original/.git/objects/20/d064226433af152edac0fe8cbd96fa8f2a1499 and patched/.git/objects/20/d064226433af152edac0fe8cbd96fa8f2a1499 differ
Binary files original/.git/objects/2c/31ada698c33ef08f5dfc45438c8b3d37f63d70 and patched/.git/objects/2c/31ada698c33ef08f5dfc45438c8b3d37f63d70 differ
Binary files original/.git/objects/33/63cce9d9a187ba4afe88fb8701f7c5ad842869 and patched/.git/objects/33/63cce9d9a187ba4afe88fb8701f7c5ad842869 differ
Binary files original/.git/objects/48/974fc15edc47c2148fb26c898baec348cbad83 and patched/.git/objects/48/974fc15edc47c2148fb26c898baec348cbad83 differ
Binary files original/.git/objects/59/836e7ea16fbbb19a36cc3ac9f4eb69ffd21f99 and patched/.git/objects/59/836e7ea16fbbb19a36cc3ac9f4eb69ffd21f99 differ
diff -rupNB original/.git/objects/59/d1d998ab535465cae7d6ccbc629eaf8ee91d9a patched/.git/objects/59/d1d998ab535465cae7d6ccbc629eaf8ee91d9a
--- original/.git/objects/59/d1d998ab535465cae7d6ccbc629eaf8ee91d9a 2010-10-31 14:02:26.024255003 +0000
+++ patched/.git/objects/59/d1d998ab535465cae7d6ccbc629eaf8ee91d9a 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-xANÅ0 Y÷Þ#¢8q !Ö,žr[-ü¶(ãÓÏx»Y<Íȱmë@óÝèªJFÒYÙÕZ}a$d)µR1kÁ[)Ó'wÝäH°oµ*cÀDÍÒ|Á*QU5Oü=£Ã o«Âë*Çßoð<ÝoüåvOàCÎ
-ÂýåÜ$Cÿu>;,ÚÀN¹i;:ð¡}×+G£î'ÓÅéUàS¹
\ No newline at end of file
Binary files original/.git/objects/5f/619924ef61f39411d045d09b2aab81198abbd1 and patched/.git/objects/5f/619924ef61f39411d045d09b2aab81198abbd1 differ
Binary files original/.git/objects/66/ae3558d7be0d8499f33dbf2aa1dfa727a84bd3 and patched/.git/objects/66/ae3558d7be0d8499f33dbf2aa1dfa727a84bd3 differ
Binary files original/.git/objects/68/783c808d5cfc35cee67e39f73b85f9294002c8 and patched/.git/objects/68/783c808d5cfc35cee67e39f73b85f9294002c8 differ
Binary files original/.git/objects/72/b424bd0dbb0373d95dba3ec3e23e54036de524 and patched/.git/objects/72/b424bd0dbb0373d95dba3ec3e23e54036de524 differ
diff -rupNB original/.git/objects/84/665669ca1dbbea32356df5703d5b6624bee8fa patched/.git/objects/84/665669ca1dbbea32356df5703d5b6624bee8fa
--- original/.git/objects/84/665669ca1dbbea32356df5703d5b6624bee8fa 2010-10-31 14:01:04.960255003 +0000
+++ patched/.git/objects/84/665669ca1dbbea32356df5703d5b6624bee8fa 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-x;
-1@séü³ bmá2qÂF6XÇûëz_÷Ç+£÷& £;ÈÆ EOž"yÆ\ÉT=2Z#`)9KVå·Ìc[îáÞÊXàüÜå*3¯»¿N+ËŽIÉ[Œ#~Qå·þ+VmmÒò¢>œ8
\ No newline at end of file
Binary files original/.git/objects/8e/bb388ba9bb54a5f782f8b0b223e28371063fc3 and patched/.git/objects/8e/bb388ba9bb54a5f782f8b0b223e28371063fc3 differ
Binary files original/.git/objects/99/0ba2c8c830175b40ea31ff041cbfea2dd63750 and patched/.git/objects/99/0ba2c8c830175b40ea31ff041cbfea2dd63750 differ
Binary files original/.git/objects/b9/5309e83c8dca995557ba12b854277882be97e6 and patched/.git/objects/b9/5309e83c8dca995557ba12b854277882be97e6 differ
Binary files original/.git/objects/c1/9d66ef0ebb5e0afb2f19b0e034770263b843b3 and patched/.git/objects/c1/9d66ef0ebb5e0afb2f19b0e034770263b843b3 differ
Binary files original/.git/objects/d9/4ed99733e5e0af42b993acb1a65949f6ffd479 and patched/.git/objects/d9/4ed99733e5e0af42b993acb1a65949f6ffd479 differ
Binary files original/.git/objects/e2/7ffe858aaab148ce8982cf97b2078f04b8d29b and patched/.git/objects/e2/7ffe858aaab148ce8982cf97b2078f04b8d29b differ
diff -rupNB original/.git/refs/heads/master patched/.git/refs/heads/master
--- original/.git/refs/heads/master 2010-10-31 14:08:33.284255003 +0000
+++ patched/.git/refs/heads/master 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-48974fc15edc47c2148fb26c898baec348cbad83
diff -rupNB original/midi.c patched/midi.c
--- original/midi.c 2010-10-31 14:11:41.311255003 +0000
+++ patched/midi.c 2010-10-31 00:27:27.000000000 +0100
@@ -22,6 +22,7 @@
*
*/
+#include <linux/slab.h> /* For kfree */
#include <linux/kernel.h>
#include <linux/version.h> /* For LINUX_VERSION_CODE */
#include <linux/errno.h>
@@ -367,7 +368,7 @@ static void snd_hdjmidi_in_endpoint_dele
{
if (ep->urb) {
if (ep->urb->transfer_buffer) {
- usb_buffer_free(ep->umidi->chip->dev,
+ usb_free_coherent(ep->umidi->chip->dev,
ep->urb->transfer_buffer_length,
ep->urb->transfer_buffer,
ep->urb->transfer_dma);
@@ -503,10 +504,10 @@ static int snd_hdjmidi_in_endpoint_creat
pipe = usb_rcvbulkpipe(umidi->chip->dev, ep_info->in_ep);
}
length = usb_maxpacket(umidi->chip->dev, pipe, 0);
- buffer = usb_buffer_alloc(umidi->chip->dev, length, GFP_KERNEL,
+ buffer = usb_alloc_coherent(umidi->chip->dev, length, GFP_KERNEL,
&ep->urb->transfer_dma);
if (!buffer) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed\n",__FUNCTION__);
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent failed\n",__FUNCTION__);
snd_hdjmidi_in_endpoint_delete(ep);
return -ENOMEM;
}
@@ -536,7 +537,7 @@ static void snd_hdjmidi_out_endpoint_del
#endif
if (ep->urb) {
if (ep->urb->transfer_buffer) {
- usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+ usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
ep->urb->transfer_buffer,
ep->urb->transfer_dma);
}
@@ -544,27 +545,27 @@ static void snd_hdjmidi_out_endpoint_del
}
if (ep->urb_led) {
if (ep->urb_led->transfer_buffer) {
- usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+ usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
ep->urb_led->transfer_buffer,
ep->urb_led->transfer_dma);
}
usb_free_urb(ep->urb_led);
}
if (ep->ctrl_req_led) {
- usb_buffer_free(ep->umidi->chip->dev, sizeof(*(ep->ctrl_req_led)),
+ usb_free_coherent(ep->umidi->chip->dev, sizeof(*(ep->ctrl_req_led)),
ep->ctrl_req_led, ep->ctrl_req_led_dma);
}
if (ep->controller_state) {
if (ep->controller_state->output_control_ctl_urb &&
ep->controller_state->output_control_ctl_urb->transfer_buffer &&
ep->controller_state->output_control_ctl_urb->transfer_dma) {
- usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+ usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
ep->controller_state->output_control_ctl_urb->transfer_buffer,
ep->controller_state->output_control_ctl_urb->transfer_dma);
}
if (ep->controller_state->output_control_ctl_req &&
ep->controller_state->output_control_ctl_dma) {
- usb_buffer_free(ep->umidi->chip->dev,
+ usb_free_coherent(ep->umidi->chip->dev,
sizeof(*(ep->controller_state->output_control_ctl_req)),
ep->controller_state->output_control_ctl_req,
ep->controller_state->output_control_ctl_dma);
@@ -573,7 +574,7 @@ static void snd_hdjmidi_out_endpoint_del
usb_free_urb(ep->controller_state->output_control_ctl_urb);
}
if (ep->controller_state->ctl_req) {
- usb_buffer_free(ep->umidi->chip->dev,
+ usb_free_coherent(ep->umidi->chip->dev,
sizeof(*(ep->controller_state->ctl_req)),
ep->controller_state->ctl_req,
ep->controller_state->ctl_req_dma);
@@ -584,14 +585,14 @@ static void snd_hdjmidi_out_endpoint_del
}
if (ep->controller_state->urb_kt) {
if (ep->controller_state->urb_kt->transfer_buffer) {
- usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+ usb_free_coherent(ep->umidi->chip->dev, ep->max_transfer,
ep->controller_state->urb_kt->transfer_buffer,
ep->controller_state->urb_kt->transfer_dma);
}
usb_free_urb(ep->controller_state->urb_kt);
}
if (ep->controller_state->ctl_req_kt) {
- usb_buffer_free(ep->umidi->chip->dev,
+ usb_free_coherent(ep->umidi->chip->dev,
sizeof(*(ep->controller_state->ctl_req_kt)),
ep->controller_state->ctl_req_kt,
ep->controller_state->ctl_req_dma_kt);
@@ -666,12 +667,12 @@ static int controller_output_init(struct
controller_state->is_weltrend = is_mp3_weltrend(ep->umidi->chip->usb_id);
}
- controller_state->ctl_req = usb_buffer_alloc(ep->umidi->chip->dev,
+ controller_state->ctl_req = usb_alloc_coherent(ep->umidi->chip->dev,
sizeof(*(controller_state->ctl_req)),
GFP_KERNEL,
&controller_state->ctl_req_dma);
if (controller_state->ctl_req==NULL) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA\n",__FUNCTION__);
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for setup DMA\n",__FUNCTION__);
return -ENOMEM;
}
@@ -679,12 +680,12 @@ static int controller_output_init(struct
* mouse setting or setting LEDs */
init_MUTEX(&controller_state->output_control_ctl_mutex);
init_completion(&controller_state->output_control_ctl_completion);
- controller_state->output_control_ctl_req = usb_buffer_alloc(ep->umidi->chip->dev,
+ controller_state->output_control_ctl_req = usb_alloc_coherent(ep->umidi->chip->dev,
sizeof(*(controller_state->output_control_ctl_req)),
GFP_KERNEL,
&controller_state->output_control_ctl_dma);
if (controller_state->output_control_ctl_req==NULL) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for general setup DMA\n",
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for general setup DMA\n",
__FUNCTION__);
return -ENOMEM;
}
@@ -700,10 +701,10 @@ static int controller_output_init(struct
max_transfer = usb_maxpacket(ep->umidi->chip->dev,
controller_state->output_control_ctl_pipe, 1);
- buffer = usb_buffer_alloc(ep->umidi->chip->dev, max_transfer,
+ buffer = usb_alloc_coherent(ep->umidi->chip->dev, max_transfer,
GFP_KERNEL, &controller_state->output_control_ctl_urb->transfer_dma);
if (buffer==NULL) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed (general URB buffer)\n",
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent failed (general URB buffer)\n",
__FUNCTION__);
return -ENOMEM;
}
@@ -726,8 +727,8 @@ static int controller_output_init(struct
controller_state->output_control_ctl_req->wIndex = cpu_to_le16(ep->umidi->iface->cur_altsetting->desc.bInterfaceNumber);
controller_state->output_control_ctl_req->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
controller_state->output_control_ctl_urb->setup_dma = controller_state->output_control_ctl_dma;
- /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
- controller_state->output_control_ctl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+ /* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
+ controller_state->output_control_ctl_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
return 0;
}
@@ -772,12 +773,12 @@ static int snd_hdjmidi_out_endpoint_crea
}
if (ep->umidi->chip->caps.leds_hid_controlled) {
- ep->ctrl_req_led = usb_buffer_alloc(ep->umidi->chip->dev,
+ ep->ctrl_req_led = usb_alloc_coherent(ep->umidi->chip->dev,
sizeof(*(ep->ctrl_req_led)),
GFP_KERNEL,
&ep->ctrl_req_led_dma);
if (ep->ctrl_req_led==NULL) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA\n",__FUNCTION__);
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for setup DMA\n",__FUNCTION__);
return -ENOMEM;
}
}
@@ -806,18 +807,18 @@ static int snd_hdjmidi_out_endpoint_crea
pipe = usb_sndctrlpipe(umidi->chip->dev, 0);
}
ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1);
- buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
+ buffer = usb_alloc_coherent(umidi->chip->dev, ep->max_transfer,
GFP_KERNEL, &ep->urb->transfer_dma);
if (!buffer) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed\n",__FUNCTION__);
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed\n",__FUNCTION__);
snd_hdjmidi_out_endpoint_delete(ep);
return -ENOMEM;
}
- buffer_led = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
+ buffer_led = usb_alloc_coherent(umidi->chip->dev, ep->max_transfer,
GFP_KERNEL, &ep->urb_led->transfer_dma);
if (!buffer_led) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for LED buffer\n",
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for LED buffer\n",
__FUNCTION__);
snd_hdjmidi_out_endpoint_delete(ep);
return -ENOMEM;
@@ -853,8 +854,8 @@ static int snd_hdjmidi_out_endpoint_crea
ep->controller_state->ctl_req->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
ep->controller_state->ctl_req->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
ep->urb->setup_dma = ep->controller_state->ctl_req_dma;
- /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
- ep->urb->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+ /* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
+ ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
}
if (ep->umidi->chip->caps.leds_hid_controlled) {
@@ -874,8 +875,8 @@ static int snd_hdjmidi_out_endpoint_crea
ep->ctrl_req_led->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
ep->ctrl_req_led->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
ep->urb_led->setup_dma = ep->ctrl_req_led_dma;
- /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
- ep->urb_led->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+ /* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
+ ep->urb_led->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
}
if (ep->umidi->chip->caps.leds_bulk_controlled) {
@@ -913,20 +914,20 @@ static int snd_hdjmidi_out_endpoint_crea
return -ENOMEM;
}
- buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
+ buffer = usb_alloc_coherent(umidi->chip->dev, ep->max_transfer,
GFP_KERNEL, &ep->controller_state->urb_kt->transfer_dma);
if (!buffer) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() for wq failed\n",__FUNCTION__);
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() for wq failed\n",__FUNCTION__);
snd_hdjmidi_out_endpoint_delete(ep);
return -ENOMEM;
}
- ep->controller_state->ctl_req_kt = usb_buffer_alloc(umidi->chip->dev,
+ ep->controller_state->ctl_req_kt = usb_alloc_coherent(umidi->chip->dev,
sizeof(*(ep->controller_state->ctl_req_kt)),
GFP_KERNEL,
&ep->controller_state->ctl_req_dma_kt);
if (!ep->controller_state->ctl_req_kt) {
- snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for setup DMA for wq\n",__FUNCTION__);
+ snd_printk(KERN_WARNING"%s() usb_alloc_coherent() failed for setup DMA for wq\n",__FUNCTION__);
snd_hdjmidi_out_endpoint_delete(ep);
return -ENOMEM;
}
@@ -946,8 +947,8 @@ static int snd_hdjmidi_out_endpoint_crea
ep->controller_state->ctl_req_kt->wIndex = cpu_to_le16(umidi->iface->cur_altsetting->desc.bInterfaceNumber);
ep->controller_state->ctl_req_kt->wLength = cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
ep->controller_state->urb_kt->setup_dma = ep->controller_state->ctl_req_dma_kt;
- /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
- ep->controller_state->urb_kt->transfer_flags = URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+ /* NOTE: transfer_dma setup above in call to usb_alloc_coherent() */
+ ep->controller_state->urb_kt->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
init_completion(&ep->controller_state->ctl_req_completion_kt);
init_completion(&ep->controller_state->mp3w_kthread_started);Linux:~$ sudo dkms build -m hdj_mod -v 1.28
Error! DKMS tree does not contain: hdj_mod-1.28
Build cannot continue without the proper tree.so i entered the second one:this will fail but explode everything needed to build with
Linux:~$ cd /var/lib/dkms/hdjmod/1.28/build
bash: cd: /var/lib/dkms/hdjmod/1.28/build: Datei oder Verzeichnis nicht gefunden [no such file or dicectory]edriv wrote:I think that some problems that users (as me) experienced are due to use of a real-time optimized kernel.
I got it to compile (using kernel 2.6.33.7-rt29) with the following patch.
- Code: Select all
--- device.c 2009-01-27 15:25:50.000000000 +0100
+++ device.ok.c 2010-09-22 21:50:44.176388000 +0200
@@ -23,7 +23,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/version.h> /* For LINUX_VERSION_CODE */
@@ -66,7 +65,7 @@
module_param_array(id, charp, NULL, 0444);
MODULE_PARM_DESC(id, "ID string for the Hercules DJ Series adapter.");
-static DECLARE_MUTEX(register_mutex);
+static DEFINE_SEMAPHORE(register_mutex, 1);
static struct snd_hdj_chip *usb_chip[SNDRV_CARDS];
/* reference count for the socket */
@@ -1097,6 +1096,7 @@
}
if (chip->caps.talkover_atten==1 &&
snd_card_proc_new(chip->card, "talkover_atten", &entry)==0) {
+
snd_info_set_text_ops(entry,
(void*)(unsigned long)chip->index,
proc_talkover_atten_read);
@@ -1660,10 +1660,10 @@
/* let the kernel option override custom id */
strncpy(card_id,id[idx],sizeof(card_id)-1);
}
- card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0);
- if (card == NULL) {
+ err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, &card);
+ if (err < 0) {
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
- return -ENOMEM;
+ return err;
}
/* save the index, so people who have the card can reference the chip */
@@ -1682,7 +1682,7 @@
chip->card = card;
chip->product_code = product_code;
- init_MUTEX(&chip->vendor_request_mutex);
+ sema_init(&chip->vendor_request_mutex, 1);
/* initialise the atomic variables */
atomic_set(&chip->locked_io, 0);
@@ -1697,7 +1697,7 @@
INIT_LIST_HEAD(&chip->bulk_list);
chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));
- init_MUTEX(&chip->netlink_list_mutex);
+ sema_init(&chip->netlink_list_mutex, 1);
INIT_LIST_HEAD(&chip->netlink_registered_processes);
/* fill in DJ capabilities for this device */
@@ -1829,6 +1829,8 @@
return DJCONTROLLER_PRODUCT_CODE;
} else if (usbid == USB_ID(USB_HDJ_VENDOR_ID, DJ_CONTROL_MP3W_PID)) {
return DJCONTROLLER_PRODUCT_CODE;
+ } else if (usbid == USB_ID(USB_HDJ_VENDOR_ID, DJ_CONTROL_MP3E2_PID)) {
+ return DJCONTROLSTEEL_PRODUCT_CODE;
} else {
return DJCONSOLE_PRODUCT_UNKNOWN;
}
@@ -1860,6 +1862,7 @@
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_MK2_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_RMX_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3_PID)&&
+ (le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3E2_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONTROL_MP3W_PID)&&
(le16_to_cpu(usb_dev->descriptor.idProduct)!=DJ_CONSOLE_STEEL_PID))
{
--- device.h 2009-01-27 15:25:50.000000000 +0100
+++ device.ok.h 2010-09-22 21:51:23.217138000 +0200
@@ -37,6 +37,7 @@
#define DJ_CONSOLE_MK2_PID 0xb100
#define DJ_CONSOLE_RMX_PID 0xb101
#define DJ_CONTROL_MP3_PID 0xd000
+#define DJ_CONTROL_MP3E2_PID 0xb105
#define DJ_CONTROL_MP3W_PID 0xd001
#define DJ_CONSOLE_STEEL_PID 0xb102
--- bulk.c 2009-01-27 15:25:50.000000000 +0100
+++ bulk.ok.c 2010-09-22 21:44:14.485144000 +0200
@@ -3062,7 +3062,7 @@
goto hdj_create_bulk_interface_error;
}
/* allocate the buffer for bulk_out_urb */
- init_MUTEX(&ubulk->bulk_out_buffer_mutex);
+ sema_init(&ubulk->bulk_out_buffer_mutex, 1);
ubulk->bulk_out_buffer =
usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
@@ -3601,7 +3601,7 @@
return -EINVAL;
}
- init_MUTEX(&ubulk->output_control_mutex);
+ sema_init(&ubulk->output_control_mutex, 1);
init_completion(&ubulk->output_control_completion);
/* Every product here except the Steel targets HID. Since the steel does not target HID, we don't
@@ -3855,7 +3855,7 @@
u16 value = 0;
struct hdj_console_context *dc = ((struct hdj_console_context *)ubulk->device_context);
- init_MUTEX(&dc->device_config_mutex);
+ sema_init(&dc->device_config_mutex, 1);
ret = hdjbulk_init_common_context(ubulk,&ubulk->hdj_common);
if (ret!=0) {
@@ -4133,7 +4133,7 @@
spin_lock_init(&dc->bulk_buffer_lock);
init_completion(&dc->bulk_request_completion);
- init_MUTEX(&dc->bulk_request_mutex);
+ sema_init(&dc->bulk_request_mutex, 1);
if ((ret = init_continuous_reader(ubulk))!=0) {
printk(KERN_WARNING"%s() init_continuous_reader() failed, rc:%d\n",
--- midi.c 2009-01-27 15:25:50.000000000 +0100
+++ midi.ok.c 2010-09-22 21:44:54.553132000 +0200
@@ -677,7 +677,7 @@
/* this buffer and URB below are for general control requests, like changing the
* mouse setting or setting LEDs */
- init_MUTEX(&controller_state->output_control_ctl_mutex);
+ sema_init(&controller_state->output_control_ctl_mutex, 1);
init_completion(&controller_state->output_control_ctl_completion);
controller_state->output_control_ctl_req = usb_buffer_alloc(ep->umidi->chip->dev,
sizeof(*(controller_state->output_control_ctl_req)),
Return to Controller presets/mappings
Users browsing this forum: No registered users and 1 guest