aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/firewire-cdev.h39
-rw-r--r--include/linux/firewire.h3
2 files changed, 34 insertions, 8 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h
index 5bc051b9a013..b87409160794 100644
--- a/include/linux/firewire-cdev.h
+++ b/include/linux/firewire-cdev.h
@@ -35,6 +35,7 @@
35/* available since kernel version 2.6.36 */ 35/* available since kernel version 2.6.36 */
36#define FW_CDEV_EVENT_REQUEST2 0x06 36#define FW_CDEV_EVENT_REQUEST2 0x06
37#define FW_CDEV_EVENT_PHY_PACKET_SENT 0x07 37#define FW_CDEV_EVENT_PHY_PACKET_SENT 0x07
38#define FW_CDEV_EVENT_PHY_PACKET_RECEIVED 0x08
38 39
39/** 40/**
40 * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types 41 * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types
@@ -285,16 +286,24 @@ struct fw_cdev_event_iso_resource {
285}; 286};
286 287
287/** 288/**
288 * struct fw_cdev_event_phy_packet - A PHY packet was transmitted 289 * struct fw_cdev_event_phy_packet - A PHY packet was transmitted or received
289 * @closure: See &fw_cdev_event_common; 290 * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_SEND_PHY_PACKET
290 * set by %FW_CDEV_IOC_SEND_PHY_PACKET ioctl 291 * or %FW_CDEV_IOC_RECEIVE_PHY_PACKETS ioctl
291 * @type: %FW_CDEV_EVENT_PHY_PACKET_SENT 292 * @type: %FW_CDEV_EVENT_PHY_PACKET_SENT or %..._RECEIVED
292 * @rcode: %RCODE_..., indicates success or failure of transmission 293 * @rcode: %RCODE_..., indicates success or failure of transmission
294 * @length: Data length in bytes
295 * @data: Incoming data
296 *
297 * If @type is %FW_CDEV_EVENT_PHY_PACKET_SENT, @length is 0 and @data empty.
298 * If @type is %FW_CDEV_EVENT_PHY_PACKET_RECEIVED, @length is 8 and @data
299 * consists of the two PHY packet quadlets, in host byte order.
293 */ 300 */
294struct fw_cdev_event_phy_packet { 301struct fw_cdev_event_phy_packet {
295 __u64 closure; 302 __u64 closure;
296 __u32 type; 303 __u32 type;
297 __u32 rcode; 304 __u32 rcode;
305 __u32 length;
306 __u32 data[0];
298}; 307};
299 308
300/** 309/**
@@ -308,7 +317,9 @@ struct fw_cdev_event_phy_packet {
308 * @iso_resource: Valid if @common.type == 317 * @iso_resource: Valid if @common.type ==
309 * %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or 318 * %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or
310 * %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 319 * %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED
311 * @phy_packet: Valid if @common.type == %FW_CDEV_EVENT_PHY_PACKET_SENT 320 * @phy_packet: Valid if @common.type ==
321 * %FW_CDEV_EVENT_PHY_PACKET_SENT or
322 * %FW_CDEV_EVENT_PHY_PACKET_RECEIVED
312 * 323 *
313 * Convenience union for userspace use. Events could be read(2) into an 324 * Convenience union for userspace use. Events could be read(2) into an
314 * appropriately aligned char buffer and then cast to this union for further 325 * appropriately aligned char buffer and then cast to this union for further
@@ -360,6 +371,7 @@ union fw_cdev_event {
360 371
361/* available since kernel version 2.6.36 */ 372/* available since kernel version 2.6.36 */
362#define FW_CDEV_IOC_SEND_PHY_PACKET _IOWR('#', 0x15, struct fw_cdev_send_phy_packet) 373#define FW_CDEV_IOC_SEND_PHY_PACKET _IOWR('#', 0x15, struct fw_cdev_send_phy_packet)
374#define FW_CDEV_IOC_RECEIVE_PHY_PACKETS _IOW('#', 0x16, struct fw_cdev_receive_phy_packets)
363 375
364/* 376/*
365 * ABI version history 377 * ABI version history
@@ -376,9 +388,9 @@ union fw_cdev_event {
376 * - shared use and auto-response for FCP registers 388 * - shared use and auto-response for FCP registers
377 * 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable 389 * 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable
378 * - added %FW_CDEV_IOC_GET_CYCLE_TIMER2 390 * - added %FW_CDEV_IOC_GET_CYCLE_TIMER2
379 * 4 (2.6.36) - added %FW_CDEV_EVENT_REQUEST2, %FW_CDEV_EVENT_PHY_PACKET_SENT 391 * 4 (2.6.36) - added %FW_CDEV_EVENT_REQUEST2, %FW_CDEV_EVENT_PHY_PACKET_*
380 * - implemented &fw_cdev_event_bus_reset.bm_node_id 392 * - implemented &fw_cdev_event_bus_reset.bm_node_id
381 * - added %FW_CDEV_IOC_SEND_PHY_PACKET 393 * - added %FW_CDEV_IOC_SEND_PHY_PACKET, _RECEIVE_PHY_PACKETS
382 */ 394 */
383#define FW_CDEV_VERSION 3 /* Meaningless; don't use this macro. */ 395#define FW_CDEV_VERSION 3 /* Meaningless; don't use this macro. */
384 396
@@ -850,4 +862,17 @@ struct fw_cdev_send_phy_packet {
850 __u32 generation; 862 __u32 generation;
851}; 863};
852 864
865/**
866 * struct fw_cdev_receive_phy_packets - start reception of PHY packets
867 * @closure: Passed back to userspace in phy packet events
868 *
869 * This ioctl activates issuing of %FW_CDEV_EVENT_PHY_PACKET_RECEIVED due to
870 * incoming PHY packets from any node on the same bus as the device.
871 *
872 * The ioctl is only permitted on device files which represent a local node.
873 */
874struct fw_cdev_receive_phy_packets {
875 __u64 closure;
876};
877
853#endif /* _LINUX_FIREWIRE_CDEV_H */ 878#endif /* _LINUX_FIREWIRE_CDEV_H */
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index 0c38b8e97722..d974aa4a24c9 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -111,9 +111,10 @@ struct fw_card {
111 bool beta_repeaters_present; 111 bool beta_repeaters_present;
112 112
113 int index; 113 int index;
114
115 struct list_head link; 114 struct list_head link;
116 115
116 struct list_head phy_receiver_list;
117
117 struct delayed_work br_work; /* bus reset job */ 118 struct delayed_work br_work; /* bus reset job */
118 bool br_short; 119 bool br_short;
119 120