diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 05:27:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 05:27:25 +0000 |
commit | c9c06167e7933d93a6e396174c68abf242294abb (patch) | |
tree | d9a8bb30663e9a3405a1ef37ffb62bc14b9f019f /drivers/ieee1394 | |
parent | f79e8cc3c34e4192a3e5ef4cc9c6542fdef703c0 (diff) |
Merge with Linux 2.4.0-test12.
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/guid.c | 2 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_types.h | 180 | ||||
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 2 | ||||
-rw-r--r-- | drivers/ieee1394/pcilynx.c | 2 | ||||
-rw-r--r-- | drivers/ieee1394/raw1394.c | 4 |
5 files changed, 10 insertions, 180 deletions
diff --git a/drivers/ieee1394/guid.c b/drivers/ieee1394/guid.c index 1aa453292..6745222f3 100644 --- a/drivers/ieee1394/guid.c +++ b/drivers/ieee1394/guid.c @@ -163,7 +163,7 @@ static void host_reset(struct hpsb_host *host) return; } - greq->tq.next = NULL; + INIT_LIST_HEAD(&greq->tq.list); greq->tq.sync = 0; greq->tq.routine = (void (*)(void*))pkt_complete; greq->tq.data = greq; diff --git a/drivers/ieee1394/ieee1394_types.h b/drivers/ieee1394/ieee1394_types.h index 8175fa8f9..c55f7e66b 100644 --- a/drivers/ieee1394/ieee1394_types.h +++ b/drivers/ieee1394/ieee1394_types.h @@ -10,186 +10,12 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) - -#include <linux/wait.h> -#define DECLARE_WAITQUEUE(name, task) struct wait_queue name = { task, NULL } - -typedef struct wait_queue *wait_queue_head_t; -typedef struct wait_queue wait_queue_t; - -inline static void init_waitqueue_head(wait_queue_head_t *wh) -{ - *wh = NULL; -} - -inline static void init_waitqueue_entry(wait_queue_t *wq, struct task_struct *p) -{ - wq->task = p; - wq->next = NULL; -} - -static __inline__ void list_add_tail(struct list_head *new, struct list_head *head) -{ - __list_add(new, head->prev, head); -} - -#define __constant_cpu_to_be32(x) __constant_htonl((x)) - -#define set_current_state(state_value) \ - do { current->state = (state_value); } while (0) - - -#include <asm/page.h> -/* Pure 2^n version of get_order */ -extern __inline__ int get_order(unsigned long size) -{ - int order; - size = (size-1) >> (PAGE_SHIFT-1); - order = -1; - do { - size >>= 1; - order++; - } while (size); - return order; -} - -#include <linux/mm.h> -#include <linux/pci.h> -inline static int pci_enable_device(struct pci_dev *dev) -{ - u16 cmd; - pci_read_config_word(dev, PCI_COMMAND, &cmd); - pci_write_config_word(dev, PCI_COMMAND, cmd | PCI_COMMAND_MEMORY); - return 0; -} - -#define PCI_DMA_BIDIRECTIONAL 0 -#define PCI_DMA_TODEVICE 1 -#define PCI_DMA_FROMDEVICE 2 -#define PCI_DMA_NONE 3 -#define PCI_ROM_RESOURCE 6 -#define pci_resource_start(dev, bar) ((bar) == PCI_ROM_RESOURCE \ - ? (dev)->rom_address \ - : (dev)->base_address[(bar)]) -#define BUG() *(int *)0 = 0 - -#include <asm/io.h> -typedef u32 dma_addr_t; - -extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask) -{ - return 1; -} - -extern inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) -{ - void *ret; - ret = (void *)__get_free_pages(GFP_ATOMIC, get_order(size)); - if (ret) { - memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); - } - return ret; -} - -extern inline void pci_free_consistent(struct pci_dev *hwdev, size_t size, - void *vaddr, dma_addr_t dma_handle) -{ - free_pages((unsigned long)vaddr, get_order(size)); -} - -extern inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, - size_t size, int direction) -{ - if (direction == PCI_DMA_NONE) - BUG(); - return virt_to_bus(ptr); -} - -extern inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, - size_t size, int direction) -{ - if (direction == PCI_DMA_NONE) - BUG(); -} - -#include <asm/scatterlist.h> -extern inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents, int direction) -{ - if (direction == PCI_DMA_NONE) - BUG(); - return nents; -} - -extern inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents, int direction) -{ - if (direction == PCI_DMA_NONE) - BUG(); -} - -extern inline void pci_dma_sync_single(struct pci_dev *hwdev, - dma_addr_t dma_handle, - size_t size, int direction) -{ - if (direction == PCI_DMA_NONE) - BUG(); -} - -extern inline void pci_dma_sync_sg(struct pci_dev *hwdev, - struct scatterlist *sg, - int nelems, int direction) -{ - if (direction == PCI_DMA_NONE) - BUG(); -} - - -#ifndef _LINUX_DEVFS_FS_KERNEL_H -typedef struct devfs_entry * devfs_handle_t; -#define DEVFS_FL_NONE 0 - -static inline devfs_handle_t devfs_register (devfs_handle_t dir, - const char *name, - unsigned int flags, - unsigned int major, - unsigned int minor, - umode_t mode, - void *ops, void *info) -{ - return NULL; -} -static inline void devfs_unregister (devfs_handle_t de) -{ - return; -} -static inline int devfs_register_chrdev (unsigned int major, const char *name, - struct file_operations *fops) -{ - return register_chrdev (major, name, fops); -} -static inline int devfs_unregister_chrdev (unsigned int major,const char *name) -{ - return unregister_chrdev (major, name); -} -#endif /* _LINUX_DEVFS_FS_KERNEL_H */ - - -#define V22_COMPAT_MOD_INC_USE_COUNT MOD_INC_USE_COUNT -#define V22_COMPAT_MOD_DEC_USE_COUNT MOD_DEC_USE_COUNT -#define OWNER_THIS_MODULE - -#else /* Linux version < 2.3 */ - +#include "linux22compat.h" +#else #define V22_COMPAT_MOD_INC_USE_COUNT do {} while (0) #define V22_COMPAT_MOD_DEC_USE_COUNT do {} while (0) #define OWNER_THIS_MODULE owner: THIS_MODULE, - -#endif /* Linux version < 2.3 */ - - +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,18) #include <asm/spinlock.h> diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 6dc42555d..3b41afb55 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -1585,7 +1585,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, int ctx, int num_desc, /* initialize bottom handler */ d->task.sync = 0; - d->task.next = NULL; + INIT_LIST_HEAD(&d->task.list); d->task.routine = dma_rcv_bh; d->task.data = (void*)d; diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c index 352f85408..9943c255c 100644 --- a/drivers/ieee1394/pcilynx.c +++ b/drivers/ieee1394/pcilynx.c @@ -1457,9 +1457,9 @@ static void remove_card(struct ti_lynx *lynx) switch (lynx->state) { case have_intr: + reg_write(lynx, PCI_INT_ENABLE, 0); free_irq(lynx->dev->irq, lynx); case have_iomappings: - reg_write(lynx, PCI_INT_ENABLE, 0); reg_write(lynx, MISC_CONTROL, MISC_CONTROL_SWRESET); iounmap(lynx->registers); iounmap(lynx->local_rom); diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 8b4aa7244..16399b347 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c @@ -786,6 +786,10 @@ static int handle_iso_send(struct file_info *fi, struct pending_request *req, req->req.length = 0; queue_task(&req->tq, &packet->complete_tq); + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); + if (!hpsb_send_packet(packet)) { req->req.error = RAW1394_ERROR_SEND_ERROR; queue_complete_req(req); |