linux_dsm_epyc7002/drivers/ata
Tejun Heo 87340e9834 libata-scsi: improve rbuf handling for simulated commands
Buffer length handling in simulated commands is error-prone and full
of bugs.  There are a number of places where necessary length checks
are missing and if the output buffer is passed in as sglist, nothing
works.

This patch adds a static buffer ata_scsi_rbuf which is sufficiently
large to handle the larges output from simulated commands (4k
currently), let all simulte functions write to the buffer and removes
all length checks as we know that there always is enough buffer space.
Copying in (for ATAPI inquiry fix up) and out are handled by
sg_copy_to/from_buffer() behind ata_scsi_rbuf_get/put() interface
which handles sglist properly.

This patch is inspired from buffer length check fix patch from Petr
Vandrovec.

Updated to use sg_copy_to/from_buffer() as suggested by FUJITA
Tomonori.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Petr Vandrovec <petr@vmware.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 02:17:03 -04:00
..
ahci.c ahci: retry enabling AHCI a few times before spitting out WARN_ON() 2008-04-25 00:45:13 -04:00
ata_generic.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
ata_piix.c ata_piix: add Asus Eee 701 controller to short cable list 2008-04-25 01:11:39 -04:00
Kconfig [MIPS] ATA: Rename routerboard 500 to 532 2008-04-29 02:16:25 -04:00
libata-acpi.c libata-acpi.c: remove unneeded #if's 2008-04-25 00:45:52 -04:00
libata-core.c make sata_set_spd_needed() static 2008-04-25 00:46:11 -04:00
libata-eh.c libata-eh set tf flags in NCQ EH result_tf 2008-04-25 01:11:37 -04:00
libata-pmp.c libata: implement PMP helpers 2008-04-17 15:44:25 -04:00
libata-scsi.c libata-scsi: improve rbuf handling for simulated commands 2008-04-29 02:17:03 -04:00
libata-sff.c libata: make WARN_ON conditions in ata_sff_hsm_move() more strict 2008-04-25 00:45:09 -04:00
libata.h libata-scsi: clean up inquiry / mode sense related functions 2008-04-29 02:16:37 -04:00
Makefile [MIPS] ATA: Rename routerboard 500 to 532 2008-04-29 02:16:25 -04:00
pata_acpi.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_ali.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_amd.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_artop.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_at32.c ATA/IDE: fix platform driver hotplug/coldplug 2008-04-25 00:45:04 -04:00
pata_atiixp.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_bf54x.c pata_bf54x: decrease count first. 2008-04-25 01:26:28 -04:00
pata_cmd64x.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cmd640.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_cs5520.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cs5530.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cs5535.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cs5536.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_cypress.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_efar.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt3x2n.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt3x3.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt37x.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_hpt366.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_icside.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_isapnp.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_it821x.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_it8213.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_ixp4xx_cf.c ATA/IDE: fix platform driver hotplug/coldplug 2008-04-25 00:45:04 -04:00
pata_jmicron.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_legacy.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_marvell.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_mpc52xx.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_mpiix.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_netcell.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_ninja32.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_ns87410.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_ns87415.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_of_platform.c Rename: linux/pata_platform.h to linux/ata_platform.h 2008-02-06 06:54:17 -05:00
pata_oldpiix.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_opti.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_optidma.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_pcmcia.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_pdc202xx_old.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_pdc2027x.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_platform.c ATA/IDE: fix platform driver hotplug/coldplug 2008-04-25 00:45:04 -04:00
pata_qdi.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_radisys.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_rb532_cf.c [MIPS] ATA: Rename routerboard 500 to 532 2008-04-29 02:16:25 -04:00
pata_rz1000.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_sc1200.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_scc.c libata: move link onlineness check out of softreset methods 2008-04-17 15:44:25 -04:00
pata_serverworks.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_sil680.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_sis.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_sl82c105.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_triflex.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
pata_via.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pata_winbond.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
pdc_adma.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
sata_fsl.c typo in sata_fsl 2008-04-28 10:03:31 -07:00
sata_inic162x.c libata: kill dead code paths in reset path 2008-04-17 15:44:25 -04:00
sata_mv.c sata_mv: re-enable hotplug, update TODO list 2008-04-25 01:26:22 -04:00
sata_nv.c sata_nv: make hardreset return -EAGAIN on success 2008-04-25 00:45:48 -04:00
sata_promise.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
sata_promise.h libata annotations and fixes 2008-01-23 05:24:15 -05:00
sata_qstor.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
sata_sil24.c libata: move link onlineness check out of softreset methods 2008-04-17 15:44:25 -04:00
sata_sil.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
sata_sis.c sata_sis: SCR accessors return -EINVAL when requested SCR isn't available 2008-04-24 23:42:47 -04:00
sata_svw.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
sata_sx4.c libata: add qc_fill_rtf port operation 2008-04-17 15:44:23 -04:00
sata_uli.c libata: rename SFF functions 2008-04-17 15:44:21 -04:00
sata_via.c libata: restructure SFF post-reset readiness waits 2008-04-17 15:44:22 -04:00
sata_vsc.c libata: rename SFF port ops 2008-04-17 15:44:22 -04:00
sis.h libata: PATA-mode fixes for sis_sata 2007-07-02 10:17:42 -04:00