linux1394-cvslog Mailing List for IEEE 1394 for Linux (Page 11)
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. <ben...@li...> - 2002-10-20 00:18:40
|
Author: bencollins Date: 2002-10-19 20:18:37 -0400 (Sat, 19 Oct 2002) New Revision: 618 Modified: trunk/ieee1394_core.c Log: Update list of exported symbols so they are sorted by the file they are implemneted in. Makes it easier to clean them up later. I want to localize a lot of the functions we aren't using. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2002-10-19 20:18:38.000000000 -0400 @@ -1147,14 +1147,17 @@ module_exit(ieee1394_cleanup); /* Exported symbols */ + +/** hosts.c **/ EXPORT_SYMBOL(hpsb_alloc_host); EXPORT_SYMBOL(hpsb_add_host); EXPORT_SYMBOL(hpsb_remove_host); EXPORT_SYMBOL(hpsb_ref_host); EXPORT_SYMBOL(hpsb_unref_host); + +/** ieee1394_core.c **/ EXPORT_SYMBOL(hpsb_speedto_str); EXPORT_SYMBOL(hpsb_set_packet_complete_task); - EXPORT_SYMBOL(alloc_hpsb_packet); EXPORT_SYMBOL(free_hpsb_packet); EXPORT_SYMBOL(hpsb_send_packet); @@ -1164,7 +1167,12 @@ EXPORT_SYMBOL(hpsb_selfid_complete); EXPORT_SYMBOL(hpsb_packet_sent); EXPORT_SYMBOL(hpsb_packet_received); +EXPORT_SYMBOL(ieee1394_register_chardev); +EXPORT_SYMBOL(ieee1394_unregister_chardev); +EXPORT_SYMBOL(ieee1394_devfs_handle); +EXPORT_SYMBOL(ieee1394_procfs_entry); +/** ieee1394_transactions.c **/ EXPORT_SYMBOL(hpsb_get_tlabel); EXPORT_SYMBOL(hpsb_free_tlabel); EXPORT_SYMBOL(fill_async_readquad); @@ -1191,6 +1199,7 @@ EXPORT_SYMBOL(hpsb_write); EXPORT_SYMBOL(hpsb_lock); +/** highlevel.c **/ EXPORT_SYMBOL(hpsb_register_highlevel); EXPORT_SYMBOL(hpsb_unregister_highlevel); EXPORT_SYMBOL(hpsb_register_addrspace); @@ -1205,6 +1214,7 @@ EXPORT_SYMBOL(highlevel_remove_host); EXPORT_SYMBOL(highlevel_host_reset); +/** nodemgr.c **/ EXPORT_SYMBOL(hpsb_guid_get_entry); EXPORT_SYMBOL(hpsb_nodeid_get_entry); EXPORT_SYMBOL(hpsb_check_nodeid); @@ -1212,14 +1222,10 @@ EXPORT_SYMBOL(hpsb_node_read); EXPORT_SYMBOL(hpsb_node_write); EXPORT_SYMBOL(hpsb_node_lock); -EXPORT_SYMBOL(hpsb_update_config_rom); -EXPORT_SYMBOL(hpsb_get_config_rom); EXPORT_SYMBOL(hpsb_register_protocol); EXPORT_SYMBOL(hpsb_unregister_protocol); EXPORT_SYMBOL(hpsb_release_unit_directory); -EXPORT_SYMBOL(ieee1394_register_chardev); -EXPORT_SYMBOL(ieee1394_unregister_chardev); -EXPORT_SYMBOL(ieee1394_devfs_handle); - -EXPORT_SYMBOL(ieee1394_procfs_entry); +/** csr.c **/ +EXPORT_SYMBOL(hpsb_update_config_rom); +EXPORT_SYMBOL(hpsb_get_config_rom); |
From: SVN U. <ben...@li...> - 2002-10-19 23:42:18
|
Author: bencollins Date: 2002-10-19 19:42:08 -0400 (Sat, 19 Oct 2002) New Revision: 617 Modified: trunk/dv1394.c trunk/eth1394.c trunk/ieee1394_core.c trunk/ieee1394_transactions.c trunk/nodemgr.c trunk/video1394.c Log: Include linux/bitops.h instead of asm/bitops.h (so we get generic defines), and also include asm/semaphore.h in nodemgr.c to get the sem_getcount static inline. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2002-10-19 19:42:10.000000000 -0400 @@ -29,7 +29,7 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/proc_fs.h> -#include <asm/bitops.h> +#include <linux/bitops.h> #include <asm/byteorder.h> #include <asm/semaphore.h> Modified: trunk/ieee1394_transactions.c ============================================================================== --- trunk/ieee1394_transactions.c (original) +++ trunk/ieee1394_transactions.c 2002-10-19 19:42:10.000000000 -0400 @@ -10,8 +10,8 @@ */ #include <linux/sched.h> +#include <linux/bitops.h> #include <asm/errno.h> -#include <asm/bitops.h> #include <linux/interrupt.h> #include "ieee1394.h" @@ -222,7 +222,7 @@ spin_lock_irqsave(&tp->lock, flags); packet->tpool = NULL; - __clear_bit(packet->tlabel, &tp->pool); + clear_bit(packet->tlabel, &tp->pool); spin_unlock_irqrestore(&tp->lock, flags); up(&tp->count); Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2002-10-19 19:42:10.000000000 -0400 @@ -11,7 +11,6 @@ #include <linux/kernel.h> #include <linux/list.h> #include <linux/slab.h> -#include <asm/byteorder.h> #include <linux/smp_lock.h> #include <linux/interrupt.h> #include <linux/kmod.h> @@ -20,6 +19,8 @@ #ifdef CONFIG_PROC_FS #include <linux/proc_fs.h> #endif +#include <asm/semaphore.h> +#include <asm/byteorder.h> #include "ieee1394_types.h" #include "ieee1394.h" Modified: trunk/eth1394.c ============================================================================== --- trunk/eth1394.c (original) +++ trunk/eth1394.c 2002-10-19 19:42:10.000000000 -0400 @@ -55,9 +55,9 @@ #include <linux/ip.h> #include <linux/tcp.h> #include <linux/skbuff.h> +#include <linux/bitops.h> #include <asm/delay.h> #include <asm/semaphore.h> -#include <asm/bitops.h> #include <net/arp.h> #include "ieee1394_types.h" Modified: trunk/video1394.c ============================================================================== --- trunk/video1394.c (original) +++ trunk/video1394.c 2002-10-19 19:42:10.000000000 -0400 @@ -37,8 +37,7 @@ #include <linux/proc_fs.h> #include <linux/delay.h> #include <linux/devfs_fs_kernel.h> - -#include <asm/bitops.h> +#include <linux/bitops.h> #include <linux/types.h> #include <linux/wrapper.h> #include <linux/vmalloc.h> Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-10-19 19:42:10.000000000 -0400 @@ -91,9 +91,9 @@ #include <linux/fs.h> #include <linux/poll.h> #include <linux/smp_lock.h> +#include <linux/bitops.h> #include <asm/byteorder.h> #include <asm/atomic.h> -#include <asm/bitops.h> #include <asm/io.h> #include <asm/uaccess.h> #include <linux/proc_fs.h> |
From: SVN U. <ben...@li...> - 2002-10-14 20:06:29
|
Author: bencollins Date: 2002-10-14 16:06:26 -0400 (Mon, 14 Oct 2002) New Revision: 616 Modified: trunk/ieee1394_transactions.c Log: Sorry, here's the actual fix to check the return of find_next_zero_bit Modified: trunk/ieee1394_transactions.c ============================================================================== --- trunk/ieee1394_transactions.c (original) +++ trunk/ieee1394_transactions.c 2002-10-14 16:06:26.000000000 -0400 @@ -192,7 +192,8 @@ packet->tlabel = find_next_zero_bit(&tp->pool, 64, tp->next); tp->next = (packet->tlabel + 1) % 64; - __set_bit(packet->tlabel, &tp->pool); + /* Should _never_ happen */ + BUG_ON(test_and_set_bit(packet->tlabel, &tp->pool)); packet->tpool = tp; spin_unlock_irqrestore(&tp->lock, flags); |
From: SVN U. <ben...@li...> - 2002-10-14 19:13:48
|
Author: bencollins Date: 2002-10-14 15:13:40 -0400 (Mon, 14 Oct 2002) New Revision: 615 Modified: trunk/ieee1394_types.h Log: Doh. An off by one. This existed in the old code too. In the old code it meant we allowed ourselves to overextend our tlabel allocation by one, but it meant the process would spin in the while loop till one became available. In the new code it meant that find_next_zero_bit() returned incorrectly and we double allocated one tlabel. Fixing this fixes that case, but now I also check the return value of find_next_zero_bit(). Modified: trunk/ieee1394_types.h ============================================================================== --- trunk/ieee1394_types.h (original) +++ trunk/ieee1394_types.h 2002-10-14 15:13:41.000000000 -0400 @@ -72,7 +72,7 @@ #define HPSB_TPOOL_INIT(_tp) \ do { \ - sema_init(&(_tp)->count, 64); \ + sema_init(&(_tp)->count, 63); \ spin_lock_init(&(_tp)->lock); \ (_tp)->next = 0; \ (_tp)->pool = 0; \ |
From: SVN U. <ben...@li...> - 2002-10-14 13:23:05
|
Author: bencollins Date: 2002-10-14 09:23:02 -0400 (Mon, 14 Oct 2002) New Revision: 614 Modified: trunk/nodemgr.c Log: Put tlabel counts in proc/devices output Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2002-10-14 09:23:02.000000000 -0400 @@ -102,10 +102,11 @@ NODE_BUS_ARGS(ne->nodeid), (unsigned long long)ne->guid); /* Generic Node information */ - PUTF(" Vendor ID: `%s' [0x%06x]\n", + PUTF(" Vendor ID : `%s' [0x%06x]\n", ne->vendor_name ?: "Unknown", ne->vendor_id); PUTF(" Capabilities: 0x%06x\n", ne->capabilities); - PUTF(" Bus Options:\n"); + PUTF(" Free tlabels: %d\n", sem_getcount(&ne->tpool.count)); + PUTF(" Bus Options :\n"); PUTF(" IRMC(%d) CMC(%d) ISC(%d) BMC(%d) PMC(%d) GEN(%d)\n" " LSPD(%d) MAX_REC(%d) CYC_CLK_ACC(%d)\n", ne->busopt.irmc, ne->busopt.cmc, ne->busopt.isc, ne->busopt.bmc, @@ -119,6 +120,7 @@ PUTF(" Nodes connected : %d\n", ne->host->node_count); PUTF(" Nodes active : %d\n", ne->host->nodes_active); PUTF(" SelfIDs received: %d\n", ne->host->selfid_count); + PUTF(" Backup tlabels : %d\n", sem_getcount(&ne->host->tpool.count)); PUTF(" Irm ID : [" NODE_BUS_FMT "]\n", NODE_BUS_ARGS(ne->host->irm_id)); PUTF(" BusMgr ID : [" NODE_BUS_FMT "]\n", |
From: SVN U. <ben...@li...> - 2002-10-14 13:12:26
|
Author: bencollins Date: 2002-10-14 09:12:23 -0400 (Mon, 14 Oct 2002) New Revision: 613 Modified: trunk/ieee1394_transactions.c Log: Use non-atomic test/set bitops, since we are using a semaphore and under a spinlock anyway Modified: trunk/ieee1394_transactions.c ============================================================================== --- trunk/ieee1394_transactions.c (original) +++ trunk/ieee1394_transactions.c 2002-10-14 09:12:23.000000000 -0400 @@ -192,7 +192,7 @@ packet->tlabel = find_next_zero_bit(&tp->pool, 64, tp->next); tp->next = (packet->tlabel + 1) % 64; - set_bit(packet->tlabel, &tp->pool); + __set_bit(packet->tlabel, &tp->pool); packet->tpool = tp; spin_unlock_irqrestore(&tp->lock, flags); @@ -221,7 +221,7 @@ spin_lock_irqsave(&tp->lock, flags); packet->tpool = NULL; - clear_bit(packet->tlabel, &tp->pool); + __clear_bit(packet->tlabel, &tp->pool); spin_unlock_irqrestore(&tp->lock, flags); up(&tp->count); |
From: SVN U. <ben...@li...> - 2002-10-14 12:43:27
|
Author: bencollins Date: 2002-10-14 08:43:23 -0400 (Mon, 14 Oct 2002) New Revision: 612 Modified: trunk/hosts.c trunk/hosts.h trunk/ieee1394_core.c trunk/ieee1394_core.h trunk/ieee1394_transactions.c trunk/ieee1394_transactions.h trunk/ieee1394_types.h trunk/nodemgr.c trunk/nodemgr.h trunk/raw1394.c trunk/sbp2.c Log: Say hello to per-node transaction label management. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2002-10-14 08:43:25.000000000 -0400 @@ -1165,8 +1165,8 @@ EXPORT_SYMBOL(hpsb_packet_sent); EXPORT_SYMBOL(hpsb_packet_received); -EXPORT_SYMBOL(get_tlabel); -EXPORT_SYMBOL(free_tlabel); +EXPORT_SYMBOL(hpsb_get_tlabel); +EXPORT_SYMBOL(hpsb_free_tlabel); EXPORT_SYMBOL(fill_async_readquad); EXPORT_SYMBOL(fill_async_readquad_resp); EXPORT_SYMBOL(fill_async_readblock); @@ -1207,6 +1207,7 @@ EXPORT_SYMBOL(hpsb_guid_get_entry); EXPORT_SYMBOL(hpsb_nodeid_get_entry); +EXPORT_SYMBOL(hpsb_check_nodeid); EXPORT_SYMBOL(hpsb_node_fill_packet); EXPORT_SYMBOL(hpsb_node_read); EXPORT_SYMBOL(hpsb_node_write); Modified: trunk/ieee1394_core.h ============================================================================== --- trunk/ieee1394_core.h (original) +++ trunk/ieee1394_core.h 2002-10-14 08:43:25.000000000 -0400 @@ -38,6 +38,9 @@ char ack_code; char tcode; + /* A pointer to the tlabel pool we used for our tlabel */ + struct hpsb_tlabel_pool *tpool; + unsigned expect_response:1; unsigned no_waiter:1; Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-10-14 08:43:25.000000000 -0400 @@ -171,7 +171,7 @@ } if (req->req.type != RAW1394_REQ_PHYPACKET) - free_tlabel(packet->host, packet->node_id, packet->tlabel); + hpsb_free_tlabel(packet); queue_complete_req(req); } @@ -762,7 +762,7 @@ if (!hpsb_send_packet(packet)) { req->req.error = RAW1394_ERROR_SEND_ERROR; req->req.length = 0; - free_tlabel(packet->host, packet->node_id, packet->tlabel); + hpsb_free_tlabel(packet); queue_complete_req(req); } return sizeof(struct raw1394_request); Modified: trunk/ieee1394_transactions.c ============================================================================== --- trunk/ieee1394_transactions.c (original) +++ trunk/ieee1394_transactions.c 2002-10-14 08:43:25.000000000 -0400 @@ -12,12 +12,14 @@ #include <linux/sched.h> #include <asm/errno.h> #include <asm/bitops.h> +#include <linux/interrupt.h> #include "ieee1394.h" #include "ieee1394_types.h" #include "hosts.h" #include "ieee1394_core.h" #include "highlevel.h" +#include "nodemgr.h" #define PREP_ASYNC_HEAD_ADDRESS(tc) \ @@ -148,9 +150,8 @@ /** - * get_tlabel - allocate a transaction label - * @host: host to be used for transmission - * @nodeid: the node ID of the transmission target + * hpsb_get_tlabel - allocate a transaction label + * @packet: the packet who's tlabel/tpool we set * @wait: whether to sleep if no tlabel is available * * Every asynchronous transaction on the 1394 bus needs a transaction label to @@ -159,72 +160,71 @@ * matching possible without ambiguity. * * There are 64 different tlabels, so an allocated tlabel has to be freed with - * free_tlabel() after the transaction is complete (unless it's reused again for + * hpsb_free_tlabel() after the transaction is complete (unless it's reused again for * the same target node). * - * @wait must not be set to true if you are calling from interrupt context. + * @wait is ignored if in_interrupt() * - * Return value: The allocated transaction label or -1 if there was no free - * tlabel and @wait is false. + * Return value: Zero on success, otherwise non-zero. A non-zero return + * generally means there are no available tlabels. */ -int get_tlabel(struct hpsb_host *host, nodeid_t nodeid, int wait) +int hpsb_get_tlabel(struct hpsb_packet *packet, int wait) { - int tlabel = 0; unsigned long flags; - int found_tlabel = 0; + struct hpsb_tlabel_pool *tp; + struct node_entry *ne = hpsb_check_nodeid(packet->node_id); - if (wait) { - down(&host->tlabel_count); - } else { - if (down_trylock(&host->tlabel_count)) return -1; - } + BUG_ON(packet->tpool != NULL); - spin_lock_irqsave(&host->tlabel_lock, flags); + if (!ne) + tp = &packet->host->tpool; + else + tp = &ne->tpool; - while (!found_tlabel) { - tlabel = host->tlabel_current; - if (tlabel < 32 && !(host->tlabel_pool[0] & 1 << tlabel)) { - host->tlabel_pool[0] |= 1 << tlabel; - found_tlabel = 1; - } else if (!(host->tlabel_pool[1] & 1 << (tlabel - 32))) { - host->tlabel_pool[1] |= 1 << (tlabel - 32); - found_tlabel = 1; - } - host->tlabel_current = (host->tlabel_current + 1) % 64; + if (wait && !in_interrupt()) { + down(&tp->count); + } else { + if (down_trylock(&tp->count)) + return 1; } + + spin_lock_irqsave(&tp->lock, flags); - spin_unlock_irqrestore(&host->tlabel_lock, flags); + packet->tlabel = find_next_zero_bit(&tp->pool, 64, tp->next); + tp->next = (packet->tlabel + 1) % 64; + set_bit(packet->tlabel, &tp->pool); + packet->tpool = tp; + + spin_unlock_irqrestore(&tp->lock, flags); - return tlabel; + return 0; } -/** - * free_tlabel - free an allocated transaction label - * @host: host to be used for transmission - * @nodeid: the node ID of the transmission target - * @tlabel: the transaction label to free +/** + * hpsb_free_tlabel - free an allocated transaction label + * @packet: packet whos tlabel/tpool needs to be cleared * - * Frees the transaction label allocated with get_tlabel(). The tlabel has to - * be freed after the transaction is complete (i.e. response was received for a - * split transaction or packet was sent for a unified transaction). + * Frees the transaction label allocated with hpsb_get_tlabel(). The + * tlabel has to be freed after the transaction is complete (i.e. response + * was received for a split transaction or packet was sent for a unified + * transaction). * * A tlabel must not be freed twice. */ -void free_tlabel(struct hpsb_host *host, nodeid_t nodeid, int tlabel) +void hpsb_free_tlabel(struct hpsb_packet *packet) { unsigned long flags; + struct hpsb_tlabel_pool *tp = packet->tpool; - spin_lock_irqsave(&host->tlabel_lock, flags); - - if (tlabel < 32) { - host->tlabel_pool[0] &= ~(1 << tlabel); - } else { - host->tlabel_pool[1] &= ~(1 << (tlabel-32)); - } + BUG_ON(packet->tlabel > 63 || packet->tlabel < 0); + BUG_ON(tp == NULL); - spin_unlock_irqrestore(&host->tlabel_lock, flags); + spin_lock_irqsave(&tp->lock, flags); + packet->tpool = NULL; + clear_bit(packet->tlabel, &tp->pool); + spin_unlock_irqrestore(&tp->lock, flags); - up(&host->tlabel_count); + up(&tp->count); } @@ -306,8 +306,11 @@ if (!p) return NULL; p->host = host; - p->tlabel = get_tlabel(host, node, 1); p->node_id = node; + if (hpsb_get_tlabel(p, 1)) { + free_hpsb_packet(p); + return NULL; + } fill_async_readquad(p, addr); return p; @@ -322,8 +325,11 @@ if (!p) return NULL; p->host = host; - p->tlabel = get_tlabel(host, node, 1); p->node_id = node; + if (hpsb_get_tlabel(p, 1)) { + free_hpsb_packet(p); + return NULL; + } fill_async_readblock(p, addr, length); return p; @@ -339,8 +345,11 @@ if (!p) return NULL; p->host = host; - p->tlabel = get_tlabel(host, node, 1); p->node_id = node; + if (hpsb_get_tlabel(p, 1)) { + free_hpsb_packet(p); + return NULL; + } fill_async_writequad(p, addr, data); return p; @@ -360,8 +369,11 @@ } p->host = host; - p->tlabel = get_tlabel(host, node, 1); p->node_id = node; + if (hpsb_get_tlabel(p, 1)) { + free_hpsb_packet(p); + return NULL; + } fill_async_writeblock(p, addr, length); return p; @@ -376,8 +388,11 @@ if (!p) return NULL; p->host = host; - p->tlabel = get_tlabel(host, node, 1); p->node_id = node; + if (hpsb_get_tlabel(p, 1)) { + free_hpsb_packet(p); + return NULL; + } switch (extcode) { case EXTCODE_FETCH_ADD: @@ -401,8 +416,11 @@ if (!p) return NULL; p->host = host; - p->tlabel = get_tlabel(host, node, 1); p->node_id = node; + if (hpsb_get_tlabel(p, 1)) { + free_hpsb_packet(p); + return NULL; + } switch (extcode) { case EXTCODE_FETCH_ADD: @@ -475,7 +493,7 @@ } hpsb_read_fail: - free_tlabel(host, node, packet->tlabel); + hpsb_free_tlabel(packet); free_hpsb_packet(packet); return retval; @@ -530,7 +548,7 @@ retval = hpsb_packet_success(packet); hpsb_write_fail: - free_tlabel(host, node, packet->tlabel); + hpsb_free_tlabel(packet); free_hpsb_packet(packet); return retval; @@ -550,8 +568,11 @@ } packet->host = host; - packet->tlabel = get_tlabel(host, node, 1); packet->node_id = node; + if (hpsb_get_tlabel(packet, 1)) { + free_hpsb_packet(packet); + return -ENOMEM; + } switch (extcode) { case EXTCODE_MASK_SWAP: @@ -586,7 +607,7 @@ } hpsb_lock_fail: - free_tlabel(host, node, packet->tlabel); + hpsb_free_tlabel(packet); free_hpsb_packet(packet); return retval; Modified: trunk/ieee1394_transactions.h ============================================================================== --- trunk/ieee1394_transactions.h (original) +++ trunk/ieee1394_transactions.h 2002-10-14 08:43:25.000000000 -0400 @@ -27,8 +27,8 @@ /* * Get and free transaction labels. */ -int get_tlabel(struct hpsb_host *host, nodeid_t nodeid, int wait); -void free_tlabel(struct hpsb_host *host, nodeid_t nodeid, int tlabel); +int hpsb_get_tlabel(struct hpsb_packet *packet, int wait); +void hpsb_free_tlabel(struct hpsb_packet *packet); struct hpsb_packet *hpsb_make_readqpacket(struct hpsb_host *host, nodeid_t node, u64 addr); Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2002-10-14 08:43:25.000000000 -0400 @@ -335,6 +335,9 @@ INIT_LIST_HEAD(&ne->list); INIT_LIST_HEAD(&ne->unit_directories); + + HPSB_TPOOL_INIT(&ne->tpool); + ne->host = host; ne->nodeid = nodeid; ne->guid = guid; @@ -1211,6 +1214,18 @@ return ne; } +struct node_entry *hpsb_check_nodeid(nodeid_t nodeid) +{ + struct node_entry *ne; + + if (down_trylock(&nodemgr_serialize)) + return NULL; + ne = find_entry_by_nodeid(nodeid); + up(&nodemgr_serialize); + + return ne; +} + /* The following four convenience functions use a struct node_entry * for addressing a node on the bus. They are intended for use by any * process context, not just the nodemgr thread, so we need to be a Modified: trunk/nodemgr.h ============================================================================== --- trunk/nodemgr.h (original) +++ trunk/nodemgr.h 2002-10-14 08:43:25.000000000 -0400 @@ -132,6 +132,8 @@ u32 capabilities; struct list_head unit_directories; + struct hpsb_tlabel_pool tpool; + const char *vendor_name; quadlet_t quadlets[0]; }; @@ -152,6 +154,10 @@ * fool-proof by itself, since the nodeid can change. */ struct node_entry *hpsb_nodeid_get_entry(nodeid_t nodeid); +/* Same as above except that it will not block waiting for the nodemgr + * serialize semaphore. */ +struct node_entry *hpsb_check_nodeid(nodeid_t nodeid); + /* * If the entry refers to a local host, this function will return the pointer * to the hpsb_host structure. It will return NULL otherwise. Once you have Modified: trunk/hosts.c ============================================================================== --- trunk/hosts.c (original) +++ trunk/hosts.c 2002-10-14 08:43:25.000000000 -0400 @@ -133,8 +133,7 @@ INIT_LIST_HEAD(&h->pending_packets); spin_lock_init(&h->pending_pkt_lock); - sema_init(&h->tlabel_count, 64); - spin_lock_init(&h->tlabel_lock); + HPSB_TPOOL_INIT(&h->tpool); atomic_set(&h->generation, 0); Modified: trunk/hosts.h ============================================================================== --- trunk/hosts.h (original) +++ trunk/hosts.h 2002-10-14 08:43:25.000000000 -0400 @@ -32,13 +32,6 @@ spinlock_t pending_pkt_lock; struct hpsb_queue_struct timeout_tq; - /* A bitmask where a set bit means that this tlabel is in use. - * FIXME - should be handled per node instead of per bus. */ - u32 tlabel_pool[2]; - struct semaphore tlabel_count; - spinlock_t tlabel_lock; - u32 tlabel_current; - unsigned char iso_listen_count[64]; int node_count; /* number of identified nodes on this bus */ @@ -64,6 +57,8 @@ u8 *speed_map; struct csr_control csr; + struct hpsb_tlabel_pool tpool; + struct hpsb_host_driver *driver; struct pci_dev *pdev; Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-14 08:43:25.000000000 -0400 @@ -790,7 +790,12 @@ hpsb_node_fill_packet(ne, packet); - packet->tlabel = get_tlabel(hi->host, packet->node_id, 0); + if (hpsb_get_tlabel(packet, 0)) { + list_add_tail(&request_packet->list, &hi->sbp2_req_free); + SBP2_ERR("sbp2util_allocate_request_packet - no tlabels available!"); + sbp2_spin_unlock(&hi->sbp2_request_packet_lock, flags); + return NULL; + } if (!data_size) { fill_async_writequad(packet, addr, data); @@ -830,8 +835,7 @@ * Free the tlabel, and return the packet to the free pool. */ sbp2_spin_lock(&hi->sbp2_request_packet_lock, flags); - free_tlabel(hi->host, LOCAL_BUS | request_packet->packet->node_id, - request_packet->packet->tlabel); + hpsb_free_tlabel(request_packet->packet); list_del(&request_packet->list); list_add_tail(&request_packet->list, &hi->sbp2_req_free); sbp2_spin_unlock(&hi->sbp2_request_packet_lock, flags); Modified: trunk/ieee1394_types.h ============================================================================== --- trunk/ieee1394_types.h (original) +++ trunk/ieee1394_types.h 2002-10-14 08:43:25.000000000 -0400 @@ -7,6 +7,7 @@ #include <linux/version.h> #include <linux/list.h> #include <linux/init.h> +#include <asm/semaphore.h> #include <asm/byteorder.h> @@ -61,6 +62,22 @@ #define HPSB_PREPARE_WORK(x,y,z) PREPARE_WORK(x,y,z) #endif +/* Transaction Label handling */ +struct hpsb_tlabel_pool { + u64 pool; + spinlock_t lock; + u8 next; + struct semaphore count; +}; + +#define HPSB_TPOOL_INIT(_tp) \ +do { \ + sema_init(&(_tp)->count, 64); \ + spin_lock_init(&(_tp)->lock); \ + (_tp)->next = 0; \ + (_tp)->pool = 0; \ +} while(0) + typedef u32 quadlet_t; typedef u64 octlet_t; |
From: SVN U. <ben...@li...> - 2002-10-14 12:42:08
|
Author: bencollins Date: 2002-10-14 08:42:02 -0400 (Mon, 14 Oct 2002) New Revision: 611 Added: trunk/TODO Log: Add a TODO list Added: trunk/TODO ============================================================================== --- trunk/TODO (original) +++ trunk/TODO 2002-10-14 08:42:03.000000000 -0400 @@ -0,0 +1,3 @@ +- Cleanup headers. Things really need to be reorged. +- Label function groups exported in ieee1384_core.c as to which file each + group comes from. |
From: SVN U. <ben...@li...> - 2002-10-14 04:07:22
|
Author: bencollins Date: 2002-10-14 00:07:18 -0400 (Mon, 14 Oct 2002) New Revision: 610 Modified: trunk/ Log: Add svn:ignore prop (like cvsignore) to ignore a few build files |
From: SVN U. <ben...@li...> - 2002-10-14 03:50:26
|
Author: bencollins Date: 2002-10-13 23:50:22 -0400 (Sun, 13 Oct 2002) New Revision: 609 Modified: trunk/ieee1394_core.c trunk/ieee1394_core.h trunk/raw1394.c trunk/raw1394.h trunk/sbp2.c trunk/sbp2.h Log: Change packet complete_work interface to a much simpler one. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2002-10-13 23:50:24.000000000 -0400 @@ -76,31 +76,31 @@ printk("\n"); } -static void process_complete_tasks(struct hpsb_packet *packet) +static void run_packet_complete(struct hpsb_packet *packet) { - struct list_head *lh, *next; - - list_for_each_safe(lh, next, &packet->complete_work) { - struct hpsb_packet_work *work = - list_entry(lh, struct hpsb_packet_work, list); - - list_del(&work->list); - - if (work->routine) - work->routine(work->data); + if (packet->complete_routine != NULL) { + packet->complete_routine(packet->complete_data); + packet->complete_routine = NULL; + packet->complete_data = NULL; } - return; } /** - * hpsb_add_packet_complete_task - add a new task for when a packet completes + * hpsb_set_packet_complete_task - set the task that runs when a packet + * completes. You cannot call this more than once on a single packet + * before it is sent. + * * @packet: the packet whose completion we want the task added to - * @work: the hpsb_queue_struct describing the task to add + * @routine: function to call + * @data: data (if any) to pass to the above function */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_packet_work *work) +void hpsb_set_packet_complete_task(struct hpsb_packet *packet, + void (*routine)(void *), void *data) { - list_add_tail(&work->list, &packet->complete_work); + BUG_ON(packet->complete_routine != NULL); + packet->complete_routine = routine; + packet->complete_data = data; return; } @@ -148,9 +148,10 @@ packet->data_size = data_size; } - INIT_LIST_HEAD(&packet->complete_work); INIT_LIST_HEAD(&packet->list); sema_init(&packet->state_change, 0); + packet->complete_routine = NULL; + packet->complete_data = NULL; packet->state = hpsb_unused; packet->generation = -1; packet->data_be = 1; @@ -428,7 +429,7 @@ packet->state = hpsb_complete; up(&packet->state_change); up(&packet->state_change); - process_complete_tasks(packet); + run_packet_complete(packet); return; } @@ -617,7 +618,7 @@ packet->state = hpsb_complete; up(&packet->state_change); - process_complete_tasks(packet); + run_packet_complete(packet); } @@ -851,7 +852,7 @@ packet->state = hpsb_complete; packet->ack_code = ACKX_ABORTED; up(&packet->state_change); - process_complete_tasks(packet); + run_packet_complete(packet); } } @@ -893,7 +894,7 @@ packet->state = hpsb_complete; packet->ack_code = ACKX_TIMEOUT; up(&packet->state_change); - process_complete_tasks(packet); + run_packet_complete(packet); } } @@ -1152,7 +1153,7 @@ EXPORT_SYMBOL(hpsb_ref_host); EXPORT_SYMBOL(hpsb_unref_host); EXPORT_SYMBOL(hpsb_speedto_str); -EXPORT_SYMBOL(hpsb_add_packet_complete_task); +EXPORT_SYMBOL(hpsb_set_packet_complete_task); EXPORT_SYMBOL(alloc_hpsb_packet); EXPORT_SYMBOL(free_hpsb_packet); Modified: trunk/ieee1394_core.h ============================================================================== --- trunk/ieee1394_core.h (original) +++ trunk/ieee1394_core.h 2002-10-13 23:50:24.000000000 -0400 @@ -68,7 +68,10 @@ /* Very core internal, don't care. */ struct semaphore state_change; - struct list_head complete_work; + /* Function (and possible data to pass to it) to call when this + * packet is completed. */ + void (*complete_routine)(void *); + void *complete_data; /* Store jiffies for implementing bus timeouts. */ unsigned long sendtime; @@ -76,31 +79,9 @@ quadlet_t embedded_header[5]; }; -/* TODO: When we drop 2.4.x support into it's own branch, I want to complete - * switch this over to a workqueue interface somehow. -- BenC */ - -/* Used to pass a function/arg that is called when a packet completes */ -struct hpsb_packet_work { - struct list_head list; /* linked list of active bh's */ - void (*routine)(void *); /* function to call */ - void *data; /* argument to function */ -}; - -#define HPSB_PACKET_WORK_INIT(_work, _routine, _data) \ -do { \ - INIT_LIST_HEAD(&(_work)->list); \ - HPSB_PACKET_WORK_PREPARE((_work), (_routine), (_data)); \ -} while (0) - -#define HPSB_PACKET_WORK_PREPARE(_work, _routine, _data) \ -do { \ - (_work)->routine = _routine; \ - (_work)->data = _data; \ -} while (0) - - -/* Add a new task for when a packet completes */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_packet_work *work); +/* Set a task for when a packet completes */ +void hpsb_set_packet_complete_task(struct hpsb_packet *packet, + void (*routine)(void *), void *data); static inline struct hpsb_packet *driver_packet(struct list_head *l) { Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-10-13 23:50:24.000000000 -0400 @@ -107,8 +107,6 @@ if (req != NULL) { memset(req, 0, sizeof(struct pending_request)); INIT_LIST_HEAD(&req->list); - HPSB_PACKET_WORK_INIT(&req->work, - (void(*)(void*))queue_complete_cb, req); } return req; @@ -754,7 +752,6 @@ return sizeof(struct raw1394_request); } - hpsb_add_packet_complete_task(packet, &req->work); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -794,10 +791,8 @@ return sizeof(struct raw1394_request); } - HPSB_PACKET_WORK_PREPARE(&req->work, - (void (*)(void*))queue_complete_req, req); req->req.length = 0; - hpsb_add_packet_complete_task(packet, &req->work); + hpsb_set_packet_complete_task(packet, (void (*)(void*))queue_complete_req, req); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -858,10 +853,8 @@ packet->header_size=header_length; packet->data_size=req->req.length-header_length; - HPSB_PACKET_WORK_PREPARE(&req->work, - (void (*)(void*))queue_complete_req, req); req->req.length = 0; - hpsb_add_packet_complete_task(packet, &req->work); + hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -1808,7 +1801,7 @@ if (!packet) return -ENOMEM; req->req.length=0; req->packet=packet; - hpsb_add_packet_complete_task(packet, &req->work); + hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); spin_unlock_irq(&fi->reqlists_lock); Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-10-13 23:50:24.000000000 -0400 @@ -164,7 +164,6 @@ struct list_head list; struct file_info *file_info; struct hpsb_packet *packet; - struct hpsb_packet_work work; struct iso_block_store *ibs; quadlet_t *data; int free_data; Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-13 23:50:24.000000000 -0400 @@ -705,13 +705,6 @@ */ INIT_LIST_HEAD(&hi->request_packet[i].list); hi->request_packet[i].packet = packet; - /* - * Set up a task queue completion routine, which returns - * the packet to the free list and releases the tlabel. - */ - HPSB_PACKET_WORK_INIT(&hi->request_packet[i].work, - (void (*)(void*))sbp2util_free_request_packet, - &hi->request_packet[i]); list_add_tail(&hi->request_packet[i].list, &hi->sbp2_req_free); @@ -806,8 +799,10 @@ } request_packet->hi_context = hi; + /* Calls the packet completion to return this to the free list */ - hpsb_add_packet_complete_task(packet, &request_packet->work); + hpsb_set_packet_complete_task(packet, (void (*)(void*))sbp2util_free_request_packet, + request_packet); /* * Now, put the packet on the in-use list. Modified: trunk/sbp2.h ============================================================================== --- trunk/sbp2.h (original) +++ trunk/sbp2.h 2002-10-13 23:50:24.000000000 -0400 @@ -324,7 +324,6 @@ struct list_head list; struct hpsb_packet *packet; - struct hpsb_packet_work work; void *hi_context; }; |
From: SVN U. <ben...@li...> - 2002-10-13 22:07:50
|
Author: bencollins Date: 2002-10-13 18:07:44 -0400 (Sun, 13 Oct 2002) New Revision: 608 Modified: trunk/ohci1394.c trunk/ohci1394.h Log: Use a pci_pool (DMA consistent pool) for d->prg allocations. Modified: trunk/ohci1394.c ============================================================================== --- trunk/ohci1394.c (original) +++ trunk/ohci1394.c 2002-10-13 18:07:45.000000000 -0400 @@ -398,7 +398,7 @@ c = DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE | DMA_CTL_BRANCH; if (generate_irq) c |= DMA_CTL_IRQ; - + d->prg_cpu[i]->control = cpu_to_le32(c | d->buf_size); /* End of descriptor list? */ @@ -1560,11 +1560,11 @@ if (d->prg_cpu) { for (i=0; i<d->num_desc; i++) if (d->prg_cpu[i] && d->prg_bus[i]) { - pci_free_consistent( - d->ohci->dev, sizeof(struct dma_cmd), - d->prg_cpu[i], d->prg_bus[i]); + pci_pool_free(d->prg_pool, d->prg_cpu[i], d->prg_bus[i]); OHCI_DMA_FREE("consistent dma_rcv prg[%d]", i); } + pci_pool_destroy(d->prg_pool); + OHCI_DMA_FREE("dma_rcv prg pool"); kfree(d->prg_cpu); kfree(d->prg_bus); } @@ -1624,6 +1624,10 @@ return -ENOMEM; } + d->prg_pool = pci_pool_create("ohci1394 rcv prg", ohci->dev, + sizeof(struct dma_cmd), 4, 0, SLAB_KERNEL); + OHCI_DMA_ALLOC("dma_rcv prg pool"); + for (i=0; i<d->num_desc; i++) { d->buf_cpu[i] = pci_alloc_consistent(ohci->dev, d->buf_size, @@ -1639,11 +1643,8 @@ return -ENOMEM; } - - d->prg_cpu[i] = pci_alloc_consistent(ohci->dev, - sizeof(struct dma_cmd), - d->prg_bus+i); - OHCI_DMA_ALLOC("consistent dma_rcv prg[%d]", i); + d->prg_cpu[i] = pci_pool_alloc(d->prg_pool, SLAB_KERNEL, d->prg_bus+i); + OHCI_DMA_ALLOC("pool dma_rcv prg[%d]", i); if (d->prg_cpu[i] != NULL) { memset(d->prg_cpu[i], 0, sizeof(struct dma_cmd)); @@ -1692,11 +1693,11 @@ if (d->prg_cpu) { for (i=0; i<d->num_desc; i++) if (d->prg_cpu[i] && d->prg_bus[i]) { - pci_free_consistent( - d->ohci->dev, sizeof(struct at_dma_prg), - d->prg_cpu[i], d->prg_bus[i]); - OHCI_DMA_FREE("consistent dma_trm prg[%d]", i); + pci_pool_free(d->prg_pool, d->prg_cpu[i], d->prg_bus[i]); + OHCI_DMA_FREE("pool dma_trm prg[%d]", i); } + pci_pool_destroy(d->prg_pool); + OHCI_DMA_FREE("dma_trm prg pool"); kfree(d->prg_cpu); kfree(d->prg_bus); } @@ -1732,11 +1733,13 @@ memset(d->prg_cpu, 0, d->num_desc * sizeof(struct at_dma_prg*)); memset(d->prg_bus, 0, d->num_desc * sizeof(dma_addr_t)); + d->prg_pool = pci_pool_create("ohci1394 trm prg", ohci->dev, + sizeof(struct at_dma_prg), 4, 0, SLAB_KERNEL); + OHCI_DMA_ALLOC("dma_rcv prg pool"); + for (i = 0; i < d->num_desc; i++) { - d->prg_cpu[i] = pci_alloc_consistent(ohci->dev, - sizeof(struct at_dma_prg), - d->prg_bus+i); - OHCI_DMA_ALLOC("consistent dma_trm prg[%d]", i); + d->prg_cpu[i] = pci_pool_alloc(d->prg_pool, SLAB_KERNEL, d->prg_bus+i); + OHCI_DMA_ALLOC("pool dma_trm prg[%d]", i); if (d->prg_cpu[i] != NULL) { memset(d->prg_cpu[i], 0, sizeof(struct at_dma_prg)); Modified: trunk/ohci1394.h ============================================================================== --- trunk/ohci1394.h (original) +++ trunk/ohci1394.h 2002-10-13 18:07:45.000000000 -0400 @@ -95,6 +95,7 @@ /* dma block descriptors */ struct dma_cmd **prg_cpu; dma_addr_t *prg_bus; + struct pci_pool *prg_pool; /* dma buffers */ quadlet_t **buf_cpu; @@ -120,6 +121,7 @@ /* dma block descriptors */ struct at_dma_prg **prg_cpu; dma_addr_t *prg_bus; + struct pci_pool *prg_pool; unsigned int prg_ind; unsigned int sent_ind; |
From: SVN U. <ben...@li...> - 2002-10-13 18:33:57
|
Author: bencollins Date: 2002-10-13 14:33:50 -0400 (Sun, 13 Oct 2002) New Revision: 607 Modified: trunk/eth1394.c trunk/ieee1394_core.c trunk/ieee1394_core.h trunk/raw1394.c trunk/raw1394.h trunk/sbp2.c trunk/sbp2.h Log: Convert our packet complete queue to an internal implementation that doesn't depend on tqueue or workqueue. For one, this didn't really fit into either case. TQueue handled it, but workqueue doesn't. I had broken this setup, because we are not supposed to return until process_packet_complete executes all the complete tasks. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2002-10-13 14:33:52.000000000 -0400 @@ -80,11 +80,14 @@ { struct list_head *lh, *next; - list_for_each_safe(lh, next, &packet->complete_tq) { - struct hpsb_queue_struct *tq = - list_entry(lh, struct hpsb_queue_struct, hpsb_queue_list); - list_del(&tq->hpsb_queue_list); - hpsb_schedule_work(tq); + list_for_each_safe(lh, next, &packet->complete_work) { + struct hpsb_packet_work *work = + list_entry(lh, struct hpsb_packet_work, list); + + list_del(&work->list); + + if (work->routine) + work->routine(work->data); } return; @@ -93,11 +96,11 @@ /** * hpsb_add_packet_complete_task - add a new task for when a packet completes * @packet: the packet whose completion we want the task added to - * @tq: the hpsb_queue_struct describing the task to add + * @work: the hpsb_queue_struct describing the task to add */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq) +void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_packet_work *work) { - list_add_tail(&tq->hpsb_queue_list, &packet->complete_tq); + list_add_tail(&work->list, &packet->complete_work); return; } @@ -145,7 +148,7 @@ packet->data_size = data_size; } - INIT_LIST_HEAD(&packet->complete_tq); + INIT_LIST_HEAD(&packet->complete_work); INIT_LIST_HEAD(&packet->list); sema_init(&packet->state_change, 0); packet->state = hpsb_unused; Modified: trunk/ieee1394_core.h ============================================================================== --- trunk/ieee1394_core.h (original) +++ trunk/ieee1394_core.h 2002-10-13 14:33:52.000000000 -0400 @@ -68,7 +68,7 @@ /* Very core internal, don't care. */ struct semaphore state_change; - struct list_head complete_tq; + struct list_head complete_work; /* Store jiffies for implementing bus timeouts. */ unsigned long sendtime; @@ -76,8 +76,31 @@ quadlet_t embedded_header[5]; }; -/* add a new task for when a packet completes */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq); +/* TODO: When we drop 2.4.x support into it's own branch, I want to complete + * switch this over to a workqueue interface somehow. -- BenC */ + +/* Used to pass a function/arg that is called when a packet completes */ +struct hpsb_packet_work { + struct list_head list; /* linked list of active bh's */ + void (*routine)(void *); /* function to call */ + void *data; /* argument to function */ +}; + +#define HPSB_PACKET_WORK_INIT(_work, _routine, _data) \ +do { \ + INIT_LIST_HEAD(&(_work)->list); \ + HPSB_PACKET_WORK_PREPARE((_work), (_routine), (_data)); \ +} while (0) + +#define HPSB_PACKET_WORK_PREPARE(_work, _routine, _data) \ +do { \ + (_work)->routine = _routine; \ + (_work)->data = _data; \ +} while (0) + + +/* Add a new task for when a packet completes */ +void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_packet_work *work); static inline struct hpsb_packet *driver_packet(struct list_head *l) { Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-10-13 14:33:52.000000000 -0400 @@ -107,7 +107,8 @@ if (req != NULL) { memset(req, 0, sizeof(struct pending_request)); INIT_LIST_HEAD(&req->list); - HPSB_INIT_WORK(&req->tq, (void(*)(void*))queue_complete_cb, NULL); + HPSB_PACKET_WORK_INIT(&req->work, + (void(*)(void*))queue_complete_cb, req); } return req; @@ -753,8 +754,7 @@ return sizeof(struct raw1394_request); } - req->tq.data = req; - hpsb_add_packet_complete_task(packet, &req->tq); + hpsb_add_packet_complete_task(packet, &req->work); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -794,9 +794,10 @@ return sizeof(struct raw1394_request); } - HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req); + HPSB_PACKET_WORK_PREPARE(&req->work, + (void (*)(void*))queue_complete_req, req); req->req.length = 0; - hpsb_add_packet_complete_task(packet, &req->tq); + hpsb_add_packet_complete_task(packet, &req->work); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -857,9 +858,10 @@ packet->header_size=header_length; packet->data_size=req->req.length-header_length; - HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req); + HPSB_PACKET_WORK_PREPARE(&req->work, + (void (*)(void*))queue_complete_req, req); req->req.length = 0; - hpsb_add_packet_complete_task(packet, &req->tq); + hpsb_add_packet_complete_task(packet, &req->work); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -1806,8 +1808,7 @@ if (!packet) return -ENOMEM; req->req.length=0; req->packet=packet; - req->tq.data=req; - hpsb_add_packet_complete_task(packet, &req->tq); + hpsb_add_packet_complete_task(packet, &req->work); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); spin_unlock_irq(&fi->reqlists_lock); Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-10-13 14:33:52.000000000 -0400 @@ -164,7 +164,7 @@ struct list_head list; struct file_info *file_info; struct hpsb_packet *packet; - struct hpsb_queue_struct tq; + struct hpsb_packet_work work; struct iso_block_store *ibs; quadlet_t *data; int free_data; Modified: trunk/eth1394.c ============================================================================== --- trunk/eth1394.c (original) +++ trunk/eth1394.c 2002-10-13 14:33:52.000000000 -0400 @@ -682,6 +682,8 @@ ptask->skb = skb; ptask->addr = addr; ptask->dest_node = dest_node; + /* TODO: When 2.4 is out of the way, give each of our ethernet + * dev's a workqueue to handle these. */ HPSB_INIT_WORK(&ptask->tq, hpsb_write_sched, ptask); hpsb_schedule_work(&ptask->tq); Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-13 14:33:52.000000000 -0400 @@ -705,6 +705,14 @@ */ INIT_LIST_HEAD(&hi->request_packet[i].list); hi->request_packet[i].packet = packet; + /* + * Set up a task queue completion routine, which returns + * the packet to the free list and releases the tlabel. + */ + HPSB_PACKET_WORK_INIT(&hi->request_packet[i].work, + (void (*)(void*))sbp2util_free_request_packet, + &hi->request_packet[i]); + list_add_tail(&hi->request_packet[i].list, &hi->sbp2_req_free); } @@ -797,15 +805,9 @@ fill_async_writeblock(packet, addr, data_size); } - /* - * Set up a task queue completion routine, which returns - * the packet to the free list and releases the tlabel. - */ - HPSB_PREPARE_WORK(&request_packet->tq, - (void (*)(void*))sbp2util_free_request_packet, - request_packet); request_packet->hi_context = hi; - hpsb_add_packet_complete_task(packet, &request_packet->tq); + /* Calls the packet completion to return this to the free list */ + hpsb_add_packet_complete_task(packet, &request_packet->work); /* * Now, put the packet on the in-use list. @@ -1376,7 +1378,12 @@ INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_inuse); INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_completed); scsi_id->sbp2_command_orb_lock = SPIN_LOCK_UNLOCKED; - scsi_id->sbp2_total_command_orbs = 0; + + /* Knock the total command orbs down if we are serializing I/O */ + if (sbp2_serialize_io) + scsi_id->sbp2_total_command_orbs = 2; + else + scsi_id->sbp2_total_command_orbs = SBP2_MAX_COMMAND_ORBS; /* * Make sure that we've gotten ahold of the sbp2 management agent @@ -1385,15 +1392,6 @@ */ sbp2_parse_unit_directory(scsi_id); - scsi_id->sbp2_total_command_orbs = SBP2_MAX_COMMAND_ORBS; - - /* - * Knock the total command orbs down if we are serializing I/O - */ - if (sbp2_serialize_io) { - scsi_id->sbp2_total_command_orbs = 2; /* one extra for good measure */ - } - /* * Find an empty spot to stick our scsi id instance data. */ Modified: trunk/sbp2.h ============================================================================== --- trunk/sbp2.h (original) +++ trunk/sbp2.h 2002-10-13 14:33:52.000000000 -0400 @@ -324,7 +324,7 @@ struct list_head list; struct hpsb_packet *packet; - struct hpsb_queue_struct tq; + struct hpsb_packet_work work; void *hi_context; }; |
From: SVN U. <hog...@li...> - 2002-10-13 14:16:03
|
Author: hogsberg Date: 2002-10-13 10:15:53 -0400 (Sun, 13 Oct 2002) New Revision: 606 Modified: trunk/hosts.h Log: Remove prototype for long gone register_builtin_lowlevels() Modified: trunk/hosts.h ============================================================================== --- trunk/hosts.h (original) +++ trunk/hosts.h 2002-10-13 10:15:54.000000000 -0400 @@ -156,9 +156,6 @@ quadlet_t data, quadlet_t compare); }; -/* core internal use */ -void register_builtin_lowlevels(void); - /* high level internal use */ struct hpsb_highlevel; void hl_all_hosts(void (*function)(struct hpsb_host*)); |
From: SVN U. <ben...@li...> - 2002-10-13 01:35:46
|
Author: bencollins Date: 2002-10-12 21:35:43 -0400 (Sat, 12 Oct 2002) New Revision: 605 Added: tags/v2.4/2.4.20-r604/ tags/v2.5/2.5.43-r604/ Removed: tags/v2.4/2.4.20-r601/ tags/v2.5/2.5.43-r601/ Log: Resync to Linus/Marcelo including the dv1394 patch Copied: 2.4.20-r604 (from rev 604, trunk) Copied: 2.5.43-r604 (from rev 604, trunk) |
From: SVN U. <ben...@li...> - 2002-10-13 01:29:38
|
Author: bencollins Date: 2002-10-12 21:29:36 -0400 (Sat, 12 Oct 2002) New Revision: 604 Modified: trunk/dv1394.c Log: Not to mention a missing '*'. My mistake. Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-10-12 21:29:36.000000000 -0400 @@ -2875,7 +2875,7 @@ #ifdef CONFIG_DEVFS_FS { - struct dv1394_devfs_entry devfs_entry = dv1394_devfs_find("dv"); + 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); |
From: SVN U. <ben...@li...> - 2002-10-13 01:28:05
|
Author: bencollins Date: 2002-10-12 21:27:59 -0400 (Sat, 12 Oct 2002) New Revision: 603 Modified: trunk/dv1394.c Log: Oops. Extraneous '=' Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-10-12 21:28:00.000000000 -0400 @@ -2875,7 +2875,7 @@ #ifdef CONFIG_DEVFS_FS { - struct dv1394_devfs_entry = devfs_entry = dv1394_devfs_find("dv"); + 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); |
From: SVN U. <ben...@li...> - 2002-10-12 21:50:49
|
Author: bencollins Date: 2002-10-12 17:50:41 -0400 (Sat, 12 Oct 2002) New Revision: 602 Added: tags/v2.4/2.4.20-r601/ tags/v2.5/2.5.43-r601/ Log: Mark new sync points Copied: 2.4.20-r601 (from rev 601, trunk) Copied: 2.5.43-r601 (from rev 601, trunk) |
From: SVN U. <ben...@li...> - 2002-10-12 21:39:47
|
Author: bencollins Date: 2002-10-12 17:39:41 -0400 (Sat, 12 Oct 2002) New Revision: 601 Modified: trunk/Makefile trunk/amdtp.c trunk/dv1394.c trunk/eth1394.c trunk/eth1394.h trunk/hosts.c trunk/hosts.h trunk/ieee1394_core.c trunk/ieee1394_core.h trunk/ieee1394_types.h trunk/ohci1394.c trunk/raw1394.c trunk/raw1394.h trunk/sbp2.c trunk/sbp2.h trunk/video1394.c Log: General: Abstract for compatiblity, the old task_queue interface. We now have compatibility between 2.4/2.5 again. Amdtp: 2.5 no longer takes a flags argument to pci_pool_create() Video1394: Remove some old compat code aswell. dv1394: Fix compilation warnings in the no-devfs case. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2002-10-12 17:39:43.000000000 -0400 @@ -29,7 +29,6 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/proc_fs.h> -#include <linux/tqueue.h> #include <asm/bitops.h> #include <asm/byteorder.h> #include <asm/semaphore.h> @@ -82,9 +81,10 @@ struct list_head *lh, *next; list_for_each_safe(lh, next, &packet->complete_tq) { - struct tq_struct *tq = list_entry(lh, struct tq_struct, list); - list_del(&tq->list); - schedule_task(tq); + struct hpsb_queue_struct *tq = + list_entry(lh, struct hpsb_queue_struct, hpsb_queue_list); + list_del(&tq->hpsb_queue_list); + hpsb_schedule_work(tq); } return; @@ -93,11 +93,11 @@ /** * hpsb_add_packet_complete_task - add a new task for when a packet completes * @packet: the packet whose completion we want the task added to - * @tq: the tq_struct describing the task to add + * @tq: the hpsb_queue_struct describing the task to add */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct tq_struct *tq) +void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq) { - list_add_tail(&tq->list, &packet->complete_tq); + list_add_tail(&tq->hpsb_queue_list, &packet->complete_tq); return; } @@ -437,7 +437,7 @@ spin_unlock_irqrestore(&host->pending_pkt_lock, flags); up(&packet->state_change); - schedule_task(&host->timeout_tq); + hpsb_schedule_work(&host->timeout_tq); } /** @@ -881,7 +881,7 @@ } if (!list_empty(&host->pending_packets)) - schedule_task(&host->timeout_tq); + hpsb_schedule_work(&host->timeout_tq); spin_unlock_irqrestore(&host->pending_pkt_lock, flags); Modified: trunk/ohci1394.c ============================================================================== --- trunk/ohci1394.c (original) +++ trunk/ohci1394.c 2002-10-12 17:39:43.000000000 -0400 @@ -91,7 +91,6 @@ #include <asm/byteorder.h> #include <asm/atomic.h> #include <asm/uaccess.h> -#include <linux/tqueue.h> #include <linux/delay.h> #include <linux/spinlock.h> Modified: trunk/ieee1394_core.h ============================================================================== --- trunk/ieee1394_core.h (original) +++ trunk/ieee1394_core.h 2002-10-12 17:39:44.000000000 -0400 @@ -2,7 +2,6 @@ #ifndef _IEEE1394_CORE_H #define _IEEE1394_CORE_H -#include <linux/tqueue.h> #include <linux/slab.h> #include <linux/devfs_fs_kernel.h> #include <linux/proc_fs.h> @@ -78,7 +77,7 @@ }; /* add a new task for when a packet completes */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct tq_struct *tq); +void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq); static inline struct hpsb_packet *driver_packet(struct list_head *l) { Modified: trunk/amdtp.c ============================================================================== --- trunk/amdtp.c (original) +++ trunk/amdtp.c 2002-10-12 17:39:44.000000000 -0400 @@ -834,7 +834,12 @@ 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, SLAB_KERNEL); + max_packet_size, 0, 0 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40) + ,SLAB_KERNEL); +#else + ); +#endif if (s->packet_pool == NULL) return -1; @@ -1020,7 +1025,13 @@ s->descriptor_pool = pci_pool_create("descriptor pool", host->ohci->dev, sizeof(struct descriptor_block), - 16, 0, SLAB_KERNEL); + 16, 0 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40) + ,SLAB_KERNEL); +#else + ); +#endif + if (s->descriptor_pool == NULL) { kfree(s->input); kfree(s); Modified: trunk/raw1394.c ============================================================================== --- trunk/raw1394.c (original) +++ trunk/raw1394.c 2002-10-12 17:39:44.000000000 -0400 @@ -107,7 +107,7 @@ if (req != NULL) { memset(req, 0, sizeof(struct pending_request)); INIT_LIST_HEAD(&req->list); - INIT_TQUEUE(&req->tq, (void(*)(void*))queue_complete_cb, NULL); + HPSB_INIT_WORK(&req->tq, (void(*)(void*))queue_complete_cb, NULL); } return req; @@ -794,8 +794,7 @@ return sizeof(struct raw1394_request); } - req->tq.data = req; - req->tq.routine = (void (*)(void*))queue_complete_req; + HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req); req->req.length = 0; hpsb_add_packet_complete_task(packet, &req->tq); @@ -858,10 +857,9 @@ packet->header_size=header_length; packet->data_size=req->req.length-header_length; - req->tq.data = req; - req->tq.routine = (void (*)(void*))queue_complete_req; + HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req); req->req.length = 0; - queue_task(&req->tq, &packet->complete_tq); + hpsb_add_packet_complete_task(packet, &req->tq); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); @@ -1809,7 +1807,7 @@ req->req.length=0; req->packet=packet; req->tq.data=req; - queue_task(&req->tq, &packet->complete_tq); + hpsb_add_packet_complete_task(packet, &req->tq); spin_lock_irq(&fi->reqlists_lock); list_add_tail(&req->list, &fi->req_pending); spin_unlock_irq(&fi->reqlists_lock); Modified: trunk/raw1394.h ============================================================================== --- trunk/raw1394.h (original) +++ trunk/raw1394.h 2002-10-12 17:39:44.000000000 -0400 @@ -164,7 +164,7 @@ struct list_head list; struct file_info *file_info; struct hpsb_packet *packet; - struct tq_struct tq; + struct hpsb_queue_struct tq; struct iso_block_store *ibs; quadlet_t *data; int free_data; Modified: trunk/Makefile ============================================================================== --- trunk/Makefile (original) +++ trunk/Makefile 2002-10-12 17:39:44.000000000 -0400 @@ -2,11 +2,8 @@ # Makefile for the Linux IEEE 1394 implementation # -O_TARGET := ieee1394drv.o - export-objs := ieee1394_core.o ohci1394.o cmp.o -list-multi := ieee1394.o ieee1394-objs := ieee1394_core.o ieee1394_transactions.o hosts.o \ highlevel.o csr.o nodemgr.o Modified: trunk/hosts.c ============================================================================== --- trunk/hosts.c (original) +++ trunk/hosts.c 2002-10-12 17:39:44.000000000 -0400 @@ -138,7 +138,7 @@ atomic_set(&h->generation, 0); - INIT_TQUEUE(&h->timeout_tq, (void (*)(void*))abort_timedouts, h); + HPSB_INIT_WORK(&h->timeout_tq, (void (*)(void*))abort_timedouts, h); h->topology_map = h->csr.topology_map + 3; h->speed_map = (u8 *)(h->csr.speed_map + 2); Modified: trunk/eth1394.c ============================================================================== --- trunk/eth1394.c (original) +++ trunk/eth1394.c 2002-10-12 17:39:44.000000000 -0400 @@ -682,8 +682,8 @@ ptask->skb = skb; ptask->addr = addr; ptask->dest_node = dest_node; - INIT_TQUEUE(&ptask->tq, hpsb_write_sched, ptask); - schedule_task(&ptask->tq); + HPSB_INIT_WORK(&ptask->tq, hpsb_write_sched, ptask); + hpsb_schedule_work(&ptask->tq); return 0; fail: Modified: trunk/hosts.h ============================================================================== --- trunk/hosts.h (original) +++ trunk/hosts.h 2002-10-12 17:39:44.000000000 -0400 @@ -2,7 +2,6 @@ #define _IEEE1394_HOSTS_H #include <linux/wait.h> -#include <linux/tqueue.h> #include <linux/list.h> #include <asm/semaphore.h> @@ -31,7 +30,7 @@ struct list_head pending_packets; spinlock_t pending_pkt_lock; - struct tq_struct timeout_tq; + struct hpsb_queue_struct timeout_tq; /* A bitmask where a set bit means that this tlabel is in use. * FIXME - should be handled per node instead of per bus. */ Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-12 17:39:44.000000000 -0400 @@ -801,8 +801,9 @@ * Set up a task queue completion routine, which returns * the packet to the free list and releases the tlabel. */ - request_packet->tq.routine = (void (*)(void*))sbp2util_free_request_packet; - request_packet->tq.data = request_packet; + HPSB_PREPARE_WORK(&request_packet->tq, + (void (*)(void*))sbp2util_free_request_packet, + request_packet); request_packet->hi_context = hi; hpsb_add_packet_complete_task(packet, &request_packet->tq); Modified: trunk/eth1394.h ============================================================================== --- trunk/eth1394.h (original) +++ trunk/eth1394.h 2002-10-12 17:39:44.000000000 -0400 @@ -56,7 +56,7 @@ struct sk_buff *skb; /* Socket buffer we are sending */ nodeid_t dest_node; /* Destination of the packet */ u64 addr; /* Address */ - struct tq_struct tq; /* The task */ + struct hpsb_queue_struct tq; /* The task */ }; /* IP1394 headers */ Modified: trunk/sbp2.h ============================================================================== --- trunk/sbp2.h (original) +++ trunk/sbp2.h 2002-10-12 17:39:44.000000000 -0400 @@ -324,7 +324,7 @@ struct list_head list; struct hpsb_packet *packet; - struct tq_struct tq; + struct hpsb_queue_struct tq; void *hi_context; }; Modified: trunk/ieee1394_types.h ============================================================================== --- trunk/ieee1394_types.h (original) +++ trunk/ieee1394_types.h 2002-10-12 17:39:44.000000000 -0400 @@ -41,6 +41,27 @@ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #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 +#define hpsb_queue_list list +#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; typedef u64 octlet_t; typedef u16 nodeid_t; Modified: trunk/video1394.c ============================================================================== --- trunk/video1394.c (original) +++ trunk/video1394.c 2002-10-12 17:39:44.000000000 -0400 @@ -35,7 +35,6 @@ #include <linux/poll.h> #include <linux/smp_lock.h> #include <linux/proc_fs.h> -#include <linux/tqueue.h> #include <linux/delay.h> #include <linux/devfs_fs_kernel.h> @@ -1455,12 +1454,7 @@ return -EIO; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) - devfs_handle = devfs_mk_dir(NULL, VIDEO1394_DRIVER_NAME, - strlen(VIDEO1394_DRIVER_NAME), NULL); -#else devfs_handle = devfs_mk_dir(NULL, VIDEO1394_DRIVER_NAME, NULL); -#endif hl_handle = hpsb_register_highlevel (VIDEO1394_DRIVER_NAME, &hl_ops); if (hl_handle == NULL) { Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-10-12 17:39:44.000000000 -0400 @@ -97,7 +97,6 @@ #include <asm/io.h> #include <asm/uaccess.h> #include <linux/proc_fs.h> -#include <linux/tqueue.h> #include <linux/delay.h> #include <asm/pgtable.h> #include <asm/page.h> @@ -2587,6 +2586,7 @@ return p; } +#ifdef CONFIG_DEVFS_FS static int dv1394_devfs_add_entry(struct video_card *video) { char buf[32]; @@ -2694,6 +2694,7 @@ kfree(p); } } +#endif /* CONFIG_DEVFS_FS */ /*** IEEE1394 HPSB CALLBACKS ***********************************************/ @@ -2852,7 +2853,6 @@ { struct ti_ohci *ohci; char buf[16]; - struct dv1394_devfs_entry *devfs_entry; /* We only work with the OHCI-1394 driver */ if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME)) @@ -2874,13 +2874,15 @@ #endif #ifdef CONFIG_DEVFS_FS - devfs_entry = dv1394_devfs_find("dv"); +{ + 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); } +} #endif dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); |
From: SVN U. <ben...@li...> - 2002-10-12 20:46:02
|
Author: bencollins Date: 2002-10-12 16:45:58 -0400 (Sat, 12 Oct 2002) New Revision: 600 Modified: trunk/ieee1394_types.h trunk/sbp2.c Log: Remove some obsolete compatibility code. We no longer work with anything as old as 2.4.14- anyway. Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-12 16:45:58.000000000 -0400 @@ -1008,13 +1008,8 @@ command->dma_size, command->dma_dir); SBP2_DMA_FREE("single bulk"); } else if (command->dma_type == CMD_DMA_PAGE) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,13) - pci_unmap_single(hi->host->pdev, command->cmd_dma, - command->dma_size, command->dma_dir); -#else pci_unmap_page(hi->host->pdev, command->cmd_dma, command->dma_size, command->dma_dir); -#endif /* Linux version < 2.4.13 */ SBP2_DMA_FREE("single page"); } /* XXX: Check for CMD_DMA_NONE bug */ command->dma_type = CMD_DMA_NONE; @@ -2147,17 +2142,11 @@ command->dma_dir = dma_dir; command->dma_size = sgpnt[0].length; command->dma_type = CMD_DMA_PAGE; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,13) - command->cmd_dma = pci_map_single (hi->host->pdev, sgpnt[0].address, - command->dma_size, - command->dma_dir); -#else command->cmd_dma = pci_map_page(hi->host->pdev, sgpnt[0].page, sgpnt[0].offset, command->dma_size, command->dma_dir); -#endif /* Linux version < 2.4.13 */ SBP2_DMA_ALLOC("single page scatter element"); command_orb->data_descriptor_hi = ORB_SET_NODE_ID(hi->host->node_id); Modified: trunk/ieee1394_types.h ============================================================================== --- trunk/ieee1394_types.h (original) +++ trunk/ieee1394_types.h 2002-10-12 16:45:58.000000000 -0400 @@ -20,23 +20,6 @@ #define __devexit_p(x) x #endif -/* This showed up around this time */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,12) - -# ifndef MODULE_LICENSE -# define MODULE_LICENSE(x) -# endif - -# ifndef min -# define min(x,y) ({ \ - const typeof(x) _x = (x); \ - const typeof(y) _y = (y); \ - (void) (&_x == &_y); \ - _x < _y ? _x : _y; }) -# endif - -#endif /* Linux version < 2.4.12 */ - #include <linux/spinlock.h> #ifndef list_for_each_safe |
From: SVN U. <ben...@li...> - 2002-10-12 20:04:32
|
Author: bencollins Date: 2002-10-12 16:04:25 -0400 (Sat, 12 Oct 2002) New Revision: 599 Modified: trunk/sbp2.c Log: Merge change from 2.5.42. Cast disk->capacity to int Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-12 16:04:26.000000000 -0400 @@ -3161,12 +3161,12 @@ heads = 64; sectors = 32; - cylinders = disk->capacity / (heads * sectors); + cylinders = (int)disk->capacity / (heads * sectors); if (cylinders > 1024) { heads = 255; sectors = 63; - cylinders = disk->capacity / (heads * sectors); + cylinders = (int)disk->capacity / (heads * sectors); } geom[0] = heads; |
From: SVN U. <hog...@li...> - 2002-10-12 17:21:28
|
Author: hogsberg Date: 2002-10-12 13:21:19 -0400 (Sat, 12 Oct 2002) New Revision: 598 Modified: trunk/sbp2.c Log: fix spelling (once such -> one such) Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-12 13:21:20.000000000 -0400 @@ -421,7 +421,7 @@ * talking to a single sbp2 device at the same time (filesystem coherency, * etc.). If you're running an sbp2 device that supports multiple logins, * and you're either running read-only filesystems or some sort of special - * filesystem supporting multiple hosts (once such filesystem is OpenGFS, + * filesystem supporting multiple hosts (one such filesystem is OpenGFS, * see opengfs.sourceforge.net for more info), then set sbp2_exclusive_login * to zero. Note: The Oxsemi OXFW911 sbp2 chipset supports up to four * concurrent logins. |
From: SVN U. <hog...@li...> - 2002-10-12 14:56:10
|
Author: hogsberg Date: 2002-10-12 10:56:00 -0400 (Sat, 12 Oct 2002) New Revision: 597 Modified: trunk/sbp2.c Log: Plug OpenGFS in exclusive-login comment Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-10-12 10:56:01.000000000 -0400 @@ -421,8 +421,9 @@ * talking to a single sbp2 device at the same time (filesystem coherency, * etc.). If you're running an sbp2 device that supports multiple logins, * and you're either running read-only filesystems or some sort of special - * filesystem supporting multiple hosts, then set sbp2_exclusive_login to - * zero. Note: The Oxsemi OXFW911 sbp2 chipset supports up to four + * filesystem supporting multiple hosts (once such filesystem is OpenGFS, + * see opengfs.sourceforge.net for more info), then set sbp2_exclusive_login + * to zero. Note: The Oxsemi OXFW911 sbp2 chipset supports up to four * concurrent logins. */ MODULE_PARM(sbp2_exclusive_login,"i"); |
From: SVN U. <ben...@li...> - 2002-10-07 01:23:50
|
Author: bencollins Date: 2002-10-06 21:23:47 -0400 (Sun, 06 Oct 2002) New Revision: 596 Removed: trunk/Makefile.in Log: Makefile.in has gone the way of the obsolete. Deleted: trunk/Makefile.in ============================================================================== --- trunk/Makefile.in (original) +++ trunk/Makefile.in 2002-10-06 21:23:48.000000000 -0400 @@ -1,20 +0,0 @@ -# -# Makefile for the Linux IEEE 1394 implementation - -expsyms(ieee1394_core.o ohci1394.o cmp.o) - -objlink(ieee1394.o ieee1394_core.o ieee1394_transactions.o hosts.o highlevel.o - csr.o nodemgr.o) - -extra_cflags(sbp2.o $(src_includelist /drivers/scsi)) - -select(CONFIG_IEEE1394 ieee1394.o) -select(CONFIG_IEEE1394_PCILYNX pcilynx.o) -select(CONFIG_IEEE1394_OHCI1394 ohci1394.o) -select(CONFIG_IEEE1394_VIDEO1394 video1394.o) -select(CONFIG_IEEE1394_RAWIO raw1394.o) -select(CONFIG_IEEE1394_SBP2 sbp2.o) -select(CONFIG_IEEE1394_DV1394 dv1394.o) -select(CONFIG_IEEE1394_ETH1394 eth1394.o) -select(CONFIG_IEEE1394_CMP cmp.o) -select(CONFIG_IEEE1394_AMDTP amdtp.o) |
From: SVN U. <ben...@li...> - 2002-10-06 14:05:06
|
Author: bencollins Date: 2002-10-06 10:05:03 -0400 (Sun, 06 Oct 2002) New Revision: 595 Removed: tags/v2.5/2.5.26/ tags/v2.5/2.5.36/ tags/v2.5/2.5.8-pre1/ Log: Keep the 2.5 merge tags clean. We only need the latest one. We'll kill them off once 2.5 goes to 2.6/3.0 (whichever it will become) anyway since it's a development line. |
From: SVN U. <ben...@li...> - 2002-10-06 14:03:39
|
Author: bencollins Date: 2002-10-06 10:03:36 -0400 (Sun, 06 Oct 2002) New Revision: 594 Added: tags/v2.4/2.4.19-r531/ tags/v2.4/2.4.20-r587/ Removed: tags/v2.4/2.4.19-pre5/ tags/v2.4/2.4.19-rc2/ tags/v2.4/2.4.19-rc3/ tags/v2.4/2.4.20-pre8/ tags/v2.4/2.4.20-pre9-r587/ Log: Make merges against -pre/-rc kernels a moving target for their release. Our 2.4.20 patch was merged, so make that the latest 2.4.20 sync point. Redo the 2.4.19 point. Copied: 2.4.19-r531 (from rev 593, tags/v2.4/2.4.19-rc3) Copied: 2.4.20-r587 (from rev 593, tags/v2.4/2.4.20-pre9-r587) |