X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fieee1394%2Fhosts.h;h=49c359022c5459bb8d79b787f6faf291d62291d4;hb=a661c4199b300503dae694efa21f1354f763b97c;hp=b911e2af99a3d7757e2ab51fef290feb04f1e134;hpb=de4394f13cc843fae2a3ba2df752ee20e6e779a8;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index b911e2a..49c3590 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h @@ -3,7 +3,6 @@ #include #include -#include #include #include #include @@ -14,6 +13,7 @@ struct module; #include "ieee1394_types.h" #include "csr.h" +#include "highlevel.h" struct hpsb_packet; struct hpsb_iso; @@ -25,17 +25,13 @@ struct hpsb_host { atomic_t generation; - struct sk_buff_head pending_packet_queue; - + struct list_head pending_packets; struct timer_list timeout; unsigned long timeout_interval; - unsigned char iso_listen_count[64]; - int node_count; /* number of identified nodes on this bus */ int selfid_count; /* total number of SelfIDs received */ int nodes_active; /* number of nodes with active link layer */ - u8 speed[ALL_NODES]; /* speed between each node and local node */ nodeid_t node_id; /* node ID of this host */ nodeid_t irm_id; /* ID of this bus' isochronous resource manager */ @@ -55,31 +51,32 @@ struct hpsb_host { int reset_retries; quadlet_t *topology_map; u8 *speed_map; - struct csr_control csr; - - /* Per node tlabel pool allocation */ - struct hpsb_tlabel_pool tpool[ALL_NODES]; + int id; struct hpsb_host_driver *driver; - struct pci_dev *pdev; - - int id; - struct device device; - struct class_device class_dev; - - int update_config_rom; - struct work_struct delayed_reset; + struct device host_dev; - unsigned int config_roms; + struct delayed_work delayed_reset; + unsigned config_roms:31; + unsigned update_config_rom:1; struct list_head addr_space; u64 low_addr_space; /* upper bound of physical DMA area */ u64 middle_addr_space; /* upper bound of posted write area */ -}; + u8 speed[ALL_NODES]; /* speed between each node and local node */ + + /* per node tlabel allocation */ + u8 next_tl[ALL_NODES]; + struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; + struct csr_control csr; + + struct hpsb_address_serve dummy_zero_addr; + struct hpsb_address_serve dummy_max_addr; +}; enum devctl_cmd { /* Host is requested to reset its bus and cancel all outstanding async @@ -104,12 +101,6 @@ enum devctl_cmd { /* Cancel all outstanding async requests without resetting the bus. * Return void. */ CANCEL_REQUESTS, - - /* Start or stop receiving isochronous channel in arg. Return void. - * This acts as an optimization hint, hosts are not required not to - * listen on unrequested channels. */ - ISO_LISTEN_CHANNEL, - ISO_UNLISTEN_CHANNEL }; enum isoctl_cmd { @@ -163,7 +154,7 @@ struct hpsb_host_driver { * to set the hardware ConfigROM if the hardware supports handling * reads to the ConfigROM on its own. */ void (*set_hw_config_rom)(struct hpsb_host *host, - quadlet_t *config_rom); + __be32 *config_rom); /* This function shall implement packet transmission based on * packet->type. It shall CRC both parts of the packet (unless @@ -203,20 +194,8 @@ struct hpsb_host_driver { struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, struct device *dev); int hpsb_add_host(struct hpsb_host *host); -void hpsb_remove_host(struct hpsb_host *h); - -/* The following 2 functions are deprecated and will be removed when the - * raw1394/libraw1394 update is complete. */ -int hpsb_update_config_rom(struct hpsb_host *host, - const quadlet_t *new_rom, size_t size, unsigned char rom_version); -int hpsb_get_config_rom(struct hpsb_host *host, quadlet_t *buffer, - size_t buffersize, size_t *rom_size, unsigned char *rom_version); - -/* Updates the configuration rom image of a host. rom_version must be the - * current version, otherwise it will fail with return value -1. If this - * host does not support config-rom-update, it will return -EINVAL. - * Return value 0 indicates success. - */ +void hpsb_resume_host(struct hpsb_host *host); +void hpsb_remove_host(struct hpsb_host *host); int hpsb_update_config_rom_image(struct hpsb_host *host); #endif /* _IEEE1394_HOSTS_H */