<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/ub.c, branch v2.6.33.16</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/block/ub.c?h=v2.6.33.16</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/block/ub.c?h=v2.6.33.16'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-09-22T14:17:25Z</updated>
<entry>
<title>const: make block_device_operations const</title>
<updated>2009-09-22T14:17:25Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-09-22T00:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e'/>
<id>urn:sha1:83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>block: Do away with the notion of hardsect_size</title>
<updated>2009-05-22T21:22:54Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2009-05-22T21:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>block: set rq-&gt;resid_len to blk_rq_bytes() on issue</title>
<updated>2009-05-19T09:36:08Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-19T09:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f49f63178360b07a095bd33b0d850d60edf7590'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ub: use __blk_end_request_all()</title>
<updated>2009-05-19T09:36:08Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-19T09:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3755100dd5f66761aaaa7ae44c70b319a7c78a56'/>
<id>urn:sha1:3755100dd5f66761aaaa7ae44c70b319a7c78a56</id>
<content type='text'>
ub_end_rq() always tries to complete full request.  The @cmd_len
parameter was there because rq-&gt;data_len used to be overwritten with
residue count.  Drop @cmd_len and use __blk_end_request_all().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: implement and enforce request peek/start/fetch</title>
<updated>2009-05-11T07:52:18Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-08T02:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9934c8c04561413609d2bc38c6b9f268cba774a4'/>
<id>urn:sha1:9934c8c04561413609d2bc38c6b9f268cba774a4</id>
<content type='text'>
Till now block layer allowed two separate modes of request execution.
A request is always acquired from the request queue via
elv_next_request().  After that, drivers are free to either dequeue it
or process it without dequeueing.  Dequeue allows elv_next_request()
to return the next request so that multiple requests can be in flight.

Executing requests without dequeueing has its merits mostly in
allowing drivers for simpler devices which can't do sg to deal with
segments only without considering request boundary.  However, the
benefit this brings is dubious and declining while the cost of the API
ambiguity is increasing.  Segment based drivers are usually for very
old or limited devices and as converting to dequeueing model isn't
difficult, it doesn't justify the API overhead it puts on block layer
and its more modern users.

Previous patches converted all block low level drivers to dequeueing
model.  This patch completes the API transition by...

* renaming elv_next_request() to blk_peek_request()

* renaming blkdev_dequeue_request() to blk_start_request()

* adding blk_fetch_request() which is combination of peek and start

* disallowing completion of queued (not started) requests

* applying new API to all LLDs

Renamings are for consistency and to break out of tree code so that
it's apparent that out of tree drivers need updating.

[ Impact: block request issue API cleanup, no functional change ]

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Mike Miller &lt;mike.miller@hp.com&gt;
Cc: unsik Kim &lt;donari75@gmail.com&gt;
Cc: Paul Clements &lt;paul.clements@steeleye.com&gt;
Cc: Tim Waugh &lt;tim@cyberelk.net&gt;
Cc: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Laurent Vivier &lt;Laurent@lvivier.info&gt;
Cc: Jeff Garzik &lt;jgarzik@pobox.com&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Adrian McMenamin &lt;adrian@mcmen.demon.co.uk&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Alex Dubov &lt;oakad@yahoo.com&gt;
Cc: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Markus Lidel &lt;Markus.Lidel@shadowconnect.com&gt;
Cc: Stefan Weinhuber &lt;wein@de.ibm.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: blk_rq_[cur_]_{sectors|bytes}() usage cleanup</title>
<updated>2009-05-11T07:50:55Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-07T13:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1011c1b9f2e45ce7c6e38888d2b83936aec38771'/>
<id>urn:sha1:1011c1b9f2e45ce7c6e38888d2b83936aec38771</id>
<content type='text'>
With the previous changes, the followings are now guaranteed for all
requests in any valid state.

* blk_rq_sectors() == blk_rq_bytes() &gt;&gt; 9
* blk_rq_cur_sectors() == blk_rq_cur_bytes() &gt;&gt; 9

Clean up accessor usages.  Notable changes are

* nbd,i2o_block: end_all used instead of explicit byte count
* scsi_lib: unnecessary conditional on request type removed

[ Impact: cleanup ]

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Paul Clements &lt;paul.clements@steeleye.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Alex Dubov &lt;oakad@yahoo.com&gt;
Cc: Markus Lidel &lt;Markus.Lidel@shadowconnect.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: cleanup rq-&gt;data_len usages</title>
<updated>2009-05-11T07:50:55Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-07T13:24:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0790410300abaaf4f25f702803beff701baebf1'/>
<id>urn:sha1:b0790410300abaaf4f25f702803beff701baebf1</id>
<content type='text'>
With recent unification of fields, it's now guaranteed that
rq-&gt;data_len always equals blk_rq_bytes().  Convert all non-IDE direct
users to accessors.  IDE will be converted in a separate patch.

