<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/usb/storage, branch v3.4</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>usb: storage: fix lockdep warning inside usb_stor_pre_reset(v2)</title>
<updated>2012-04-06T20:54:00+00:00</updated>
<author>
<name>Ming Lei</name>
<email>tom.leiming@gmail.com</email>
</author>
<published>2012-03-19T07:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c825bab0cef8b90bab8b63eb5686b8c8eb22e798'/>
<id>c825bab0cef8b90bab8b63eb5686b8c8eb22e798</id>
<content type='text'>
This patch fixes one lockdep warning[1] inside usb_stor_pre_reset.

If the current configuration includes multiple mass storage interfaces,
the 'AA' lockdep warning will be triggered since the lock class of
'us-&gt;dev_mutex' is acquired two times in .reset path. It isn't
a real deadlock, so just take the lockdep_set_class annotation to
remove the warning.

[1], lockdep warning log
:[ INFO: possible recursive locking detected ]
:3.3.0-0.rc5.git3.1.fc17.x86_64 #1 Tainted: G        W
:---------------------------------------------
:usb-storage/14846 is trying to acquire lock:
: (&amp;(us-&gt;dev_mutex)){+.+.+.}, at: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
:but task is already holding lock:
: (&amp;(us-&gt;dev_mutex)){+.+.+.}, at: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
:other info that might help us debug this:
: Possible unsafe locking scenario:
:       CPU0
:       ----
:  lock(&amp;(us-&gt;dev_mutex));
:  lock(&amp;(us-&gt;dev_mutex));
: *** DEADLOCK ***
: May be due to missing lock nesting notation
:2 locks held by usb-storage/14846:
: #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;ffffffff8147e6a5&gt;] usb_lock_device_for_reset+0x95/0x100
: #1:  (&amp;(us-&gt;dev_mutex)){+.+.+.}, at: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
:stack backtrace:
:Pid: 14846, comm: usb-storage Tainted: G        W 3.3.0-0.rc5.git3.1.fc17.x86_64 #1
:Call Trace:
: [&lt;ffffffff810cbdaf&gt;] __lock_acquire+0x168f/0x1bb0
: [&lt;ffffffff81021083&gt;] ? native_sched_clock+0x13/0x80
: [&lt;ffffffff810210f9&gt;] ? sched_clock+0x9/0x10
: [&lt;ffffffff810210f9&gt;] ? sched_clock+0x9/0x10
: [&lt;ffffffff810a2975&gt;] ? sched_clock_local+0x25/0xa0
: [&lt;ffffffff810cc9a1&gt;] lock_acquire+0xa1/0x1e0
: [&lt;ffffffffa0481c0c&gt;] ? usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffff81699c86&gt;] mutex_lock_nested+0x76/0x3a0
: [&lt;ffffffffa0481c0c&gt;] ? usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffffa0481c0c&gt;] ? usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffff8148184d&gt;] usb_reset_device+0x7d/0x190
: [&lt;ffffffffa048119c&gt;] usb_stor_port_reset+0x7c/0x80 [usb_storage]
: [&lt;ffffffffa0481234&gt;] usb_stor_invoke_transport+0x94/0x560 [usb_storage]
: [&lt;ffffffff810cd3b2&gt;] ? mark_held_locks+0xb2/0x130
: [&lt;ffffffff8169dbd0&gt;] ? _raw_spin_unlock_irq+0x30/0x50
: [&lt;ffffffffa047fe3e&gt;] usb_stor_transparent_scsi_command+0xe/0x10 [usb_storage]
: [&lt;ffffffffa0481ae3&gt;] usb_stor_control_thread+0x173/0x280 [usb_storage]
: [&lt;ffffffffa0481970&gt;] ? fill_inquiry_response+0x20/0x20 [usb_storage]
: [&lt;ffffffff8108a3f7&gt;] kthread+0xb7/0xc0
: [&lt;ffffffff816a7d34&gt;] kernel_thread_helper+0x4/0x10
: [&lt;ffffffff8169e0f4&gt;] ? retint_restore_args+0x13/0x13
: [&lt;ffffffff8108a340&gt;] ? kthread_worker_fn+0x1a0/0x1a0
: [&lt;ffffffff816a7d30&gt;] ? gs_change+0x13/0x13

Reported-By: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes one lockdep warning[1] inside usb_stor_pre_reset.

If the current configuration includes multiple mass storage interfaces,
the 'AA' lockdep warning will be triggered since the lock class of
'us-&gt;dev_mutex' is acquired two times in .reset path. It isn't
a real deadlock, so just take the lockdep_set_class annotation to
remove the warning.

