<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/ide/ide-cd.c, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ide-cd: handle fragmented packet commands gracefully</title>
<updated>2009-06-26T18:22:37+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>petkovbb@gmail.com</email>
</author>
<published>2009-06-26T18:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9c72ebef5aabf3532469d602a9d87beceea268b1'/>
<id>9c72ebef5aabf3532469d602a9d87beceea268b1</id>
<content type='text'>
There are some devices in the wild that clear the DRQ bit during the
last word of a packet command and therefore could use a "second chance"
for that last word of data to be xferred instead of simply failing the
request. Do that by attempting to suck in those last bytes in PIO mode.

In addition, the ATA_ERR bit has to be cleared for we cannot be sure the
data is valid otherwise.

See http://bugzilla.kernel.org/show_bug.cgi?id=13399 for details.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Acked-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some devices in the wild that clear the DRQ bit during the
last word of a packet command and therefore could use a "second chance"
for that last word of data to be xferred instead of simply failing the
request. Do that by attempting to suck in those last bytes in PIO mode.

In addition, the ATA_ERR bit has to be cleared for we cannot be sure the
data is valid otherwise.

See http://bugzilla.kernel.org/show_bug.cgi?id=13399 for details.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Acked-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide-cd: Improve "weird block size" error message</title>
<updated>2009-06-24T07:32:31+00:00</updated>
<author>
<name>Frans Pop</name>
<email>elendil@planet.nl</email>
</author>
<published>2009-06-23T23:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d9ae62433e46909fc9e7d97ce74202c2851667b8'/>
<id>d9ae62433e46909fc9e7d97ce74202c2851667b8</id>
<content type='text'>
Currently the error gets repeated too frequently, for example each
time HAL polls the device when a disc is present. Avoid that by using
printk_once instead of printk.

Also join the error and corrective action messages into a single line.

Signed-off-by: Frans Pop &lt;elendil@planet.nl&gt;
Acked-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the error gets repeated too frequently, for example each
time HAL polls the device when a disc is present. Avoid that by using
printk_once instead of printk.

Also join the error and corrective action messages into a single line.

