linux1394-cvslog Mailing List for IEEE 1394 for Linux (Page 7)
Brought to you by:
aeb,
bencollins
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
(12) |
Aug
(8) |
Sep
(9) |
Oct
(4) |
Nov
(5) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(7) |
Feb
(3) |
Mar
(15) |
Apr
(12) |
May
(5) |
Jun
(9) |
Jul
(32) |
Aug
(39) |
Sep
(42) |
Oct
(22) |
Nov
(28) |
Dec
(8) |
2002 |
Jan
(37) |
Feb
(47) |
Mar
(6) |
Apr
(29) |
May
(33) |
Jun
(9) |
Jul
(28) |
Aug
(30) |
Sep
(15) |
Oct
(75) |
Nov
(37) |
Dec
(31) |
2003 |
Jan
|
Feb
(89) |
Mar
(41) |
Apr
(13) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SVN U. <ano...@li...> - 2002-12-22 14:51:06
|
Author: anonymous Date: 2002-12-20 02:46:28 -0500 (Fri, 20 Dec 2002) New Revision: 714 Modified: trunk/dma.c trunk/dma.h Log: might as well make rounding up to PAGE_SIZE multiples a function Modified: trunk/dma.c ============================================================================== --- trunk/dma.c (original) +++ trunk/dma.c 2002-12-22 09:50:34.000000000 -0500 @@ -25,8 +25,7 @@ int dma_prog_region_alloc(struct dma_prog_region *prog, unsigned long n_bytes, struct pci_dev *dev) { /* round up to page size */ - if(n_bytes % PAGE_SIZE) - n_bytes += PAGE_SIZE - (n_bytes % PAGE_SIZE); + n_bytes = round_up_to_page(n_bytes); prog->n_pages = n_bytes / PAGE_SIZE; @@ -70,8 +69,7 @@ unsigned int i, n_pages; /* round up to page size */ - if(n_bytes % PAGE_SIZE) - n_bytes += PAGE_SIZE - (n_bytes % PAGE_SIZE); + n_bytes = round_up_to_page(n_bytes); n_pages = n_bytes / PAGE_SIZE; Modified: trunk/dma.h ============================================================================== --- trunk/dma.h (original) +++ trunk/dma.h 2002-12-22 09:50:34.000000000 -0500 @@ -73,4 +73,12 @@ relative to the beginning of the dma_region */ dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, unsigned long offset); +/* round up a number of bytes to be a multiple of the PAGE_SIZE */ +static inline unsigned long round_up_to_page(unsigned long len) +{ + if(len % PAGE_SIZE) + len += PAGE_SIZE - (len % PAGE_SIZE); + return len; +} + #endif /* IEEE1394_DMA_H */ |
From: SVN U. <ano...@li...> - 2002-12-22 14:51:04
|
Author: anonymous Date: 2002-12-20 02:38:15 -0500 (Fri, 20 Dec 2002) New Revision: 713 Modified: trunk/raw1394.h Log: oops, irq_interval needs to be signed Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-12-22 09:50:32.000000000 -0500 @@ -143,7 +143,7 @@ __u32 max_packet_size; __u32 channel; __u32 speed; /* xmit only */ - __u32 irq_interval; + __s32 irq_interval; }; /* argument to RAW1394_ISO_XMIT/RECV_INIT and RAW1394_ISO_GET_STATUS */ |
From: SVN U. <ano...@li...> - 2002-12-22 14:51:02
|
Author: anonymous Date: 2002-12-20 02:23:36 -0500 (Fri, 20 Dec 2002) New Revision: 712 Added: trunk/raw1394-private.h Modified: trunk/raw1394.c trunk/raw1394.h Log: dmaas - moved kernel-only definitions from raw1394.h to raw1394-private.h; switched all user-visible definitions in raw1394.h to __u32-style fixed width data types Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-22 09:50:29.000000000 -0500 @@ -50,7 +50,7 @@ #include "iso.h" #include "ieee1394_transactions.h" #include "raw1394.h" - +#include "raw1394-private.h" #if BITS_PER_LONG == 64 #define int2ptr(x) ((void *)x) Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-12-22 09:50:29.000000000 -0500 @@ -1,8 +1,7 @@ #ifndef IEEE1394_RAW1394_H #define IEEE1394_RAW1394_H -#define RAW1394_DEVICE_MAJOR 171 -#define RAW1394_DEVICE_NAME "raw1394" +/* header for the raw1394 API that is exported to user-space */ #define RAW1394_KERNELAPI_VERSION 4 @@ -94,21 +93,21 @@ }; typedef struct arm_request { - nodeid_t destination_nodeid; - nodeid_t source_nodeid; - nodeaddr_t destination_offset; - u8 tlabel; - u8 tcode; - u_int8_t extended_transaction_code; - u_int32_t generation; - arm_length_t buffer_length; - byte_t *buffer; + __u16 destination_nodeid; + __u16 source_nodeid; + __u64 destination_offset; + __u8 tlabel; + __u8 tcode; + __u8 extended_transaction_code; + __u32 generation; + __u16 buffer_length; + __u8 *buffer; } *arm_request_t; typedef struct arm_response { - int response_code; - arm_length_t buffer_length; - byte_t *buffer; + __s32 response_code; + __u16 buffer_length; + __u8 *buffer; } *arm_response_t; typedef struct arm_request_response { @@ -132,19 +131,19 @@ /* per-packet metadata embedded in the ringbuffer */ /* must be identical to hpsb_iso_packet_info in iso.h! */ struct raw1394_iso_packet_info { - unsigned short len; - unsigned short cycle; - unsigned char channel; /* recv only */ - unsigned char tag; - unsigned char sy; + __u16 len; + __u16 cycle; + __u8 channel; /* recv only */ + __u8 tag; + __u8 sy; }; struct raw1394_iso_config { - unsigned int buf_packets; - unsigned int max_packet_size; - int channel; - int speed; /* xmit only */ - int irq_interval; + __u32 buf_packets; + __u32 max_packet_size; + __u32 channel; + __u32 speed; /* xmit only */ + __u32 irq_interval; }; /* argument to RAW1394_ISO_XMIT/RECV_INIT and RAW1394_ISO_GET_STATUS */ @@ -153,98 +152,26 @@ struct raw1394_iso_config config; /* byte offset between successive packets in the buffer */ - int buf_stride; + __s32 buf_stride; /* byte offset of data payload within each packet */ - int packet_data_offset; + __s32 packet_data_offset; /* byte offset of struct iso_packet_info within each packet */ - int packet_info_offset; + __s32 packet_info_offset; /* index of next packet to fill with data (ISO transmission) or next packet containing data recieved (ISO reception) */ - unsigned int first_packet; + __u32 first_packet; /* number of packets waiting to be filled with data (ISO transmission) or containing data received (ISO reception) */ - unsigned int n_packets; + __u32 n_packets; /* approximate number of packets dropped due to overflow or underflow of the packet buffer (a value of zero guarantees that no packets have been dropped) */ - unsigned int overflows; + __u32 overflows; }; -#ifdef __KERNEL__ - -struct iso_block_store { - atomic_t refcount; - size_t data_size; - quadlet_t data[0]; -}; - -enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0, - RAW1394_ISO_RECV = 1, - RAW1394_ISO_XMIT = 2 }; - -struct file_info { - struct list_head list; - - enum { opened, initialized, connected } state; - unsigned int protocol_version; - - struct hpsb_host *host; - - struct list_head req_pending; - struct list_head req_complete; - struct semaphore complete_sem; - spinlock_t reqlists_lock; - wait_queue_head_t poll_wait_complete; - - struct list_head addr_list; - - u8 *fcp_buffer; - - /* old ISO API */ - u64 listen_channels; - quadlet_t *iso_buffer; - size_t iso_buffer_length; - - u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */ - - /* new rawiso API */ - enum raw1394_iso_state iso_state; - struct hpsb_iso *iso_handle; -}; - -struct arm_addr { - struct list_head addr_list; /* file_info list */ - u64 start, end; - u64 arm_tag; - u8 access_rights; - u8 notification_options; - u8 client_transactions; - u64 recvb; - u16 rec_length; - u8 *addr_space_buffer; /* accessed by read/write/lock */ -}; - -struct pending_request { - struct list_head list; - struct file_info *file_info; - struct hpsb_packet *packet; - struct iso_block_store *ibs; - quadlet_t *data; - int free_data; - struct raw1394_request req; -}; - -struct host_info { - struct list_head list; - struct hpsb_host *host; - struct list_head file_info_list; -}; - -#endif /* __KERNEL__ */ - #endif /* IEEE1394_RAW1394_H */ Added: trunk/raw1394-private.h ============================================================================== --- trunk/raw1394-private.h (original) +++ trunk/raw1394-private.h 2002-12-22 09:50:29.000000000 -0500 @@ -0,0 +1,78 @@ +#ifndef IEEE1394_RAW1394_PRIVATE_H +#define IEEE1394_RAW1394_PRIVATE_H + +/* header for definitions that are private to the raw1394 driver + and not visible to user-space */ + +#define RAW1394_DEVICE_MAJOR 171 +#define RAW1394_DEVICE_NAME "raw1394" + +struct iso_block_store { + atomic_t refcount; + size_t data_size; + quadlet_t data[0]; +}; + +enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0, + RAW1394_ISO_RECV = 1, + RAW1394_ISO_XMIT = 2 }; + +struct file_info { + struct list_head list; + + enum { opened, initialized, connected } state; + unsigned int protocol_version; + + struct hpsb_host *host; + + struct list_head req_pending; + struct list_head req_complete; + struct semaphore complete_sem; + spinlock_t reqlists_lock; + wait_queue_head_t poll_wait_complete; + + struct list_head addr_list; + + u8 *fcp_buffer; + + /* old ISO API */ + u64 listen_channels; + quadlet_t *iso_buffer; + size_t iso_buffer_length; + + u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */ + + /* new rawiso API */ + enum raw1394_iso_state iso_state; + struct hpsb_iso *iso_handle; +}; + +struct arm_addr { + struct list_head addr_list; /* file_info list */ + u64 start, end; + u64 arm_tag; + u8 access_rights; + u8 notification_options; + u8 client_transactions; + u64 recvb; + u16 rec_length; + u8 *addr_space_buffer; /* accessed by read/write/lock */ +}; + +struct pending_request { + struct list_head list; + struct file_info *file_info; + struct hpsb_packet *packet; + struct iso_block_store *ibs; + quadlet_t *data; + int free_data; + struct raw1394_request req; +}; + +struct host_info { + struct list_head list; + struct hpsb_host *host; + struct list_head file_info_list; +}; + +#endif /* IEEE1394_RAW1394_PRIVATE_H */ |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:59
|
Author: anonymous Date: 2002-12-20 02:01:57 -0500 (Fri, 20 Dec 2002) New Revision: 711 Modified: trunk/raw1394.c Log: ignore iso activity wakeups that do not apply to the current file descriptor Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-22 09:50:27.000000000 -0500 @@ -2052,7 +2052,9 @@ if (hi != NULL) { list_for_each(lh, &hi->file_info_list) { - queue_rawiso_event(list_entry(lh, struct file_info, list)); + struct file_info *fi = list_entry(lh, struct file_info, list); + if(fi->iso_handle == iso) + queue_rawiso_event(fi); } } |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:57
|
Author: anonymous Date: 2002-12-20 01:59:17 -0500 (Fri, 20 Dec 2002) New Revision: 710 Modified: trunk/dma.c Log: fix a very serious typo in dma.c page-rounding Modified: trunk/dma.c ============================================================================== --- trunk/dma.c (original) +++ trunk/dma.c 2002-12-22 09:50:25.000000000 -0500 @@ -26,7 +26,7 @@ { /* round up to page size */ if(n_bytes % PAGE_SIZE) - n_bytes += PAGE_SIZE - (n_bytes & PAGE_SIZE); + n_bytes += PAGE_SIZE - (n_bytes % PAGE_SIZE); prog->n_pages = n_bytes / PAGE_SIZE; @@ -71,7 +71,7 @@ /* round up to page size */ if(n_bytes % PAGE_SIZE) - n_bytes += PAGE_SIZE - (n_bytes & PAGE_SIZE); + n_bytes += PAGE_SIZE - (n_bytes % PAGE_SIZE); n_pages = n_bytes / PAGE_SIZE; |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:54
|
Author: anonymous Date: 2002-12-17 11:09:47 -0500 (Tue, 17 Dec 2002) New Revision: 709 Added: tags/linux-2.4-sync/ Log: New 2.4 sync point Copied: linux-2.4-sync (from rev 707, branches/linux-2.4) |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:50
|
Author: anonymous Date: 2002-12-17 11:08:56 -0500 (Tue, 17 Dec 2002) New Revision: 708 Removed: tags/linux-2.4-sync/ Log: Remove old sync point |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:48
|
Author: anonymous Date: 2002-12-17 10:53:44 -0500 (Tue, 17 Dec 2002) New Revision: 707 Modified: branches/linux-2.4/amdtp.c branches/linux-2.4/ieee1394_types.h branches/linux-2.4/sbp2.c branches/linux-2.4/sbp2.h branches/linux-2.4/video1394.c Log: Since this is 2.4 only, remove some compatibility stuff. This branch wont work on 2.5.x anyway Modified: branches/linux-2.4/amdtp.c ============================================================================== --- branches/linux-2.4/amdtp.c (original) +++ branches/linux-2.4/amdtp.c 2002-12-22 09:50:16.000000000 -0500 @@ -834,12 +834,8 @@ max_packet_size = max_nevents * s->dimension * 4 + 8; s->packet_pool = pci_pool_create("packet pool", s->host->ohci->dev, - max_packet_size, 0, 0 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40) - ,SLAB_KERNEL); -#else - ); -#endif + max_packet_size, 0, 0 ,SLAB_KERNEL); + if (s->packet_pool == NULL) return -1; @@ -1025,12 +1021,7 @@ s->descriptor_pool = pci_pool_create("descriptor pool", host->ohci->dev, sizeof(struct descriptor_block), - 16, 0 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40) - ,SLAB_KERNEL); -#else - ); -#endif + 16, 0, SLAB_KERNEL); if (s->descriptor_pool == NULL) { kfree(s->input); Modified: branches/linux-2.4/sbp2.c ============================================================================== --- branches/linux-2.4/sbp2.c (original) +++ branches/linux-2.4/sbp2.c 2002-12-22 09:50:16.000000000 -0500 @@ -3054,15 +3054,9 @@ /* * Tell scsi stack that we're done with this command */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) spin_lock_irq(&io_request_lock); done (SCpnt); spin_unlock_irq(&io_request_lock); -#else - spin_lock_irq(hi->scsi_host->host_lock); - done (SCpnt); - spin_unlock_irq(hi->scsi_host->host_lock); -#endif return; } @@ -3139,11 +3133,7 @@ /* * Called by scsi stack to get bios parameters (used by fdisk, and at boot). */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28) static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) -#else -static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]) -#endif { int heads, sectors, cylinders; @@ -3180,13 +3170,9 @@ * we register a scsi host with the scsi stack. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) spin_unlock_irq(&io_request_lock); sbp2_init(); spin_lock_irq(&io_request_lock); -#else - sbp2_init(); -#endif /* We return the number of hosts registered. */ return scsi_driver_template.present; @@ -3244,9 +3230,7 @@ .this_id = -1, .sg_tablesize = SBP2_MAX_SG_ELEMENTS, .use_clustering = SBP2_CLUSTERING, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) .use_new_eh_code = TRUE, -#endif .emulated = 1, .proc_name = SBP2_DEVICE_NAME, }; Modified: branches/linux-2.4/sbp2.h ============================================================================== --- branches/linux-2.4/sbp2.h (original) +++ branches/linux-2.4/sbp2.h 2002-12-22 09:50:16.000000000 -0500 @@ -23,13 +23,8 @@ #define SBP2_H /* Some compatibility code */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #define SCSI_REGISTER_HOST(tmpl) scsi_register_module(MODULE_SCSI_HA, tmpl) #define SCSI_UNREGISTER_HOST(tmpl) scsi_unregister_module(MODULE_SCSI_HA, tmpl) -#else -#define SCSI_REGISTER_HOST(tmpl) scsi_register_host(tmpl) -#define SCSI_UNREGISTER_HOST(tmpl) scsi_unregister_host(tmpl) -#endif #define SBP2_DEVICE_NAME "sbp2" #define SBP2_DEVICE_NAME_SIZE 4 @@ -549,11 +544,7 @@ static int sbp2scsi_detect (Scsi_Host_Template *tpnt); static const char *sbp2scsi_info (struct Scsi_Host *host); void sbp2scsi_setup(char *str, int *ints); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28) static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]); -#else -static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]); -#endif static int sbp2scsi_abort (Scsi_Cmnd *SCpnt); static int sbp2scsi_reset (Scsi_Cmnd *SCpnt); static int sbp2scsi_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)); Modified: branches/linux-2.4/ieee1394_types.h ============================================================================== --- branches/linux-2.4/ieee1394_types.h (original) +++ branches/linux-2.4/ieee1394_types.h 2002-12-22 09:50:16.000000000 -0500 @@ -29,9 +29,7 @@ #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,5) #define pte_offset_kernel pte_offset -#endif #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) @@ -42,8 +40,6 @@ #endif -/* Compatibility for task/work queues */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,42) /* Use task queue */ #include <linux/tqueue.h> #define hpsb_queue_struct tq_struct @@ -51,15 +47,6 @@ #define hpsb_schedule_work(x) schedule_task(x) #define HPSB_INIT_WORK(x,y,z) INIT_TQUEUE(x,y,z) #define HPSB_PREPARE_WORK(x,y,z) PREPARE_TQUEUE(x,y,z) -#else -/* Use work queue */ -#include <linux/workqueue.h> -#define hpsb_queue_struct work_struct -#define hpsb_queue_list entry -#define hpsb_schedule_work(x) schedule_work(x) -#define HPSB_INIT_WORK(x,y,z) INIT_WORK(x,y,z) -#define HPSB_PREPARE_WORK(x,y,z) PREPARE_WORK(x,y,z) -#endif typedef u32 quadlet_t; Modified: branches/linux-2.4/video1394.c ============================================================================== --- branches/linux-2.4/video1394.c (original) +++ branches/linux-2.4/video1394.c 2002-12-22 09:50:16.000000000 -0500 @@ -64,13 +64,8 @@ #define vmalloc_32(x) vmalloc(x) #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3)) #define remap_page_range_1394(vma, start, addr, size, prot) \ remap_page_range(start, addr, size, prot) -#else -#define remap_page_range_1394(vma, start, addr, size, prot) \ - remap_page_range(vma, start, addr, size, prot) -#endif struct it_dma_prg { struct dma_cmd begin; @@ -558,11 +553,7 @@ if (d->ir_prg[i][d->nb_cmd-1].status & cpu_to_le32(0xFFFF0000)) { reset_ir_status(d, i); d->buffer_status[i] = VIDEO1394_BUFFER_READY; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18) - get_fast_time(&d->buffer_time[i]); -#else do_gettimeofday(&d->buffer_time[i]); -#endif } } |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:46
|
Author: anonymous Date: 2002-12-17 10:49:36 -0500 (Tue, 17 Dec 2002) New Revision: 706 Removed: branches/linux-2.4/Config.help Log: Not used in 2.4 Deleted: branches/linux-2.4/Config.help ============================================================================== --- branches/linux-2.4/Config.help (original) +++ branches/linux-2.4/Config.help 2002-12-22 09:50:14.000000000 -0500 @@ -1,126 +0,0 @@ -CONFIG_IEEE1394 - IEEE 1394 describes a high performance serial bus, which is also - known as FireWire(tm) or i.Link(tm) and is used for connecting all - sorts of devices (most notably digital video cameras) to your - computer. - - If you have FireWire hardware and want to use it, say Y here. This - is the core support only, you will also need to select a driver for - your IEEE 1394 adapter. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called ieee1394.o. - -CONFIG_IEEE1394_PCILYNX - Say Y here if you have an IEEE-1394 controller with the Texas - Instruments PCILynx chip. Note: this driver is written for revision - 2 of this chip and may not work with revision 0. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called pcilynx.o. - -CONFIG_IEEE1394_PCILYNX_LOCALRAM - This option makes the PCILynx driver use local RAM available on some - PCILynx setups for Packet Control Lists. Local RAM is random access - memory which resides on the PCILynx board as opposed to on your - computer's motherboard. Local RAM may speed up command processing - because no PCI transfers are necessary during use of the Packet - Control Lists. - - Note that there are no known PCILynx systems providing local RAM - except for the evaluation boards by Texas Instruments and that the - PCILynx does not reliably report missing RAM. This means that it is - dangerous to say Y here if you are not absolutely sure that your - board provides 64KB of local RAM. - - If unsure, say N. - -CONFIG_IEEE1394_PCILYNX_PORTS - This option enables driver code to access the RAM, ROM and AUX ports - of the PCILynx through character devices in /dev. If you don't know - what this is about then you won't need it. - - If unsure, say N. - -CONFIG_IEEE1394_OHCI1394 - Enable this driver if you have an IEEE 1394 controller based on the - OHCI-1394 specification. The current driver is only tested with OHCI - chipsets made by Texas Instruments and NEC. Most third-party vendors - use one of these chipsets. It should work with any OHCI-1394 - compliant card, however. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called ohci1394.o. - -CONFIG_IEEE1394_VIDEO1394 - This option enables video device usage for OHCI-1394 cards. Enable - this option only if you have an IEEE 1394 video device connected to - an OHCI-1394 card. - -CONFIG_IEEE1394_DV1394 - This driver allows you to transmit and receive DV (digital video) - streams on an OHCI-1394 card using a simple frame-oriented - interface. - - The user-space API for dv1394 is documented in dv1394.h. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called dv1394.o. - -CONFIG_IEEE1394_SBP2 - This option enables you to use SBP-2 devices connected to your IEEE - 1394 bus. SBP-2 devices include harddrives and DVD devices. - -CONFIG_IEEE1394_RAWIO - Say Y here if you want support for the raw device. This is generally - a good idea, so you should say Y here. The raw device enables - direct communication of user programs with the IEEE 1394 bus and - thus with the attached peripherals. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called raw1394.o. - -CONFIG_IEEE1394_ETH1394 - Extremely Experimental! This driver is a Linux specific way to use your - IEEE1394 Host as an Ethernet type device. This is _NOT_ IP1394. - -CONFIG_IEEE1394_AMDTP - This option enables the Audio & Music Data Transmission Protocol - (IEC61883-6) driver, which implements audio transmission over - IEEE1394. - - The userspace interface is documented in amdtp.h. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called amdtp.o. - -CONFIG_IEEE1394_CMP - This option enables the Connection Management Procedures - (IEC61883-1) driver, which implements input and output plugs. - - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called amdtp.o. - -CONFIG_IEEE1394_VERBOSEDEBUG - If you say Y here, you will get very verbose debugging logs from the - subsystem which includes a dump of the header of every sent and - received packet. This can amount to a high amount of data collected - in a very short time which is usually also saved to disk by the - system logging daemons. - - Say Y if you really want or need the debugging output, everyone else - says N. |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:44
|
Author: anonymous Date: 2002-12-17 10:31:13 -0500 (Tue, 17 Dec 2002) New Revision: 705 Removed: tags/v2.4/ Log: Remove old 2.4 tags |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:42
|
Author: anonymous Date: 2002-12-17 10:05:29 -0500 (Tue, 17 Dec 2002) New Revision: 704 Added: tags/linux-2.4-sync/ Log: Move sync point Copied: linux-2.4-sync (from rev 703, tags/v2.4/2.4.20-r587) |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:39
|
Author: anonymous Date: 2002-12-17 09:45:54 -0500 (Tue, 17 Dec 2002) New Revision: 703 Added: tags/linux-2.5-sync/ Log: New 2.5 sync point Copied: linux-2.5-sync (from rev 702, trunk) |
From: SVN U. <ano...@li...> - 2002-12-22 14:50:37
|
Author: anonymous Date: 2002-12-17 09:36:13 -0500 (Tue, 17 Dec 2002) New Revision: 702 Removed: tags/v2.5/ Log: Remove old style sync point |
From: SVN U. <ben...@li...> - 2002-12-22 14:49:13
|
Author: bencollins Date: 2002-12-16 16:56:31 -0500 (Mon, 16 Dec 2002) New Revision: 701 Modified: trunk/dma.c Log: Convert, yet more, struct initializers to C99 style. Let's keep this the norm ppl. Everything that gets added seems to need converting. Modified: trunk/dma.c ============================================================================== --- trunk/dma.c (original) +++ trunk/dma.c 2002-12-22 09:48:41.000000000 -0500 @@ -210,7 +210,7 @@ } static struct vm_operations_struct dma_region_vm_ops = { - nopage: dma_region_pagefault, + .nopage = dma_region_pagefault, }; int dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma) |
From: SVN U. <ben...@li...> - 2002-12-22 14:48:51
|
Author: bencollins Date: 2002-12-16 16:56:31 -0500 (Mon, 16 Dec 2002) New Revision: 701 Modified: trunk/dma.c Log: Convert, yet more, struct initializers to C99 style. Let's keep this the norm ppl. Everything that gets added seems to need converting. Modified: trunk/dma.c ============================================================================== --- trunk/dma.c (original) +++ trunk/dma.c 2002-12-22 09:48:19.000000000 -0500 @@ -210,7 +210,7 @@ } static struct vm_operations_struct dma_region_vm_ops = { - nopage: dma_region_pagefault, + .nopage = dma_region_pagefault, }; int dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma) |
From: SVN U. <ben...@li...> - 2002-12-16 22:04:14
|
Author: bencollins Date: 2002-12-16 16:51:20 -0500 (Mon, 16 Dec 2002) New Revision: 700 Modified: trunk/dv1394-private.h trunk/dv1394.c Log: Merge in a slightly modified version of Al Viro's DevFS cleanups. Modified: trunk/dv1394-private.h ============================================================================== --- trunk/dv1394-private.h (original) +++ trunk/dv1394-private.h 2002-12-16 17:03:42.000000000 -0500 @@ -583,5 +583,8 @@ #define CIP_N_PAL 1 #define CIP_D_PAL 16 +/* Base for our DevFS entries */ +#define DV1394_DEV_BASE "ieee1394/dv" + #endif /* _DV_1394_PRIVATE_H */ Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-12-16 17:03:42.000000000 -0500 @@ -175,15 +175,6 @@ static struct hpsb_highlevel *hl_handle; /* = NULL; */ -static LIST_HEAD(dv1394_devfs); -struct dv1394_devfs_entry { - struct list_head list; - devfs_handle_t devfs; - char name[32]; - struct dv1394_devfs_entry *parent; -}; -static spinlock_t dv1394_devfs_lock = SPIN_LOCK_UNLOCKED; - /* translate from a struct file* to the corresponding struct video_card* */ static inline struct video_card* file_to_video_card(struct file *file) @@ -2461,135 +2452,40 @@ /*** DEVFS HELPERS *********************************************************/ -struct dv1394_devfs_entry * -dv1394_devfs_find( char *name) -{ - struct list_head *lh; - struct dv1394_devfs_entry *p; - - spin_lock( &dv1394_devfs_lock); - if(!list_empty(&dv1394_devfs)) { - list_for_each(lh, &dv1394_devfs) { - p = list_entry(lh, struct dv1394_devfs_entry, list); - if(!strncmp(p->name, name, sizeof(p->name))) { - goto found; - } - } - } - p = NULL; - -found: - spin_unlock( &dv1394_devfs_lock); - return p; -} - #ifdef CONFIG_DEVFS_FS static int dv1394_devfs_add_entry(struct video_card *video) { - char buf[32]; - struct dv1394_devfs_entry *p; - struct dv1394_devfs_entry *parent; + char buf[64]; + snprintf(buf, sizeof(buf), DV1394_DEV_BASE "/host%d/%s/%s", + (video->id>>2), + (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), + (video->mode == MODE_RECEIVE ? "in" : "out")); - p = kmalloc(sizeof(struct dv1394_devfs_entry), GFP_KERNEL); - if(!p) { - printk(KERN_ERR "dv1394: cannot allocate dv1394_devfs_entry\n"); - goto err; - } - memset(p, 0, sizeof(struct dv1394_devfs_entry)); - - snprintf(buf, sizeof(buf), "dv/host%d/%s", (video->id>>2), - (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL")); - - parent = dv1394_devfs_find(buf); - if (parent == NULL) { - printk(KERN_ERR "dv1394: unable to locate parent devfs of %s\n", buf); - goto err_free; - } - - video->devfs_handle = devfs_register( - parent->devfs, - (video->mode == MODE_RECEIVE ? "in" : "out"), - DEVFS_FL_NONE, + video->devfs_handle = devfs_register(NULL, buf, DEVFS_FL_NONE, IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394*16 + video->id, S_IFCHR | S_IRUGO | S_IWUGO, &dv1394_fops, (void*) video); - p->devfs = video->devfs_handle; - if (p->devfs == NULL) { - printk(KERN_ERR "dv1394: unable to create /dev/ieee1394/%s/%s\n", - parent->name, - (video->mode == MODE_RECEIVE ? "in" : "out")); - goto err_free; - } - - spin_lock( &dv1394_devfs_lock); - INIT_LIST_HEAD(&p->list); - list_add_tail(&p->list, &dv1394_devfs); - spin_unlock( &dv1394_devfs_lock); - return 0; - - err_free: - kfree(p); - err: - return -ENOMEM; } -static int -dv1394_devfs_add_dir( char *name, - struct dv1394_devfs_entry *parent, - struct dv1394_devfs_entry **out) +static int dv1394_devfs_add_dir(char *name) { - struct dv1394_devfs_entry *p; - - p = kmalloc(sizeof(struct dv1394_devfs_entry), GFP_KERNEL); - if(!p) { - printk(KERN_ERR "dv1394: cannot allocate dv1394_devfs_entry\n"); - goto err; - } - memset(p, 0, sizeof(struct dv1394_devfs_entry)); - - if (parent == NULL) { - snprintf(p->name, sizeof(p->name), "%s", name); - p->devfs = devfs_mk_dir(ieee1394_devfs_handle, name, NULL); - } else { - snprintf(p->name, sizeof(p->name), "%s/%s", parent->name, name); - p->devfs = devfs_mk_dir(parent->devfs, name, NULL); - } - if (p->devfs == NULL) { - printk(KERN_ERR "dv1394: unable to create /dev/ieee1394/%s\n", p->name); - goto err_free; + if (!devfs_mk_dir(NULL, name, NULL)) + printk(KERN_ERR "dv1394: unable to create /dev/%s\n", name); + return -ENOMEM; } - p->parent = parent; - if (out != NULL) *out = p; - - spin_lock( &dv1394_devfs_lock); - INIT_LIST_HEAD(&p->list); - list_add_tail(&p->list, &dv1394_devfs); - spin_unlock( &dv1394_devfs_lock); - return 0; - - err_free: - kfree(p); - err: - return -ENOMEM; } void dv1394_devfs_del( char *name) { - struct dv1394_devfs_entry *p = dv1394_devfs_find(name); - if (p != NULL) { - devfs_unregister(p->devfs); - - spin_lock( &dv1394_devfs_lock); - list_del(&p->list); - spin_unlock( &dv1394_devfs_lock); - kfree(p); - } + char s[64]; + sprintf(s, "ieee1394/%s", name); + devfs_find_and_unregister(NULL, s, 0, 0, 0, 0); } #endif /* CONFIG_DEVFS_FS */ @@ -2773,15 +2669,12 @@ #endif #ifdef CONFIG_DEVFS_FS -{ - struct dv1394_devfs_entry *devfs_entry = dv1394_devfs_find("dv"); - if (devfs_entry != NULL) { - snprintf(buf, sizeof(buf), "host%d", ohci->id); - dv1394_devfs_add_dir(buf, devfs_entry, &devfs_entry); - dv1394_devfs_add_dir("NTSC", devfs_entry, NULL); - dv1394_devfs_add_dir("PAL", devfs_entry, NULL); - } -} + snprintf(buf, sizeof(buf), DV1394_DEV_BASE "/host%d", ohci->id); + dv1394_devfs_add_dir(buf); + snprintf(buf, sizeof(buf), DV1394_DEV_BASE "/host%d/NTSC", ohci->id); + dv1394_devfs_add_dir(buf); + snprintf(buf, sizeof(buf), DV1394_DEV_BASE "/host%d/PAL", ohci->id); + dv1394_devfs_add_dir(buf); #endif dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); @@ -2941,8 +2834,8 @@ } #ifdef CONFIG_DEVFS_FS - if (dv1394_devfs_add_dir("dv", NULL, NULL) < 0) { - printk(KERN_ERR "dv1394: unable to create /dev/ieee1394/dv\n"); + if (dv1394_devfs_add_dir(DV1394_DEV_BASE) < 0) { + printk(KERN_ERR "dv1394: unable to create /dev/%s\n", DV1394_DEV_BASE); ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_DV1394); return -ENOMEM; } @@ -2950,7 +2843,7 @@ #ifdef CONFIG_PROC_FS if (dv1394_procfs_add_dir("dv",NULL,NULL) < 0) { - printk(KERN_ERR "dv1394: unable to create /proc/bus/ieee1394/dv\n"); + printk(KERN_ERR "dv1394: unable to create /proc/bus/%s\n", DV1394_DEV_BASE); ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_DV1394); #ifdef CONFIG_DEVFS_FS dv1394_devfs_del("dv"); |
From: SVN U. <ben...@li...> - 2002-12-16 21:59:15
|
Author: bencollins Date: 2002-12-16 16:56:31 -0500 (Mon, 16 Dec 2002) New Revision: 701 Modified: trunk/dma.c Log: Convert, yet more, struct initializers to C99 style. Let's keep this the norm ppl. Everything that gets added seems to need converting. Modified: trunk/dma.c ============================================================================== --- trunk/dma.c (original) +++ trunk/dma.c 2002-12-16 16:58:43.000000000 -0500 @@ -210,7 +210,7 @@ } static struct vm_operations_struct dma_region_vm_ops = { - nopage: dma_region_pagefault, + .nopage = dma_region_pagefault, }; int dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma) |
From: SVN U. <ben...@li...> - 2002-12-16 21:59:11
|
Author: bencollins Date: 2002-12-16 16:56:31 -0500 (Mon, 16 Dec 2002) New Revision: 700 Modified: trunk/dma.c Log: Convert, yet more, struct initializers to C99 style. Let's keep this the norm ppl. Everything that gets added seems to need converting. Modified: trunk/dma.c ============================================================================== --- trunk/dma.c (original) +++ trunk/dma.c 2002-12-16 16:58:39.000000000 -0500 @@ -210,7 +210,7 @@ } static struct vm_operations_struct dma_region_vm_ops = { - nopage: dma_region_pagefault, + .nopage = dma_region_pagefault, }; int dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma) |
From: SVN U. <dm...@li...> - 2002-12-16 21:50:00
|
Author: dmaas Date: 2002-12-16 00:13:38 -0500 (Mon, 16 Dec 2002) New Revision: 699 Modified: trunk/raw1394.c trunk/raw1394.h Log: rawiso update: - add a raw1394 ioctl RAW1394_ISO_QUEUE_ACTIVITY to force a RAWISO_ACTIVITY event into the queue. Needed for libraw1394 to wake itself up. Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-16 16:49:27.000000000 -0500 @@ -2015,43 +2015,48 @@ return 0; } +/* put a RAWISO_ACTIVITY event in the queue, if one isn't there already */ +static void queue_rawiso_event(struct file_info *fi) +{ + unsigned long flags; + + spin_lock_irqsave(&fi->reqlists_lock, flags); + + /* only one ISO activity event may be in the queue */ + if(!__rawiso_event_in_queue(fi)) { + struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); + + if(req) { + req->file_info = fi; + req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; + req->req.generation = get_hpsb_generation(fi->host); + __queue_complete_req(req); + } else { + /* on allocation failure, signal an overflow */ + if(fi->iso_handle) { + atomic_inc(&fi->iso_handle->overflows); + } + } + } + spin_unlock_irqrestore(&fi->reqlists_lock, flags); +} + static void rawiso_activity_cb(struct hpsb_iso *iso) { - unsigned long host_flags; + unsigned long flags; struct list_head *lh; struct host_info *hi; - spin_lock_irqsave(&host_info_lock, host_flags); + spin_lock_irqsave(&host_info_lock, flags); hi = find_host_info(iso->host); if (hi != NULL) { list_for_each(lh, &hi->file_info_list) { - unsigned long reqlist_flags; - struct file_info *fi = list_entry(lh, struct file_info, list); - - spin_lock_irqsave(&fi->reqlists_lock, reqlist_flags); - - /* only one ISO activity event may be in the queue */ - if(!__rawiso_event_in_queue(fi)) { - struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); - - if(req) { - req->file_info = fi; - req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; - req->req.generation = get_hpsb_generation(iso->host); - __queue_complete_req(req); - } else { - /* on allocation failure, signal an overflow */ - if(fi->iso_handle) { - atomic_inc(&fi->iso_handle->overflows); - } - } - } - spin_unlock_irqrestore(&fi->reqlists_lock, reqlist_flags); + queue_rawiso_event(list_entry(lh, struct file_info, list)); } } - spin_unlock_irqrestore(&host_info_lock, host_flags); + spin_unlock_irqrestore(&host_info_lock, flags); } /* helper function - gather all the kernel iso status bits for returning to user-space */ @@ -2191,6 +2196,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; case RAW1394_ISO_XMIT: @@ -2215,6 +2224,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; default: Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-12-16 16:49:28.000000000 -0500 @@ -127,6 +127,7 @@ #define RAW1394_ISO_GET_STATUS 5 /* arg: raw1394_iso_status* */ #define RAW1394_ISO_PRODUCE_CONSUME 6 /* arg: int, # of packets */ #define RAW1394_ISO_SHUTDOWN 7 +#define RAW1394_ISO_QUEUE_ACTIVITY 9 /* per-packet metadata embedded in the ringbuffer */ /* must be identical to hpsb_iso_packet_info in iso.h! */ |
From: SVN U. <dm...@li...> - 2002-12-16 21:49:53
|
Author: dmaas Date: 2002-12-16 00:13:38 -0500 (Mon, 16 Dec 2002) New Revision: 698 Modified: trunk/raw1394.c trunk/raw1394.h Log: rawiso update: - add a raw1394 ioctl RAW1394_ISO_QUEUE_ACTIVITY to force a RAWISO_ACTIVITY event into the queue. Needed for libraw1394 to wake itself up. Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-16 16:49:21.000000000 -0500 @@ -2015,43 +2015,48 @@ return 0; } +/* put a RAWISO_ACTIVITY event in the queue, if one isn't there already */ +static void queue_rawiso_event(struct file_info *fi) +{ + unsigned long flags; + + spin_lock_irqsave(&fi->reqlists_lock, flags); + + /* only one ISO activity event may be in the queue */ + if(!__rawiso_event_in_queue(fi)) { + struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); + + if(req) { + req->file_info = fi; + req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; + req->req.generation = get_hpsb_generation(fi->host); + __queue_complete_req(req); + } else { + /* on allocation failure, signal an overflow */ + if(fi->iso_handle) { + atomic_inc(&fi->iso_handle->overflows); + } + } + } + spin_unlock_irqrestore(&fi->reqlists_lock, flags); +} + static void rawiso_activity_cb(struct hpsb_iso *iso) { - unsigned long host_flags; + unsigned long flags; struct list_head *lh; struct host_info *hi; - spin_lock_irqsave(&host_info_lock, host_flags); + spin_lock_irqsave(&host_info_lock, flags); hi = find_host_info(iso->host); if (hi != NULL) { list_for_each(lh, &hi->file_info_list) { - unsigned long reqlist_flags; - struct file_info *fi = list_entry(lh, struct file_info, list); - - spin_lock_irqsave(&fi->reqlists_lock, reqlist_flags); - - /* only one ISO activity event may be in the queue */ - if(!__rawiso_event_in_queue(fi)) { - struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); - - if(req) { - req->file_info = fi; - req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; - req->req.generation = get_hpsb_generation(iso->host); - __queue_complete_req(req); - } else { - /* on allocation failure, signal an overflow */ - if(fi->iso_handle) { - atomic_inc(&fi->iso_handle->overflows); - } - } - } - spin_unlock_irqrestore(&fi->reqlists_lock, reqlist_flags); + queue_rawiso_event(list_entry(lh, struct file_info, list)); } } - spin_unlock_irqrestore(&host_info_lock, host_flags); + spin_unlock_irqrestore(&host_info_lock, flags); } /* helper function - gather all the kernel iso status bits for returning to user-space */ @@ -2191,6 +2196,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; case RAW1394_ISO_XMIT: @@ -2215,6 +2224,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; default: Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-12-16 16:49:21.000000000 -0500 @@ -127,6 +127,7 @@ #define RAW1394_ISO_GET_STATUS 5 /* arg: raw1394_iso_status* */ #define RAW1394_ISO_PRODUCE_CONSUME 6 /* arg: int, # of packets */ #define RAW1394_ISO_SHUTDOWN 7 +#define RAW1394_ISO_QUEUE_ACTIVITY 9 /* per-packet metadata embedded in the ringbuffer */ /* must be identical to hpsb_iso_packet_info in iso.h! */ |
From: SVN U. <dm...@li...> - 2002-12-16 21:48:27
|
Author: dmaas Date: 2002-12-16 00:13:38 -0500 (Mon, 16 Dec 2002) New Revision: 697 Modified: trunk/raw1394.c trunk/raw1394.h Log: rawiso update: - add a raw1394 ioctl RAW1394_ISO_QUEUE_ACTIVITY to force a RAWISO_ACTIVITY event into the queue. Needed for libraw1394 to wake itself up. Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-16 16:47:54.000000000 -0500 @@ -2015,43 +2015,48 @@ return 0; } +/* put a RAWISO_ACTIVITY event in the queue, if one isn't there already */ +static void queue_rawiso_event(struct file_info *fi) +{ + unsigned long flags; + + spin_lock_irqsave(&fi->reqlists_lock, flags); + + /* only one ISO activity event may be in the queue */ + if(!__rawiso_event_in_queue(fi)) { + struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); + + if(req) { + req->file_info = fi; + req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; + req->req.generation = get_hpsb_generation(fi->host); + __queue_complete_req(req); + } else { + /* on allocation failure, signal an overflow */ + if(fi->iso_handle) { + atomic_inc(&fi->iso_handle->overflows); + } + } + } + spin_unlock_irqrestore(&fi->reqlists_lock, flags); +} + static void rawiso_activity_cb(struct hpsb_iso *iso) { - unsigned long host_flags; + unsigned long flags; struct list_head *lh; struct host_info *hi; - spin_lock_irqsave(&host_info_lock, host_flags); + spin_lock_irqsave(&host_info_lock, flags); hi = find_host_info(iso->host); if (hi != NULL) { list_for_each(lh, &hi->file_info_list) { - unsigned long reqlist_flags; - struct file_info *fi = list_entry(lh, struct file_info, list); - - spin_lock_irqsave(&fi->reqlists_lock, reqlist_flags); - - /* only one ISO activity event may be in the queue */ - if(!__rawiso_event_in_queue(fi)) { - struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); - - if(req) { - req->file_info = fi; - req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; - req->req.generation = get_hpsb_generation(iso->host); - __queue_complete_req(req); - } else { - /* on allocation failure, signal an overflow */ - if(fi->iso_handle) { - atomic_inc(&fi->iso_handle->overflows); - } - } - } - spin_unlock_irqrestore(&fi->reqlists_lock, reqlist_flags); + queue_rawiso_event(list_entry(lh, struct file_info, list)); } } - spin_unlock_irqrestore(&host_info_lock, host_flags); + spin_unlock_irqrestore(&host_info_lock, flags); } /* helper function - gather all the kernel iso status bits for returning to user-space */ @@ -2191,6 +2196,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; case RAW1394_ISO_XMIT: @@ -2215,6 +2224,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; default: Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-12-16 16:47:55.000000000 -0500 @@ -127,6 +127,7 @@ #define RAW1394_ISO_GET_STATUS 5 /* arg: raw1394_iso_status* */ #define RAW1394_ISO_PRODUCE_CONSUME 6 /* arg: int, # of packets */ #define RAW1394_ISO_SHUTDOWN 7 +#define RAW1394_ISO_QUEUE_ACTIVITY 9 /* per-packet metadata embedded in the ringbuffer */ /* must be identical to hpsb_iso_packet_info in iso.h! */ |
Author: dmaas Date: 2002-12-16 00:13:38 -0500 (Mon, 16 Dec 2002) New Revision: 697 Modified: trunk/raw1394.c trunk/raw1394.h Log: rawiso update: - add a raw1394 ioctl RAW1394_ISO_QUEUE_ACTIVITY to force a RAWISO_ACTIVITY event into the queue. Needed for libraw1394 to wake itself up. Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-16 16:43:36.000000000 -0500 @@ -2015,43 +2015,48 @@ return 0; } +/* put a RAWISO_ACTIVITY event in the queue, if one isn't there already */ +static void queue_rawiso_event(struct file_info *fi) +{ + unsigned long flags; + + spin_lock_irqsave(&fi->reqlists_lock, flags); + + /* only one ISO activity event may be in the queue */ + if(!__rawiso_event_in_queue(fi)) { + struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); + + if(req) { + req->file_info = fi; + req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; + req->req.generation = get_hpsb_generation(fi->host); + __queue_complete_req(req); + } else { + /* on allocation failure, signal an overflow */ + if(fi->iso_handle) { + atomic_inc(&fi->iso_handle->overflows); + } + } + } + spin_unlock_irqrestore(&fi->reqlists_lock, flags); +} + static void rawiso_activity_cb(struct hpsb_iso *iso) { - unsigned long host_flags; + unsigned long flags; struct list_head *lh; struct host_info *hi; - spin_lock_irqsave(&host_info_lock, host_flags); + spin_lock_irqsave(&host_info_lock, flags); hi = find_host_info(iso->host); if (hi != NULL) { list_for_each(lh, &hi->file_info_list) { - unsigned long reqlist_flags; - struct file_info *fi = list_entry(lh, struct file_info, list); - - spin_lock_irqsave(&fi->reqlists_lock, reqlist_flags); - - /* only one ISO activity event may be in the queue */ - if(!__rawiso_event_in_queue(fi)) { - struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); - - if(req) { - req->file_info = fi; - req->req.type = RAW1394_REQ_RAWISO_ACTIVITY; - req->req.generation = get_hpsb_generation(iso->host); - __queue_complete_req(req); - } else { - /* on allocation failure, signal an overflow */ - if(fi->iso_handle) { - atomic_inc(&fi->iso_handle->overflows); - } - } - } - spin_unlock_irqrestore(&fi->reqlists_lock, reqlist_flags); + queue_rawiso_event(list_entry(lh, struct file_info, list)); } } - spin_unlock_irqrestore(&host_info_lock, host_flags); + spin_unlock_irqrestore(&host_info_lock, flags); } /* helper function - gather all the kernel iso status bits for returning to user-space */ @@ -2191,6 +2196,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; case RAW1394_ISO_XMIT: @@ -2215,6 +2224,10 @@ case RAW1394_ISO_SHUTDOWN: raw1394_iso_shutdown(fi); return 0; + + case RAW1394_ISO_QUEUE_ACTIVITY: + queue_rawiso_event(fi); + return 0; } break; default: Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-12-16 16:43:37.000000000 -0500 @@ -127,6 +127,7 @@ #define RAW1394_ISO_GET_STATUS 5 /* arg: raw1394_iso_status* */ #define RAW1394_ISO_PRODUCE_CONSUME 6 /* arg: int, # of packets */ #define RAW1394_ISO_SHUTDOWN 7 +#define RAW1394_ISO_QUEUE_ACTIVITY 9 /* per-packet metadata embedded in the ringbuffer */ /* must be identical to hpsb_iso_packet_info in iso.h! */ |
From: SVN U. <ben...@li...> - 2002-12-08 17:35:56
|
Author: bencollins Date: 2002-12-08 12:35:11 -0500 (Sun, 08 Dec 2002) New Revision: 696 Modified: branches/linux-2.4/raw1394.c Log: Backport tlabel free fix for raw1394 to linux24 branch. Modified: branches/linux-2.4/raw1394.c ============================================================================== --- branches/linux-2.4/raw1394.c (original) +++ branches/linux-2.4/raw1394.c 2002-12-08 12:35:12.000000000 -0500 @@ -171,7 +171,10 @@ req->req.length = 0; } - if (req->req.type != RAW1394_REQ_PHYPACKET) + if ((req->req.type == RAW1394_REQ_ASYNC_READ) || + (req->req.type == RAW1394_REQ_ASYNC_WRITE) || + (req->req.type == RAW1394_REQ_LOCK) || + (req->req.type == RAW1394_REQ_LOCK64)) free_tlabel(packet->host, packet->node_id, packet->tlabel); queue_complete_req(req); |
From: SVN U. <ben...@li...> - 2002-12-05 15:07:39
|
Author: bencollins Date: 2002-12-05 10:06:54 -0500 (Thu, 05 Dec 2002) New Revision: 695 Modified: trunk/raw1394.c Log: Patch from Manfred Weihs to fix deallocation of an unallocated tlabel. Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-12-05 10:06:55.000000000 -0500 @@ -179,7 +179,10 @@ req->req.length = 0; } - if (req->req.type != RAW1394_REQ_PHYPACKET) + if ((req->req.type == RAW1394_REQ_ASYNC_READ) || + (req->req.type == RAW1394_REQ_ASYNC_WRITE) || + (req->req.type == RAW1394_REQ_LOCK) || + (req->req.type == RAW1394_REQ_LOCK64)) hpsb_free_tlabel(packet); queue_complete_req(req); |
From: SVN U. <ben...@li...> - 2002-11-19 00:49:38
|
Author: bencollins Date: 2002-11-18 19:49:05 -0500 (Mon, 18 Nov 2002) New Revision: 694 Modified: trunk/csr.c trunk/csr.h Log: CSR bandwidth_avail and channels_avail mechanism from Steve Kinneberg. Modified: trunk/csr.c ============================================================================== --- trunk/csr.c (original) +++ trunk/csr.c 2002-11-18 19:49:06.000000000 -0500 @@ -54,8 +54,15 @@ host->csr.bus_manager_id = 0x3f; host->csr.bandwidth_available = 4915; - host->csr.channels_available_hi = ~0; + host->csr.channels_available_hi = 0xfffffffe; /* pre-alloc ch 31 per 1394a-2000 */ host->csr.channels_available_lo = ~0; + host->csr.broadcast_channel = 0x80000000 | 31; + + if (host->is_irm) { + if (host->driver->hw_csr_reg) { + host->driver->hw_csr_reg(host, 2, 0xfffffffe, ~0); + } + } host->csr.node_ids = host->node_id << 16; @@ -95,8 +102,15 @@ host->csr.bus_time = 0; host->csr.bus_manager_id = 0x3f; host->csr.bandwidth_available = 4915; - host->csr.channels_available_hi = ~0; + host->csr.channels_available_hi = 0xfffffffe; /* pre-alloc ch 31 per 1394a-2000 */ host->csr.channels_available_lo = ~0; + host->csr.broadcast_channel = 0x80000000 | 31; + + if (host->is_irm) { + if (host->driver->hw_csr_reg) { + host->driver->hw_csr_reg(host, 2, 0xfffffffe, ~0); + } + } } int hpsb_update_config_rom(struct hpsb_host *host, const quadlet_t *new_rom, @@ -268,6 +282,10 @@ *(buf++) = cpu_to_be32(ret); out; + case CSR_BROADCAST_CHANNEL: + *(buf++) = cpu_to_be32(host->csr.broadcast_channel); + out; + /* address gap to end - fall through to default */ default: return RCODE_ADDRESS_ERROR; @@ -345,6 +363,12 @@ /* these are not writable, only lockable */ return RCODE_TYPE_ERROR; + case CSR_BROADCAST_CHANNEL: + /* only the valid bit can be written */ + host->csr.broadcast_channel = (host->csr.broadcast_channel & ~0x40000000) + | (be32_to_cpu(*data) & 0x40000000); + out; + /* address gap to end - fall through */ default: return RCODE_ADDRESS_ERROR; @@ -373,6 +397,18 @@ data = be32_to_cpu(data); arg = be32_to_cpu(arg); + /* Is somebody releasing the broadcast_channel on us? */ + if (csraddr == CSR_CHANNELS_AVAILABLE_HI && (data & 0x1)) { + /* Note: this is may not be the right way to handle + * the problem, so we should look into the proper way + * eventually. */ + HPSB_WARN("Node [" NODE_BUS_FMT "] wants to release " + "broadcast channel 31. Ignoring.", + NODE_BUS_ARGS(nodeid)); + + data &= ~0x1; /* keep broadcast channel allocated */ + } + if (host->driver->hw_csr_reg) { quadlet_t old; @@ -389,23 +425,84 @@ switch (csraddr) { case CSR_BUS_MANAGER_ID: regptr = &host->csr.bus_manager_id; + *store = cpu_to_be32(*regptr); + if (*regptr == arg) + *regptr = data; break; case CSR_BANDWIDTH_AVAILABLE: + { + quadlet_t bandwidth; + quadlet_t old; + quadlet_t new; + regptr = &host->csr.bandwidth_available; + old = *regptr; + + /* bandwidth available algorithm adapted from IEEE 1394a-2000 spec */ + if (arg > 0x1fff) { + *store = cpu_to_be32(old); /* change nothing */ + break; + } + data &= 0x1fff; + if (arg >= data) { + /* allocate bandwidth */ + bandwidth = arg - data; + if (old >= bandwidth) { + new = old - bandwidth; + *store = cpu_to_be32(arg); + *regptr = new; + } else { + *store = cpu_to_be32(old); + } + } else { + /* deallocate bandwidth */ + bandwidth = data - arg; + if (old + bandwidth < 0x2000) { + new = old + bandwidth; + *store = cpu_to_be32(arg); + *regptr = new; + } else { + *store = cpu_to_be32(old); + } + } break; + } case CSR_CHANNELS_AVAILABLE_HI: + { + /* Lock algorithm for CHANNELS_AVAILABLE as recommended by 1394a-2000 */ + quadlet_t affected_channels = arg ^ data; + regptr = &host->csr.channels_available_hi; + + if ((arg & affected_channels) == (*regptr & affected_channels)) { + *regptr ^= affected_channels; + *store = cpu_to_be32(arg); + } else { + *store = cpu_to_be32(*regptr); + } + break; + } case CSR_CHANNELS_AVAILABLE_LO: + { + /* Lock algorithm for CHANNELS_AVAILABLE as recommended by 1394a-2000 */ + quadlet_t affected_channels = arg ^ data; + regptr = &host->csr.channels_available_lo; + + if ((arg & affected_channels) == (*regptr & affected_channels)) { + *regptr ^= affected_channels; + *store = cpu_to_be32(arg); + } else { + *store = cpu_to_be32(*regptr); + } break; } + } - *store = cpu_to_be32(*regptr); - if (*regptr == arg) *regptr = data; spin_unlock_irqrestore(&host->csr.lock, flags); return RCODE_COMPLETE; @@ -420,10 +517,7 @@ case CSR_SPLIT_TIMEOUT_LO: case CSR_CYCLE_TIME: case CSR_BUS_TIME: - case CSR_BUS_MANAGER_ID: - case CSR_BANDWIDTH_AVAILABLE: - case CSR_CHANNELS_AVAILABLE_HI: - case CSR_CHANNELS_AVAILABLE_LO: + case CSR_BROADCAST_CHANNEL: return RCODE_TYPE_ERROR; case CSR_BUSY_TIMEOUT: @@ -433,6 +527,97 @@ } } +static int lock64_regs(struct hpsb_host *host, int nodeid, octlet_t * store, + u64 addr, octlet_t data, octlet_t arg, int extcode, u16 fl) +{ + int csraddr = addr - CSR_REGISTER_BASE; + unsigned long flags; + + data = be64_to_cpu(data); + arg = be64_to_cpu(arg); + + if (csraddr & 0x3) + return RCODE_TYPE_ERROR; + + if (csraddr != CSR_CHANNELS_AVAILABLE + || extcode != EXTCODE_COMPARE_SWAP) + goto unsupported_lock64req; + + /* Is somebody releasing the broadcast_channel on us? */ + if (csraddr == CSR_CHANNELS_AVAILABLE_HI && (data & 0x100000000ULL)) { + /* Note: this is may not be the right way to handle + * the problem, so we should look into the proper way + * eventually. */ + HPSB_WARN("Node [" NODE_BUS_FMT "] wants to release " + "broadcast channel 31. Ignoring.", + NODE_BUS_ARGS(nodeid)); + + data &= ~0x100000000ULL; /* keep broadcast channel allocated */ + } + + if (host->driver->hw_csr_reg) { + quadlet_t data_hi, data_lo; + quadlet_t arg_hi, arg_lo; + quadlet_t old_hi, old_lo; + + data_hi = data >> 32; + data_lo = data & 0xFFFFFFFF; + arg_hi = arg >> 32; + arg_lo = arg & 0xFFFFFFFF; + + old_hi = host->driver->hw_csr_reg(host, (csraddr - CSR_BUS_MANAGER_ID) >> 2, + data_hi, arg_hi); + + old_lo = host->driver->hw_csr_reg(host, ((csraddr + 4) - CSR_BUS_MANAGER_ID) >> 2, + data_lo, arg_lo); + + *store = cpu_to_be64(((octlet_t)old_hi << 32) | old_lo); + } else { + octlet_t old; + octlet_t affected_channels = arg ^ data; + + spin_lock_irqsave(&host->csr.lock, flags); + + old = ((octlet_t)host->csr.channels_available_hi << 32) | host->csr.channels_available_lo; + + if ((arg & affected_channels) == (old & affected_channels)) { + host->csr.channels_available_hi ^= (affected_channels >> 32); + host->csr.channels_available_lo ^= (affected_channels & 0xffffffff); + *store = cpu_to_be64(arg); + } else { + *store = cpu_to_be64(old); + } + + spin_unlock_irqrestore(&host->csr.lock, flags); + } + + /* Is somebody erroneously releasing the broadcast_channel on us? */ + if (host->csr.channels_available_hi & 0x1) + host->csr.channels_available_hi &= ~0x1; + + return RCODE_COMPLETE; + + unsupported_lock64req: + switch (csraddr) { + case CSR_STATE_CLEAR: + case CSR_STATE_SET: + case CSR_RESET_START: + case CSR_NODE_IDS: + case CSR_SPLIT_TIMEOUT_HI: + case CSR_SPLIT_TIMEOUT_LO: + case CSR_CYCLE_TIME: + case CSR_BUS_TIME: + case CSR_BUS_MANAGER_ID: + case CSR_BROADCAST_CHANNEL: + case CSR_BUSY_TIMEOUT: + case CSR_BANDWIDTH_AVAILABLE: + return RCODE_TYPE_ERROR; + + default: + return RCODE_ADDRESS_ERROR; + } +} + static int write_fcp(struct hpsb_host *host, int nodeid, int dest, quadlet_t *data, u64 addr, unsigned int length, u16 flags) { @@ -474,6 +659,7 @@ .read = read_regs, .write = write_regs, .lock = lock_regs, + .lock64 = lock64_regs, }; static struct hpsb_highlevel *hl; Modified: trunk/csr.h ============================================================================== --- trunk/csr.h (original) +++ trunk/csr.h 2002-11-18 19:49:06.000000000 -0500 @@ -42,6 +42,7 @@ quadlet_t bus_manager_id; quadlet_t bandwidth_available; quadlet_t channels_available_hi, channels_available_lo; + quadlet_t broadcast_channel; quadlet_t *rom; size_t rom_size; |