[1], lockdep warning log
:[ INFO: possible recursive locking detected ]
:3.3.0-0.rc5.git3.1.fc17.x86_64 #1 Tainted: G        W
:---------------------------------------------
:usb-storage/14846 is trying to acquire lock:
: (&amp;(us-&gt;dev_mutex)){+.+.+.}, at: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
:but task is already holding lock:
: (&amp;(us-&gt;dev_mutex)){+.+.+.}, at: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
:other info that might help us debug this:
: Possible unsafe locking scenario:
:       CPU0
:       ----
:  lock(&amp;(us-&gt;dev_mutex));
:  lock(&amp;(us-&gt;dev_mutex));
: *** DEADLOCK ***
: May be due to missing lock nesting notation
:2 locks held by usb-storage/14846:
: #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;ffffffff8147e6a5&gt;] usb_lock_device_for_reset+0x95/0x100
: #1:  (&amp;(us-&gt;dev_mutex)){+.+.+.}, at: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
:stack backtrace:
:Pid: 14846, comm: usb-storage Tainted: G        W 3.3.0-0.rc5.git3.1.fc17.x86_64 #1
:Call Trace:
: [&lt;ffffffff810cbdaf&gt;] __lock_acquire+0x168f/0x1bb0
: [&lt;ffffffff81021083&gt;] ? native_sched_clock+0x13/0x80
: [&lt;ffffffff810210f9&gt;] ? sched_clock+0x9/0x10
: [&lt;ffffffff810210f9&gt;] ? sched_clock+0x9/0x10
: [&lt;ffffffff810a2975&gt;] ? sched_clock_local+0x25/0xa0
: [&lt;ffffffff810cc9a1&gt;] lock_acquire+0xa1/0x1e0
: [&lt;ffffffffa0481c0c&gt;] ? usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffff81699c86&gt;] mutex_lock_nested+0x76/0x3a0
: [&lt;ffffffffa0481c0c&gt;] ? usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffffa0481c0c&gt;] ? usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffffa0481c0c&gt;] usb_stor_pre_reset+0x1c/0x20 [usb_storage]
: [&lt;ffffffff8148184d&gt;] usb_reset_device+0x7d/0x190
: [&lt;ffffffffa048119c&gt;] usb_stor_port_reset+0x7c/0x80 [usb_storage]
: [&lt;ffffffffa0481234&gt;] usb_stor_invoke_transport+0x94/0x560 [usb_storage]
: [&lt;ffffffff810cd3b2&gt;] ? mark_held_locks+0xb2/0x130
: [&lt;ffffffff8169dbd0&gt;] ? _raw_spin_unlock_irq+0x30/0x50
: [&lt;ffffffffa047fe3e&gt;] usb_stor_transparent_scsi_command+0xe/0x10 [usb_storage]
: [&lt;ffffffffa0481ae3&gt;] usb_stor_control_thread+0x173/0x280 [usb_storage]
: [&lt;ffffffffa0481970&gt;] ? fill_inquiry_response+0x20/0x20 [usb_storage]
: [&lt;ffffffff8108a3f7&gt;] kthread+0xb7/0xc0
: [&lt;ffffffff816a7d34&gt;] kernel_thread_helper+0x4/0x10
: [&lt;ffffffff8169e0f4&gt;] ? retint_restore_args+0x13/0x13
: [&lt;ffffffff8108a340&gt;] ? kthread_worker_fn+0x1a0/0x1a0
: [&lt;ffffffff816a7d30&gt;] ? gs_change+0x13/0x13

Reported-By: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Documentation: remove references to /etc/modprobe.conf</title>
<updated>2012-03-30T23:03:15+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2012-03-30T20:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=970e2486492aa1eb47a436a5a4c81e92558986a9'/>
<id>970e2486492aa1eb47a436a5a4c81e92558986a9</id>
<content type='text'>
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
is no longer parsed by new kmod tool. References to this file are
replaced in Documentation, comments and Kconfig according to the
context.

There are also some references to the old /etc/modules.conf from 2.4
kernels that are being removed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
Acked-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
is no longer parsed by new kmod tool. References to this file are
replaced in Documentation, comments and Kconfig according to the
context.

