Loading drivers/ieee1394/ieee1394_transactions.c +195 −193 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ #include "nodemgr.h" #include "ieee1394_transactions.h" #define PREP_ASYNC_HEAD_ADDRESS(tc) \ packet->tcode = tc; \ packet->header[0] = (packet->node_id << 16) | (packet->tlabel << 10) \ Loading @@ -32,7 +31,6 @@ packet->header[1] = (packet->host->node_id << 16) | (addr >> 32); \ packet->header[2] = addr & 0xffffffff static void fill_async_readquad(struct hpsb_packet *packet, u64 addr) { PREP_ASYNC_HEAD_ADDRESS(TCODE_READQ); Loading @@ -41,7 +39,8 @@ static void fill_async_readquad(struct hpsb_packet *packet, u64 addr) packet->expect_response = 1; } static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length) static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length) { PREP_ASYNC_HEAD_ADDRESS(TCODE_READB); packet->header[3] = length << 16; Loading @@ -50,7 +49,8 @@ static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int lengt packet->expect_response = 1; } static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data) static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data) { PREP_ASYNC_HEAD_ADDRESS(TCODE_WRITEQ); packet->header[3] = data; Loading @@ -59,7 +59,8 @@ static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t packet->expect_response = 1; } static void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length) static void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length) { PREP_ASYNC_HEAD_ADDRESS(TCODE_WRITEB); packet->header[3] = length << 16; Loading Loading @@ -186,8 +187,6 @@ void hpsb_free_tlabel(struct hpsb_packet *packet) up(&tp->count); } int hpsb_packet_success(struct hpsb_packet *packet) { switch (packet->ack_code) { Loading Loading @@ -229,7 +228,6 @@ int hpsb_packet_success(struct hpsb_packet *packet) return -EAGAIN; } case ACK_DATA_ERROR: if (packet->tcode == TCODE_WRITEB || packet->tcode == TCODE_LOCK_REQUEST) { Loading Loading @@ -290,7 +288,8 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node, } struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host, nodeid_t node, u64 addr, quadlet_t *buffer, size_t length) u64 addr, quadlet_t * buffer, size_t length) { struct hpsb_packet *packet; Loading Loading @@ -323,8 +322,9 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node return packet; } struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, int length, int channel, int tag, int sync) struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 * buffer, int length, int channel, int tag, int sync) { struct hpsb_packet *packet; Loading Loading @@ -353,14 +353,15 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, i } struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node, u64 addr, int extcode, quadlet_t *data, quadlet_t arg) u64 addr, int extcode, quadlet_t * data, quadlet_t arg) { struct hpsb_packet *p; u32 length; p = hpsb_alloc_packet(8); if (!p) return NULL; if (!p) return NULL; p->host = host; p->node_id = node; Loading Loading @@ -389,15 +390,16 @@ struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node, return p; } struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node, u64 addr, int extcode, octlet_t *data, octlet_t arg) struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node, u64 addr, int extcode, octlet_t * data, octlet_t arg) { struct hpsb_packet *p; u32 length; p = hpsb_alloc_packet(16); if (!p) return NULL; if (!p) return NULL; p->host = host; p->node_id = node; Loading Loading @@ -430,13 +432,13 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node return p; } struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data) struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data) { struct hpsb_packet *p; p = hpsb_alloc_packet(0); if (!p) return NULL; if (!p) return NULL; p->host = host; fill_phy_packet(p, data); Loading @@ -451,7 +453,8 @@ struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host, struct hpsb_packet *p; p = hpsb_alloc_packet(length); if (!p) return NULL; if (!p) return NULL; p->host = host; fill_iso_packet(p, length, channel, tag, sync); Loading Loading @@ -505,7 +508,6 @@ hpsb_read_fail: return retval; } int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, u64 addr, quadlet_t * buffer, size_t length) { Loading Loading @@ -568,7 +570,6 @@ hpsb_lock_fail: return retval; } int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, quadlet_t * buffer, size_t length, u32 specifier_id, unsigned int version) Loading @@ -587,7 +588,8 @@ int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, return -ENOMEM; packet->data[0] = cpu_to_be32((host->node_id << 16) | specifier_id_hi); packet->data[1] = cpu_to_be32((specifier_id_lo << 24) | (version & 0x00ffffff)); packet->data[1] = cpu_to_be32((specifier_id_lo << 24) | (version & 0x00ffffff)); memcpy(&(packet->data[2]), buffer, length - 8); Loading Loading
drivers/ieee1394/ieee1394_transactions.c +195 −193 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ #include "nodemgr.h" #include "ieee1394_transactions.h" #define PREP_ASYNC_HEAD_ADDRESS(tc) \ packet->tcode = tc; \ packet->header[0] = (packet->node_id << 16) | (packet->tlabel << 10) \ Loading @@ -32,7 +31,6 @@ packet->header[1] = (packet->host->node_id << 16) | (addr >> 32); \ packet->header[2] = addr & 0xffffffff static void fill_async_readquad(struct hpsb_packet *packet, u64 addr) { PREP_ASYNC_HEAD_ADDRESS(TCODE_READQ); Loading @@ -41,7 +39,8 @@ static void fill_async_readquad(struct hpsb_packet *packet, u64 addr) packet->expect_response = 1; } static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length) static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length) { PREP_ASYNC_HEAD_ADDRESS(TCODE_READB); packet->header[3] = length << 16; Loading @@ -50,7 +49,8 @@ static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int lengt packet->expect_response = 1; } static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data) static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data) { PREP_ASYNC_HEAD_ADDRESS(TCODE_WRITEQ); packet->header[3] = data; Loading @@ -59,7 +59,8 @@ static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t packet->expect_response = 1; } static void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length) static void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length) { PREP_ASYNC_HEAD_ADDRESS(TCODE_WRITEB); packet->header[3] = length << 16; Loading Loading @@ -186,8 +187,6 @@ void hpsb_free_tlabel(struct hpsb_packet *packet) up(&tp->count); } int hpsb_packet_success(struct hpsb_packet *packet) { switch (packet->ack_code) { Loading Loading @@ -229,7 +228,6 @@ int hpsb_packet_success(struct hpsb_packet *packet) return -EAGAIN; } case ACK_DATA_ERROR: if (packet->tcode == TCODE_WRITEB || packet->tcode == TCODE_LOCK_REQUEST) { Loading Loading @@ -290,7 +288,8 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node, } struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host, nodeid_t node, u64 addr, quadlet_t *buffer, size_t length) u64 addr, quadlet_t * buffer, size_t length) { struct hpsb_packet *packet; Loading Loading @@ -323,8 +322,9 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node return packet; } struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, int length, int channel, int tag, int sync) struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 * buffer, int length, int channel, int tag, int sync) { struct hpsb_packet *packet; Loading Loading @@ -353,14 +353,15 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, i } struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node, u64 addr, int extcode, quadlet_t *data, quadlet_t arg) u64 addr, int extcode, quadlet_t * data, quadlet_t arg) { struct hpsb_packet *p; u32 length; p = hpsb_alloc_packet(8); if (!p) return NULL; if (!p) return NULL; p->host = host; p->node_id = node; Loading Loading @@ -389,15 +390,16 @@ struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node, return p; } struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node, u64 addr, int extcode, octlet_t *data, octlet_t arg) struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node, u64 addr, int extcode, octlet_t * data, octlet_t arg) { struct hpsb_packet *p; u32 length; p = hpsb_alloc_packet(16); if (!p) return NULL; if (!p) return NULL; p->host = host; p->node_id = node; Loading Loading @@ -430,13 +432,13 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node return p; } struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data) struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data) { struct hpsb_packet *p; p = hpsb_alloc_packet(0); if (!p) return NULL; if (!p) return NULL; p->host = host; fill_phy_packet(p, data); Loading @@ -451,7 +453,8 @@ struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host, struct hpsb_packet *p; p = hpsb_alloc_packet(length); if (!p) return NULL; if (!p) return NULL; p->host = host; fill_iso_packet(p, length, channel, tag, sync); Loading Loading @@ -505,7 +508,6 @@ hpsb_read_fail: return retval; } int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, u64 addr, quadlet_t * buffer, size_t length) { Loading Loading @@ -568,7 +570,6 @@ hpsb_lock_fail: return retval; } int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, quadlet_t * buffer, size_t length, u32 specifier_id, unsigned int version) Loading @@ -587,7 +588,8 @@ int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, return -ENOMEM; packet->data[0] = cpu_to_be32((host->node_id << 16) | specifier_id_hi); packet->data[1] = cpu_to_be32((specifier_id_lo << 24) | (version & 0x00ffffff)); packet->data[1] = cpu_to_be32((specifier_id_lo << 24) | (version & 0x00ffffff)); memcpy(&(packet->data[2]), buffer, length - 8); Loading