<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v3.7.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/scsi?h=v3.7.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/scsi?h=v3.7.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-04T15:29:47Z</updated>
<entry>
<title>megaraid: fix BUG_ON() from incorrect use of delayed work</title>
<updated>2012-12-04T15:29:47Z</updated>
<author>
<name>Xiaotian Feng</name>
<email>xtfeng@gmail.com</email>
</author>
<published>2012-12-04T11:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c1d390d8e6128b050f0f66b1c33d390760deb3f4'/>
<id>urn:sha1:c1d390d8e6128b050f0f66b1c33d390760deb3f4</id>
<content type='text'>
megaraid use INIT_WORK to declare a hotplug_work, but cast the
hotplug_work from work_struct to delayed_work and
schedule_delayed_work on it.  This is very dangerous, as other part of
delayed_work might be kernel memories allocated by others.

With commit 8852aac ("workqueue: mod_delayed_work_on() shouldn't queue
timer on 0 delay"), schedule_delayed_work() will check dwork-&gt;timer
before queue_work even when @delay is 0, this causes megaraid code to
hit the BUG_ON() in workqueue code.  Change megaraid code to use
delayed work.

Signed-off-by: Xiaotian Feng &lt;dannyfeng@tencent.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Neela Syam Kolli &lt;megaraidlinux@lsi.com&gt;
Cc: "James E.J. Bottomley" &lt;JBottomley@parallels.com&gt;
Cc: linux-scsi@vger.kernel.org
</content>
</entry>
<entry>
<title>[SCSI] sd: Implement support for WRITE SAME</title>
<updated>2012-11-14T06:45:42Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2012-09-18T16:19:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd'/>
<id>urn:sha1:5db44863b6ebbb400c5e61d56ebe8f21ef48b1bd</id>
<content type='text'>
Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk
driver.

 - We set the default maximum to 0xFFFF because there are several
   devices out there that only support two-byte block counts even with
   WRITE SAME(16). We only enable transfers bigger than 0xFFFF if the
   device explicitly reports MAXIMUM WRITE SAME LENGTH in the BLOCK
   LIMITS VPD.

 - max_write_same_blocks can be overriden per-device basis in sysfs.

 - The UNMAP discovery heuristics remain unchanged but the discard
   limits are tweaked to match the "real" WRITE SAME commands.

 - In the error handling logic we now distinguish between WRITE SAME
   with and without UNMAP set.

The discovery process heuristics are:

 - If the device reports a SCSI level of SPC-3 or greater we'll issue
   READ SUPPORTED OPERATION CODES to find out whether WRITE SAME(16) is
   supported. If that's the case we will use it.

 - If the device supports the block limits VPD and reports a MAXIMUM
   WRITE SAME LENGTH bigger than 0xFFFF we will use WRITE SAME(16).

 - Otherwise we will use WRITE SAME(10) unless the target LBA is beyond
   0xFFFFFFFF or the block count exceeds 0xFFFF.

 - no_write_same is set for ATA, FireWire and USB.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Reviewed-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: Permit merged discard requests</title>
<updated>2012-11-14T05:23:53Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2012-09-18T16:19:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=26e85fcd15f68b57d9ba645cd3591117a8ac0e05'/>
<id>urn:sha1:26e85fcd15f68b57d9ba645cd3591117a8ac0e05</id>
<content type='text'>
Support requests with more than one bio payload for discards. The total
number of bytes to be discarded is stored in req-&gt;__data_len and used in
sd_done() to complete the I/O.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Add a report opcode helper</title>
<updated>2012-11-14T05:11:31Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2012-09-18T16:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3c6bdaeab4fda6c9fdd5f3f5c610dea97bddf7d6'/>
<id>urn:sha1:3c6bdaeab4fda6c9fdd5f3f5c610dea97bddf7d6</id>
<content type='text'>
The REPORT SUPPORTED OPERATION CODES command can be used to query
whether a given opcode is supported by a device. Add a helper function
that allows us to look up commands.

We only issue RSOC if the device reports compliance with SPC-3 or
later. But to err on the side of caution we disable the command for ATA,
FireWire and USB.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] isci: copy fis 0x34 response into proper buffer</title>
<updated>2012-11-13T13:45:14Z</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=49bd665c5407a453736d3232ee58f2906b42e83c'/>
<id>urn:sha1:49bd665c5407a453736d3232ee58f2906b42e83c</id>
<content type='text'>
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;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc</title>
<updated>2012-11-10T20:58:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-11-10T20:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2b1768f39aebfcccdc5b948eb4962918a5a64581'/>
<id>urn:sha1:2b1768f39aebfcccdc5b948eb4962918a5a64581</id>
<content type='text'>
Pull sparc fixes from David Miller:
 "Several build/bug fixes for sparc, including:

  1) Configuring a mix of static vs.  modular sparc64 crypto modules
     didn't work, remove an ill-conceived attempt to only have to build
     the device match table for these drivers once to fix the problem.

     Reported by Meelis Roos.

  2) Make the montgomery multiple/square and mpmul instructions actually
     usable in 32-bit tasks.  Essentially this involves providing 32-bit
     userspace with a way to use a 64-bit stack when it needs to.

  3) Our sparc64 atomic backoffs don't yield cpu strands properly on
     Niagara chips.  Use pause instruction when available to achieve
     this, otherwise use a benign instruction we know blocks the strand
     for some time.

  4) Wire up kcmp

  5) Fix the build of various drivers by removing the unnecessary
     blocking of OF_GPIO when SPARC.

  6) Fix unintended regression wherein of_address_to_resource stopped
     being provided.  Fix from Andreas Larsson.

  7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas
     Larsson."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
  sparc: Support atomic64_dec_if_positive properly.
  of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again
  sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
  sparc: Add sparc support for platform_get_irq()
  sparc: Allow OF_GPIO on sparc.
  qlogicpti: Fix build warning.
  sparc: Wire up sys_kcmp.
  sparc64: Improvde documentation and readability of atomic backoff code.
  sparc64: Use pause instruction when available.
  sparc64: Fix cpu strand yielding.
  sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.