There are also some references to the old /etc/modules.conf from 2.4
kernels that are being removed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
Acked-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb/storage: redefine US_BULK_FLAG_IN and use it</title>
<updated>2012-02-28T19:07:42+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-02-25T17:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b8db6d6402ddca1c78a27407fbd10a6ccb23ab14'/>
<id>b8db6d6402ddca1c78a27407fbd10a6ccb23ab14</id>
<content type='text'>
US_BULK_FLAG_IN is defined as 1 and not used. The USB storage spec says
that bit 7 of flags within CBW defines the data direction. 1 is DATA-IN
(read from device) and 0 is the DATA-OUT. Bit 6 is obselete and bits 0-5
are reserved.
This patch redefines the unsued define US_BULK_FLAG_IN from 1 to 1 &lt;&lt; 7
aka 0x80 and replaces the obvious users. In a following patch the
storage gadget will use it as well.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
US_BULK_FLAG_IN is defined as 1 and not used. The USB storage spec says
that bit 7 of flags within CBW defines the data direction. 1 is DATA-IN
(read from device) and 0 is the DATA-OUT. Bit 6 is obselete and bits 0-5
are reserved.
This patch redefines the unsued define US_BULK_FLAG_IN from 1 to 1 &lt;&lt; 7
aka 0x80 and replaces the obvious users. In a following patch the
storage gadget will use it as well.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb/storage: a couple defines from drivers/usb/storage/transport.h to include/linux/usb/storage.h</title>
<updated>2012-02-28T19:05:18+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-02-25T17:28:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7ac4704c099125214a4f0a4bd54ce94d15be2ffb'/>
<id>7ac4704c099125214a4f0a4bd54ce94d15be2ffb</id>
<content type='text'>
This moves the BOT data structures for CBW and CSW from drivers internal
header file to global include able file in include/.
The storage gadget is using the same name for CSW but a different for
CBW so I fix it up properly. The same goes for the ub driver and keucr
driver in staging.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves the BOT data structures for CBW and CSW from drivers internal
header file to global include able file in include/.
The storage gadget is using the same name for CSW but a different for
CBW so I fix it up properly. The same goes for the ub driver and keucr
driver in staging.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: ums_realtek: do not use stack memory for DMA in __do_config_autodelink</title>
<updated>2012-02-24T21:37:45+00:00</updated>
<author>
<name>jwboyer@redhat.com</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2012-02-20T20:34:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4898e07174b79013afd2b422ef6c4336ef8e6783'/>
<id>4898e07174b79013afd2b422ef6c4336ef8e6783</id>
<content type='text'>
__do_config_autodelink passes the data variable to the transport function.
If the calling functions pass a stack variable, this will eventually trigger
a DMA-API debug backtrace for mapping stack memory in the DMA buffer.  Fix
this by calling kmemdup for the passed data instead.

Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__do_config_autodelink passes the data variable to the transport function.
If the calling functions pass a stack variable, this will eventually trigger
a DMA-API debug backtrace for mapping stack memory in the DMA buffer.  Fix
this by calling kmemdup for the passed data instead.

Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'usb-3.3-rc4' into usb-next</title>
<updated>2012-02-23T16:21:03+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-02-23T16:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c69263c66e5b2a5d0c7e5a41c189b1846ae1de92'/>
<id>c69263c66e5b2a5d0c7e5a41c189b1846ae1de92</id>
<content type='text'>
This is to pull in the xhci changes and the other fixes and device id
updates that were done in Linus's tree.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to pull in the xhci changes and the other fixes and device id
updates that were done in Linus's tree.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb-storage: fix freezing of the scanning thread</title>
<updated>2012-02-22T00:29:15+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-02-21T18:16:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bb94a406682770a35305daaa241ccdb7cab399de'/>
<id>bb94a406682770a35305daaa241ccdb7cab399de</id>
<content type='text'>
This patch (as1521b) fixes the interaction between usb-storage's
scanning thread and the freezer.  The current implementation has a
race: If the device is unplugged shortly after being plugged in and
just as a system sleep begins, the scanning thread may get frozen
before the khubd task.  Khubd won't be able to freeze until the
disconnect processing is complete, and the disconnect processing can't
proceed until the scanning thread finishes, so the sleep transition
will fail.

The implementation in the 3.2 kernel suffers from an additional
problem.  There the scanning thread calls set_freezable_with_signal(),
and the signals sent by the freezer will mess up the thread's I/O
delays, which are all interruptible.

The solution to both problems is the same: Replace the kernel thread
used for scanning with a delayed-work routine on the system freezable
work queue.  Freezable work queues have the nice property that you can
cancel a work item even while the work queue is frozen, and no signals
are needed.

