linux-kernel-test/drivers/scsi
Tejun Heo c3a4d78c58 block: add rq->resid_len
rq->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->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->data_len for PC commands.
Drivers which want to report residual count should first cache the
total request length, update rq->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->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->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->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 <tj@kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Mike Miller <mike.miller@hp.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: Mike Miller <mike.miller@hp.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-05-11 09:50:53 +02:00
..
aacraid Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n) 2009-04-13 15:04:33 -07:00
aic7xxx dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
aic7xxx_old
aic94xx dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
arcmsr dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
arm Merge branch 'master' into devel 2009-03-28 20:30:18 +00:00
cxgb3i [SCSI] cxgb3i: call ddp release function directly 2009-04-03 09:23:13 -05:00
device_handler [SCSI] scsi_dh_rdac: Retry for NOT_READY check condition 2009-03-17 22:07:06 -04:00
dpt
fcoe [SCSI] fcoe, libfcoe: Add support for FIP. FCoE discovery and keep-alive. 2009-04-03 09:23:08 -05:00
ibmvscsi [SCSI] ibmvfc: Driver version 1.0.5 2009-04-03 09:22:44 -05:00
libfc [SCSI] fcoe, libfc: add libfcoe module 2009-04-03 09:23:04 -05:00
libsas block: add rq->resid_len 2009-05-11 09:50:53 +02:00
lpfc Fix lpfc_parse_bg_err()'s use of do_div() 2009-04-14 09:58:17 -07:00
megaraid dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
mpt2sas block: add rq->resid_len 2009-05-11 09:50:53 +02:00
osd [SCSI] osd_uld: Remove creation of osd_scsi class symlink 2009-04-03 09:22:56 -05:00
pcmcia [SCSI] aha152x_cs: Fix regression that keeps driver from using shared interrupts 2009-01-05 12:17:42 -06:00
qla2xxx dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
qla4xxx dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
sym53c8xx_2 dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
.gitignore
3w-9xxx.c Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n) 2009-04-13 15:04:33 -07:00
3w-9xxx.h [SCSI] 3w-9xxx: add power management support 2009-03-13 15:46:42 -05:00
3w-xxxx.c
3w-xxxx.h dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
53c700_d.h_shipped
53c700.c
53c700.h
53c700.scr
a100u2w.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
a100u2w.h
a2091.c [SCSI] a2091: make 2 functions static 2009-04-03 10:17:31 -05:00
a2091.h [SCSI] a2091: make 2 functions static 2009-04-03 10:17:31 -05:00
a3000.c [SCSI] a3000: make 2 functions static 2009-04-03 10:17:17 -05:00
a3000.h [SCSI] a3000: make 2 functions static 2009-04-03 10:17:17 -05:00
a4000t.c scsi: a4000 - Correct driver unregistration in case of failure 2009-04-22 20:39:06 +02:00
advansys.c [SCSI] advansys: use request_firmware 2009-04-03 09:25:23 -05:00
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
aha1740.h
aic7xxx_old.c
atari_NCR5380.c m68k: section mismatch fixes: Atari SCSI 2009-03-26 21:15:29 +01:00
atari_scsi.c m68k: section mismatch fixes: Atari SCSI 2009-03-26 21:15:29 +01:00
atari_scsi.h
atp870u.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
atp870u.h
BusLogic.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
BusLogic.h
bvme6000_scsi.c scsi/m68k: Kill NCR_700_detect() warnings 2009-03-24 16:38:25 -07:00
ch.c [SCSI] ch: Add scsi type modalias 2009-03-13 15:48:43 -05:00
constants.c [SCSI] Remove SUGGEST flags 2009-03-12 12:58:02 -05:00
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
dpti.h
dtc.c
dtc.h
eata_generic.h
eata_pio.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
eata_pio.h
eata.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
esp_scsi.c [SCSI] esp_scsi: Use DIV_ROUND_UP 2008-12-29 11:24:14 -06:00
esp_scsi.h
fd_mcs.c
fdomain.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
fdomain.h
FlashPoint.c
g_NCR5380_mmio.c
g_NCR5380.c
g_NCR5380.h
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gdth.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
gdth.h
gvp11.c [SCSI] a2091, gvp11: kill warn_unused_result warnings 2009-01-02 12:16:18 -06:00
gvp11.h
hosts.c [SCSI] fix /proc memory leak in the SCSI core 2009-03-12 12:58:17 -05:00
hptiop.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
hptiop.h
ibmmca.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
imm.c
imm.h
in2000.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
in2000.h
initio.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
initio.h [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
ipr.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
ipr.h [SCSI] ipr: add MSI support 2009-03-12 12:57:58 -05:00
ips.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
ips.h
iscsi_tcp.c [SCSI] iscsi class: remove host no argument from session creation callout 2009-03-13 15:29:39 -05:00
iscsi_tcp.h [SCSI] iscsi_tcp: hook iscsi_tcp into new libiscsi_tcp module 2008-12-29 11:24:22 -06:00
jazz_esp.c
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-04-06 13:24:49 -07:00
lasi700.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
libiscsi_tcp.c [SCSI] libiscsi_tcp: replace tcp_debug/scsi_debug logging with session/conn logging 2009-03-13 15:27:29 -05:00
libiscsi.c [SCSI] libiscsi: fix iscsi pool error path 2009-04-03 09:23:14 -05:00
libsrp.c
mac53c94.c
mac53c94.h
mac_esp.c [SCSI] mac_esp: fix for quadras with two esp chips 2008-12-29 11:24:19 -06:00
mac_scsi.c m68k: machw.h cleanup 2008-12-28 20:00:03 +01:00
mac_scsi.h
Makefile [SCSI] fcoe, libfc: add libfcoe module 2009-04-03 09:23:04 -05:00
megaraid.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
megaraid.h [SCSI] megaraid: fix mega_internal_command oops 2008-11-05 12:40:23 -05:00
mesh.c
mesh.h
mvme16x_scsi.c scsi/m68k: Kill NCR_700_detect() warnings 2009-03-24 16:38:25 -07:00
mvme147.c
mvme147.h
mvsas.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
NCR5380.h
NCR_D700.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32_debug.c
nsp32_io.h
nsp32.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
nsp32.h
osst_detect.h
osst_options.h
osst.c [SCSI] osst: replace scsi_execute_async with the block layer API 2009-03-12 12:58:10 -05:00
osst.h [SCSI] osst: replace scsi_execute_async with the block layer API 2009-03-12 12:58:10 -05:00
pas16.c
pas16.h
ppa.c
ppa.h
ps3rom.c powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/scsi 2009-01-16 16:15:15 +11:00
qla1280.c Merge git://git.infradead.org/~dwmw2/firmware-2.6 2009-04-10 12:01:22 -07:00
qla1280.h [SCSI] qla1280: use request_firmware 2009-04-03 09:24:42 -05:00
qlogicfas408.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
qlogicfas408.h
qlogicfas.c
qlogicpti.c [SCSI] qlogicpti: use request_firmware 2009-04-03 09:25:23 -05:00
qlogicpti.h
raid_class.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
script_asm.pl
scsi_debug.c [SCSI] scsi_debug: DIF/DIX support 2009-03-12 12:57:55 -05:00
scsi_devinfo.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
scsi_error.c [SCSI] remove scsi_req_map_sg 2009-03-12 12:58:10 -05:00
scsi_ioctl.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
scsi_lib_dma.c
scsi_lib.c block: add rq->resid_len 2009-05-11 09:50:53 +02:00
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_priv.h PM/Hibernate: Wait for SCSI devices scan to complete during resume 2009-04-13 11:37:07 -07:00
scsi_proc.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
scsi_sas_internal.h
scsi_scan.c driver synchronization: make scsi_wait_scan more advanced 2009-04-21 19:40:00 -07:00
scsi_sysctl.c
scsi_sysfs.c [SCSI] scsi_sysfs: delete extra kernel-doc 2009-03-12 12:57:55 -05:00
scsi_tgt_if.c
scsi_tgt_lib.c
scsi_tgt_priv.h
scsi_transport_api.h
scsi_transport_fc_internal.h
scsi_transport_fc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-03-28 13:30:43 -07:00
scsi_transport_iscsi.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-03-28 13:30:43 -07:00
scsi_transport_sas.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
scsi_transport_spi.c [SCSI] scsi_transport_spi: fix the misuse of scsi_execute return value 2008-12-29 11:24:32 -06:00
scsi_transport_srp_internal.h
scsi_transport_srp.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
scsi_typedefs.h
scsi_wait_scan.c driver synchronization: make scsi_wait_scan more advanced 2009-04-21 19:40:00 -07:00
scsi.c [SCSI] use kmem_cache_zalloc instead of kmem_cache_alloc/memset 2009-04-03 10:16:31 -05:00
scsi.h
scsicam.c
sd_dif.c [SCSI] sd: Correctly handle 6-byte commands with DIX 2009-01-05 09:06:23 -06:00
sd.c [SCSI] fix recovered error handling 2009-04-03 09:22:55 -05:00
sd.h [SCSI] sd: Make revalidate less chatty 2009-03-17 21:43:52 -04:00
ses.c [SCSI] ses: #if 0 the unused ses_match_host() 2009-04-03 10:17:01 -05:00
sg.c block: add rq->resid_len 2009-05-11 09:50:53 +02:00
sgiwd93.c [SCSI] sgiwd93: Fix compilation warning 2009-01-02 10:58:41 -06:00
sim710.c [SCSI] struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-02 10:22:16 -06:00
sni_53c710.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
sr_ioctl.c [SCSI] add residual argument to scsi_execute and scsi_execute_req 2008-12-29 11:24:24 -06:00
sr_vendor.c
sr.c [SCSI] fix recovered error handling 2009-04-03 09:22:55 -05:00
sr.h
st_options.h
st.c block: add rq->resid_len 2009-05-11 09:50:53 +02:00
st.h [SCSI] st: remove unused frp_sg_current 2009-01-02 12:02:25 -06:00
stex.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
sun3_NCR5380.c
sun3_scsi_vme.c
sun3_scsi.c
sun3_scsi.h
sun3x_esp.c
sun_esp.c
sym53c416.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
sym53c416.h
t128.c
t128.h
tmscsim.c [SCSI] tmscsim: fix indentation and braces disagreement - add braces 2008-12-29 11:24:14 -06:00
tmscsim.h
u14-34f.c [SCSI] u14-34f: fix scsi_dma_map failure case 2008-12-29 11:24:14 -06:00
ultrastor.c
ultrastor.h
wd33c93.c
wd33c93.h
wd7000.c [SCSI] Clean up my email address and use a single standard address for everything 2008-12-29 11:24:12 -06:00
zalon.c parisc: fix dev_printk() compile warnings for accessing a device struct 2009-03-13 01:18:14 -04:00
zorro7xx.c