<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v3.2.41</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/scsi?h=v3.2.41</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/scsi?h=v3.2.41'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-20T15:03:17Z</updated>
<entry>
<title>dc395x: uninitialized variable in device_alloc()</title>
<updated>2013-03-20T15:03:17Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-02-11T19:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae651768e63cb9007aadf9c807ff9d8e3daedf8d'/>
<id>urn:sha1:ae651768e63cb9007aadf9c807ff9d8e3daedf8d</id>
<content type='text'>
commit 208afec4f3be8c51ad6eebe6611dd6d2ad2fa298 upstream.

This bug was introduced back in bitkeeper days in 2003.  We use
"dcb-&gt;dev_mode" before it has been initialized.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>sd: Reshuffle init_sd to avoid crash</title>
<updated>2013-02-06T04:33:53Z</updated>
<author>
<name>Joel D. Diaz</name>
<email>joeldiaz@us.ibm.com</email>
</author>
<published>2012-10-10T08:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bdb5d1a2d352d58ac99be529bb8c006dfb9be83'/>
<id>urn:sha1:8bdb5d1a2d352d58ac99be529bb8c006dfb9be83</id>
<content type='text'>
commit afd5e34b2bb34881d3a789e62486814a49b47faa upstream.

scsi_register_driver will register a prep_fn() function, which
in turn migh need to use the sd_cdp_pool for DIF.
Which hasn't been initialised at this point, leading to
a crash. So reshuffle the init_sd() and exit_sd() paths
to have the driver registered last.

Signed-off-by: Joel D. Diaz &lt;joeldiaz@us.ibm.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>efi: Make 'efi_enabled' a function to query EFI facilities</title>
<updated>2013-02-06T04:33:50Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-11-14T09:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06c73e442edec7cda81193276c72fda1abb96fb0'/>
<id>urn:sha1:06c73e442edec7cda81193276c72fda1abb96fb0</id>
<content type='text'>
commit 83e68189745ad931c2afd45d8ee3303929233e7f upstream.

Originally 'efi_enabled' indicated whether a kernel was booted from
EFI firmware. Over time its semantics have changed, and it now
indicates whether or not we are booted on an EFI machine with
bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.

The immediate motivation for this patch is the bug report at,

    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

which details how running a platform driver on an EFI machine that is
designed to run under BIOS can cause the machine to become
bricked. Also, the following report,

    https://bugzilla.kernel.org/show_bug.cgi?id=47121

details how running said driver can also cause Machine Check
Exceptions. Drivers need a new means of detecting whether they're
running on an EFI machine, as sadly the expression,

    if (!efi_enabled)

hasn't been a sufficient condition for quite some time.

Users actually want to query 'efi_enabled' for different reasons -
what they really want access to is the list of available EFI
facilities.

For instance, the x86 reboot code needs to know whether it can invoke
the ResetSystem() function provided by the EFI runtime services, while
the ACPI OSL code wants to know whether the EFI config tables were
mapped successfully. There are also checks in some of the platform
driver code to simply see if they're running on an EFI machine (which
would make it a bad idea to do BIOS-y things).