Boaz: spotted incorrect data_len/resid_len conversion in osd.

[ Impact: convert direct rq-&gt;data_len usages to blk_rq_bytes() ]

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Markus Lidel &lt;Markus.Lidel@shadowconnect.com&gt;
Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Cc: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: convert to pos and nr_sectors accessors</title>
<updated>2009-05-11T07:50:54Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-07T13:24:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83096ebf1263b2c1ee5e653ba37d993d02e3eb7b'/>
<id>urn:sha1:83096ebf1263b2c1ee5e653ba37d993d02e3eb7b</id>
<content type='text'>
With recent cleanups, there is no place where low level driver
directly manipulates request fields.  This means that the 'hard'
request fields always equal the !hard fields.  Convert all
rq-&gt;sectors, nr_sectors and current_nr_sectors references to
accessors.

While at it, drop superflous blk_rq_pos() &lt; 0 test in swim.c.

[ Impact: use pos and nr_sectors accessors ]

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Tested-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Tested-by: Adrian McMenamin &lt;adrian@mcmen.demon.co.uk&gt;
Acked-by: Adrian McMenamin &lt;adrian@mcmen.demon.co.uk&gt;
Acked-by: Mike Miller &lt;mike.miller@hp.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Paul Clements &lt;paul.clements@steeleye.com&gt;
Cc: Tim Waugh &lt;tim@cyberelk.net&gt;
Cc: Jeff Garzik &lt;jgarzik@pobox.com&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Cc: Alex Dubov &lt;oakad@yahoo.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Dario Ballabio &lt;ballabio_dario@emc.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: unsik Kim &lt;donari75@gmail.com&gt;
Cc: Laurent Vivier &lt;Laurent@lvivier.info&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: add rq-&gt;resid_len</title>
<updated>2009-05-11T07:50:53Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-07T13:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c3a4d78c580de4edc9ef0f7c59812fb02ceb037f'/>
<id>urn:sha1:c3a4d78c580de4edc9ef0f7c59812fb02ceb037f</id>
<content type='text'>
rq-&gt;data_len served two purposes - the length of data buffer on issue
and the residual count on completion.  This duality creates some
headaches.

First of all, block layer and low level drivers can't really determine
what rq-&gt;data_len contains while a request is executing.  It could be
the total request length or it coulde be anything else one of the
lower layers is using to keep track of residual count.  This
complicates things because blk_rq_bytes() and thus
[__]blk_end_request_all() relies on rq-&gt;data_len for PC commands.
Drivers which want to report residual count should first cache the
total request length, update rq-&gt;data_len and then complete the
request with the cached data length.

Secondly, it makes requests default to reporting full residual count,
ie. reporting that no data transfer occurred.  The residual count is
an exception not the norm; however, the driver should clear
rq-&gt;data_len to zero to signify the normal cases while leaving it
alone means no data transfer occurred at all.  This reverse default
behavior complicates code unnecessarily and renders block PC on some
drivers (ide-tape/floppy) unuseable.

This patch adds rq-&gt;resid_len which is used only for residual count.

While at it, remove now unnecessasry blk_rq_bytes() caching in
ide_pc_intr() as rq-&gt;data_len is not changed anymore.

Boaz	: spotted missing conversion in osd
Sergei	: spotted too early conversion to blk_rq_bytes() in ide-tape

[ Impact: cleanup residual count handling, report 0 resid by default ]

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Mike Miller &lt;mike.miller@hp.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Doug Gilbert &lt;dgilbert@interlog.com&gt;
Cc: Mike Miller &lt;mike.miller@hp.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>USB: add reset endpoint operations</title>
<updated>2009-04-17T17:50:27Z</updated>
<author>
<name>David Vrabel</name>
<email>david.vrabel@csr.com</email>
</author>
<published>2009-04-08T17:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3444b26afa145148951112534f298bdc554ec789'/>
<id>urn:sha1:3444b26afa145148951112534f298bdc554ec789</id>
<content type='text'>
Wireless USB endpoint state has a sequence number and a current
window and not just a single toggle bit.  So allow HCDs to provide a
endpoint_reset method and call this or clear the software toggles as
required (after a clear halt, set configuration etc.).

usb_settoggle() and friends are then HCD internal and are moved into
core/hcd.h and all device drivers call usb_reset_endpoint() instead.

If the device endpoint state has been reset (with a clear halt) but
the host endpoint state has not then subsequent data transfers will
not complete. The device will only work again after it is reset or
disconnected.

Signed-off-by: David Vrabel &lt;david.vrabel@csr.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
