aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-06-24 09:31:54 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-07-09 18:07:41 -0400
commit53c96b41742a2dadd14e65c23fc119f2a2fd9f05 (patch)
tree44593ed2871181d95772ffb740e912c9585672d8 /drivers
parent77bba7aea7dc833caa34761fa7ce081a40a14493 (diff)
ieee1394: remove old isochronous ABI
Based on patch "the scheduled removal of RAW1394_REQ_ISO_{SEND,LISTEN}" from Adrian Bunk, November 20 2006. This patch also removes the underlying facilities in ohci1394 and disables them in pcilynx. That is, hpsb_host_driver.devctl() and hpsb_host_driver.transmit_packet() are no longer used for iso reception and transmission. Since video1394 and dv1394 only work with ohci1394 and raw1394's rawiso interface has never been implemented in pcilynx, pcilynx is now no longer useful for isochronous applications. raw1394 will still handle the request types but will complete the requests with errors that indicate API version conflicts. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/highlevel.c45
-rw-r--r--drivers/ieee1394/highlevel.h16
-rw-r--r--drivers/ieee1394/hosts.h8
-rw-r--r--drivers/ieee1394/ieee1394_core.c8
-rw-r--r--drivers/ieee1394/ieee1394_core.h5
-rw-r--r--drivers/ieee1394/ieee1394_transactions.c30
-rw-r--r--drivers/ieee1394/ieee1394_transactions.h2
-rw-r--r--drivers/ieee1394/ohci1394.c221
-rw-r--r--drivers/ieee1394/ohci1394.h14
-rw-r--r--drivers/ieee1394/pcilynx.c16
-rw-r--r--drivers/ieee1394/raw1394-private.h5
-rw-r--r--drivers/ieee1394/raw1394.c176
-rw-r--r--drivers/ieee1394/raw1394.h4
13 files changed, 32 insertions, 518 deletions
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c
index 83a493312751..b6425469b6ee 100644
--- a/drivers/ieee1394/highlevel.c
+++ b/drivers/ieee1394/highlevel.c
@@ -483,37 +483,6 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
483 return retval; 483 return retval;
484} 484}
485 485
486/**
487 * hpsb_listen_channel - enable receving a certain isochronous channel
488 *
489 * Reception is handled through the @hl's iso_receive op.
490 */
491int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
492 unsigned int channel)
493{
494 if (channel > 63) {
495 HPSB_ERR("%s called with invalid channel", __FUNCTION__);
496 return -EINVAL;
497 }
498 if (host->iso_listen_count[channel]++ == 0)
499 return host->driver->devctl(host, ISO_LISTEN_CHANNEL, channel);
500 return 0;
501}
502
503/**
504 * hpsb_unlisten_channel - disable receving a certain isochronous channel
505 */
506void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
507 unsigned int channel)
508{
509 if (channel > 63) {
510 HPSB_ERR("%s called with invalid channel", __FUNCTION__);
511 return;
512 }
513 if (--host->iso_listen_count[channel] == 0)
514 host->driver->devctl(host, ISO_UNLISTEN_CHANNEL, channel);
515}
516
517static void init_hpsb_highlevel(struct hpsb_host *host) 486static void init_hpsb_highlevel(struct hpsb_host *host)
518{ 487{
519 INIT_LIST_HEAD(&dummy_zero_addr.host_list); 488 INIT_LIST_HEAD(&dummy_zero_addr.host_list);
@@ -570,20 +539,6 @@ void highlevel_host_reset(struct hpsb_host *host)
570 read_unlock_irqrestore(&hl_irqs_lock, flags); 539 read_unlock_irqrestore(&hl_irqs_lock, flags);
571} 540}
572 541
573void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length)
574{
575 unsigned long flags;
576 struct hpsb_highlevel *hl;
577 int channel = (((quadlet_t *)data)[0] >> 8) & 0x3f;
578
579 read_lock_irqsave(&hl_irqs_lock, flags);
580 list_for_each_entry(hl, &hl_irqs, irq_list) {
581 if (hl->iso_receive)
582 hl->iso_receive(host, channel, data, length);
583 }
584 read_unlock_irqrestore(&hl_irqs_lock, flags);
585}
586
587void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, 542void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
588 void *data, size_t length) 543 void *data, size_t length)
589{ 544{
diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h
index 63474f7ee69d..eb9fe321e09a 100644
--- a/drivers/ieee1394/highlevel.h
+++ b/drivers/ieee1394/highlevel.h
@@ -26,9 +26,7 @@ struct hpsb_address_serve {
26struct hpsb_highlevel { 26struct hpsb_highlevel {
27 const char *name; 27 const char *name;
28 28
29 /* Any of the following pointers can legally be NULL, except for 29 /* Any of the following pointers can legally be NULL. */
30 * iso_receive which can only be NULL when you don't request
31 * channels. */
32 30
33 /* New host initialized. Will also be called during 31 /* New host initialized. Will also be called during
34 * hpsb_register_highlevel for all hosts already installed. */ 32 * hpsb_register_highlevel for all hosts already installed. */
@@ -43,13 +41,6 @@ struct hpsb_highlevel {
43 * You can not expect to be able to do stock hpsb_reads. */ 41 * You can not expect to be able to do stock hpsb_reads. */
44 void (*host_reset)(struct hpsb_host *host); 42 void (*host_reset)(struct hpsb_host *host);
45 43
46 /* An isochronous packet was received. Channel contains the channel
47 * number for your convenience, it is also contained in the included
48 * packet header (first quadlet, CRCs are missing). You may get called
49 * for channel/host combinations you did not request. */
50 void (*iso_receive)(struct hpsb_host *host, int channel,
51 quadlet_t *data, size_t length);
52
53 /* A write request was received on either the FCP_COMMAND (direction = 44 /* A write request was received on either the FCP_COMMAND (direction =
54 * 0) or the FCP_RESPONSE (direction = 1) register. The cts arg 45 * 0) or the FCP_RESPONSE (direction = 1) register. The cts arg
55 * contains the cts field (first byte of data). */ 46 * contains the cts field (first byte of data). */
@@ -109,7 +100,6 @@ int highlevel_lock(struct hpsb_host *host, int nodeid, quadlet_t *store,
109int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store, 100int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store,
110 u64 addr, octlet_t data, octlet_t arg, int ext_tcode, 101 u64 addr, octlet_t data, octlet_t arg, int ext_tcode,
111 u16 flags); 102 u16 flags);
112void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length);
113void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, 103void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
114 void *data, size_t length); 104 void *data, size_t length);
115 105
@@ -125,10 +115,6 @@ int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
125 struct hpsb_address_ops *ops, u64 start, u64 end); 115 struct hpsb_address_ops *ops, u64 start, u64 end);
126int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, 116int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
127 u64 start); 117 u64 start);
128int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
129 unsigned int channel);
130void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
131 unsigned int channel);
132 118
133void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host); 119void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host);
134void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, 120void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h
index 979fd190f60f..e4e8aeb4d778 100644
--- a/drivers/ieee1394/hosts.h
+++ b/drivers/ieee1394/hosts.h
@@ -28,8 +28,6 @@ struct hpsb_host {
28 struct timer_list timeout; 28 struct timer_list timeout;
29 unsigned long timeout_interval; 29 unsigned long timeout_interval;
30 30
31 unsigned char iso_listen_count[64];
32
33 int node_count; /* number of identified nodes on this bus */ 31 int node_count; /* number of identified nodes on this bus */
34 int selfid_count; /* total number of SelfIDs received */ 32 int selfid_count; /* total number of SelfIDs received */
35 int nodes_active; /* number of nodes with active link layer */ 33 int nodes_active; /* number of nodes with active link layer */
@@ -99,12 +97,6 @@ enum devctl_cmd {
99 /* Cancel all outstanding async requests without resetting the bus. 97 /* Cancel all outstanding async requests without resetting the bus.
100 * Return void. */ 98 * Return void. */
101 CANCEL_REQUESTS, 99 CANCEL_REQUESTS,
102
103 /* Start or stop receiving isochronous channel in arg. Return void.
104 * This acts as an optimization hint, hosts are not required not to
105 * listen on unrequested channels. */
106 ISO_LISTEN_CHANNEL,
107 ISO_UNLISTEN_CHANNEL
108}; 100};
109 101
110enum isoctl_cmd { 102enum isoctl_cmd {
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index 8f71b6a06aa0..0fc8c6e559e4 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -1028,11 +1028,6 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size,
1028 handle_incoming_packet(host, tcode, data, size, write_acked); 1028 handle_incoming_packet(host, tcode, data, size, write_acked);
1029 break; 1029 break;
1030 1030
1031
1032 case TCODE_ISO_DATA:
1033 highlevel_iso_receive(host, data, size);
1034 break;
1035
1036 case TCODE_CYCLE_START: 1031 case TCODE_CYCLE_START:
1037 /* simply ignore this packet if it is passed on */ 1032 /* simply ignore this packet if it is passed on */
1038 break; 1033 break;
@@ -1316,7 +1311,6 @@ EXPORT_SYMBOL(hpsb_make_streampacket);
1316EXPORT_SYMBOL(hpsb_make_lockpacket); 1311EXPORT_SYMBOL(hpsb_make_lockpacket);
1317EXPORT_SYMBOL(hpsb_make_lock64packet); 1312EXPORT_SYMBOL(hpsb_make_lock64packet);
1318EXPORT_SYMBOL(hpsb_make_phypacket); 1313EXPORT_SYMBOL(hpsb_make_phypacket);
1319EXPORT_SYMBOL(hpsb_make_isopacket);
1320EXPORT_SYMBOL(hpsb_read); 1314EXPORT_SYMBOL(hpsb_read);
1321EXPORT_SYMBOL(hpsb_write); 1315EXPORT_SYMBOL(hpsb_write);
1322EXPORT_SYMBOL(hpsb_packet_success); 1316EXPORT_SYMBOL(hpsb_packet_success);
@@ -1327,8 +1321,6 @@ EXPORT_SYMBOL(hpsb_unregister_highlevel);
1327EXPORT_SYMBOL(hpsb_register_addrspace); 1321EXPORT_SYMBOL(hpsb_register_addrspace);
1328EXPORT_SYMBOL(hpsb_unregister_addrspace); 1322EXPORT_SYMBOL(hpsb_unregister_addrspace);
1329EXPORT_SYMBOL(hpsb_allocate_and_register_addrspace); 1323EXPORT_SYMBOL(hpsb_allocate_and_register_addrspace);
1330EXPORT_SYMBOL(hpsb_listen_channel);
1331EXPORT_SYMBOL(hpsb_unlisten_channel);
1332EXPORT_SYMBOL(hpsb_get_hostinfo); 1324EXPORT_SYMBOL(hpsb_get_hostinfo);
1333EXPORT_SYMBOL(hpsb_create_hostinfo); 1325EXPORT_SYMBOL(hpsb_create_hostinfo);
1334EXPORT_SYMBOL(hpsb_destroy_hostinfo); 1326EXPORT_SYMBOL(hpsb_destroy_hostinfo);
diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h
index 11fd324ee045..21d50f73a210 100644
--- a/drivers/ieee1394/ieee1394_core.h
+++ b/drivers/ieee1394/ieee1394_core.h
@@ -24,9 +24,8 @@ struct hpsb_packet {
24 24
25 nodeid_t node_id; 25 nodeid_t node_id;
26 26
27 /* Async and Iso types should be clear, raw means send-as-is, do not 27 /* hpsb_raw = send as-is, do not CRC (but still byte-swap it) */
28 * CRC! Byte swapping shall still be done in this case. */ 28 enum { hpsb_async, hpsb_raw } __attribute__((packed)) type;
29 enum { hpsb_async, hpsb_iso, hpsb_raw } __attribute__((packed)) type;
30 29
31 /* Okay, this is core internal and a no care for hosts. 30 /* Okay, this is core internal and a no care for hosts.
32 * queued = queued for sending 31 * queued = queued for sending
diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c
index 40078ce930c8..c39c70a8aa9f 100644
--- a/drivers/ieee1394/ieee1394_transactions.c
+++ b/drivers/ieee1394/ieee1394_transactions.c
@@ -89,18 +89,6 @@ static void fill_async_lock(struct hpsb_packet *packet, u64 addr, int extcode,
89 packet->expect_response = 1; 89 packet->expect_response = 1;
90} 90}
91 91
92static void fill_iso_packet(struct hpsb_packet *packet, int length, int channel,
93 int tag, int sync)
94{
95 packet->header[0] = (length << 16) | (tag << 14) | (channel << 8)
96 | (TCODE_ISO_DATA << 4) | sync;
97
98 packet->header_size = 4;
99 packet->data_size = length;
100 packet->type = hpsb_iso;
101 packet->tcode = TCODE_ISO_DATA;
102}
103
104static void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data) 92static void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data)
105{ 93{
106 packet->header[0] = data; 94 packet->header[0] = data;
@@ -491,24 +479,6 @@ struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data)
491 return p; 479 return p;
492} 480}
493 481
494struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host,
495 int length, int channel,
496 int tag, int sync)
497{
498 struct hpsb_packet *p;
499
500 p = hpsb_alloc_packet(length);
501 if (!p)
502 return NULL;
503
504 p->host = host;
505 fill_iso_packet(p, length, channel, tag, sync);
506
507 p->generation = get_hpsb_generation(host);
508
509 return p;
510}
511
512/* 482/*
513 * FIXME - these functions should probably read from / write to user space to 483 * FIXME - these functions should probably read from / write to user space to
514 * avoid in kernel buffers for user space callers 484 * avoid in kernel buffers for user space callers
diff --git a/drivers/ieee1394/ieee1394_transactions.h b/drivers/ieee1394/ieee1394_transactions.h
index 86b8ee692ea7..d2d5bc3546d7 100644
--- a/drivers/ieee1394/ieee1394_transactions.h
+++ b/drivers/ieee1394/ieee1394_transactions.h
@@ -19,8 +19,6 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host,
19 nodeid_t node, u64 addr, int extcode, 19 nodeid_t node, u64 addr, int extcode,
20 octlet_t *data, octlet_t arg); 20 octlet_t *data, octlet_t arg);
21struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data); 21struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data);
22struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host, int length,
23 int channel, int tag, int sync);
24struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host, 22struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host,
25 nodeid_t node, u64 addr, 23 nodeid_t node, u64 addr,
26 quadlet_t *buffer, size_t length); 24 quadlet_t *buffer, size_t length);
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index a75b1446b6ed..5667c8102efc 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -157,7 +157,6 @@ static void dma_trm_reset(struct dma_trm_ctx *d);
157static int alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d, 157static int alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
158 enum context_type type, int ctx, int num_desc, 158 enum context_type type, int ctx, int num_desc,
159 int buf_size, int split_buf_size, int context_base); 159 int buf_size, int split_buf_size, int context_base);
160static void stop_dma_rcv_ctx(struct dma_rcv_ctx *d);
161static void free_dma_rcv_ctx(struct dma_rcv_ctx *d); 160static void free_dma_rcv_ctx(struct dma_rcv_ctx *d);
162 161
163static int alloc_dma_trm_ctx(struct ti_ohci *ohci, struct dma_trm_ctx *d, 162static int alloc_dma_trm_ctx(struct ti_ohci *ohci, struct dma_trm_ctx *d,
@@ -520,9 +519,6 @@ static void ohci_initialize(struct ti_ohci *ohci)
520 initialize_dma_trm_ctx(&ohci->at_req_context); 519 initialize_dma_trm_ctx(&ohci->at_req_context);
521 initialize_dma_trm_ctx(&ohci->at_resp_context); 520 initialize_dma_trm_ctx(&ohci->at_resp_context);
522 521
523 /* Initialize IR Legacy DMA channel mask */
524 ohci->ir_legacy_channels = 0;
525
526 /* Accept AR requests from all nodes */ 522 /* Accept AR requests from all nodes */
527 reg_write(ohci, OHCI1394_AsReqFilterHiSet, 0x80000000); 523 reg_write(ohci, OHCI1394_AsReqFilterHiSet, 0x80000000);
528 524
@@ -869,36 +865,9 @@ static int ohci_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
869 return -EOVERFLOW; 865 return -EOVERFLOW;
870 } 866 }
871 867
872 /* Decide whether we have an iso, a request, or a response packet */
873 if (packet->type == hpsb_raw) 868 if (packet->type == hpsb_raw)
874 d = &ohci->at_req_context; 869 d = &ohci->at_req_context;
875 else if ((packet->tcode == TCODE_ISO_DATA) && (packet->type == hpsb_iso)) { 870 else if ((packet->tcode & 0x02) && (packet->tcode != TCODE_ISO_DATA))
876 /* The legacy IT DMA context is initialized on first
877 * use. However, the alloc cannot be run from
878 * interrupt context, so we bail out if that is the
879 * case. I don't see anyone sending ISO packets from
880 * interrupt context anyway... */
881
882 if (ohci->it_legacy_context.ohci == NULL) {
883 if (in_interrupt()) {
884 PRINT(KERN_ERR,
885 "legacy IT context cannot be initialized during interrupt");
886 return -EINVAL;
887 }
888
889 if (alloc_dma_trm_ctx(ohci, &ohci->it_legacy_context,
890 DMA_CTX_ISO, 0, IT_NUM_DESC,
891 OHCI1394_IsoXmitContextBase) < 0) {
892 PRINT(KERN_ERR,
893 "error initializing legacy IT context");
894 return -ENOMEM;
895 }
896
897 initialize_dma_trm_ctx(&ohci->it_legacy_context);
898 }
899
900 d = &ohci->it_legacy_context;
901 } else if ((packet->tcode & 0x02) && (packet->tcode != TCODE_ISO_DATA))
902 d = &ohci->at_resp_context; 871 d = &ohci->at_resp_context;
903 else 872 else
904 d = &ohci->at_req_context; 873 d = &ohci->at_req_context;
@@ -917,9 +886,7 @@ static int ohci_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
917static int ohci_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg) 886static int ohci_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
918{ 887{
919 struct ti_ohci *ohci = host->hostdata; 888 struct ti_ohci *ohci = host->hostdata;
920 int retval = 0; 889 int retval = 0, phy_reg;
921 unsigned long flags;
922 int phy_reg;
923 890
924 switch (cmd) { 891 switch (cmd) {
925 case RESET_BUS: 892 case RESET_BUS:
@@ -1012,117 +979,6 @@ static int ohci_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
1012 dma_trm_reset(&ohci->at_resp_context); 979 dma_trm_reset(&ohci->at_resp_context);
1013 break; 980 break;
1014 981
1015 case ISO_LISTEN_CHANNEL:
1016 {
1017 u64 mask;
1018 struct dma_rcv_ctx *d = &ohci->ir_legacy_context;
1019 int ir_legacy_active;
1020
1021 if (arg<0 || arg>63) {
1022 PRINT(KERN_ERR,
1023 "%s: IS0 listen channel %d is out of range",
1024 __FUNCTION__, arg);
1025 return -EFAULT;
1026 }
1027
1028 mask = (u64)0x1<<arg;
1029
1030 spin_lock_irqsave(&ohci->IR_channel_lock, flags);
1031
1032 if (ohci->ISO_channel_usage & mask) {
1033 PRINT(KERN_ERR,
1034 "%s: IS0 listen channel %d is already used",
1035 __FUNCTION__, arg);
1036 spin_unlock_irqrestore(&ohci->IR_channel_lock, flags);
1037 return -EFAULT;
1038 }
1039
1040 ir_legacy_active = ohci->ir_legacy_channels;
1041
1042 ohci->ISO_channel_usage |= mask;
1043 ohci->ir_legacy_channels |= mask;
1044
1045 spin_unlock_irqrestore(&ohci->IR_channel_lock, flags);
1046
1047 if (!ir_legacy_active) {
1048 if (ohci1394_register_iso_tasklet(ohci,
1049 &ohci->ir_legacy_tasklet) < 0) {
1050 PRINT(KERN_ERR, "No IR DMA context available");
1051 return -EBUSY;
1052 }
1053
1054 /* the IR context can be assigned to any DMA context
1055 * by ohci1394_register_iso_tasklet */
1056 d->ctx = ohci->ir_legacy_tasklet.context;
1057 d->ctrlSet = OHCI1394_IsoRcvContextControlSet +
1058 32*d->ctx;
1059 d->ctrlClear = OHCI1394_IsoRcvContextControlClear +
1060 32*d->ctx;
1061 d->cmdPtr = OHCI1394_IsoRcvCommandPtr + 32*d->ctx;
1062 d->ctxtMatch = OHCI1394_IsoRcvContextMatch + 32*d->ctx;
1063
1064 initialize_dma_rcv_ctx(&ohci->ir_legacy_context, 1);
1065
1066 if (printk_ratelimit())
1067 DBGMSG("IR legacy activated");
1068 }
1069
1070 spin_lock_irqsave(&ohci->IR_channel_lock, flags);
1071
1072 if (arg>31)
1073 reg_write(ohci, OHCI1394_IRMultiChanMaskHiSet,
1074 1<<(arg-32));
1075 else
1076 reg_write(ohci, OHCI1394_IRMultiChanMaskLoSet,
1077 1<<arg);
1078
1079 spin_unlock_irqrestore(&ohci->IR_channel_lock, flags);
1080 DBGMSG("Listening enabled on channel %d", arg);
1081 break;
1082 }
1083 case ISO_UNLISTEN_CHANNEL:
1084 {
1085 u64 mask;
1086
1087 if (arg<0 || arg>63) {
1088 PRINT(KERN_ERR,
1089 "%s: IS0 unlisten channel %d is out of range",
1090 __FUNCTION__, arg);
1091 return -EFAULT;
1092 }
1093
1094 mask = (u64)0x1<<arg;
1095
1096 spin_lock_irqsave(&ohci->IR_channel_lock, flags);
1097
1098 if (!(ohci->ISO_channel_usage & mask)) {
1099 PRINT(KERN_ERR,
1100 "%s: IS0 unlisten channel %d is not used",
1101 __FUNCTION__, arg);
1102 spin_unlock_irqrestore(&ohci->IR_channel_lock, flags);
1103 return -EFAULT;
1104 }
1105
1106 ohci->ISO_channel_usage &= ~mask;
1107 ohci->ir_legacy_channels &= ~mask;
1108
1109 if (arg>31)
1110 reg_write(ohci, OHCI1394_IRMultiChanMaskHiClear,
1111 1<<(arg-32));
1112 else
1113 reg_write(ohci, OHCI1394_IRMultiChanMaskLoClear,
1114 1<<arg);
1115
1116 spin_unlock_irqrestore(&ohci->IR_channel_lock, flags);
1117 DBGMSG("Listening disabled on channel %d", arg);
1118
1119 if (ohci->ir_legacy_channels == 0) {
1120 stop_dma_rcv_ctx(&ohci->ir_legacy_context);
1121 DBGMSG("ISO legacy receive context stopped");
1122 }
1123
1124 break;
1125 }
1126 default: 982 default:
1127 PRINT_G(KERN_ERR, "ohci_devctl cmd %d not implemented yet", 983 PRINT_G(KERN_ERR, "ohci_devctl cmd %d not implemented yet",
1128 cmd); 984 cmd);
@@ -2868,22 +2724,6 @@ static void dma_trm_tasklet (unsigned long data)
2868 spin_unlock_irqrestore(&d->lock, flags); 2724 spin_unlock_irqrestore(&d->lock, flags);
2869} 2725}
2870 2726
2871static void stop_dma_rcv_ctx(struct dma_rcv_ctx *d)
2872{
2873 if (d->ctrlClear) {
2874 ohci1394_stop_context(d->ohci, d->ctrlClear, NULL);
2875
2876 if (d->type == DMA_CTX_ISO) {
2877 /* disable interrupts */
2878 reg_write(d->ohci, OHCI1394_IsoRecvIntMaskClear, 1 << d->ctx);
2879 ohci1394_unregister_iso_tasklet(d->ohci, &d->ohci->ir_legacy_tasklet);
2880 } else {
2881 tasklet_kill(&d->task);
2882 }
2883 }
2884}
2885
2886
2887static void free_dma_rcv_ctx(struct dma_rcv_ctx *d) 2727static void free_dma_rcv_ctx(struct dma_rcv_ctx *d)
2888{ 2728{
2889 int i; 2729 int i;
@@ -3005,18 +2845,11 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
3005 2845
3006 spin_lock_init(&d->lock); 2846 spin_lock_init(&d->lock);
3007 2847
3008 if (type == DMA_CTX_ISO) { 2848 d->ctrlSet = context_base + OHCI1394_ContextControlSet;
3009 ohci1394_init_iso_tasklet(&ohci->ir_legacy_tasklet, 2849 d->ctrlClear = context_base + OHCI1394_ContextControlClear;
3010 OHCI_ISO_MULTICHANNEL_RECEIVE, 2850 d->cmdPtr = context_base + OHCI1394_ContextCommandPtr;
3011 dma_rcv_tasklet, (unsigned long) d);
3012 } else {
3013 d->ctrlSet = context_base + OHCI1394_ContextControlSet;
3014 d->ctrlClear = context_base + OHCI1394_ContextControlClear;
3015 d->cmdPtr = context_base + OHCI1394_ContextCommandPtr;
3016
3017 tasklet_init (&d->task, dma_rcv_tasklet, (unsigned long) d);
3018 }
3019 2851
2852 tasklet_init(&d->task, dma_rcv_tasklet, (unsigned long) d);
3020 return 0; 2853 return 0;
3021} 2854}
3022 2855
@@ -3097,28 +2930,10 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci, struct dma_trm_ctx *d,
3097 spin_lock_init(&d->lock); 2930 spin_lock_init(&d->lock);
3098 2931
3099 /* initialize tasklet */ 2932 /* initialize tasklet */
3100 if (type == DMA_CTX_ISO) { 2933 d->ctrlSet = context_base + OHCI1394_ContextControlSet;
3101 ohci1394_init_iso_tasklet(&ohci->it_legacy_tasklet, OHCI_ISO_TRANSMIT, 2934 d->ctrlClear = context_base + OHCI1394_ContextControlClear;
3102 dma_trm_tasklet, (unsigned long) d); 2935 d->cmdPtr = context_base + OHCI1394_ContextCommandPtr;
3103 if (ohci1394_register_iso_tasklet(ohci, 2936 tasklet_init(&d->task, dma_trm_tasklet, (unsigned long)d);
3104 &ohci->it_legacy_tasklet) < 0) {
3105 PRINT(KERN_ERR, "No IT DMA context available");
3106 free_dma_trm_ctx(d);
3107 return -EBUSY;
3108 }
3109
3110 /* IT can be assigned to any context by register_iso_tasklet */
3111 d->ctx = ohci->it_legacy_tasklet.context;
3112 d->ctrlSet = OHCI1394_IsoXmitContextControlSet + 16 * d->ctx;
3113 d->ctrlClear = OHCI1394_IsoXmitContextControlClear + 16 * d->ctx;
3114 d->cmdPtr = OHCI1394_IsoXmitCommandPtr + 16 * d->ctx;
3115 } else {
3116 d->ctrlSet = context_base + OHCI1394_ContextControlSet;
3117 d->ctrlClear = context_base + OHCI1394_ContextControlClear;
3118 d->cmdPtr = context_base + OHCI1394_ContextCommandPtr;
3119 tasklet_init (&d->task, dma_trm_tasklet, (unsigned long)d);
3120 }
3121
3122 return 0; 2937 return 0;
3123} 2938}
3124 2939
@@ -3344,20 +3159,6 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3344 ohci->ISO_channel_usage = 0; 3159 ohci->ISO_channel_usage = 0;
3345 spin_lock_init(&ohci->IR_channel_lock); 3160 spin_lock_init(&ohci->IR_channel_lock);
3346 3161
3347 /* Allocate the IR DMA context right here so we don't have
3348 * to do it in interrupt path - note that this doesn't
3349 * waste much memory and avoids the jugglery required to
3350 * allocate it in IRQ path. */
3351 if (alloc_dma_rcv_ctx(ohci, &ohci->ir_legacy_context,
3352 DMA_CTX_ISO, 0, IR_NUM_DESC,
3353 IR_BUF_SIZE, IR_SPLIT_BUF_SIZE,
3354 OHCI1394_IsoRcvContextBase) < 0) {
3355 FAIL(-ENOMEM, "Cannot allocate IR Legacy DMA context");
3356 }
3357
3358 /* We hopefully don't have to pre-allocate IT DMA like we did
3359 * for IR DMA above. Allocate it on-demand and mark inactive. */
3360 ohci->it_legacy_context.ohci = NULL;
3361 spin_lock_init(&ohci->event_lock); 3162 spin_lock_init(&ohci->event_lock);
3362 3163
3363 /* 3164 /*
@@ -3450,8 +3251,6 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
3450 free_dma_rcv_ctx(&ohci->ar_resp_context); 3251 free_dma_rcv_ctx(&ohci->ar_resp_context);
3451 free_dma_trm_ctx(&ohci->at_req_context); 3252 free_dma_trm_ctx(&ohci->at_req_context);
3452 free_dma_trm_ctx(&ohci->at_resp_context); 3253 free_dma_trm_ctx(&ohci->at_resp_context);
3453 free_dma_rcv_ctx(&ohci->ir_legacy_context);
3454 free_dma_trm_ctx(&ohci->it_legacy_context);
3455 3254
3456 case OHCI_INIT_HAVE_SELFID_BUFFER: 3255 case OHCI_INIT_HAVE_SELFID_BUFFER:
3457 pci_free_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE, 3256 pci_free_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE,
diff --git a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h
index f1ad539e7c1b..4320bf010495 100644
--- a/drivers/ieee1394/ohci1394.h
+++ b/drivers/ieee1394/ohci1394.h
@@ -190,23 +190,10 @@ struct ti_ohci {
190 unsigned long ir_multichannel_used; /* ditto */ 190 unsigned long ir_multichannel_used; /* ditto */
191 spinlock_t IR_channel_lock; 191 spinlock_t IR_channel_lock;
192 192
193 /* iso receive (legacy API) */
194 u64 ir_legacy_channels; /* note: this differs from ISO_channel_usage;
195 it only accounts for channels listened to
196 by the legacy API, so that we can know when
197 it is safe to free the legacy API context */
198
199 struct dma_rcv_ctx ir_legacy_context;
200 struct ohci1394_iso_tasklet ir_legacy_tasklet;
201
202 /* iso transmit */ 193 /* iso transmit */
203 int nb_iso_xmit_ctx; 194 int nb_iso_xmit_ctx;
204 unsigned long it_ctx_usage; /* use test_and_set_bit() for atomicity */ 195 unsigned long it_ctx_usage; /* use test_and_set_bit() for atomicity */
205 196
206 /* iso transmit (legacy API) */
207 struct dma_trm_ctx it_legacy_context;
208 struct ohci1394_iso_tasklet it_legacy_tasklet;
209
210 u64 ISO_channel_usage; 197 u64 ISO_channel_usage;
211 198
212 /* IEEE-1394 part follows */ 199 /* IEEE-1394 part follows */
@@ -221,7 +208,6 @@ struct ti_ohci {
221 208
222 /* Tasklets for iso receive and transmit, used by video1394 209 /* Tasklets for iso receive and transmit, used by video1394
223 * and dv1394 */ 210 * and dv1394 */
224
225 struct list_head iso_tasklet_list; 211 struct list_head iso_tasklet_list;
226 spinlock_t iso_tasklet_list_lock; 212 spinlock_t iso_tasklet_list_lock;
227 213
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
index 0742befe9227..d1a5bcdb5e0b 100644
--- a/drivers/ieee1394/pcilynx.c
+++ b/drivers/ieee1394/pcilynx.c
@@ -477,7 +477,11 @@ static void send_next(struct ti_lynx *lynx, int what)
477 struct lynx_send_data *d; 477 struct lynx_send_data *d;
478 struct hpsb_packet *packet; 478 struct hpsb_packet *packet;
479 479
480#if 0 /* has been removed from ieee1394 core */
480 d = (what == hpsb_iso ? &lynx->iso_send : &lynx->async); 481 d = (what == hpsb_iso ? &lynx->iso_send : &lynx->async);
482#else
483 d = &lynx->async;
484#endif
481 if (!list_empty(&d->pcl_queue)) { 485 if (!list_empty(&d->pcl_queue)) {
482 PRINT(KERN_ERR, lynx->id, "trying to queue a new packet in nonempty fifo"); 486 PRINT(KERN_ERR, lynx->id, "trying to queue a new packet in nonempty fifo");
483 BUG(); 487 BUG();
@@ -511,9 +515,11 @@ static void send_next(struct ti_lynx *lynx, int what)
511 case hpsb_async: 515 case hpsb_async:
512 pcl.buffer[0].control |= PCL_CMD_XMT; 516 pcl.buffer[0].control |= PCL_CMD_XMT;
513 break; 517 break;
518#if 0 /* has been removed from ieee1394 core */
514 case hpsb_iso: 519 case hpsb_iso:
515 pcl.buffer[0].control |= PCL_CMD_XMT | PCL_ISOMODE; 520 pcl.buffer[0].control |= PCL_CMD_XMT | PCL_ISOMODE;
516 break; 521 break;
522#endif
517 case hpsb_raw: 523 case hpsb_raw:
518 pcl.buffer[0].control |= PCL_CMD_UNFXMT; 524 pcl.buffer[0].control |= PCL_CMD_UNFXMT;
519 break; 525 break;
@@ -542,9 +548,11 @@ static int lynx_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
542 case hpsb_raw: 548 case hpsb_raw:
543 d = &lynx->async; 549 d = &lynx->async;
544 break; 550 break;
551#if 0 /* has been removed from ieee1394 core */
545 case hpsb_iso: 552 case hpsb_iso:
546 d = &lynx->iso_send; 553 d = &lynx->iso_send;
547 break; 554 break;
555#endif
548 default: 556 default:
549 PRINT(KERN_ERR, lynx->id, "invalid packet type %d", 557 PRINT(KERN_ERR, lynx->id, "invalid packet type %d",
550 packet->type); 558 packet->type);
@@ -797,7 +805,7 @@ static int lynx_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
797 } 805 }
798 806
799 break; 807 break;
800 808#if 0 /* has been removed from ieee1394 core */
801 case ISO_LISTEN_CHANNEL: 809 case ISO_LISTEN_CHANNEL:
802 spin_lock_irqsave(&lynx->iso_rcv.lock, flags); 810 spin_lock_irqsave(&lynx->iso_rcv.lock, flags);
803 811
@@ -819,7 +827,7 @@ static int lynx_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
819 827
820 spin_unlock_irqrestore(&lynx->iso_rcv.lock, flags); 828 spin_unlock_irqrestore(&lynx->iso_rcv.lock, flags);
821 break; 829 break;
822 830#endif
823 default: 831 default:
824 PRINT(KERN_ERR, lynx->id, "unknown devctl command %d", cmd); 832 PRINT(KERN_ERR, lynx->id, "unknown devctl command %d", cmd);
825 retval = -1; 833 retval = -1;
@@ -1009,11 +1017,11 @@ static irqreturn_t lynx_irq_handler(int irq, void *dev_id)
1009 pci_unmap_single(lynx->dev, lynx->iso_send.data_dma, 1017 pci_unmap_single(lynx->dev, lynx->iso_send.data_dma,
1010 packet->data_size, PCI_DMA_TODEVICE); 1018 packet->data_size, PCI_DMA_TODEVICE);
1011 } 1019 }
1012 1020#if 0 /* has been removed from ieee1394 core */
1013 if (!list_empty(&lynx->iso_send.queue)) { 1021 if (!list_empty(&lynx->iso_send.queue)) {
1014 send_next(lynx, hpsb_iso); 1022 send_next(lynx, hpsb_iso);
1015 } 1023 }
1016 1024#endif
1017 spin_unlock(&lynx->iso_send.queue_lock); 1025 spin_unlock(&lynx->iso_send.queue_lock);
1018 1026
1019 if (pcl.pcl_status & DMA_CHAN_STAT_PKTCMPL) { 1027 if (pcl.pcl_status & DMA_CHAN_STAT_PKTCMPL) {
diff --git a/drivers/ieee1394/raw1394-private.h b/drivers/ieee1394/raw1394-private.h
index 50daabf6e5fa..a06aaad5b448 100644
--- a/drivers/ieee1394/raw1394-private.h
+++ b/drivers/ieee1394/raw1394-private.h
@@ -36,11 +36,6 @@ struct file_info {
36 36
37 u8 __user *fcp_buffer; 37 u8 __user *fcp_buffer;
38 38
39 /* old ISO API */
40 u64 listen_channels;
41 quadlet_t __user *iso_buffer;
42 size_t iso_buffer_length;
43
44 u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */ 39 u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
45 40
46 /* new rawiso API */ 41 /* new rawiso API */
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 1dadd5a15ba1..336e5ff4cfcf 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -98,21 +98,6 @@ static struct hpsb_address_ops arm_ops = {
98 98
99static void queue_complete_cb(struct pending_request *req); 99static void queue_complete_cb(struct pending_request *req);
100 100
101#include <asm/current.h>
102static void print_old_iso_deprecation(void)
103{
104 static pid_t p;
105
106 if (p == current->pid)
107 return;
108 p = current->pid;
109 printk(KERN_WARNING "raw1394: WARNING - Program \"%s\" uses unsupported"
110 " isochronous request types which will be removed in a next"
111 " kernel release\n", current->comm);
112 printk(KERN_WARNING "raw1394: Update your software to use libraw1394's"
113 " newer interface\n");
114}
115
116static struct pending_request *__alloc_pending_request(gfp_t flags) 101static struct pending_request *__alloc_pending_request(gfp_t flags)
117{ 102{
118 struct pending_request *req; 103 struct pending_request *req;
@@ -297,67 +282,6 @@ static void host_reset(struct hpsb_host *host)
297 spin_unlock_irqrestore(&host_info_lock, flags); 282 spin_unlock_irqrestore(&host_info_lock, flags);
298} 283}
299 284
300static void iso_receive(struct hpsb_host *host, int channel, quadlet_t * data,
301 size_t length)
302{
303 unsigned long flags;
304 struct host_info *hi;
305 struct file_info *fi;
306 struct pending_request *req, *req_next;
307 struct iso_block_store *ibs = NULL;
308 LIST_HEAD(reqs);
309
310 if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) {
311 HPSB_INFO("dropped iso packet");
312 return;
313 }
314
315 spin_lock_irqsave(&host_info_lock, flags);
316 hi = find_host_info(host);
317
318 if (hi != NULL) {
319 list_for_each_entry(fi, &hi->file_info_list, list) {
320 if (!(fi->listen_channels & (1ULL << channel)))
321 continue;
322
323 req = __alloc_pending_request(GFP_ATOMIC);
324 if (!req)
325 break;
326
327 if (!ibs) {
328 ibs = kmalloc(sizeof(*ibs) + length,
329 GFP_ATOMIC);
330 if (!ibs) {
331 kfree(req);
332 break;
333 }
334
335 atomic_add(length, &iso_buffer_size);
336 atomic_set(&ibs->refcount, 0);
337 ibs->data_size = length;
338 memcpy(ibs->data, data, length);
339 }
340
341 atomic_inc(&ibs->refcount);
342
343 req->file_info = fi;
344 req->ibs = ibs;
345 req->data = ibs->data;
346 req->req.type = RAW1394_REQ_ISO_RECEIVE;
347 req->req.generation = get_hpsb_generation(host);
348 req->req.misc = 0;
349 req->req.recvb = ptr2int(fi->iso_buffer);
350 req->req.length = min(length, fi->iso_buffer_length);
351
352 list_add_tail(&req->list, &reqs);
353 }
354 }
355 spin_unlock_irqrestore(&host_info_lock, flags);
356
357 list_for_each_entry_safe(req, req_next, &reqs, list)
358 queue_complete_req(req);
359}
360
361static void fcp_request(struct hpsb_host *host, int nodeid, int direction, 285static void fcp_request(struct hpsb_host *host, int nodeid, int direction,
362 int cts, u8 * data, size_t length) 286 int cts, u8 * data, size_t length)
363{ 287{
@@ -680,43 +604,6 @@ out_set_card:
680 return 0; 604 return 0;
681} 605}
682 606
683static void handle_iso_listen(struct file_info *fi, struct pending_request *req)
684{
685 int channel = req->req.misc;
686
687 if ((channel > 63) || (channel < -64)) {
688 req->req.error = RAW1394_ERROR_INVALID_ARG;
689 } else if (channel >= 0) {
690 /* allocate channel req.misc */
691 if (fi->listen_channels & (1ULL << channel)) {
692 req->req.error = RAW1394_ERROR_ALREADY;
693 } else {
694 if (hpsb_listen_channel
695 (&raw1394_highlevel, fi->host, channel)) {
696 req->req.error = RAW1394_ERROR_ALREADY;
697 } else {
698 fi->listen_channels |= 1ULL << channel;
699 fi->iso_buffer = int2ptr(req->req.recvb);
700 fi->iso_buffer_length = req->req.length;
701 }
702 }
703 } else {
704 /* deallocate channel (one's complement neg) req.misc */
705 channel = ~channel;
706
707 if (fi->listen_channels & (1ULL << channel)) {
708 hpsb_unlisten_channel(&raw1394_highlevel, fi->host,
709 channel);
710 fi->listen_channels &= ~(1ULL << channel);
711 } else {
712 req->req.error = RAW1394_ERROR_INVALID_ARG;
713 }
714 }
715
716 req->req.length = 0;
717 queue_complete_req(req);
718}
719
720static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) 607static void handle_fcp_listen(struct file_info *fi, struct pending_request *req)
721{ 608{
722 if (req->req.misc) { 609 if (req->req.misc) {
@@ -890,50 +777,6 @@ static int handle_async_request(struct file_info *fi,
890 return 0; 777 return 0;
891} 778}
892 779
893static int handle_iso_send(struct file_info *fi, struct pending_request *req,
894 int channel)
895{
896 unsigned long flags;
897 struct hpsb_packet *packet;
898
899 packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f,
900 (req->req.misc >> 16) & 0x3,
901 req->req.misc & 0xf);
902 if (!packet)
903 return -ENOMEM;
904
905 packet->speed_code = req->req.address & 0x3;
906
907 req->packet = packet;
908
909 if (copy_from_user(packet->data, int2ptr(req->req.sendb),
910 req->req.length)) {
911 req->req.error = RAW1394_ERROR_MEMFAULT;
912 req->req.length = 0;
913 queue_complete_req(req);
914 return 0;
915 }
916
917 req->req.length = 0;
918 hpsb_set_packet_complete_task(packet,
919 (void (*)(void *))queue_complete_req,
920 req);
921
922 spin_lock_irqsave(&fi->reqlists_lock, flags);
923 list_add_tail(&req->list, &fi->req_pending);
924 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
925
926 /* Update the generation of the packet just before sending. */
927 packet->generation = req->req.generation;
928
929 if (hpsb_send_packet(packet) < 0) {
930 req->req.error = RAW1394_ERROR_SEND_ERROR;
931 queue_complete_req(req);
932 }
933
934 return 0;
935}
936
937static int handle_async_send(struct file_info *fi, struct pending_request *req) 780static int handle_async_send(struct file_info *fi, struct pending_request *req)
938{ 781{
939 unsigned long flags; 782 unsigned long flags;
@@ -2317,10 +2160,6 @@ static int state_connected(struct file_info *fi, struct pending_request *req)
2317 queue_complete_req(req); 2160 queue_complete_req(req);
2318 return 0; 2161 return 0;
2319 2162
2320 case RAW1394_REQ_ISO_SEND:
2321 print_old_iso_deprecation();
2322 return handle_iso_send(fi, req, node);
2323
2324 case RAW1394_REQ_ARM_REGISTER: 2163 case RAW1394_REQ_ARM_REGISTER:
2325 return arm_register(fi, req); 2164 return arm_register(fi, req);
2326 2165
@@ -2336,9 +2175,12 @@ static int state_connected(struct file_info *fi, struct pending_request *req)
2336 case RAW1394_REQ_RESET_NOTIFY: 2175 case RAW1394_REQ_RESET_NOTIFY:
2337 return reset_notification(fi, req); 2176 return reset_notification(fi, req);
2338 2177
2178 case RAW1394_REQ_ISO_SEND:
2339 case RAW1394_REQ_ISO_LISTEN: 2179 case RAW1394_REQ_ISO_LISTEN:
2340 print_old_iso_deprecation(); 2180 printk(KERN_DEBUG "raw1394: old iso ABI has been removed\n");
2341 handle_iso_listen(fi, req); 2181 req->req.error = RAW1394_ERROR_COMPAT;
2182 req->req.misc = RAW1394_KERNELAPI_VERSION;
2183 queue_complete_req(req);
2342 return 0; 2184 return 0;
2343 2185
2344 case RAW1394_REQ_FCP_LISTEN: 2186 case RAW1394_REQ_FCP_LISTEN:
@@ -2965,14 +2807,7 @@ static int raw1394_release(struct inode *inode, struct file *file)
2965 if (fi->iso_state != RAW1394_ISO_INACTIVE) 2807 if (fi->iso_state != RAW1394_ISO_INACTIVE)
2966 raw1394_iso_shutdown(fi); 2808 raw1394_iso_shutdown(fi);
2967 2809
2968 for (i = 0; i < 64; i++) {
2969 if (fi->listen_channels & (1ULL << i)) {
2970 hpsb_unlisten_channel(&raw1394_highlevel, fi->host, i);
2971 }
2972 }
2973
2974 spin_lock_irqsave(&host_info_lock, flags); 2810 spin_lock_irqsave(&host_info_lock, flags);
2975 fi->listen_channels = 0;
2976 2811
2977 fail = 0; 2812 fail = 0;
2978 /* set address-entries invalid */ 2813 /* set address-entries invalid */
@@ -3134,7 +2969,6 @@ static struct hpsb_highlevel raw1394_highlevel = {
3134 .add_host = add_host, 2969 .add_host = add_host,
3135 .remove_host = remove_host, 2970 .remove_host = remove_host,
3136 .host_reset = host_reset, 2971 .host_reset = host_reset,
3137 .iso_receive = iso_receive,
3138 .fcp_request = fcp_request, 2972 .fcp_request = fcp_request,
3139}; 2973};
3140 2974
diff --git a/drivers/ieee1394/raw1394.h b/drivers/ieee1394/raw1394.h
index 7bd22ee1afbb..963ac20373d2 100644
--- a/drivers/ieee1394/raw1394.h
+++ b/drivers/ieee1394/raw1394.h
@@ -17,11 +17,11 @@
17#define RAW1394_REQ_ASYNC_WRITE 101 17#define RAW1394_REQ_ASYNC_WRITE 101
18#define RAW1394_REQ_LOCK 102 18#define RAW1394_REQ_LOCK 102
19#define RAW1394_REQ_LOCK64 103 19#define RAW1394_REQ_LOCK64 103
20#define RAW1394_REQ_ISO_SEND 104 20#define RAW1394_REQ_ISO_SEND 104 /* removed ABI, now a no-op */
21#define RAW1394_REQ_ASYNC_SEND 105 21#define RAW1394_REQ_ASYNC_SEND 105
22#define RAW1394_REQ_ASYNC_STREAM 106 22#define RAW1394_REQ_ASYNC_STREAM 106
23 23
24#define RAW1394_REQ_ISO_LISTEN 200 24#define RAW1394_REQ_ISO_LISTEN 200 /* removed ABI, now a no-op */
25#define RAW1394_REQ_FCP_LISTEN 201 25#define RAW1394_REQ_FCP_LISTEN 201
26#define RAW1394_REQ_RESET_BUS 202 26#define RAW1394_REQ_RESET_BUS 202
27#define RAW1394_REQ_GET_ROM 203 27#define RAW1394_REQ_GET_ROM 203