The 3.2 version of this patch solves the problem in Bugzilla #42730.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Seth Forshee &lt;seth.forshee@canonical.com&gt;
CC: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as1521b) fixes the interaction between usb-storage's
scanning thread and the freezer.  The current implementation has a
race: If the device is unplugged shortly after being plugged in and
just as a system sleep begins, the scanning thread may get frozen
before the khubd task.  Khubd won't be able to freeze until the
disconnect processing is complete, and the disconnect processing can't
proceed until the scanning thread finishes, so the sleep transition
will fail.

The implementation in the 3.2 kernel suffers from an additional
problem.  There the scanning thread calls set_freezable_with_signal(),
and the signals sent by the freezer will mess up the thread's I/O
delays, which are all interruptible.

The solution to both problems is the same: Replace the kernel thread
used for scanning with a delayed-work routine on the system freezable
work queue.  Freezable work queues have the nice property that you can
cancel a work item even while the work queue is frozen, and no signals
are needed.

The 3.2 version of this patch solves the problem in Bugzilla #42730.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Seth Forshee &lt;seth.forshee@canonical.com&gt;
CC: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'usb-3.3-rc3' into usb-next</title>
<updated>2012-02-10T19:13:53+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-02-10T19:12:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7483948fdd31a8642ef0288aab6f368b98d53c29'/>
<id>7483948fdd31a8642ef0288aab6f368b98d53c29</id>
<content type='text'>
This is done to resolve a merge conflict with:
	drivers/usb/class/cdc-wdm.c
and to better handle future patches for this driver as it is under
active development at the moment.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is done to resolve a merge conflict with:
	drivers/usb/class/cdc-wdm.c
and to better handle future patches for this driver as it is under
active development at the moment.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb-storage: reorganize target-specific code</title>
<updated>2012-02-09T01:36:41+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-01-10T18:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=af74d2dae8f85a0e90a30594beb507f5d954fa3f'/>
<id>af74d2dae8f85a0e90a30594beb507f5d954fa3f</id>
<content type='text'>
Now that usb-storage has a target_alloc() routine, this patch (as1508)
moves some existing target-specific code out of the slave_alloc()
routine to where it really belongs.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Matthew Dharm &lt;mdharm-usb@one-eyed-alien.net&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that usb-storage has a target_alloc() routine, this patch (as1508)
moves some existing target-specific code out of the slave_alloc()
routine to where it really belongs.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Matthew Dharm &lt;mdharm-usb@one-eyed-alien.net&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI &amp; usb-storage: add flags for VPD pages and REPORT LUNS</title>
<updated>2012-02-09T01:36:41+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-01-10T18:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=09b6b51b0b6c1b9bb61815baf205e4d74c89ff04'/>
<id>09b6b51b0b6c1b9bb61815baf205e4d74c89ff04</id>
<content type='text'>
This patch (as1507) adds a skip_vpd_pages flag to struct scsi_device
and a no_report_luns flag to struct scsi_target.  The first is used to
control whether sd will look at VPD pages for information on block
provisioning, limits, and characteristics.  The second prevents
scsi_report_lun_scan() from issuing a REPORT LUNS command.

The patch also modifies usb-storage to set the new flag bits for all
USB devices and targets, and to stop adjusting the scsi_level value.

Historically we have seen that USB mass-storage devices often don't
support VPD pages or REPORT LUNS properly.  Until now we have avoided
these things by setting the scsi_level to SCSI_2 for all USB devices.
But this has the side effect of storing the LUN bits into the second
byte of each CDB, and now we have a report of a device which doesn't
like that.  The best solution is to stop abusing scsi_level and
instead have separate flags for VPD pages and REPORT LUNS.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Perry Wagle &lt;wagle@mac.com&gt;
CC: Matthew Dharm &lt;mdharm-usb@one-eyed-alien.net&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as1507) adds a skip_vpd_pages flag to struct scsi_device
and a no_report_luns flag to struct scsi_target.  The first is used to
control whether sd will look at VPD pages for information on block
provisioning, limits, and characteristics.  The second prevents
scsi_report_lun_scan() from issuing a REPORT LUNS command.

The patch also modifies usb-storage to set the new flag bits for all
USB devices and targets, and to stop adjusting the scsi_level value.

Historically we have seen that USB mass-storage devices often don't
support VPD pages or REPORT LUNS properly.  Until now we have avoided
these things by setting the scsi_level to SCSI_2 for all USB devices.
But this has the side effect of storing the LUN bits into the second
byte of each CDB, and now we have a report of a device which doesn't
like that.  The best solution is to stop abusing scsi_level and
instead have separate flags for VPD pages and REPORT LUNS.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Perry Wagle &lt;wagle@mac.com&gt;
CC: Matthew Dharm &lt;mdharm-usb@one-eyed-alien.net&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
