X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fieee1394%2Fhighlevel.c;h=918ffc4fc8ace2923f660d452d6f389a488c8b25;hb=e89e896d31b11a51a54ddcd3f72a76bd286dd86c;hp=83a49331275188e265346f2ed70e753c2f52a010;hpb=5f757f91e70a97eda8f0cc13bddc853209b2d173;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index 83a49331275..918ffc4fc8a 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c @@ -228,10 +228,8 @@ void hpsb_register_highlevel(struct hpsb_highlevel *hl) { unsigned long flags; + hpsb_init_highlevel(hl); INIT_LIST_HEAD(&hl->addr_list); - INIT_LIST_HEAD(&hl->host_info_list); - - rwlock_init(&hl->host_info_lock); down_write(&hl_drivers_sem); list_add_tail(&hl->hl_list, &hl_drivers); @@ -339,7 +337,7 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, if ((alignment & 3) || (alignment > 0x800000000000ULL) || (hweight64(alignment) != 1)) { HPSB_ERR("%s called with invalid alignment: 0x%048llx", - __FUNCTION__, (unsigned long long)alignment); + __func__, (unsigned long long)alignment); return retval; } @@ -354,7 +352,7 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, if (((start|end) & ~align_mask) || (start >= end) || (end > CSR1212_ALL_SPACE_END)) { HPSB_ERR("%s called with invalid addresses " - "(start = %012Lx end = %012Lx)", __FUNCTION__, + "(start = %012Lx end = %012Lx)", __func__, (unsigned long long)start,(unsigned long long)end); return retval; } @@ -422,7 +420,7 @@ int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, if (((start|end) & 3) || (start >= end) || (end > CSR1212_ALL_SPACE_END)) { - HPSB_ERR("%s called with invalid addresses", __FUNCTION__); + HPSB_ERR("%s called with invalid addresses", __func__); return 0; } @@ -483,37 +481,6 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, return retval; } -/** - * hpsb_listen_channel - enable receving a certain isochronous channel - * - * Reception is handled through the @hl's iso_receive op. - */ -int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host, - unsigned int channel) -{ - if (channel > 63) { - HPSB_ERR("%s called with invalid channel", __FUNCTION__); - return -EINVAL; - } - if (host->iso_listen_count[channel]++ == 0) - return host->driver->devctl(host, ISO_LISTEN_CHANNEL, channel); - return 0; -} - -/** - * hpsb_unlisten_channel - disable receving a certain isochronous channel - */ -void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host, - unsigned int channel) -{ - if (channel > 63) { - HPSB_ERR("%s called with invalid channel", __FUNCTION__); - return; - } - if (--host->iso_listen_count[channel] == 0) - host->driver->devctl(host, ISO_UNLISTEN_CHANNEL, channel); -} - static void init_hpsb_highlevel(struct hpsb_host *host) { INIT_LIST_HEAD(&dummy_zero_addr.host_list); @@ -570,20 +537,6 @@ void highlevel_host_reset(struct hpsb_host *host) read_unlock_irqrestore(&hl_irqs_lock, flags); } -void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length) -{ - unsigned long flags; - struct hpsb_highlevel *hl; - int channel = (((quadlet_t *)data)[0] >> 8) & 0x3f; - - read_lock_irqsave(&hl_irqs_lock, flags); - list_for_each_entry(hl, &hl_irqs, irq_list) { - if (hl->iso_receive) - hl->iso_receive(host, channel, data, length); - } - read_unlock_irqrestore(&hl_irqs_lock, flags); -} - void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, void *data, size_t length) {