ieee1394: remove old isochronous ABI
RFC PATCH 1/1 ieee1394: remove old isochronous ABI
Date: Sun, 24 Jun 2007 15:31:54 +0200 (CEST)
From: Stefan Richter <[email protected]>
Subject: [RFC PATCH] 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.
---
This patch has been sent to linux1394-devel and libdc1394-devel and didn't receive a comment.
Documentation/ABI/removed/raw1394_legacy_isochronous | 16 Documentation/feature-removal-schedule.txt | 10 drivers/ieee1394/highlevel.c | 45 -- drivers/ieee1394/highlevel.h | 16 drivers/ieee1394/hosts.h | 8 drivers/ieee1394/ieee1394_core.c | 8 drivers/ieee1394/ieee1394_core.h | 5 drivers/ieee1394/ieee1394_transactions.c | 30 - drivers/ieee1394/ieee1394_transactions.h | 2 drivers/ieee1394/ohci1394.c | 221 ----------- drivers/ieee1394/ohci1394.h | 14 drivers/ieee1394/pcilynx.c | 16 drivers/ieee1394/raw1394-private.h | 5 drivers/ieee1394/raw1394.c | 176 -------- drivers/ieee1394/raw1394.h | 4 15 files changed, 48 insertions(+), 528 deletions(-)
Documentation/ABI/removed/raw1394_legacy_isochronous new file +16 -0
@@ -0,0 +1,16 @@ +What: legacy isochronous ABI of raw1394 (1st generation iso ABI) +Date: June 2007 (scheduled), removed in kernel v2.6.23 +Contact: [email protected] +Description: + The two request types RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN have + been deprecated for quite some time. They are very inefficient as they + come with high interrupt load and several layers of callbacks for each + packet. Because of these deficiencies, the video1394 and dv1394 drivers + and the 3rd-generation isochronous ABI in raw1394 (rawiso) were created. + +Users: + libraw1394 users via the long deprecated API raw1394_iso_write, + raw1394_start_iso_write, raw1394_start_iso_rcv, raw1394_stop_iso_rcv + + libdc1394, which optionally uses these old libraw1394 calls + alternatively to the more efficient video1394 ABI
Documentation/feature-removal-schedule.txt +0 -10
@@ -49,16 +49,6 @@ Who: Adrian Bunk <[email protected]> --------------------------- -What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN -When: June 2007 -Why: Deprecated in favour of the more efficient and robust rawiso interface. - Affected are applications which use the deprecated part of libraw1394 - (raw1394_iso_write, raw1394_start_iso_write, raw1394_start_iso_rcv, - raw1394_stop_iso_rcv) or bypass libraw1394. -Who: Dan Dennedy <[email protected]>, Stefan Richter <[email protected]> - ---------------------------- - What: old NCR53C9x driver When: October 2007 Why: Replaced by the much better esp_scsi driver. Actual low-level
drivers/ieee1394/raw1394.h +2 -2
@@ -17,11 +17,11 @@#define RAW1394_REQ_ASYNC_WRITE 101#define RAW1394_REQ_LOCK 102#define RAW1394_REQ_LOCK64 103 -#define RAW1394_REQ_ISO_SEND 104 +#define RAW1394_REQ_ISO_SEND 104/* removed ABI, now a no-op */ #define RAW1394_REQ_ASYNC_SEND 105#define RAW1394_REQ_ASYNC_STREAM 106 -#define RAW1394_REQ_ISO_LISTEN 200 +#define RAW1394_REQ_ISO_LISTEN 200/* removed ABI, now a no-op */ #define RAW1394_REQ_FCP_LISTEN 201#define RAW1394_REQ_RESET_BUS 202#define RAW1394_REQ_GET_ROM 203
drivers/ieee1394/raw1394-private.h +0 -5
@@ -36,11 +36,6 @@ struct file_info {u8 __user *fcp_buffer; -/* old ISO API */ -u64 listen_channels; -quadlet_t __user *iso_buffer; -size_t iso_buffer_length; -u8 notification;/* (busreset-notification) RAW1394_NOTIFY_OFF/ON */ /* new rawiso API */
drivers/ieee1394/raw1394.c +5 -171
226 lines not on this page · raw message
drivers/ieee1394/highlevel.c +0 -45
57 lines not on this page · raw message
drivers/ieee1394/highlevel.h +1 -15
@@ -26,9 +26,7 @@ struct hpsb_address_serve {struct hpsb_highlevel {const char *name; -/* Any of the following pointers can legally be NULL, except for -* iso_receive which can only be NULL when you don't request -* channels. */ +/* Any of the following pointers can legally be NULL. */ /* New host initialized. Will also be called during * hpsb_register_highlevel for all hosts already installed. */
@@ -43,13 +41,6 @@ struct hpsb_highlevel {* You can not expect to be able to do stock hpsb_reads. */ void (*host_reset)(struct hpsb_host *host); -/* An isochronous packet was received. Channel contains the channel -* number for your convenience, it is also contained in the included -* packet header (first quadlet, CRCs are missing). You may get called -* for channel/host combinations you did not request. */ -void (*iso_receive)(struct hpsb_host *host,int channel, -quadlet_t *data,size_t length); -/* A write request was received on either the FCP_COMMAND (direction = * 0) or the FCP_RESPONSE (direction = 1) register. The cts arg * contains the cts field (first byte of data). */
@@ -109,7 +100,6 @@ int highlevel_lock(struct hpsb_host *hosint highlevel_lock64 (struct hpsb_host *host,int nodeid,octlet_t *store,u64 addr,octlet_t data,octlet_t arg,int ext_tcode,u16 flags); -void highlevel_iso_receive (struct hpsb_host *host,void *data,size_t length);void highlevel_fcp_request (struct hpsb_host *host,int nodeid,int direction,void *data,size_t length);
@@ -125,10 +115,6 @@ int hpsb_register_addrspace(struct hpsb_ struct hpsb_address_ops *ops, u64 start, u64 end);int hpsb_unregister_addrspace (struct hpsb_highlevel *hl,struct hpsb_host *host,u64 start); -int hpsb_listen_channel (struct hpsb_highlevel *hl,struct hpsb_host *host, -unsigned int channel); -void hpsb_unlisten_channel (struct hpsb_highlevel *hl,struct hpsb_host *host, -unsigned int channel);void *hpsb_get_hostinfo (struct hpsb_highlevel *hl,struct hpsb_host *host); void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
drivers/ieee1394/ieee1394_core.c +0 -8
@@ -1028,11 +1028,6 @@ void hpsb_packet_received(struct hpsb_hohandle_incoming_packet (host, tcode, data, size, write_acked);break ; - -case TCODE_ISO_DATA : -highlevel_iso_receive (host, data, size); -break ; -case TCODE_CYCLE_START :/* simply ignore this packet if it is passed on */ break ;
@@ -1316,7 +1311,6 @@ EXPORT_SYMBOL(hpsb_make_streampacket);EXPORT_SYMBOL (hpsb_make_lockpacket);EXPORT_SYMBOL (hpsb_make_lock64packet);EXPORT_SYMBOL (hpsb_make_phypacket); -EXPORT_SYMBOL (hpsb_make_isopacket);EXPORT_SYMBOL (hpsb_read);EXPORT_SYMBOL (hpsb_write);EXPORT_SYMBOL (hpsb_packet_success);
@@ -1327,8 +1321,6 @@ EXPORT_SYMBOL(hpsb_unregister_highlevel)EXPORT_SYMBOL (hpsb_register_addrspace);EXPORT_SYMBOL (hpsb_unregister_addrspace);EXPORT_SYMBOL (hpsb_allocate_and_register_addrspace); -EXPORT_SYMBOL (hpsb_listen_channel); -EXPORT_SYMBOL (hpsb_unlisten_channel);EXPORT_SYMBOL (hpsb_get_hostinfo);EXPORT_SYMBOL (hpsb_create_hostinfo);EXPORT_SYMBOL (hpsb_destroy_hostinfo);
drivers/ieee1394/ieee1394_transactions.c +0 -30
@@ -89,18 +89,6 @@ static void fill_async_lock(struct hpsb_ packet->expect_response =1 ; } -static void fill_iso_packet (struct hpsb_packet *packet,int length,int channel, -int tag,int sync) -{ - packet->header[0 ] = (length <<16 ) | (tag <<14 ) | (channel <<8 ) - | (TCODE_ISO_DATA <<4 ) | sync; - - packet->header_size =4 ; - packet->data_size = length; - packet->type = hpsb_iso; - packet->tcode =TCODE_ISO_DATA ; -} -static void fill_phy_packet (struct hpsb_packet *packet,quadlet_t data) { packet->header[0 ] = data;
@@ -491,24 +479,6 @@ struct hpsb_packet *hpsb_make_phypacket(return p; } -struct hpsb_packet *hpsb_make_isopacket (struct hpsb_host *host, -int length,int channel, -int tag,int sync) -{ -struct hpsb_packet *p; - - p =hpsb_alloc_packet (length); -if (!p) -return NULL ; - - p->host = host; -fill_iso_packet (p, length, channel, tag, sync); - - p->generation =get_hpsb_generation (host); - -return p; -} -/* * FIXME - these functions should probably read from / write to user space to * avoid in kernel buffers for user space callers
drivers/ieee1394/ieee1394_transactions.h +0 -2
@@ -19,8 +19,6 @@ struct hpsb_packet *hpsb_make_lock64pack nodeid_t node, u64 addr, int extcode, octlet_t *data, octlet_t arg);struct hpsb_packet *hpsb_make_phypacket (struct hpsb_host *host,quadlet_t data); -struct hpsb_packet *hpsb_make_isopacket (struct hpsb_host *host,int length, -int channel,int tag,int sync);struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host,nodeid_t node,u64 addr,quadlet_t *buffer,size_t length);
drivers/ieee1394/ieee1394_core.h +2 -3
@@ -24,9 +24,8 @@ struct hpsb_packet {nodeid_t node_id; -/* Async and Iso types should be clear, raw means send-as-is, do not -* CRC! Byte swapping shall still be done in this case. */ -enum { hpsb_async, hpsb_iso, hpsb_raw } __attribute__((packed)) type; +/* hpsb_raw = send as-is, do not CRC (but still byte-swap it) */ +enum { hpsb_async, hpsb_raw } __attribute__((packed)) type;/* Okay, this is core internal and a no care for hosts. * queued = queued for sending
drivers/ieee1394/hosts.h +0 -8
@@ -28,8 +28,6 @@ struct hpsb_host {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 */
@@ -99,12 +97,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 {
drivers/ieee1394/ohci1394.c +10 -211
284 lines not on this page · raw message
drivers/ieee1394/ohci1394.h +0 -14
@@ -190,23 +190,10 @@ struct ti_ohci {unsigned long ir_multichannel_used;/* ditto */ spinlock_t IR_channel_lock; -/* iso receive (legacy API) */ -u64 ir_legacy_channels;/* note: this differs from ISO_channel_usage; -it only accounts for channels listened to -by the legacy API, so that we can know when -it is safe to free the legacy API context */ - -struct dma_rcv_ctx ir_legacy_context; -struct ohci1394_iso_tasklet ir_legacy_tasklet; -/* iso transmit */ int nb_iso_xmit_ctx;unsigned long it_ctx_usage;/* use test_and_set_bit() for atomicity */ -/* iso transmit (legacy API) */ -struct dma_trm_ctx it_legacy_context; -struct ohci1394_iso_tasklet it_legacy_tasklet; -u64 ISO_channel_usage;/* IEEE-1394 part follows */
@@ -221,7 +208,6 @@ struct ti_ohci {/* Tasklets for iso receive and transmit, used by video1394 * and dv1394 */ -struct list_head iso_tasklet_list;spinlock_t iso_tasklet_list_lock;
drivers/ieee1394/pcilynx.c +12 -4
@@ -477,7 +477,11 @@ static void send_next(struct ti_lynx *lystruct lynx_send_data *d;struct hpsb_packet *packet; +#if 0 /* has been removed from ieee1394 core */ d = (what == hpsb_iso ? &lynx->iso_send : &lynx->async); +#else + d = &lynx->async; +#endif if (!list_empty (&d->pcl_queue)) {KERN_ERR , lynx->id,"trying to queue a new packet in nonempty fifo" );BUG ();
@@ -511,9 +515,11 @@ static void send_next(struct ti_lynx *lycase hpsb_async: pcl.buffer[0 ].control |=PCL_CMD_XMT ;break ; +#if 0 /* has been removed from ieee1394 core */ case hpsb_iso: pcl.buffer[0 ].control |=PCL_CMD_XMT |PCL_ISOMODE ;break ; +#endif case hpsb_raw: pcl.buffer[0 ].control |=PCL_CMD_UNFXMT ;break ;
@@ -542,9 +548,11 @@ static int lynx_transmit(struct hpsb_hoscase hpsb_raw: d = &lynx->async;break ; +#if 0 /* has been removed from ieee1394 core */ case hpsb_iso: d = &lynx->iso_send;break ; +#endif default :KERN_ERR , lynx->id,"invalid packet type %d" , packet->type);
@@ -797,7 +805,7 @@ static int lynx_devctl(struct hpsb_host }break ; - +#if 0 /* has been removed from ieee1394 core */ case ISO_LISTEN_CHANNEL :spin_lock_irqsave (&lynx->iso_rcv.lock, flags);
@@ -819,7 +827,7 @@ static int lynx_devctl(struct hpsb_hostspin_unlock_irqrestore (&lynx->iso_rcv.lock, flags);break ; - +#endif default :KERN_ERR , lynx->id,"unknown devctl command %d" , cmd); retval =-1 ;
@@ -1009,11 +1017,11 @@ static irqreturn_t lynx_irq_handler(intpci_unmap_single (lynx->dev, lynx->iso_send.data_dma, packet->data_size,PCI_DMA_TODEVICE ); } - +#if 0 /* has been removed from ieee1394 core */ if (!list_empty (&lynx->iso_send.queue)) {send_next (lynx, hpsb_iso); } - +#endif spin_unlock (&lynx->iso_send.queue_lock);if (pcl.pcl_status &DMA_CHAN_STAT_PKTCMPL ) {
Signature · 3 lines
Stefan Richter -=====-=-=== -=== -=--= http://arcgraph.de/sr/