aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)Author
2007-04-01[SCSI] ipr: Add new PCI-E IDs to device tableBrian King
Adds support for some new PCI-E ipr adapters. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] ipr: Remove auto RAID create module parameterBrian King
Remove the auto RAID 0 array creation module parameter, since support for this function has been removed from the firmware. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] ipr: Make adapter operational timeout be per adapter typeBrian King
Some ipr adapters may take longer than others to come operational. This patch makes this timeout different for different adapters, while still preserving the module parameter which can be used to globally override the default. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] ibmvscsi: add slave_configure to allow device restartRobert Jennings
Fixed the kernel-doc comment for ibmvscsi_slave_configure. Thanks to Randy Dunlap for pointing this out. Adding a slave_configure function for the driver. Now the disks can be restarted by the scsi mid-layer when the are disconnected and reconnected. Signed-off-by: "Robert Jennings" <rcj@linux.vnet.ibm.com> Signed-off-by: "Santiago Leon" <santil@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] ibmvscsi: allow for dynamic adjustment of server request_limitRobert Jennings
The request limit calculations used previously on the client failed to mirror the state of the server. Additionally, when a value < 3 was provided there could be problems setting can_queue and handling abort and reset commands. Signed-off-by: "Robert Jennings" <rcj@linux.vnet.ibm.com> Signed-off-by: Santiago Leon <santil@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] aacraid: fix print of Firmware Build Date and add TSIDSalyzyn, Mark
The Adapter build date that is to be printed on instantiation was not displayed as a result of the supplemental adapter information structure not being in sync with the Firmware; the driver took an early test cycle version that had a miss-sized padded region at the head and the structure was not re-checked at the end of qualification. The Build Date was not a priority and is merely a cosmetic enhancement, and the wrong location for the start of the structure member would not induce any side-effect problems. We updated the structure to match the actual format, and added the TSID (Tech Support Identification) value print, should it be present, to the adapter instantiation announcements during driver load. This later enhancement should improve the relationship between Service folk & Tech Support if the printed value of the TSID found it's way into the circular file labeled G... Neither of these values show in sysfs (yet). Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] aacraid: remove unused or deprecated firmware constantsSalyzyn, Mark
Just sweeping the floor clean in one spot. Some of these constants have never been used in the driver or in the firmware (and thus are meaningless). Triggered this patch because I discovered one of the unused constants was actually incorrect and figured it was better to clean them out than correct and update. There are no side effects at all regarding this patch, it is purely cosmetic. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] qla2xxx: Remove duplicate pci_disable_device() callBernhard Walle
On the path qla2x00_probe_one() -> probe_failed -> qla2x00_free_device(), pci_disable_device() is executed twice, once in qla2x00_free_device() and once in qla2x00_probe_one(). This patch removes the unnecessary call. Signed-off-by: Bernhard Walle <bwalle@suse.de> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] aacraid: resolve compiler warnings using ptrdiff_tSalyzyn, Mark
Unsigned long is not always the same size as a pointer, namely on 32 bit systems with 64 bit address space. Ptrdiff_t is the same size as a pointer in all configurations. By using ptrdiff_t we can mitigate the warning messages on these configurations. There should be no side effects of this patch. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] aic7xxx: make functions staticAdrian Bunk
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] aacraid: cleanupsAdrian Bunk
- proper prototypes for global code in aacraid.h - aac_rx_start_adapter() can now become static Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] dpt_i2o: remove dead codeAdrian Bunk
The Coverity checker spotted this dead code introduced by commit a07f353701acae77e023f6270e8af353b37af7c4. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] Remove some unused SCSI-related kernel config variables.Robert P. J. Day
Remove the unused SCSI-related kernel config variables SCSI_NCR53C8XX_PROFILE_SUPPORT SCSI_NCR53C8XX_PROFILE 53C700_IO_MAPPED AIC79XX_ENABLE_RD_STRM AIC7XXX_PROBE_EISA_VL Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] dpt: whitespace cleanupHenne
Remove some trailing whitespaces and some replace whitespaces with tabs. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] pcmcia: allow drivers to be built non-modularRobert P. J. Day
Remove the Kconfig requirement that the PCMCIA SCSI drivers be built only as modules, and allow them to be built into the kernel. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] aacraid: Add likely() and unlikely()Salyzyn, Mark
Add some likely() and unlikely() compiler hints in some of the aacraid hardware interface layers. There should be no operational side effects resulting from this patch and the changes should be mostly benign on x86 platforms. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] qla2xxx: fix for byteswap in fc_host fabric_nameRichard Lary
This patch fixes byte swap issue in qla2xxx driver to fix corrupted fabric_name passed to /sys/class/fc_host/host*/fabric_name. Signed-off-by: Richard Lary <rlary@us.ibm.com> Acked-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01[SCSI] lpfc: fix oops when parsing dodgy VPDAnton Blanchard
We have seen two cases where VPD on an emulex card has been incorrect and we end up walking off the end of memory. It looks like someone made an update (increased the length of a string) without increasing the Length field. Then we do: Length -= (3+i); And since Length is unsigned it becomes very large and we loop forever in the encapsulating: while (Length > 0) { If we make Length signed then we fall out of the loop and proceed on. Its important to note we have only seen this in the lab and it may be the only two cases of this in existence, but since the rest of the code has been written to be resilient against bad VPD we may as well fix this too. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: James Smart <James.Smart@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-27Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] gdth: fix oops in gdth_copy_cmd() [SCSI] mptsas: Fix oops for insmod during kexec [SCSI] lpfc: avoid double-free during PCI error failure
2007-03-21[SCSI] aacraid: cleanup and version stamp driverSalyzyn, Mark
There is some residual cleanup of the last series of patches and the need to bump the revision number to draw the line in the sand. The cmd->SCp.phase is set in the aac_valid_context routine, then set again to the same value following it's return. The cmd->scsi_done is set twice in the aac_queuecommand routine. Free up the scsidev FILO in aac_probe_container as it is not needed further down the function in any case. Improve the efficiency of the abort handler kernel print parameters. Bump revision number of driver to approximate the equivalent in the Adaptec supplied version. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-21[SCSI] aacraid: check buffer address in aac_internal_transferSalyzyn, Mark
Captured a panic on an older kernel where an application issuing commands via sg was sending requests that lacked a request_buffer, thus the buffer pointer used in aac_internal_transer was NULL. The application was fixed closing the issue, but felt it was advised to immunize the driver against the eventuality. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-21[SCSI] fix scsi_wait_scan build problemJames Bottomley
The #ifdef MODULE around the export of scsi_complete_async_scans() which is the API the scsi_wait_scan module uses is incorrect and causes the symbol to be undefined in certain circumstances leading to a build failure. Remove the defines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] sd: fix up start/stop messages for new sd_printk() APIJames Bottomley
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] sd: implement START/STOP managementTejun Heo
Implement SBC START/STOP management. sdev->mange_start_stop is added. When it's set to one, sd STOPs the device on suspend and shutdown and STARTs it on resume. sdev->manage_start_stop defaults is in sdev instead of scsi_disk cdev to allow ->slave_config() override the default configuration but is exported under scsi_disk sysfs node as sdev->allow_restart is. When manage_start_stop is zero (the default value), this patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo <htejun@gmail.com> Rejections fixed and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] sd: fix return value of sd_sync_cache()Tejun Heo
sd_sync_cache() should return -errno on error, fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] eata_pio: Remove FALSE/TRUE definesRichard Knutsson
eata_generic.h is only included by eata_pio.c and it only uses FALSE/TRUE in comments. Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] expose eh_timed_out to the host templateJames Bottomley
It looks like megaraid_sas at least needs this to throttle its commands as they begin to time out. The code keeps the existing transport template use of eh_timed_out (and allows the transport to override the host if they both have this callback). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: Improved error handlingMark Haverkamp
Received from Mark Salyzyn, This set of fixes improve error handling stability of the driver. A popular manifestation of the problems is an NULL pointer reference in the interrupt handler when referencing portions of the scsi command context, or in the scsi_done handling when an offlined device is referenced. The aacraid driver currently does not get notification of orphaned command completions due to devices going offline. The driver also fails to handle the commands that are finished by the error handler, and thus can complete again later at the hands of the adapter causing situations of completion of an invalid scsi command context. Test Unit Ready calls abort assuming that the abort was successful, but are not, and thus when the interrupt from the adapter occurs, they reference invalid command contexts. We add in a TIMED_OUT flag to inform the aacraid FIB context that the interrupt service should merely release the driver resources and not complete the command up. We take advantage of this with the abort handler as well for select abortable commands. And we detect and react if a command that can not be aborted is currently still outstanding to the controller when reissued by the retry mechanism. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: fix srb ioctl for 64 bitsMark Haverkamp
Received from Mark Salyzyn, The raw srb ioctl is supposed to be able to take packets with 32 and 64 bit virtual address SG elements, it did not handle the frames with 64 bit SG elements well when communicating with 64 bit DMA capable adapters, and it did not handle the 32 bit limited DMA adapters at all. The enclosed patch now handles all four quadrants (32 bit / 64 bit SG elements in SRB requests + 32 bit or 64 bit DMA capable adapters) This fix is required before Java based management applications in a 64 bit user space can submit raw srb requests to the array physical components via the ioctl mechanism, the allocated user memory pool on 64 bit machines under this environment forced the management software's hands to submit 64 bit user space virtual address SG elements in via the ioctl. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: remove un-needed references to container id (cid)Mark Haverkamp
Received from Mark Salyzyn, This little patch removes the ',cid)' container identification argument from some of the functions. The argument is used in some cases as merely a debug helper and thus not used, and in others, the value can be quickly acquired from the scsi command in their single solitary use in the procedure rather than wasting resources on passing the argument in from above. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: Fix ioctl handling when adapter resetsMark Haverkamp
Received from Mark Salyzyn, Outstanding ioctl calls still have some problems with aborting cleanly in the face of a reset iop recovery action should the adapter ever enter into a Firmware Assert (BlinkLED) condition. The enclosed patch resolves some uncovered flawed handling. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: Fix blocking issue with container probing function (cast update)Mark Haverkamp
Received from Mark Salyzyn, The aac_probe_container call blocks. This is an issue because it is called on occasion in the context of the queuecommand handler. Once in a blue moon this has resulted in a kernel panic sleeping during interrupt; or problems with some embedded system versions of the kernel that depend on queuecommand to not block. This ugly patch rewrites the aac_probe_container call into a new routine _aac_probe_container that is an asynchronous state machine to complete the series of operations. The legacy blocking aac_probe_container call used in other areas of the driver (during initialization scanning for all targets and in the separate hot-add/remove [aacraid] thread) merely issues _aac_probe_container and then simple spins calling schedule() waiting for completion. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: Fix struct element name issueMark Haverkamp
Received from Mark Salyzyn, This patch is to resolve a namespace issue that will result from a patch expected in the future that adds a new interface; rationalized as correcting a long term issue where hw_fib, instead of hw_fib_va, refers to the virtual address space and hw_fib_pa refers to the physical address space. A small fragment of this patch also cleans up an unused variable that was close to the patch fragments. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] aacraid: add restart adapter platform functionMark Haverkamp
Received from Mark Salyzyn, This patch updates the adapter restart function to deal with some adapters that have specific IOP reset needs. Since the code for restarting the adapter was in two places, changed over to utilizing a platform function in one place. Signed-off-by: Mark Haverkamp <markh@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] set resid in scsi_io_completion() even for check conditionPete Wyckoff
Some targets can return both valid data and sense information. Always update the request data_len from the SCSI command residual. Callers should interpret sense data to determine what parts of the data are valid in case of a CHECK CONDITION status. Signed-off-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] tgt: remove the code to build senseFUJITA Tomonori
tgt notifies a LLD of the failure with sense when it hits the user-space daemon bugs. However, tgt doesn't know anything about SCSI devices that initiators talks to. So it's impossible to send proper sense buffer (format and contents). This patch changes tgt not to notify a LLD of the failure with bogus sense. Instead, tgt just re-queues the failure command to the internal list so that it will be freed cleanly later on when the scsi_host is removed. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] fc_transport: update potential link speedsJames Smart
This patch updates the FC transport for all speeds identified in SM-HBA. Note: it does not sync the "bit" definitions, as that is actually insulated from user-space via the sysfs text string. (I could do it, but it does introduce a potential binary-incompatibility). Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] qla2xxx: Update version number to 8.01.07-k6.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] qla2xxx: Allow the extended-error-logging flag to be dynamic.Andrew Vasquez
The module parameter, ql2xextended_error_logging, can now be set dynamically by writing to the following sysfs entry: /sys/module/qla2xxx/parameters/ql2xextended_error_logging This alleviates the need for the driver to be unloaded and reloaded in order to enable logging. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] qla2xxx: Drop acquisition of hardware_lock during flash manipulations.Andrew Vasquez
There's no need given, I/O has been quiesced, RISC interrupts have been disabled, and finally the RISC has been paused. Flash manipulation on ISP21xx, ISP22xx, and ISP23xx parts requires the RISC to go through a full reset to recover. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] qla2xxx: Add cond_resched() calls during HBA flash manipulation.Andrew Vasquez
We're observing soft lockups during HBA FLASH retrieval and update. Add cond_resched() each time around the tight-loops during flash read()s/write()s. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] qla2xxx: Add scan_[start|finish]() callbacks for ISP24xx HBAs.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] qla2xxx: fix RSCN handling on big-endian systemsMalahal Naineni
qla2xxx driver fails to handle RSCN events affecting area or domain due to an endian issue on big endian systems. This fixes the port_id_t structure on big endian systems. Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Acked-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-20[SCSI] make scsi_wait_scan always modularJames Bottomley
Currently scsi_wait_scan is only built modular if SCSI is modular. However, it's perfectly possible for a built in SCSI still to have modular drivers and thus need scsi_wait_scan as a module. Therefore, scsi_wait_scan should always be built as a module (unless the kernel doesn't support modules). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-15[PATCH] sysfs and driver core: add callback helper, used by SCSI and S390Alan Stern
This patch (as868) adds a helper routine for device drivers that need to set up a callback to perform some action in a different process's context. This is intended for use by attribute methods that want to unregister themselves or their parent device. Attribute method calls are mutually exclusive with unregistration, so such actions cannot be taken directly. Two attribute methods are converted to use the new helper routine: one for SCSI device deletion and one for System/390 ccwgroup devices. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Hugh Dickins <hugh@veritas.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-11[SCSI] sd: typo fix: sdkp_printk should be sd_printkJames Bottomley
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11[SCSI] pci2000: Delete unused header file.Robert P. J. Day
This driver was removed a while ago by commit 099175c94a221fa2723b7273883c98cd32efe900 However, it seems that pci2000.h wasn't properly eliminated, so remove it now. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11[SCSI] tgt: fix scsi command leakFUJITA Tomonori
The failure to map user-space pages leads to scsi command leak. It can happens mostly because of user-space daemon bugs (or OOM). This patch makes tgt just notify a LLD of the failure with sense when blk_rq_map_user() fails. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11[SCSI] tgt: fix sesnse buffer problemsFUJITA Tomonori
This patch simplify the way to notify LLDs of the command completion and addresses the following sense buffer problems: - can't handle both data and sense. - forces user-space to use aligned sense buffer tgt copies sense_data from userspace to cmnd->sense_buffer (if necessary), maps user-space pages (if necessary) and then calls host->transfer_response (host->transfer_data is removed). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11[SCSI] tgt: rm bio hacks in scsi tgtMike Christie
scsi tgt breaks up a command into multple scatterlists if we cannot fit all the data in one. This was because the block rq helpers did not support large requests and because we can get a command of any old size so it is hard to preallocate pages for scatterlist large enough (we cannot really preallocate pages with the bio map user path). In 2.6.20, we added large request support to the block layer helper, blk_rq_map_user. And at LSF, we talked about increasing SCSI_MAX_PHYS_SEGMENTS for scsi tgt if we want to support really really :) large (greater than 256 * PAGE_SIZE in the worst mapping case) requests. The only target currently implemented does not even support the multiple scatterlists stuff and only supports smaller requests, so this patch just coverts scsi tgt to use blk_rq_map_user. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>