Lines Matching refs:scsi_dh
13 #include <scsi/scsi_dh.h>
122 * @scsi_dh - The device handler to attach
125 struct scsi_device_handler *scsi_dh)
129 if (!try_module_get(scsi_dh->module))
132 error = scsi_dh->attach(sdev);
151 scsi_dh->name, error);
152 module_put(scsi_dh->module);
154 sdev->handler = scsi_dh;
195 * @scsi_dh - device handler to be registered.
199 int scsi_register_device_handler(struct scsi_device_handler *scsi_dh)
201 if (__scsi_dh_lookup(scsi_dh->name))
204 if (!scsi_dh->attach || !scsi_dh->detach)
208 list_add(&scsi_dh->list, &scsi_dh_list);
211 printk(KERN_INFO "%s: device handler registered\n", scsi_dh->name);
220 * @scsi_dh - device handler to be unregistered.
224 int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh)
226 if (!__scsi_dh_lookup(scsi_dh->name))
230 list_del(&scsi_dh->list);
232 printk(KERN_INFO "%s: device handler unregistered\n", scsi_dh->name);
323 struct scsi_device_handler *scsi_dh;
330 scsi_dh = scsi_dh_lookup(name);
331 if (!scsi_dh) {
337 if (sdev->handler != scsi_dh)
342 err = scsi_dh_handler_attach(sdev, scsi_dh);