<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/sd.c, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-30T09:28:34Z</updated>
<entry>
<title>[SCSI] sd: update sd to use the new pm callbacks</title>
<updated>2012-11-30T09:28:34Z</updated>
<author>
<name>Aaron Lu</name>
</author>
<published>2012-11-09T07:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=691e3d3175daff73d9b1771bf79ab032fdcec5a5'/>
<id>urn:sha1:691e3d3175daff73d9b1771bf79ab032fdcec5a5</id>
<content type='text'>
Update sd driver to use the callbacks defined in dev_pm_ops.

sd_freeze is NULL, the bus level callback has taken care of quiescing
the device so there should be nothing needs to be done here.
Consequently, sd_thaw is not needed here either.

suspend, poweroff and runtime suspend share the same routine sd_suspend,
which will sync flush and then stop the drive, this is the same as before.

resume, restore and runtime resume share the same routine sd_resume,
which will start the drive by putting it into active power state, this
is also the same as before.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: put to stopped power state when runtime suspend</title>
<updated>2012-11-30T09:22:09Z</updated>
<author>
<name>Aaron Lu</name>
</author>
<published>2012-11-09T07:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a01475637c70a4a484dd315a90bf2df518f07705'/>
<id>urn:sha1:a01475637c70a4a484dd315a90bf2df518f07705</id>
<content type='text'>
When device is runtime suspended, put it to stopped power state to save
some power.

This will also make the behaviour consistent with what the scsi_pm.c
thinks about sd as the comment says:
sd treats runtime suspend, system suspend and system hibernate identical.
With this patch, it is now identical.
And sd_shutdown will also do nothing when it finds the device has been
runtime suspended, if we do not spin down the disk in runtime suspend
by putting it into stopped power state, the disk will be shut down
incorrectly.
And the the same problem can be solved for runtime power off after
runtime suspended case by this change.

With the current runtime scheme for disk, it will only be runtime
suspended when no process opens the disk, so this shouldn't happen a
lot, which makes it acceptable to spin down the disk when runtime
suspended. If some day a more aggressive runtime scheme is used, like
the 'request based runtime pm for disk' that Alan Stern and Lin Ming
has been working, we can introduce some policy to control this. But for
now, make it simple and correct by spinning down the disk.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: Use SCSI read/write(16) with &gt; 32-bit LBA drives</title>
<updated>2012-11-27T05:00:38Z</updated>
<author>
<name>Jason J. Herne</name>
</author>
<published>2012-11-14T22:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53ad570be625045aba3ae7de8d82401364c655e1'/>
<id>urn:sha1:53ad570be625045aba3ae7de8d82401364c655e1</id>
<content type='text'>
Force large capacity (&gt; 0xFFFFFFFF blocks) drives to use READ/WRITE(16) instead
of READ/WRITE(10). Some(most/all?) USB enclosures do not like READ(10) commands
when a large capacity drive is installed. This issue was reported and discussed
here: http://marc.info/?l=linux-usb&amp;m=135247705222324

Signed-off-by: Jason J. Herne &lt;hernejj@gmail.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: Reshuffle init_sd to avoid crash</title>
<updated>2012-11-27T04:59:34Z</updated>
<author>
<name>Joel D. Diaz</name>
</author>
<published>2012-10-10T08:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=afd5e34b2bb34881d3a789e62486814a49b47faa'/>
<id>urn:sha1:afd5e34b2bb34881d3a789e62486814a49b47faa</id>
<content type='text'>
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;
</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>
</author>
<published>2012-09-18T16:19:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2012-09-18T16:19:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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] sd: Ensure we correctly disable devices with unknown protection type</title>
<updated>2012-09-24T09:01:24Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2012-09-21T16:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe542396da73b7e2b0848618c7e95855c1b75689'/>
<id>urn:sha1:fe542396da73b7e2b0848618c7e95855c1b75689</id>
<content type='text'>
We set the capacity to zero when we discovered a device formatted with
an unknown DIF protection type. However, the read_capacity code would
override the capacity and cause the device to be enabled regardless.

Make sd_read_protection_type() return an error if the protection type is
unknown. Also prevent duplicate printk lines when the device is being
revalidated.

Reported-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: Allow protection_type to be overridden</title>
<updated>2012-09-24T08:10:59Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2012-08-28T18:29:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8172499aae4d375334cfe6361900929c3b31a03f'/>
<id>urn:sha1:8172499aae4d375334cfe6361900929c3b31a03f</id>
<content type='text'>
We have encountered a few devices that misbehaved when operating in T10
PI mode. Allow T10 PI protection type to be overridden from userland.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: Avoid remapping bad reference tags</title>
<updated>2012-09-24T08:10:59Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2012-08-28T18:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c579ab69d50a416887390ba4b89598a7b2fa0b6'/>
<id>urn:sha1:8c579ab69d50a416887390ba4b89598a7b2fa0b6</id>
<content type='text'>
It does not make sense to translate ref tags with unexpected values.
Instead we simply ignore them and let the upper layers catch the
problem. Ref tags that contain the expected value are still remapped.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] set to WCE if usb cache quirk is present.</title>
<updated>2012-07-20T07:59:00Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2012-07-08T03:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b81478d82e389dd0961760f5ff6f56b50d29db6d'/>
<id>urn:sha1:b81478d82e389dd0961760f5ff6f56b50d29db6d</id>
<content type='text'>
Make use of USB quirk method to identify such HDD while reading
the cache status in sd_probe(). If cache quirk is present for
the HDD, lets assume that cache is enabled and make WCE bit
equal to 1.

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Pankaj Kumar &lt;pankaj.km@samsung.com&gt;
Signed-off-by: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
