<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/scsi_sysfs.c, branch v2.6.26.8</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[SCSI] fix intermittent oops in scsi_bus_uevent</title>
<updated>2008-05-23T21:17:06+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-05-22T11:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f42ea7bc0ddfadebd9e1c5362b41b53902dbcb1'/>
<id>1f42ea7bc0ddfadebd9e1c5362b41b53902dbcb1</id>
<content type='text'>
Reported-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
&gt; BUG: unable to handle kernel paging request at e6f17fac
&gt; IP: [&lt;c02604d6&gt;] scsi_bus_uevent+0x1/0x17
&gt; *pde = 2714b163 *pte = 26f17160
&gt; Oops: 0000 [#1] DEBUG_PAGEALLOC
&gt; last sysfs file:
&gt;
&gt; Pid:  1, comm: swapper Not tainted (2.6.26-rc2-next-20080516skw #30)
&gt; EIP: 0060:[&lt;c02604d6&gt;] EFLAGS: 00010282 CPU: 0
&gt; EIP is at scsi_bus_uevent+0x1/0x17
&gt; EAX: e6f18014 EBX: e6f18014 ECX: c02604d5 EDX: e7173000
&gt; ESI: e7173000 EDI: e7173000 EBP: e7851ca0 ESP: e7851c90
&gt;  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068

The problem is caused by:

commit b0ed43360fdca227048d88a08290365cb681c1a8
Author: Hannes Reinecke &lt;hare@suse.de&gt;
Date:   Tue Mar 18 14:32:28 2008 +0100

    [SCSI] add scsi_host and scsi_target to scsi_bus

which added scsi_bus_type to the struct scsi_target device.  This
causes both the scsi_device and scsi_target to fire scsi_bus_uevents.
However, the actualy scsi_bus_uevent() call assumes blindly that it's
a struct scsi_device.  Check for this and return immediately if it
isn't.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Sitsofe Wheeler &lt;sitsofe@yahoo.com&gt;
&gt; BUG: unable to handle kernel paging request at e6f17fac
&gt; IP: [&lt;c02604d6&gt;] scsi_bus_uevent+0x1/0x17
&gt; *pde = 2714b163 *pte = 26f17160
&gt; Oops: 0000 [#1] DEBUG_PAGEALLOC
&gt; last sysfs file:
&gt;
&gt; Pid:  1, comm: swapper Not tainted (2.6.26-rc2-next-20080516skw #30)
&gt; EIP: 0060:[&lt;c02604d6&gt;] EFLAGS: 00010282 CPU: 0
&gt; EIP is at scsi_bus_uevent+0x1/0x17
&gt; EAX: e6f18014 EBX: e6f18014 ECX: c02604d5 EDX: e7173000
&gt; ESI: e7173000 EDI: e7173000 EBP: e7851ca0 ESP: e7851c90
&gt;  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068

The problem is caused by:

commit b0ed43360fdca227048d88a08290365cb681c1a8
Author: Hannes Reinecke &lt;hare@suse.de&gt;
Date:   Tue Mar 18 14:32:28 2008 +0100

    [SCSI] add scsi_host and scsi_target to scsi_bus

which added scsi_bus_type to the struct scsi_target device.  This
causes both the scsi_device and scsi_target to fire scsi_bus_uevents.
However, the actualy scsi_bus_uevent() call assumes blindly that it's
a struct scsi_device.  Check for this and return immediately if it
isn't.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] bsg: add release callback support</title>
<updated>2008-04-22T20:16:32+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-04-18T15:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97f46ae45c70857e459b7f8df1fc2807e7bd90a9'/>
<id>97f46ae45c70857e459b7f8df1fc2807e7bd90a9</id>
<content type='text'>
This patch adds release callback support, which is called when a bsg
device goes away. bsg_register_queue() takes a pointer to a callback
function. This feature is useful for stuff like sas_host that can't
use the release callback in struct device.

If a caller doesn't need bsg's release callback, it can call
bsg_register_queue() with NULL pointer (e.g. scsi devices can use
release callback in struct device so they don't need bsg's callback).

With this patch, bsg uses kref for refcounts on bsg devices instead of
get/put_device in fops-&gt;open/release. bsg calls put_device and the
caller's release callback (if it was registered) in kref_put's
release.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds release callback support, which is called when a bsg
device goes away. bsg_register_queue() takes a pointer to a callback
function. This feature is useful for stuff like sas_host that can't
use the release callback in struct device.

If a caller doesn't need bsg's release callback, it can call
bsg_register_queue() with NULL pointer (e.g. scsi devices can use
release callback in struct device so they don't need bsg's callback).

With this patch, bsg uses kref for refcounts on bsg devices instead of
get/put_device in fops-&gt;open/release. bsg calls put_device and the
caller's release callback (if it was registered) in kref_put's
release.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] rework scsi_target allocation</title>
<updated>2008-04-22T20:16:31+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-03-23T03:42:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=643eb2d932c97a0583381629d632d486934cf7ee'/>
<id>643eb2d932c97a0583381629d632d486934cf7ee</id>
<content type='text'>
The current target allocation code registeres each possible target
with sysfs; it will be deleted again if no useable LUN on this target
was found. This results in a string of 'target add/target remove' uevents.

Based on a patch by Hannes Reinecke &lt;hare@suse.de&gt; this patch reworks
the target allocation code so that only uevents for existing targets
are sent. The sysfs registration is split off from the existing
scsi_target_alloc() into a in a new scsi_add_target() function, which
should be called whenever an existing target is found. Only then a
uevent is sent, so we'll be generating events for existing targets
only.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current target allocation code registeres each possible target
with sysfs; it will be deleted again if no useable LUN on this target
was found. This results in a string of 'target add/target remove' uevents.

Based on a patch by Hannes Reinecke &lt;hare@suse.de&gt; this patch reworks
the target allocation code so that only uevents for existing targets
are sent. The sysfs registration is split off from the existing
scsi_target_alloc() into a in a new scsi_add_target() function, which
should be called whenever an existing target is found. Only then a
uevent is sent, so we'll be generating events for existing targets
only.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] use default attributes for scsi_host</title>
<updated>2008-04-22T20:16:31+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2008-03-18T13:32:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f7120a4f75168df3c02efacd10403a4ba0bcb29d'/>
<id>f7120a4f75168df3c02efacd10403a4ba0bcb29d</id>
<content type='text'>
This patch removes the unused sysfs attibute overwriting logic for
the scsi host attibutes, and plugs them into the driver core default
attribute creation.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes the unused sysfs attibute overwriting logic for
the scsi host attibutes, and plugs them into the driver core default
attribute creation.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] add scsi_host and scsi_target to scsi_bus</title>
<updated>2008-04-22T20:16:29+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2008-03-18T13:32:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0ed43360fdca227048d88a08290365cb681c1a8'/>
<id>b0ed43360fdca227048d88a08290365cb681c1a8</id>
<content type='text'>
This patch implements scsi_host and scsi_target device types
and adds both to the scsi_bus.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements scsi_host and scsi_target device types
and adds both to the scsi_bus.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: convert struct class_device to struct device</title>
<updated>2008-04-20T02:10:33+00:00</updated>
<author>
<name>Tony Jones</name>
<email>tonyj@suse.de</email>
</author>
<published>2008-02-21T23:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ee959b00c335d7780136c5abda37809191fe52c3'/>
<id>ee959b00c335d7780136c5abda37809191fe52c3</id>
<content type='text'>
It's big, but there doesn't seem to be a way to split it up smaller...

Signed-off-by: Tony Jones &lt;tonyj@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Roland Dreier &lt;rolandd@cisco.com&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Hal Rosenstock &lt;hal.rosenstock@gmail.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's big, but there doesn't seem to be a way to split it up smaller...

Signed-off-by: Tony Jones &lt;tonyj@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Roland Dreier &lt;rolandd@cisco.com&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Hal Rosenstock &lt;hal.rosenstock@gmail.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[SCSI] fix bsg queue oops with iscsi logout"</title>
<updated>2008-03-26T16:09:19+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-03-26T16:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0feed274d2dfa2162d2c37c254eede96926d3717'/>
<id>0feed274d2dfa2162d2c37c254eede96926d3717</id>
<content type='text'>
This reverts commit 4b6f5b3a993cbe34b4280f252bccc76967c185c8.

bsg takes a reference to the underlying generic device, so it's
impossible to unregister bsg in the device release routine.

Acked-by: FUJITA Tomonori &lt;tomof@acm.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 4b6f5b3a993cbe34b4280f252bccc76967c185c8.

bsg takes a reference to the underlying generic device, so it's
impossible to unregister bsg in the device release routine.

Acked-by: FUJITA Tomonori &lt;tomof@acm.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] fix bsg queue oops with iscsi logout</title>
<updated>2008-03-13T21:47:05+00:00</updated>
<author>
<name>Mike Christie</name>
<email>michaelc@cs.wisc.edu</email>
</author>
<published>2008-03-11T05:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b6f5b3a993cbe34b4280f252bccc76967c185c8'/>
<id>4b6f5b3a993cbe34b4280f252bccc76967c185c8</id>
<content type='text'>
Delay bsg unregistration, because we want to wait until all the request/cmds
have released their reference.

Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Delay bsg unregistration, because we want to wait until all the request/cmds
have released their reference.

Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] add missing transport configure points for target and host</title>
<updated>2008-01-23T17:29:17+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-01-05T15:38:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d52b3815a52456dcf1a45fbc344e23bb643b2bda'/>
<id>d52b3815a52456dcf1a45fbc344e23bb643b2bda</id>
<content type='text'>
While trying to convert the SPI transport class to attribute groups, I
discovered that we don't actually have any transport configure points
for either the target or the host.  This patch adds these missing
transport class triggers.  The host one is simply done after the add,
the target one tries to be more clever and add it after devices may have
been placed on the target (so the device configure will have set up the
target parameters).

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While trying to convert the SPI transport class to attribute groups, I
discovered that we don't actually have any transport configure points
for either the target or the host.  This patch adds these missing
transport class triggers.  The host one is simply done after the add,
the target one tries to be more clever and add it after devices may have
been placed on the target (so the device configure will have set up the
target parameters).

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] scsi_sysfs: restore prep_fn when ULD is removed</title>
<updated>2008-01-02T19:08:00+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-01-02T17:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=751bf4d7865e4ced406be93b04c7436d866d3684'/>
<id>751bf4d7865e4ced406be93b04c7436d866d3684</id>
<content type='text'>
A recent bug report:

http://bugzilla.kernel.org/show_bug.cgi?id=9674

Was caused because the ULDs now set their own prep functions, but
don't necessarily reset the prep function back to the SCSI default
when they are removed.  This leads to panics if commands are sent to
the device after the module is removed because the prep_fn is still
pointing to the old module code.  The fix for this is to implement a
bus remove method that resets the prep_fn pointer correctly before
calling the ULD specific driver remove method.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A recent bug report:

http://bugzilla.kernel.org/show_bug.cgi?id=9674

Was caused because the ULDs now set their own prep functions, but
don't necessarily reset the prep function back to the SCSI default
when they are removed.  This leads to panics if commands are sent to
the device after the module is removed because the prep_fn is still
pointing to the old module code.  The fix for this is to implement a
bus remove method that resets the prep_fn pointer correctly before
calling the ULD specific driver remove method.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
