<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/hpsa.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-12-14T16:24:01Z</updated>
<entry>
<title>hpsa: fix a race in cmd_free/scsi_done</title>
<updated>2014-12-14T16:24:01Z</updated>
<author>
<name>Tomas Henzl</name>
</author>
<published>2013-08-01T13:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e87cf8149d14c01a665e65029ad76530b228e901'/>
<id>urn:sha1:e87cf8149d14c01a665e65029ad76530b228e901</id>
<content type='text'>
commit 2cc5bfaf854463d9d1aa52091f60110fbf102a96 upstream.

When the driver calls scsi_done and after that frees it's internal
preallocated memory it can happen that a new job is enqueud before
the memory is freed. The allocation fails and the message
"cmd_alloc returned NULL" is shown.
Patch below fixes it by moving cmd-&gt;scsi_done after cmd_free.

Signed-off-by: Tomas Henzl &lt;thenzl@redhat.com&gt;
Acked-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Masoud Sharbiani &lt;msharbiani@twopensource.com&gt;
</content>
</entry>
<entry>
<title>hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl</title>
<updated>2014-09-13T22:41:39Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2014-07-03T15:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1b82e6b662bc18a857feb9c3d173546afcdae65'/>
<id>urn:sha1:b1b82e6b662bc18a857feb9c3d173546afcdae65</id>
<content type='text'>
commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream.

When copy_from_user fails, return -EFAULT, not -ENOMEM

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Reported-by: Robert Elliott &lt;elliott@hp.com&gt;
Reviewed-by: Joe Handzik &lt;joseph.t.handzik@hp.com&gt;
Reviewed-by: Scott Teel &lt;scott.teel@hp.com&gt;
Reviewed by: Mike MIller &lt;michael.miller@canonical.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hpsa: return 0 from driver probe function on success, not 1</title>
<updated>2014-01-03T04:33:27Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2013-11-01T16:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4394d6137fccf28a5f91b2813fa5ea7956dae40'/>
<id>urn:sha1:e4394d6137fccf28a5f91b2813fa5ea7956dae40</id>
<content type='text'>
commit 88bf6d62db4393fa03a58bada9d746312d5b496f upstream.

A return value of 1 is interpreted as an error.  See pci_driver.
in local_pci_probe().  If you're wondering how this ever could
have worked, it's because it used to be the case that only return
values less than zero were interpreted as failure.  But even in
the current kernel if the driver registers its various entry
points with the kernel, and then returns a value which is
interpreted as failure, those registrations aren't undone, so
the driver still mostly works.  However, the driver's remove
function wouldn't be called on rmmod, and pci power management
functions wouldn't work.  In the case of Smart Array, since it
has a battery backed cache (or else no cache) even if the driver
is not shut down properly as long as there is no outstanding
i/o, nothing too bad happens, which is why it took so long to
notice.

Requesting backport to stable because the change to pci-driver.c
which requires driver probe functions to return 0 occurred between
2.6.35 and 2.6.36 (the pci power management breakage) and again
between 3.7 and 3.8 (pci_dev-&gt;driver getting set to NULL in
local_pci_probe() preventing driver remove function from being
called on rmmod.)

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.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: do not discard scsi status on aborted commands</title>
<updated>2014-01-03T04:33:27Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2013-09-23T18:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=249e9834a03c3bd1f66b97f0c5ceca4ed5a2ee5b'/>
<id>urn:sha1:249e9834a03c3bd1f66b97f0c5ceca4ed5a2ee5b</id>
<content type='text'>
commit 2e311fbabdc23b7eaec77313dc3b9a151a5407b5 upstream.

We inadvertantly discarded the scsi status for aborted commands.
For some commands (e.g. reads from tape drives) these can't be retried,
and if we discarded the scsi status, the scsi mid layer couldn't notice
anything was wrong and the error was not reported.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.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>
</author>
<published>2012-09-20T21:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>hpsa: dial down lockup detection during firmware flash</title>
<updated>2012-10-17T02:50:02Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2012-05-01T16:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=def274ac605a69628f7d0d2d666484d209b0b6ee'/>
<id>urn:sha1:def274ac605a69628f7d0d2d666484d209b0b6ee</id>
<content type='text'>
commit e85c59746957fd6e3595d02cf614370056b5816e upstream.

