From: Adrian M. <ad...@mc...> - 2002-02-17 23:54:31
|
I have some code in my Puru Puru driver which does this: u16 find_id = play->code; struct dc_puru_effect *entry; for (ptr = effects_list.next; ptr != &effects_list; ptr = ptr->next) { entry = list_entry(ptr, struct dc_puru_effect, list); if (entry->sid == find_id) { struct mapleq *rumble = maple_allocq(puru->data->dev); rumble->command = 14; rumble->length = 2; ((unsigned long *) (rumble->recvbuf))[0] = cpu_to_be32(MAPLE_FUNC_PURUPURU); ((unsigned long *) (rumble->recvbuf))[1] = 0x0000ffff; rumble->sendbuf = rumble->recvbuf; if (maple_add_packet(rumble) != 0) printk("Could not add packet\n"); ie it uses the maple low level commands to create a mapleq* and then adds it to the list of packets to be processed. However - while all this code appears to execute correctly and the function returns from maple_add_packet, the system then freezes. Has anybody else used this low level maple interface (which is different from the other supported maple devices, but is esentially the method used below them in the main maple.c) in this way? Any ideas of what might be going wrong in my code? Adrian |