This patch is a prereq for the samsung-laptop fix patch.

Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Corentin Chary &lt;corentincj@iksaif.net&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Peter Jones &lt;pjones@redhat.com&gt;
Cc: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Steve Langasek &lt;steve.langasek@canonical.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad@kernel.org&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
[bwh: Backported to 3.2:
 - Adjust context (a lot)
 - Add efi_is_native() function from commit 5189c2a7c776
   ('x86: efi: Turn off efi_enabled after setup on mixed fw/kernel')
 - Make efi_init() bail out when booted non-native, as it would previously
   not be called in this case
 - Drop inapplicable changes to start_kernel()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>mvsas: Fix oops when ata commond timeout.</title>
<updated>2013-01-16T01:13:27Z</updated>
<author>
<name>Jianpeng Ma</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-08-04T02:34:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b6ee0c4b85c6697d88593e164f79d79c398aa0b'/>
<id>urn:sha1:3b6ee0c4b85c6697d88593e164f79d79c398aa0b</id>
<content type='text'>
commit 95ab000388974d8ffef8257306b4be6e8778b768 upstream.

Kernel message follows:

[  511.712011] sd 11:0:0:0: [sdf] command ffff8800a4e81400 timed out
[  511.712022] sas: Enter sas_scsi_recover_host busy: 1 failed: 1
[  511.712024] sas: trying to find task 0xffff8800a4d24c80
[  511.712026] sas: sas_scsi_find_task: aborting task 0xffff8800a4d24c80
[  511.712029] drivers/scsi/mvsas/mv_sas.c 1631:mvs_abort_task()
mvi=ffff8800b5300000 task=ffff8800a4d24c80 slot=ffff8800b5325038
slot_idx=x0
[  511.712035] BUG: unable to handle kernel NULL pointer dereference at
0000000000000058
[  511.712040] IP: [&lt;ffffffff815f8c0c&gt;] _raw_spin_lock_irqsave+0xc/0x30
[  511.712047] PGD 0
[  511.712049] Oops: 0002 [#1] SMP
[  511.712052] Modules linked in: mvsas libsas scsi_transport_sas
raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq
async_tx [last unloaded: mvsas]
[  511.712062] CPU 3
[  511.712066] Pid: 7322, comm: scsi_eh_11 Not tainted 3.5.0+ #106 To Be
Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M.
[  511.712068] RIP: 0010:[&lt;ffffffff815f8c0c&gt;]  [&lt;ffffffff815f8c0c&gt;]
_raw_spin_lock_irqsave+0xc/0x30
[  511.712073] RSP: 0018:ffff880098d3bcb0  EFLAGS: 00010086
[  511.712074] RAX: 0000000000000286 RBX: 0000000000000058 RCX:
00000000000000c3
[  511.712076] RDX: 0000000000000100 RSI: 0000000000000046 RDI:
0000000000000058
[  511.712078] RBP: ffff880098d3bcb0 R08: 000000000000000a R09:
0000000000000000
[  511.712080] R10: 00000000000004e8 R11: 00000000000004e7 R12:
ffff8800a4d24c80
[  511.712082] R13: 0000000000000050 R14: ffff8800b5325038 R15:
ffff8800a4eafe00
[  511.712084] FS:  0000000000000000(0000) GS:ffff8800bdb80000(0000)
knlGS:0000000000000000
[  511.712086] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  511.712088] CR2: 0000000000000058 CR3: 00000000a4ce6000 CR4:
00000000000407e0
[  511.712090] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[  511.712091] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[  511.712093] Process scsi_eh_11 (pid: 7322, threadinfo
ffff880098d3a000, task ffff8800a61dde40)
[  511.712095] Stack:
[  511.712096]  ffff880098d3bce0 ffffffff81060683 ffff880000000000
0000000000000000
[  511.712099]  ffff8800a4d24c80 ffff8800b5300000 ffff880098d3bcf0
ffffffffa0076a88
[  511.712102]  ffff880098d3bd50 ffffffffa0079bb5 ffff880000000000
ffff880000000018
[  511.712106] Call Trace:
[  511.712110]  [&lt;ffffffff81060683&gt;] complete+0x23/0x60
[  511.712115]  [&lt;ffffffffa0076a88&gt;] mvs_tmf_timedout+0x18/0x20 [mvsas]
[  511.712119]  [&lt;ffffffffa0079bb5&gt;] mvs_slot_complete+0x765/0x7d0
[mvsas]
[  511.712125]  [&lt;ffffffffa005a17d&gt;] sas_scsi_recover_host+0x55d/0xdb0
[libsas]
[  511.712128]  [&lt;ffffffff8106d600&gt;] ? idle_balance+0xe0/0x130
[  511.712133]  [&lt;ffffffff813b150c&gt;] scsi_error_handler+0xcc/0x470
[  511.712136]  [&lt;ffffffff815f7ad0&gt;] ? __schedule+0x370/0x730
[  511.712139]  [&lt;ffffffff8105f728&gt;] ? __wake_up_common+0x58/0x90
[  511.712142]  [&lt;ffffffff813b1440&gt;] ? scsi_eh_get_sense+0x110/0x110
[  511.712146]  [&lt;ffffffff810571be&gt;] kthread+0x8e/0xa0
[  511.712150]  [&lt;ffffffff816015f4&gt;] kernel_thread_helper+0x4/0x10
[  511.712153]  [&lt;ffffffff81057130&gt;] ? flush_kthread_work+0x120/0x120
[  511.712156]  [&lt;ffffffff816015f0&gt;] ? gs_change+0xb/0xb
[  511.712157] Code: 8a 00 01 00 00 89 d0 f0 66 0f b1 0f 66 39 d0 0f 94
c0 0f b6 c0 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 9c 58 fa ba 00 01
00 00 &lt;f0&gt; 66 0f c1 17 0f b6 ce 38 d1 74 11 0f 1f 84 00 00 00 00 00 f3
[  511.712191] RIP  [&lt;ffffffff815f8c0c&gt;] _raw_spin_lock_irqsave+0xc/0x30
[  511.712194]  RSP &lt;ffff880098d3bcb0&gt;
[  511.712196] CR2: 0000000000000058
[  511.712198] ---[ end trace a781c7b1e65db92c ]---

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hpsa: gen8plus Smart Array IDs</title>
<updated>2013-01-03T03:33:54Z</updated>
<author>
<name>Mike Miller</name>
<email>mike.miller@hp.com</email>
</author>
<published>2012-09-20T21:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fa1dd81ceffee58d0340a48c593ec5474e8e4f84'/>
<id>urn:sha1:fa1dd81ceffee58d0340a48c593ec5474e8e4f84</id>
<content type='text'>
commit fe0c9610bb68dd0aad1017456f5e3c31264d70c2 upstream.

Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>qla2xxx: Test and clear FCPORT_UPDATE_NEEDED atomically.</title>
<updated>2013-01-03T03:33:22Z</updated>
<author>
<name>David Jeffery</name>
<email>djeffery@redhat.com</email>
</author>
<published>2012-11-21T07:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2265ae8136790818643d05c5fd31ac46292914cc'/>
<id>urn:sha1:2265ae8136790818643d05c5fd31ac46292914cc</id>
<content type='text'>
commit a394aac88506159e047630fc90dc2242568382d8 upstream.

When the qla2xxx driver loses access to multiple, remote ports, there is a race
condition which can occur which will keep the request stuck on a scsi request
queue indefinitely.

This bad state occurred do to a race condition with how the FCPORT_UPDATE_NEEDED
bit is set in qla2x00_schedule_rport_del(), and how it is cleared in
qla2x00_do_dpc().  The problem port has its drport pointer set, but it has never
been processed by the driver to inform the fc transport that the port has been
lost.  qla2x00_schedule_rport_del() sets drport, and then sets the
FCPORT_UPDATE_NEEDED bit.  In qla2x00_do_dpc(), the port lists are walked and
any drport pointer is handled and the fc transport informed of the port loss,
then the FCPORT_UPDATE_NEEDED bit is cleared.  This leaves a race where the
dpc thread is processing one port removal, another port removal is marked
with a call to qla2x00_schedule_rport_del(), and the dpc thread clears the
bit for both removals, even though only the first removal was actually
handled.  Until another event occurs to set FCPORT_UPDATE_NEEDED, the later
port removal is never finished and qla2xxx stays in a bad state which causes
requests to become stuck on request queues.

This patch updates the driver to test and clear FCPORT_UPDATE_NEEDED
atomically.  This ensures the port state changes are processed and not lost.

Signed-off-by: David Jeffery &lt;djeffery@redhat.com&gt;
Signed-off-by: Chad Dupuis &lt;chad.dupuis@qlogic.com&gt;
Signed-off-by: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>mvsas: fix undefined bit shift</title>
<updated>2013-01-03T03:33:21Z</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2012-11-16T19:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=463c45b0cdd91bf8426330373e5d292b002c5617'/>
<id>urn:sha1:463c45b0cdd91bf8426330373e5d292b002c5617</id>
<content type='text'>
commit beecadea1b8d67f591b13f7099559f32f3fd601d upstream.

The macro bit(n) is defined as ((u32)1 &lt;&lt; n), and thus it doesn't work
with n &gt;= 32, such as in mvs_94xx_assign_reg_set():

	if (i &gt;= 32) {
		mvi-&gt;sata_reg_set |= bit(i);
		...
	}

The shift ((u32)1 &lt;&lt; n) with n &gt;= 32 also leads to undefined behavior.
The result varies depending on the architecture.

This patch changes bit(n) to do a 64-bit shift.  It also simplifies
mv_ffc64() using __ffs64(), since invoking ffz() with ~0 is undefined.

Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Acked-by: Xiangliang Yu &lt;yuxiangl@marvell.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>prevent stack buffer overflow in host_reset</title>
<updated>2013-01-03T03:33:21Z</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2012-11-15T20:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=567fd40fe65a51594d7745827226f93d9a40ec6f'/>
<id>urn:sha1:567fd40fe65a51594d7745827226f93d9a40ec6f</id>
<content type='text'>
commit 072f19b4bea31cdd482d79f805413f2f9ac9e233 upstream.

store_host_reset() has tried to re-invent the wheel to compare sysfs strings.
Unfortunately it did so poorly and never bothered to check the input from
userspace before overwriting stack with it, so something simple as:

echo "WoopsieWoopsie" &gt;
/sys/devices/pseudo_0/adapter0/host0/scsi_host/host0/host_reset

would result in:

[  316.310101] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81f5bac7
[  316.310101]
[  316.320051] Pid: 6655, comm: sh Tainted: G        W    3.7.0-rc5-next-20121114-sasha-00016-g5c9d68d-dirty #129
[  316.320051] Call Trace:
[  316.340058] pps pps0: PPS event at 1352918752.620355751
[  316.340062] pps pps0: capture assert seq #303
[  316.320051]  [&lt;ffffffff83b3856b&gt;] panic+0xcd/0x1f4
[  316.320051]  [&lt;ffffffff81f5bac7&gt;] ? store_host_reset+0xd7/0x100
[  316.320051]  [&lt;ffffffff8110b996&gt;] __stack_chk_fail+0x16/0x20
[  316.320051]  [&lt;ffffffff81f5bac7&gt;] store_host_reset+0xd7/0x100
[  316.320051]  [&lt;ffffffff81e55bb3&gt;] dev_attr_store+0x13/0x30
[  316.320051]  [&lt;ffffffff812f7db1&gt;] sysfs_write_file+0x101/0x170
[  316.320051]  [&lt;ffffffff8127acc8&gt;] vfs_write+0xb8/0x180
[  316.320051]  [&lt;ffffffff8127ae80&gt;] sys_write+0x50/0xa0
[  316.320051]  [&lt;ffffffff83c03418&gt;] tracesys+0xe1/0xe6

Fix this by uninventing whatever was going on there and just use sysfs_streq.

Bug introduced by 29443691 ("[SCSI] scsi: Added support for adapter and
firmware reset").

[jejb: added necessary const to prevent compile warnings]
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>scsi: aha152x: Fix sparse warning and make printing pointer address more portable.</title>
<updated>2013-01-03T03:32:51Z</updated>
<author>
<name>Krzysztof Wilczynski</name>
<email>krzysztof.wilczynski@linux.com</email>
</author>
<published>2012-05-02T10:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ddd6e088519fa4bdd6388ab05109cffdc8a35107'/>
<id>urn:sha1:ddd6e088519fa4bdd6388ab05109cffdc8a35107</id>
<content type='text'>
commit b631cf1f899f9d2e449884dbccc34940637c639f upstream.

This is to change use of "0x%08x" in favour of "%p" as per ../Documentation/printk-formats.txt,
which also takes care about the following warning during compilation time:

  drivers/scsi/aha152x.c: In function ‘get_command’:
  drivers/scsi/aha152x.c:2987: warning: cast from pointer to integer of different size

Signed-off-by: Krzysztof Wilczynski &lt;krzysztof.wilczynski@linux.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>isci: copy fis 0x34 response into proper buffer</title>
<updated>2012-12-06T11:20:23Z</updated>
<author>
<name>Maciej Patelczyk</name>
<email>maciej.patelczyk@intel.com</email>
</author>
<published>2012-10-15T12:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=733dcd5a3d61164b794d461750aed607cd46120d'/>
<id>urn:sha1:733dcd5a3d61164b794d461750aed607cd46120d</id>
<content type='text'>
commit 49bd665c5407a453736d3232ee58f2906b42e83c upstream.

SATA MICROCODE DOWNALOAD fails on isci driver. After receiving Register
Device to Host (FIS 0x34) frame Initiator resets phy.
In the frame handler routine response (FIS 0x34) was copied into wrong
buffer and upper layer did not receive any answer which resulted in
timeout and reset.
This patch corrects this bug.

Signed-off-by: Maciej Patelczyk &lt;maciej.patelczyk@intel.com&gt;
Signed-off-by: Lukasz Dorau &lt;lukasz.dorau@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