Signed-off-by: Frans Pop &lt;elendil@planet.nl&gt;
Acked-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide-cd: Don't warn on bogus block size unless it actually matters.</title>
<updated>2009-06-24T07:32:30+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-06-23T23:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=af054ed0018f0a69f8ea6f7546cbf34385edf13b'/>
<id>af054ed0018f0a69f8ea6f7546cbf34385edf13b</id>
<content type='text'>
Frans Pop reported that his CDROM drive reports a blocksize of 2352,
and this causes new warnings due to commit
e8e7b9eb11c34ee18bde8b7011af41938d1ad667 ("ide-cd: fix oops when using
growisofs").

What we're trying to do is make sure that "blocklen &gt;&gt; SECTOR_BITS"
is something the block layer won't choke on.

And for Frans' case "2352 &gt;&gt; SECTOR_BITS" is equal to
"2048 &gt;&gt; SECTOR_BITS", and thats "4".

So warning in this case gives no real benefit.

Reported-by: Frans Pop &lt;elendil@planet.nl&gt;
Tested-by: Frans Pop &lt;elendil@planet.nl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Frans Pop reported that his CDROM drive reports a blocksize of 2352,
and this causes new warnings due to commit
e8e7b9eb11c34ee18bde8b7011af41938d1ad667 ("ide-cd: fix oops when using
growisofs").

What we're trying to do is make sure that "blocklen &gt;&gt; SECTOR_BITS"
is something the block layer won't choke on.

And for Frans' case "2352 &gt;&gt; SECTOR_BITS" is equal to
"2048 &gt;&gt; SECTOR_BITS", and thats "4".

So warning in this case gives no real benefit.

Reported-by: Frans Pop &lt;elendil@planet.nl&gt;
Tested-by: Frans Pop &lt;elendil@planet.nl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide-cd: prevent null pointer deref via cdrom_newpc_intr</title>
<updated>2009-06-20T10:22:47+00:00</updated>
<author>
<name>Rainer Weikusat</name>
<email>rweikusat@mssgmbh.com</email>
</author>
<published>2009-06-18T15:04:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=39c58f37a10198054c656c28202fb1e6d22fd505'/>
<id>39c58f37a10198054c656c28202fb1e6d22fd505</id>
<content type='text'>
With 2.6.30, the error handling code in cdrom_newpc_intr was changed
to deal with partial request failures by normally completing the 'good'
parts of a request and only 'error' the last (and presumably,
incompletely transferred) bio associated with a particular
request. In order to do this, ide_complete_rq is called over
ide_cd_error_cmd() to partially complete the rq. The block layer
does partial completion only for requests with bio's and if the
rq doesn't have one (eg 'GPCMD_READ_DISC_INFO') the request is
completed as a whole and the drive-&gt;hwif-&gt;rq pointer set to NULL
afterwards. When calling ide_complete_rq again to report
the error, this null pointer is derefenced, resulting in a kernel
crash.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13399.

Signed-off-by: Rainer Weikusat &lt;rweikusat@mssgmbh.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With 2.6.30, the error handling code in cdrom_newpc_intr was changed
to deal with partial request failures by normally completing the 'good'
parts of a request and only 'error' the last (and presumably,
incompletely transferred) bio associated with a particular
request. In order to do this, ide_complete_rq is called over
ide_cd_error_cmd() to partially complete the rq. The block layer
does partial completion only for requests with bio's and if the
rq doesn't have one (eg 'GPCMD_READ_DISC_INFO') the request is
completed as a whole and the drive-&gt;hwif-&gt;rq pointer set to NULL
afterwards. When calling ide_complete_rq again to report
the error, this null pointer is derefenced, resulting in a kernel
crash.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13399.

Signed-off-by: Rainer Weikusat &lt;rweikusat@mssgmbh.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: BUG() on unknown requests</title>
<updated>2009-06-15T20:16:10+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-06-15T20:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78'/>
<id>2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78</id>
<content type='text'>
Unsupported requests should be never handed down to device drivers
and the best thing we can do upon discovering such request inside
driver's -&gt;do_request method is to just BUG().

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unsupported requests should be never handed down to device drivers
and the best thing we can do upon discovering such request inside
driver's -&gt;do_request method is to just BUG().

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bp-remove-pc-buf' into for-next</title>
<updated>2009-06-13T10:00:54+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-06-13T10:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8dcce4081305d3d1629190edd112e6473c315cbc'/>
<id>8dcce4081305d3d1629190edd112e6473c315cbc</id>
<content type='text'>
Conflicts:
	drivers/ide/ide-tape.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/ide/ide-tape.c
</pre>
</div>
</content>
</entry>
<entry>
<title>block: Do away with the notion of hardsect_size</title>
<updated>2009-05-22T21:22:54+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2009-05-22T21:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1'/>
<id>e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1</id>
<content type='text'>
Until now we have had a 1:1 mapping between storage device physical
block size and the logical block sized used when addressing the device.
With SATA 4KB drives coming out that will no longer be the case.  The
sector size will be 4KB but the logical block size will remain
512-bytes.  Hence we need to distinguish between the physical block size
and the logical ditto.

This patch renames hardsect_size to logical_block_size.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until now we have had a 1:1 mapping between storage device physical
block size and the logical block sized used when addressing the device.
With SATA 4KB drives coming out that will no longer be the case.  The
sector size will be 4KB but the logical block size will remain
512-bytes.  Hence we need to distinguish between the physical block size
and the logical ditto.

This patch renames hardsect_size to logical_block_size.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into for-2.6.31</title>
<updated>2009-05-22T18:25:34+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2009-05-22T18:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e4b636366c00738b9609cda307014d71b1225b7f'/>
<id>e4b636366c00738b9609cda307014d71b1225b7f</id>
<content type='text'>
Conflicts:
	drivers/block/hd.c
	drivers/block/mg_disk.c

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/block/hd.c
	drivers/block/mg_disk.c

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: set rq-&gt;resid_len to blk_rq_bytes() on issue</title>
<updated>2009-05-19T09:36:08+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-19T09:33:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5f49f63178360b07a095bd33b0d850d60edf7590'/>
<id>5f49f63178360b07a095bd33b0d850d60edf7590</id>
<content type='text'>
In commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f, while introducing
rq-&gt;resid_len, the default value of residue count was changed from
full count to zero.  The conversion was done under the assumption that
when a request fails residue count wasn't defined.  However, Boaz and
James pointed out that this wasn't true and the residue count should
be preserved for failed requests too.

This patchset restores the original behavior by setting rq-&gt;resid_len
to blk_rq_bytes(rq) on request start and restoring explicit clearing
in affected drivers.  While at it, take advantage of the fact that
rq-&gt;resid_len is set to full count where applicable.

* ide-cd: rq-&gt;resid_len cleared on pc success

* mptsas: req-&gt;resid_len cleared on success

* sas_expander: rsp/req-&gt;resid_len cleared on success

* mpt2sas_transport: req-&gt;resid_len cleared on success

* ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
  advantage of initial full count to simplify code

Boaz Harrosh spotted bug in resid_len initialization.  Fixed as
suggested.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f, while introducing
rq-&gt;resid_len, the default value of residue count was changed from
full count to zero.  The conversion was done under the assumption that
when a request fails residue count wasn't defined.  However, Boaz and
James pointed out that this wasn't true and the residue count should
be preserved for failed requests too.

This patchset restores the original behavior by setting rq-&gt;resid_len
to blk_rq_bytes(rq) on request start and restoring explicit clearing
in affected drivers.  While at it, take advantage of the fact that
rq-&gt;resid_len is set to full count where applicable.

* ide-cd: rq-&gt;resid_len cleared on pc success

* mptsas: req-&gt;resid_len cleared on success

* sas_expander: rsp/req-&gt;resid_len cleared on success

* mpt2sas_transport: req-&gt;resid_len cleared on success

* ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
  advantage of initial full count to simplify code

Boaz Harrosh spotted bug in resid_len initialization.  Fixed as
suggested.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ide: unify interrupt reason checking</title>
<updated>2009-05-15T04:44:45+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>petkovbb@gmail.com</email>
</author>
<published>2009-04-26T08:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=103f7033bd0f7b65ff3e0a5ea72449d08010b031'/>
<id>103f7033bd0f7b65ff3e0a5ea72449d08010b031</id>
<content type='text'>
Add ide_check_ireason() function that handles all ATAPI devices.
Reorganize all unlikely cases in ireason checking further down in the
code path.

In addition, add PFX for printks originating from ide-atapi. Finally,
remove ide_cd_check_ireason.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add ide_check_ireason() function that handles all ATAPI devices.
Reorganize all unlikely cases in ireason checking further down in the
code path.

In addition, add PFX for printks originating from ide-atapi. Finally,
remove ide_cd_check_ireason.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
