aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/hosts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/hosts.c')
-rw-r--r--drivers/ieee1394/hosts.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c
index 32a130921938..6164a9a83396 100644
--- a/drivers/ieee1394/hosts.c
+++ b/drivers/ieee1394/hosts.c
@@ -94,14 +94,6 @@ static int alloc_hostnum_cb(struct hpsb_host *host, void *__data)
94 return 0; 94 return 0;
95} 95}
96 96
97/*
98 * The pending_packet_queue is special in that it's processed
99 * from hardirq context too (such as hpsb_bus_reset()). Hence
100 * split the lock class from the usual networking skb-head
101 * lock class by using a separate key for it:
102 */
103static struct lock_class_key pending_packet_queue_key;
104
105static DEFINE_MUTEX(host_num_alloc); 97static DEFINE_MUTEX(host_num_alloc);
106 98
107/** 99/**
@@ -137,9 +129,7 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
137 h->hostdata = h + 1; 129 h->hostdata = h + 1;
138 h->driver = drv; 130 h->driver = drv;
139 131
140 skb_queue_head_init(&h->pending_packet_queue); 132 INIT_LIST_HEAD(&h->pending_packets);
141 lockdep_set_class(&h->pending_packet_queue.lock,
142 &pending_packet_queue_key);
143 INIT_LIST_HEAD(&h->addr_space); 133 INIT_LIST_HEAD(&h->addr_space);
144 134
145 for (i = 2; i < 16; i++) 135 for (i = 2; i < 16; i++)
@@ -190,7 +180,7 @@ int hpsb_add_host(struct hpsb_host *host)
190{ 180{
191 if (hpsb_default_host_entry(host)) 181 if (hpsb_default_host_entry(host))
192 return -ENOMEM; 182 return -ENOMEM;
193 hpsb_add_extra_config_roms(host); 183
194 highlevel_add_host(host); 184 highlevel_add_host(host);
195 return 0; 185 return 0;
196} 186}
@@ -212,12 +202,19 @@ void hpsb_remove_host(struct hpsb_host *host)
212 202
213 host->driver = &dummy_driver; 203 host->driver = &dummy_driver;
214 highlevel_remove_host(host); 204 highlevel_remove_host(host);
215 hpsb_remove_extra_config_roms(host);
216 205
217 class_device_unregister(&host->class_dev); 206 class_device_unregister(&host->class_dev);
218 device_unregister(&host->device); 207 device_unregister(&host->device);
219} 208}
220 209
210/**
211 * hpsb_update_config_rom_image - updates configuration ROM image of a host
212 *
213 * Updates the configuration ROM image of a host. rom_version must be the
214 * current version, otherwise it will fail with return value -1. If this
215 * host does not support config-rom-update, it will return -%EINVAL.
216 * Return value 0 indicates success.
217 */
221int hpsb_update_config_rom_image(struct hpsb_host *host) 218int hpsb_update_config_rom_image(struct hpsb_host *host)
222{ 219{
223 unsigned long reset_delay; 220 unsigned long reset_delay;