]> err.no Git - linux-2.6/blobdiff - drivers/ieee1394/hosts.c
ieee1394: stricter error checks in csr1212
[linux-2.6] / drivers / ieee1394 / hosts.c
index ee82a5320bf7b5c353db56485c2b1ab31f673b33..615ba62080131161ec1298ba529e06e3db1d216b 100644 (file)
@@ -190,14 +190,19 @@ int hpsb_add_host(struct hpsb_host *host)
 {
        if (hpsb_default_host_entry(host))
                return -ENOMEM;
-
        hpsb_add_extra_config_roms(host);
-
        highlevel_add_host(host);
-
        return 0;
 }
 
+void hpsb_resume_host(struct hpsb_host *host)
+{
+       if (host->driver->set_hw_config_rom)
+               host->driver->set_hw_config_rom(host,
+                                               host->csr.rom->bus_info_data);
+       host->driver->devctl(host, RESET_BUS, SHORT_RESET);
+}
+
 void hpsb_remove_host(struct hpsb_host *host)
 {
        host->is_shutdown = 1;
@@ -206,15 +211,21 @@ void hpsb_remove_host(struct hpsb_host *host)
        flush_scheduled_work();
 
        host->driver = &dummy_driver;
-
        highlevel_remove_host(host);
-
        hpsb_remove_extra_config_roms(host);
 
        class_device_unregister(&host->class_dev);
        device_unregister(&host->device);
 }
 
+/**
+ * hpsb_update_config_rom_image - updates configuration ROM image of a host
+ *
+ * Updates the configuration ROM image of a host.  rom_version must be the
+ * current version, otherwise it will fail with return value -1. If this
+ * host does not support config-rom-update, it will return -%EINVAL.
+ * Return value 0 indicates success.
+ */
 int hpsb_update_config_rom_image(struct hpsb_host *host)
 {
        unsigned long reset_delay;