Dial back the aggressiveness of the controller lockup detection thread.
Currently it will declare the controller to be locked up if it goes
for 10 seconds with no interrupts and no change in the heartbeat
register.  Dial back this to 30 seconds with no heartbeat change, and
also snoop the ioctl path and if a firmware flash command is detected,
dial it back further to 4 minutes until the firmware flash command
completes.  The reason for this is that during the firmware flash
operation, the controller apparently doesn't update the heartbeat
register as frequently as it is supposed to, and we can get a false
positive.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hpsa: Use LUN reset instead of target reset</title>
<updated>2012-10-17T02:48:28Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2012-07-26T16:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2239182005cc209df395cae2316f4e6688642b8d'/>
<id>urn:sha1:2239182005cc209df395cae2316f4e6688642b8d</id>
<content type='text'>
commit 21e89afd325849eb38adccf382df16cc895911f9 upstream.

It turns out Smart Array logical drives do not support target
reset and when the target reset fails, the logical drive will
be taken off line.  Symptoms look like this:

hpsa 0000:03:00.0: Abort request on C1:B0:T0:L0
hpsa 0000:03:00.0: resetting device 1:0:0:0
hpsa 0000:03:00.0: cp ffff880037c56000 is reported invalid (probably means target device no longer present)
hpsa 0000:03:00.0: resetting device failed.
sd 1:0:0:0: Device offlined - not ready after error recovery
sd 1:0:0:0: rejecting I/O to offline device
EXT3-fs error (device sdb1): read_block_bitmap:

LUN reset is supported though, and is what we should be using.
Target reset is also disruptive in shared SAS situations,
for example, an external MSA1210m which does support target
reset attached to Smart Arrays in multiple hosts -- a target
reset from one host is disruptive to other hosts as all LUNs
on the target will be reset and will abort all outstanding i/os
back to all the attached hosts.  So we should use LUN reset,
not target reset.

Tested this with Smart Array logical drives and with tape drives.
Not sure how this bug survived since 2009, except it must be very
rare for a Smart Array to require more than 30s to complete a request.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.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: fix handling of protocol error</title>
<updated>2012-10-10T02:30:57Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2012-09-14T21:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e95d3285c82d306b304b9cfb37e709b9986c8cf9'/>
<id>urn:sha1:e95d3285c82d306b304b9cfb37e709b9986c8cf9</id>
<content type='text'>
commit 256d0eaac87da1e993190846064f339f4c7a63f5 upstream.

If a command status of CMD_PROTOCOL_ERR is received, this
information should be conveyed to the SCSI mid layer, not
dropped on the floor.  CMD_PROTOCOL_ERR may be received
from the Smart Array for any commands destined for an external
RAID controller such as a P2000, or commands destined for tape
drives or CD/DVD-ROM drives, if for instance a cable is
disconnected.  This mostly affects multipath configurations, as
disconnecting a cable on a non-multipath configuration is not
going to do anything good regardless of whether CMD_PROTOCOL_ERR
is handled correctly or not.  Not handling CMD_PROTOCOL_ERR
correctly in a multipath configaration involving external RAID
controllers may cause data corruption, so this is quite a serious
bug.  This bug should not normally cause a problem for direct
attached disk storage.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.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: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler</title>
<updated>2012-05-30T23:43:53Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2011-11-28T16:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2b6ee559fe72ec90da4eb623f3f01135c5a1ec7'/>
<id>urn:sha1:d2b6ee559fe72ec90da4eb623f3f01135c5a1ec7</id>
<content type='text'>
commit 45bcf018d1a4779d592764ef57517c92589d55d7 upstream.

IRQF_SHARED is required for older controllers that don't support MSI(X)
and which may end up sharing an interrupt.  All the controllers hpsa
normally supports have MSI(X) capability, but older controllers may be
encountered via the hpsa_allow_any=1 module parameter.

Also remove deprecated IRQF_DISABLED.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.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: Fix problem with MSA2xxx devices</title>
<updated>2012-05-30T23:43:20Z</updated>
<author>
<name>Stephen M. Cameron</name>
</author>
<published>2012-01-19T20:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3af3cfd49857172f602d2ad6bc55386c8943187'/>
<id>urn:sha1:a3af3cfd49857172f602d2ad6bc55386c8943187</id>
<content type='text'>
commit 9bc3711cbb67ac620bf09b4a147cbab45b2c36c0 upstream.

Upgraded firmware on Smart Array P7xx (and some others) made them show up as
SCSI revision 5 devices and this caused the driver to fail to map MSA2xxx
logical drives to the correct bus/target/lun.  A symptom of this would be that
the target ID of the logical drives as presented by the external storage array
is ignored, and all such logical drives are assigned to target zero,
differentiated only by LUN.  Some multipath software reportedly does not deal
well with this behavior, failing to recognize different paths to the same
device as such.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Signed-off-by: Scott Teel &lt;scott.teel@hp.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>