</content>
</entry>
<entry>
<title>qlogicpti: Fix build warning.</title>
<updated>2012-10-28T20:26:37Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-10-28T20:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f7e8d9f830b118cfe757140d910834afd1710001'/>
<id>urn:sha1:f7e8d9f830b118cfe757140d910834afd1710001</id>
<content type='text'>
The build warns:

drivers/scsi/qlogicpti.c: In function 'qpti_sbus_probe':
drivers/scsi/qlogicpti.c:1316:45: warning: passing argument 1 of 'scsi_host_alloc' discards 'const' qualifier from pointer target type [enabled by default]
include/scsi/scsi_host.h:778:26: note: expected 'struct scsi_host_template *' but argument is of type 'const struct scsi_host_template *'

The problem is that of_device_id-&gt;data is a const void pointer.

This is pretty silly in this specific instance, because for all
matched device IDs we set match-&gt;data to the same value,
&amp;qpti_template.

So just use that directly instead of the unnecessary and improperly
typed abstraction.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>qla2xxx: Update target lookup session tables when a target session changes</title>
<updated>2012-10-26T19:29:46Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-10-11T20:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8292d1da53fa60c7516ab03a9d83f7ea266d335'/>
<id>urn:sha1:c8292d1da53fa60c7516ab03a9d83f7ea266d335</id>
<content type='text'>
It is possible for the target code to change the loop_id or s_id of a
target session in reaction to an FC fabric change.  However, the
session structures are stored in tables that are indexed by these two
keys, and if we just change the session structure but leave the
pointers to it in the old places in the table, havoc can ensue.  For
example, a new session might come along that should go in the old slot
in the table and overwrite the old session pointer.

To handle this, add a new tgt_ops-&gt;update_sess() method that also
updates the "by loop_id" and "by s_id" lookup tables when a session
changes, so that the keys where a session pointer is stored in these
tables always matches the keys in the session structure itself.

(nab: Drop unnecessary double inversion with FCF_CONF_COMP_SUPPORTED
      usage)

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Chad Dupuis &lt;chad.dupuis@qlogic.com&gt;
Cc: Arun Easi &lt;arun.easi@qlogic.com&gt;
Cc: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPC</title>
<updated>2012-10-26T19:29:46Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-10-11T20:41:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c046aa0f0f47719a38854fc6383216392b130704'/>
<id>urn:sha1:c046aa0f0f47719a38854fc6383216392b130704</id>
<content type='text'>
My draft of SPC-4 says the following about the SCSI name string in
inquiry VPD page 83h:

    The SCSI NAME STRING field starts with either:

    a) the four UTF-8 characters 'eui.' concatenated with 16, 24, or
       32 hexadecimal digits (i.e., the UTF-8 characters 0 through 9
       and A through F) for an EUI-64 based identifier (see
       7.8.6.5). The first hexadecimal digit shall be the most
       significant four bits of the first byte (i.e., most significant
       byte) of the EUI-64 based identifier;
    b) the four UTF-8 characters 'naa.' concatenated with 16 or 32
       hexadecimal digits for an NAA identifier (see 7.8.6.6). The
       first hexadecimal digit shall be the most significant four bits
       of the first byte (i.e., most significant byte) of the NAA
       identifier; or
    c) the four UTF-8 characters 'iqn.' concatenated with an iSCSI
       Name for an iSCSI-name based identifier (see iSCSI).

However, the .tpg_get_wwn method for tcm_qla2xxx formats the WWN so
the SCSI name string looks like "52:4a:93:7d:24:5f:b2:12,t,0x0001".
This patch corrects the code so that VPD 83h gives a SPC-compliant
SCSI name string like "naa.524a937d245fb212,t,0x0001" while leavig
other uses alone (so configfs will still work with ':' separated WWNs).

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Chad Dupuis &lt;chad.dupuis@qlogic.com&gt;
Cc: Arun Easi &lt;arun.easi@qlogic.com&gt;
Cc: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>qla2xxx: Add missing -&gt;vport_slock while calling qlt_update_vp_map</title>
<updated>2012-10-26T19:29:46Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-10-09T19:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=29c08cdabd323adf7fcc0d26077383d4daf7b09a'/>
<id>urn:sha1:29c08cdabd323adf7fcc0d26077383d4daf7b09a</id>
<content type='text'>
All other callers of qlt_update_vp_map() already hold -&gt;vport_slock
while updating the vp target map, so go ahead and add the missing
-&gt;vport_slock within qla24xx_disable_vp() code.

Cc: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Cc: Chad Dupuis &lt;chad.dupuis@qlogic.com&gt;
Cc: Arun Easi &lt;arun.easi@qlogic.com&gt;
Cc: Andrew Vasquez &lt;andrew.vasquez@qlogic.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Acked-by: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
