Loading Documentation/scsi/aic7xxx.txt +5 −1 Original line number Diff line number Diff line ==================================================================== = Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v6.2.28 = = Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v7.0 = = README for = = The Linux Operating System = ==================================================================== Loading Loading @@ -131,6 +131,10 @@ The following information is available in this file: SCSI "stub" effects. 2. Version History 7.0 (4th August, 2005) - Updated driver to use SCSI transport class infrastructure - Upported sequencer and core fixes from last adaptec released version of the driver. 6.2.36 (June 3rd, 2003) - Correct code that disables PCI parity error checking. - Correct and simplify handling of the ignore wide residue Loading Documentation/scsi/scsi_mid_low_api.txt +0 −41 Original line number Diff line number Diff line Loading @@ -373,13 +373,11 @@ Summary: scsi_activate_tcq - turn on tag command queueing scsi_add_device - creates new scsi device (lu) instance scsi_add_host - perform sysfs registration and SCSI bus scan. scsi_add_timer - (re-)start timer on a SCSI command. scsi_adjust_queue_depth - change the queue depth on a SCSI device scsi_assign_lock - replace default host_lock with given lock scsi_bios_ptable - return copy of block device's partition table scsi_block_requests - prevent further commands being queued to given host scsi_deactivate_tcq - turn off tag command queueing scsi_delete_timer - cancel timer on a SCSI command. scsi_host_alloc - return a new scsi_host instance whose refcount==1 scsi_host_get - increments Scsi_Host instance's refcount scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) Loading Loading @@ -457,27 +455,6 @@ struct scsi_device * scsi_add_device(struct Scsi_Host *shost, int scsi_add_host(struct Scsi_Host *shost, struct device * dev) /** * scsi_add_timer - (re-)start timer on a SCSI command. * @scmd: pointer to scsi command instance * @timeout: duration of timeout in "jiffies" * @complete: pointer to function to call if timeout expires * * Returns nothing * * Might block: no * * Notes: Each scsi command has its own timer, and as it is added * to the queue, we set up the timer. When the command completes, * we cancel the timer. An LLD can use this function to change * the existing timeout value. * * Defined in: drivers/scsi/scsi_error.c **/ void scsi_add_timer(struct scsi_cmnd *scmd, int timeout, void (*complete)(struct scsi_cmnd *)) /** * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device * @sdev: pointer to SCSI device to change queue depth on Loading Loading @@ -565,24 +542,6 @@ void scsi_block_requests(struct Scsi_Host * shost) void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) /** * scsi_delete_timer - cancel timer on a SCSI command. * @scmd: pointer to scsi command instance * * Returns 1 if able to cancel timer else 0 (i.e. too late or already * cancelled). * * Might block: no [may in the future if it invokes del_timer_sync()] * * Notes: All commands issued by upper levels already have a timeout * associated with them. An LLD can use this function to cancel the * timer. * * Defined in: drivers/scsi/scsi_error.c **/ int scsi_delete_timer(struct scsi_cmnd *scmd) /** * scsi_host_alloc - create a scsi host adapter instance and perform basic * initialization. Loading MAINTAINERS +7 −0 Original line number Diff line number Diff line Loading @@ -822,6 +822,13 @@ L: emu10k1-devel@lists.sourceforge.net W: http://sourceforge.net/projects/emu10k1/ S: Maintained EMULEX LPFC FC SCSI DRIVER P: James Smart M: james.smart@emulex.com L: linux-scsi@vger.kernel.org W: http://sourceforge.net/projects/lpfcxxxx S: Supported EPSON 1355 FRAMEBUFFER DRIVER P: Christopher Hoover M: ch@murgatroid.com, ch@hpl.hp.com Loading drivers/base/attribute_container.c +76 −10 Original line number Diff line number Diff line Loading @@ -22,11 +22,26 @@ /* This is a private structure used to tie the classdev and the * container .. it should never be visible outside this file */ struct internal_container { struct list_head node; struct klist_node node; struct attribute_container *cont; struct class_device classdev; }; static void internal_container_klist_get(struct klist_node *n) { struct internal_container *ic = container_of(n, struct internal_container, node); class_device_get(&ic->classdev); } static void internal_container_klist_put(struct klist_node *n) { struct internal_container *ic = container_of(n, struct internal_container, node); class_device_put(&ic->classdev); } /** * attribute_container_classdev_to_container - given a classdev, return the container * Loading Loading @@ -57,7 +72,8 @@ int attribute_container_register(struct attribute_container *cont) { INIT_LIST_HEAD(&cont->node); INIT_LIST_HEAD(&cont->containers); klist_init(&cont->containers,internal_container_klist_get, internal_container_klist_put); down(&attribute_container_mutex); list_add_tail(&cont->node, &attribute_container_list); Loading @@ -77,11 +93,13 @@ attribute_container_unregister(struct attribute_container *cont) { int retval = -EBUSY; down(&attribute_container_mutex); if (!list_empty(&cont->containers)) spin_lock(&cont->containers.k_lock); if (!list_empty(&cont->containers.k_list)) goto out; retval = 0; list_del(&cont->node); out: spin_unlock(&cont->containers.k_lock); up(&attribute_container_mutex); return retval; Loading Loading @@ -140,7 +158,6 @@ attribute_container_add_device(struct device *dev, continue; } memset(ic, 0, sizeof(struct internal_container)); INIT_LIST_HEAD(&ic->node); ic->cont = cont; class_device_initialize(&ic->classdev); ic->classdev.dev = get_device(dev); Loading @@ -151,11 +168,22 @@ attribute_container_add_device(struct device *dev, fn(cont, dev, &ic->classdev); else attribute_container_add_class_device(&ic->classdev); list_add_tail(&ic->node, &cont->containers); klist_add_tail(&ic->node, &cont->containers); } up(&attribute_container_mutex); } /* FIXME: can't break out of this unless klist_iter_exit is also * called before doing the break */ #define klist_for_each_entry(pos, head, member, iter) \ for (klist_iter_init(head, iter); (pos = ({ \ struct klist_node *n = klist_next(iter); \ n ? container_of(n, typeof(*pos), member) : \ ({ klist_iter_exit(iter) ; NULL; }); \ }) ) != NULL; ) /** * attribute_container_remove_device - make device eligible for removal. * Loading @@ -182,17 +210,19 @@ attribute_container_remove_device(struct device *dev, down(&attribute_container_mutex); list_for_each_entry(cont, &attribute_container_list, node) { struct internal_container *ic, *tmp; struct internal_container *ic; struct klist_iter iter; if (attribute_container_no_classdevs(cont)) continue; if (!cont->match(cont, dev)) continue; list_for_each_entry_safe(ic, tmp, &cont->containers, node) { klist_for_each_entry(ic, &cont->containers, node, &iter) { if (dev != ic->classdev.dev) continue; list_del(&ic->node); klist_del(&ic->node); if (fn) fn(cont, dev, &ic->classdev); else { Loading Loading @@ -225,12 +255,18 @@ attribute_container_device_trigger(struct device *dev, down(&attribute_container_mutex); list_for_each_entry(cont, &attribute_container_list, node) { struct internal_container *ic, *tmp; struct internal_container *ic; struct klist_iter iter; if (!cont->match(cont, dev)) continue; list_for_each_entry_safe(ic, tmp, &cont->containers, node) { if (attribute_container_no_classdevs(cont)) { fn(cont, dev, NULL); continue; } klist_for_each_entry(ic, &cont->containers, node, &iter) { if (dev == ic->classdev.dev) fn(cont, dev, &ic->classdev); } Loading Loading @@ -368,6 +404,36 @@ attribute_container_class_device_del(struct class_device *classdev) } EXPORT_SYMBOL_GPL(attribute_container_class_device_del); /** * attribute_container_find_class_device - find the corresponding class_device * * @cont: the container * @dev: the generic device * * Looks up the device in the container's list of class devices and returns * the corresponding class_device. */ struct class_device * attribute_container_find_class_device(struct attribute_container *cont, struct device *dev) { struct class_device *cdev = NULL; struct internal_container *ic; struct klist_iter iter; klist_for_each_entry(ic, &cont->containers, node, &iter) { if (ic->classdev.dev == dev) { cdev = &ic->classdev; /* FIXME: must exit iterator then break */ klist_iter_exit(&iter); break; } } return cdev; } EXPORT_SYMBOL_GPL(attribute_container_find_class_device); int __init attribute_container_init(void) { Loading drivers/base/transport_class.c +12 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * This file is licensed under GPLv2 * * The basic idea here is to allow any "device controller" (which * would most often be a Host Bus Adapter" to use the services of one * would most often be a Host Bus Adapter to use the services of one * or more tranport classes for performing transport specific * services. Transport specific services are things that the generic * command layer doesn't want to know about (speed settings, line Loading Loading @@ -64,7 +64,9 @@ void transport_class_unregister(struct transport_class *tclass) } EXPORT_SYMBOL_GPL(transport_class_unregister); static int anon_transport_dummy_function(struct device *dev) static int anon_transport_dummy_function(struct transport_container *tc, struct device *dev, struct class_device *cdev) { /* do nothing */ return 0; Loading Loading @@ -115,9 +117,10 @@ static int transport_setup_classdev(struct attribute_container *cont, struct class_device *classdev) { struct transport_class *tclass = class_to_transport_class(cont->class); struct transport_container *tcont = attribute_container_to_transport_container(cont); if (tclass->setup) tclass->setup(dev); tclass->setup(tcont, dev, classdev); return 0; } Loading Loading @@ -178,12 +181,14 @@ void transport_add_device(struct device *dev) EXPORT_SYMBOL_GPL(transport_add_device); static int transport_configure(struct attribute_container *cont, struct device *dev) struct device *dev, struct class_device *cdev) { struct transport_class *tclass = class_to_transport_class(cont->class); struct transport_container *tcont = attribute_container_to_transport_container(cont); if (tclass->configure) tclass->configure(dev); tclass->configure(tcont, dev, cdev); return 0; } Loading @@ -202,7 +207,7 @@ static int transport_configure(struct attribute_container *cont, */ void transport_configure_device(struct device *dev) { attribute_container_trigger(dev, transport_configure); attribute_container_device_trigger(dev, transport_configure); } EXPORT_SYMBOL_GPL(transport_configure_device); Loading @@ -215,7 +220,7 @@ static int transport_remove_classdev(struct attribute_container *cont, struct transport_class *tclass = class_to_transport_class(cont->class); if (tclass->remove) tclass->remove(dev); tclass->remove(tcont, dev, classdev); if (tclass->remove != anon_transport_dummy_function) { if (tcont->statistics) Loading Loading
Documentation/scsi/aic7xxx.txt +5 −1 Original line number Diff line number Diff line ==================================================================== = Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v6.2.28 = = Adaptec Aic7xxx Fast -> Ultra160 Family Manager Set v7.0 = = README for = = The Linux Operating System = ==================================================================== Loading Loading @@ -131,6 +131,10 @@ The following information is available in this file: SCSI "stub" effects. 2. Version History 7.0 (4th August, 2005) - Updated driver to use SCSI transport class infrastructure - Upported sequencer and core fixes from last adaptec released version of the driver. 6.2.36 (June 3rd, 2003) - Correct code that disables PCI parity error checking. - Correct and simplify handling of the ignore wide residue Loading
Documentation/scsi/scsi_mid_low_api.txt +0 −41 Original line number Diff line number Diff line Loading @@ -373,13 +373,11 @@ Summary: scsi_activate_tcq - turn on tag command queueing scsi_add_device - creates new scsi device (lu) instance scsi_add_host - perform sysfs registration and SCSI bus scan. scsi_add_timer - (re-)start timer on a SCSI command. scsi_adjust_queue_depth - change the queue depth on a SCSI device scsi_assign_lock - replace default host_lock with given lock scsi_bios_ptable - return copy of block device's partition table scsi_block_requests - prevent further commands being queued to given host scsi_deactivate_tcq - turn off tag command queueing scsi_delete_timer - cancel timer on a SCSI command. scsi_host_alloc - return a new scsi_host instance whose refcount==1 scsi_host_get - increments Scsi_Host instance's refcount scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) Loading Loading @@ -457,27 +455,6 @@ struct scsi_device * scsi_add_device(struct Scsi_Host *shost, int scsi_add_host(struct Scsi_Host *shost, struct device * dev) /** * scsi_add_timer - (re-)start timer on a SCSI command. * @scmd: pointer to scsi command instance * @timeout: duration of timeout in "jiffies" * @complete: pointer to function to call if timeout expires * * Returns nothing * * Might block: no * * Notes: Each scsi command has its own timer, and as it is added * to the queue, we set up the timer. When the command completes, * we cancel the timer. An LLD can use this function to change * the existing timeout value. * * Defined in: drivers/scsi/scsi_error.c **/ void scsi_add_timer(struct scsi_cmnd *scmd, int timeout, void (*complete)(struct scsi_cmnd *)) /** * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device * @sdev: pointer to SCSI device to change queue depth on Loading Loading @@ -565,24 +542,6 @@ void scsi_block_requests(struct Scsi_Host * shost) void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) /** * scsi_delete_timer - cancel timer on a SCSI command. * @scmd: pointer to scsi command instance * * Returns 1 if able to cancel timer else 0 (i.e. too late or already * cancelled). * * Might block: no [may in the future if it invokes del_timer_sync()] * * Notes: All commands issued by upper levels already have a timeout * associated with them. An LLD can use this function to cancel the * timer. * * Defined in: drivers/scsi/scsi_error.c **/ int scsi_delete_timer(struct scsi_cmnd *scmd) /** * scsi_host_alloc - create a scsi host adapter instance and perform basic * initialization. Loading
MAINTAINERS +7 −0 Original line number Diff line number Diff line Loading @@ -822,6 +822,13 @@ L: emu10k1-devel@lists.sourceforge.net W: http://sourceforge.net/projects/emu10k1/ S: Maintained EMULEX LPFC FC SCSI DRIVER P: James Smart M: james.smart@emulex.com L: linux-scsi@vger.kernel.org W: http://sourceforge.net/projects/lpfcxxxx S: Supported EPSON 1355 FRAMEBUFFER DRIVER P: Christopher Hoover M: ch@murgatroid.com, ch@hpl.hp.com Loading
drivers/base/attribute_container.c +76 −10 Original line number Diff line number Diff line Loading @@ -22,11 +22,26 @@ /* This is a private structure used to tie the classdev and the * container .. it should never be visible outside this file */ struct internal_container { struct list_head node; struct klist_node node; struct attribute_container *cont; struct class_device classdev; }; static void internal_container_klist_get(struct klist_node *n) { struct internal_container *ic = container_of(n, struct internal_container, node); class_device_get(&ic->classdev); } static void internal_container_klist_put(struct klist_node *n) { struct internal_container *ic = container_of(n, struct internal_container, node); class_device_put(&ic->classdev); } /** * attribute_container_classdev_to_container - given a classdev, return the container * Loading Loading @@ -57,7 +72,8 @@ int attribute_container_register(struct attribute_container *cont) { INIT_LIST_HEAD(&cont->node); INIT_LIST_HEAD(&cont->containers); klist_init(&cont->containers,internal_container_klist_get, internal_container_klist_put); down(&attribute_container_mutex); list_add_tail(&cont->node, &attribute_container_list); Loading @@ -77,11 +93,13 @@ attribute_container_unregister(struct attribute_container *cont) { int retval = -EBUSY; down(&attribute_container_mutex); if (!list_empty(&cont->containers)) spin_lock(&cont->containers.k_lock); if (!list_empty(&cont->containers.k_list)) goto out; retval = 0; list_del(&cont->node); out: spin_unlock(&cont->containers.k_lock); up(&attribute_container_mutex); return retval; Loading Loading @@ -140,7 +158,6 @@ attribute_container_add_device(struct device *dev, continue; } memset(ic, 0, sizeof(struct internal_container)); INIT_LIST_HEAD(&ic->node); ic->cont = cont; class_device_initialize(&ic->classdev); ic->classdev.dev = get_device(dev); Loading @@ -151,11 +168,22 @@ attribute_container_add_device(struct device *dev, fn(cont, dev, &ic->classdev); else attribute_container_add_class_device(&ic->classdev); list_add_tail(&ic->node, &cont->containers); klist_add_tail(&ic->node, &cont->containers); } up(&attribute_container_mutex); } /* FIXME: can't break out of this unless klist_iter_exit is also * called before doing the break */ #define klist_for_each_entry(pos, head, member, iter) \ for (klist_iter_init(head, iter); (pos = ({ \ struct klist_node *n = klist_next(iter); \ n ? container_of(n, typeof(*pos), member) : \ ({ klist_iter_exit(iter) ; NULL; }); \ }) ) != NULL; ) /** * attribute_container_remove_device - make device eligible for removal. * Loading @@ -182,17 +210,19 @@ attribute_container_remove_device(struct device *dev, down(&attribute_container_mutex); list_for_each_entry(cont, &attribute_container_list, node) { struct internal_container *ic, *tmp; struct internal_container *ic; struct klist_iter iter; if (attribute_container_no_classdevs(cont)) continue; if (!cont->match(cont, dev)) continue; list_for_each_entry_safe(ic, tmp, &cont->containers, node) { klist_for_each_entry(ic, &cont->containers, node, &iter) { if (dev != ic->classdev.dev) continue; list_del(&ic->node); klist_del(&ic->node); if (fn) fn(cont, dev, &ic->classdev); else { Loading Loading @@ -225,12 +255,18 @@ attribute_container_device_trigger(struct device *dev, down(&attribute_container_mutex); list_for_each_entry(cont, &attribute_container_list, node) { struct internal_container *ic, *tmp; struct internal_container *ic; struct klist_iter iter; if (!cont->match(cont, dev)) continue; list_for_each_entry_safe(ic, tmp, &cont->containers, node) { if (attribute_container_no_classdevs(cont)) { fn(cont, dev, NULL); continue; } klist_for_each_entry(ic, &cont->containers, node, &iter) { if (dev == ic->classdev.dev) fn(cont, dev, &ic->classdev); } Loading Loading @@ -368,6 +404,36 @@ attribute_container_class_device_del(struct class_device *classdev) } EXPORT_SYMBOL_GPL(attribute_container_class_device_del); /** * attribute_container_find_class_device - find the corresponding class_device * * @cont: the container * @dev: the generic device * * Looks up the device in the container's list of class devices and returns * the corresponding class_device. */ struct class_device * attribute_container_find_class_device(struct attribute_container *cont, struct device *dev) { struct class_device *cdev = NULL; struct internal_container *ic; struct klist_iter iter; klist_for_each_entry(ic, &cont->containers, node, &iter) { if (ic->classdev.dev == dev) { cdev = &ic->classdev; /* FIXME: must exit iterator then break */ klist_iter_exit(&iter); break; } } return cdev; } EXPORT_SYMBOL_GPL(attribute_container_find_class_device); int __init attribute_container_init(void) { Loading
drivers/base/transport_class.c +12 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * This file is licensed under GPLv2 * * The basic idea here is to allow any "device controller" (which * would most often be a Host Bus Adapter" to use the services of one * would most often be a Host Bus Adapter to use the services of one * or more tranport classes for performing transport specific * services. Transport specific services are things that the generic * command layer doesn't want to know about (speed settings, line Loading Loading @@ -64,7 +64,9 @@ void transport_class_unregister(struct transport_class *tclass) } EXPORT_SYMBOL_GPL(transport_class_unregister); static int anon_transport_dummy_function(struct device *dev) static int anon_transport_dummy_function(struct transport_container *tc, struct device *dev, struct class_device *cdev) { /* do nothing */ return 0; Loading Loading @@ -115,9 +117,10 @@ static int transport_setup_classdev(struct attribute_container *cont, struct class_device *classdev) { struct transport_class *tclass = class_to_transport_class(cont->class); struct transport_container *tcont = attribute_container_to_transport_container(cont); if (tclass->setup) tclass->setup(dev); tclass->setup(tcont, dev, classdev); return 0; } Loading Loading @@ -178,12 +181,14 @@ void transport_add_device(struct device *dev) EXPORT_SYMBOL_GPL(transport_add_device); static int transport_configure(struct attribute_container *cont, struct device *dev) struct device *dev, struct class_device *cdev) { struct transport_class *tclass = class_to_transport_class(cont->class); struct transport_container *tcont = attribute_container_to_transport_container(cont); if (tclass->configure) tclass->configure(dev); tclass->configure(tcont, dev, cdev); return 0; } Loading @@ -202,7 +207,7 @@ static int transport_configure(struct attribute_container *cont, */ void transport_configure_device(struct device *dev) { attribute_container_trigger(dev, transport_configure); attribute_container_device_trigger(dev, transport_configure); } EXPORT_SYMBOL_GPL(transport_configure_device); Loading @@ -215,7 +220,7 @@ static int transport_remove_classdev(struct attribute_container *cont, struct transport_class *tclass = class_to_transport_class(cont->class); if (tclass->remove) tclass->remove(dev); tclass->remove(tcont, dev, classdev); if (tclass->remove != anon_transport_dummy_function) { if (tcont->statistics) Loading