summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] qla2xxx: ABBA lock ordering fix.Andrew Vasquez2006-05-201-14/+1Star
| | | | | | | | | | | | | | | In qla2x00_reset_chip the driver first takes the hardware lock, and then later on takes the mbx lock. In the mailbox_command code.. it goes the other way around. Discovered with the lock validator. Cc: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Update ISP24xx firwmare loading heuristics.Andrew Vasquez2006-05-201-83/+93
| | | | | | | | | If firmware image is unavailable via request_firwmare(), then attempt to load the image (likely out-of-date) stored in flash memory. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Use FW calculated residual count for underrun handling.Ravi Anand2006-05-202-5/+13
| | | | | | | With ISP24XX and ISP54XX parts. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Add support for new flash part.Ravi Anand2006-05-202-12/+83
| | | | | Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] qla2xxx: Don't wait for loop transition to complete if LOOP_DEAD ↵Ravi Anand2006-05-201-0/+4
| | | | | | | state is attained. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: update versionMike Christie2006-05-201-3/+5
| | | | | | | update version Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: fix command requeues during iscsi recoveryMike Christie2006-05-201-39/+48
| | | | | | | | | | | | | | Do not flush queues then block session. This will cause commands to needlessly swing around on us and remove goofy recovery_failed field and replace with state value. And do not start recovery from within the host reset function. This causeis too many problems becuase open-iscsi was desinged to call out to userspace then have userpscae decide if we should go into recovery or kill the session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: support mutiple daemonsMike Christie2006-05-201-11/+27
| | | | | | | | | | Patch from david.somayajulu@qlogic.com and cleaned up by Tomo. qla4xxx is going to have a different daemon so this patch just routes the events to the right daemon. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: kill dtask mempoolsMike Christie2006-05-202-88/+10Star
| | | | | | | | | | | | Discovered by steven@hayter.me.uk and patch by michaelc@cs.wisc.edu The dtask mempool is reserving 261120 items per session! Since we are now sending headers with sendmsg there is no reason for the mempool and that was causing us to us carzy amounts of mem. We can preallicate a header in the r2t and task struct and reuse them Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: only preallocate login bufferMike Christie2006-05-201-16/+10Star
| | | | | | | | | We only use the mtask data buffer for login tasks so we do not need to preallocate a buffer for every mtask. This saves 8 * 31 KB. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: dont use sendpage for iscsi headersMike Christie2006-05-201-16/+8Star
| | | | | | | | | | | | From Zhen and ported by Mike: Don't use sendpage for the headers. sendpage for the pdu headers does not seem to have a performance impact, makes life harder for mutiple data pdus to be in flight and still trips up some network cards when it is from slab mem. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] fix (unlikely) memory leak in DAC960 driverJesper Juhl2006-05-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Coverity checker found a memory leak (bug nr. 1245) in drivers/block/DAC960.c::DAC960_V2_ProcessCompletedCommand() The leak is pretty unlikely since it requires that the first of two successive kmalloc() calls fail while the second one succeeds. But it can still happen even if it's unlikely. If the first call that allocates 'PhysicalDeviceInfo' fails but the one that allocates 'InquiryUnitSerialNumber' succeeds, then we will leak the memory allocated to 'InquiryUnitSerialNumber' when the variable goes out of scope. A simple fix for this is to change the existing code that frees 'PhysicalDeviceInfo' if that one was allocated but 'InquiryUnitSerialNumber' was not, into a check for either pointer being NULL and if so just free both. This is safe since kfree() can deal with being passed a NULL pointer and it avoids the leak. While I was there I also removed the casts of the kmalloc() return value since it's pointless. I also updated the driver version since this patch changes the workings of the code (however slightly). This issue could probably be fixed a lot more elegantly, but the code is a big mess IMHO and I just took the least intrusive route to a fix that I could find instead of starting on a cleanup as well (that can come later). Please consider for inclusion. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] aacraid: remove unneeded listMark Haverkamp2006-05-204-9/+0Star
| | | | | | | | | | Received From Mark Salyzyn The queue tracking is just not being used, not even for debugging. Information about outstanding commands can be acquired from the scsi structures. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] aacraid: sa race condition fixMark Haverkamp2006-05-201-2/+2
| | | | | | | | | | Received From Mark Salyzyn A race condition existed that could result in a lost completion of a command to the ppc based cards. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] aacraid: adjustable timeoutsMark Haverkamp2006-05-206-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | Received From Mark Salyzyn Add the ability to adjust for unusual corner case failures. Both of these additional module parameters deal with embedded, non-intel or complicated system scenarios. Aif_timeout can be increased past the default 2 minute timeout to drop application registrations when a system has an unusually high event load resulting from continuing management requests, or simultaneous builds, or sluggish user space as a result of system load. Startup_timeout can be increased past the default 3 minute timeout to drop an adapter initialization for systems that have a very large number of targets, or slow to spin-up targets, or a complicated set of array configurations that extend the time for the firmware to declare that it is operational. This timeout would only have an affect on non-intel based systems, as the (more patient) BIOS would generally be where the startup delay would be dealt with. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] aacraid: optimize sg allocMark Haverkamp2006-05-201-3/+3
| | | | | | | | | Received From Mark Salyzyn Slight space and speed efficiency improvement. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] aacraid: remove unneeded lockingMark Haverkamp2006-05-201-8/+0Star
| | | | | | | | | | | Received From Mark Salyzyn Since new commands to the card are quiesced, respect the changes in the SCSI error path which dropped locking around the hba reset handler and similarly drop the lock requirement in the driver's path. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] fix proc_scsi_write to return "length" on success with ↵James Bottomley2006-05-101-2/+7
| | | | | | | | | | | | | | | | | | remove-single-device case Problem spotted by: Suzuki K P <suzuki@in.ibm.com> A zero return on success isn't correct for filesystem write functions. They should either return negative error or the length of bytes consumed. Add code to convert our zero on success error return to return the length of bytes passed in. This fixes the following: $ echo "scsi remove-single-device 0 0 3 0" > /proc/scsi/scsi bash: echo: write error: No such device or address" Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: dequeue all buffers from queueMike Christie2006-05-101-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | debugged by wrwhitehead@novell.com patch and analysis by fujita.tomonori@lab.ntt.co.jp Only tcp_read_sock and recv_actor (iscsi_tcp_data_recv for us) see desc.count. It is is used just for permitting tcp_read_sock to read the portion of data in the socket. When iscsi_tcp_data_recv sees a partial header, it sets desc.count. However, it is possible that the next skb (containing the rest of the header) still does not come. So I'm not sure that this scheme is completely correct. Ideally, we should use the exact length of the data in the socket for desc.count. However, it is not so simple (see SIOCINQ in tcp_ioctl). So I think that iscsi_tcp_data_recv can just stop playing with desc.count and tell tcp_read_sock to read the all skbs. As proposed already, if iscsi_tcp_data_ready sets desc.count to non-zero, tcp_read_sock does that. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: increment expstatsn during loginMike Christie2006-05-103-21/+30
| | | | | | | | | | | | | | | debugged by Ming and Rohan: The problem Ming and Rohan debugged was that during a normal session login, open-iscsi is not incrementing the exp_statsn counter. It was stuck at zero. From the RFC, it looks like if the login response PDU has a successful status then we should be incrementing that value. Also from the RFC, it looks like if when we drop a connection then reconnect, we should be using the exp_statsn from the old connection in the next relogin attempt. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: align printksOr Gerlitz2006-05-103-17/+19
| | | | | | | | align printk output Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: fix manamgement task oopsMike Christie2006-05-101-6/+21
| | | | | | | | | | | | from patmans@us.ibm.com and michaelc@cs.wisc.edu Fix bugs when forcing a mgmt task to fail and allow session recovery to cleanup the session/connection of any running mgmt tasks. When called during the in login state. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: add transport end point callbacksOr Gerlitz2006-05-102-3/+42
| | | | | | | | | | add transport end point callbacks so iscsi drivers that cannot connect from userspace, like iscsi tcp, using sockets do not have to implement their own socket infrastructure. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] scsi_lib.c: fix warning in scsi_kmap_atomic_sgAndrew Morton2006-04-201-1/+2
| | | | | | | | | drivers/scsi/scsi_lib.c: In function `scsi_kmap_atomic_sg': drivers/scsi/scsi_lib.c:2394: warning: unsigned int format, different type arg (arg 3) drivers/scsi/scsi_lib.c:2394: warning: unsigned int format, different type arg (arg 4) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] scsi_scan.c: fix compile warningsakpm@osdl.org2006-04-152-9/+18
| | | | | | | | | | | | | | drivers/scsi/scsi_scan.c: In function `scsi_probe_and_add_lun': drivers/scsi/scsi_scan.c:926: warning: unused variable `vend' drivers/scsi/scsi_scan.c:926: warning: unused variable `mod' drivers/scsi/scsi_scan.c: At top level: drivers/scsi/scsi_scan.c:829: warning: `scsi_inq_str' defined but not used Fix those, tighten up the (somewhat poorly-designed) logging macro and fix some coding-style warts. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] dc395x: dynamically map scatter-gather for PIOGuennadi Liakhovetski2006-04-142-102/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current dc395x driver uses PIO to transfer up to 4 bytes which do not get transferred by DMA (under unclear circumstances). For this the driver uses page_address() which is broken on highmem. Apart from this the actual calculation of the virtual address is wrong (even without highmem). So, e.g., for reading it reads bytes from the driver to a wrong address and returns wrong data, I guess, for writing it would just output random data to the device. The proper fix, as suggested by many, is to dynamically map data using kmap_atomic(page, KM_BIO_SRC_IRQ) / kunmap_atomic(virt). The reason why it has not been done until now, although I've done some preliminary patches more than a year ago was that nobody interested in fixing this problem was able to reliably reproduce it. Now it changed - with the help from Sebastian Frei (CC'ed) I was able to trigger the PIO path. Thus, I was also able to test and debug it. There are 4 cases when PIO is used in dc395x - data-in / -out with and without scatter-gather. I was able to reproduce and test only data-in with and without SG. So, the data-out path is still untested, but it is also somewhat simpler than the data-in. Fredrik Roubert (also CC'ed) also had PIO triggering on his system, and in his case it was data-out without SG. It would be great if he could test the attached patch on his system, but even if he cannot, I would still request to apply the patch and just wait if anybody cries... Implementation: I put 2 new functions in scsi_lib.c and their declarations in scsi_cmnd.h. I exported them without _GPL, although, I don't feel strongly about that - not many drivers are likely to use them. But there is at least one more - I want to use them in tmscsim.c. Whether these are the right files for the functions and their declarations - not sure either. Actually, they are not scsi-specific, so, might go somewhere around other scattergather magic? They are not platform specific either, and most SG functions are defined under arch/*/... As these issues were discussed previously there were some more routines suggested to manipulate scattergather buffers, I think, some of them were needed around crypto code... So, might be a common place reasonable, like lib/scattergather.c? I am open here. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] ibmvscsi: convert kmalloc + memset to kcallocFUJITA Tomonori2006-04-141-2/+1Star
| | | | | | | | Convert kmalloc + memset to kcalloc in ibmvscsi Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Dave Boutcher <sleddog@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Merge ../scsi-rc-fixes-2.6James Bottomley2006-04-1438-13226/+990Star
|\ | | | | | | | | | | | | | | | | | | Conflicts: include/scsi/scsi_devinfo.h Same number for two BLIST flags: BLIST_MAX_512 and BLIST_ATTACH_PQ3 Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] scsi_transport_sas: don't scan a non-existent end deviceJames Bottomley2006-04-141-0/+2
| | | | | | | | | | | | | | | | Any end device that can't support any of the scanning protocols shouldn't be scanned, so set its id to -1 to prevent scsi_scan_target() being called for it. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] mptfusion - fix panic in mptsas_slave_configureMoore, Eric2006-04-141-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Driver panic when RAID logical volume was present when driver loaded, or when a RAID logical volume was created on the fly. This issue was created in due to recent scsi_transport_sas change, when sas_read_port_mode_page was added into the mptsas drivers slave_config entry point. This new API expects that all sdev's to be assocated to an rphy, however that is not the case for logical volumes, as they are created using scsi_add_device, instead of sas_rphy_add(). Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] 3ware 9000 disable local irqs during kmap_atomicadam radford2006-04-131-2/+7
| | | | | | | | | | | | | | Equivalent of the same patch for the 3w-xxxx driver. Signed-off-by: Adam Radford <linuxraid@amcc.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] SCSI: fix scsi_kill_request() busy count handlingTejun Heo2006-04-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | scsi_kill_request() completes requests via normal SCSI completion path which decrements busy counts; however, requests which get passed to scsi_kill_request() aren't holding busy counts and scsi_kill_request() don't increment them before invoking completion path resulting in incorrect busy counts. Bump up busy counts before invoking completion path. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] FC transport: fixes for workq deadlocksJames Smart2006-04-131-155/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As previously reported via Michael Reed, the FC transport took a hit in 2.6.15 (perhaps a little earlier) when we solved a recursion error. There are 2 deadlocks occurring: - With scan and the delete items sharing the same workq, flushing the workq for the delete code was getting it stalled behind a very long running scan code path. - There's a deadlock where scsi_remove_target() has to sit behind scsi_scan_target() due to contention over the scan_lock(). This patch resolves the 1st deadlock and significantly reduces the odds of the second. So far, we have only replicated the 2nd deadlock on a highly-parallel SMP system. More on the 2nd deadlock in a following email. This patch reworks the transport to: - Only use the scsi host workq for scanning - Use 2 other workq's internally. One for deletions, the other for scheduled deletions. Originally, we tried this with a single workq, but the occassional flushes of the scheduled queues was hitting the second deadlock with a slightly higher frequency. In the future, we'll look at the LLDD's and the transport to see if we can get rid of this extra overhead. - When moving to the other workq's we tightened up some object states and some lock handling. - Properly syncs adds/deletes - minor code cleanups - directly reference fc_host_attrs, rather than through attribute macros - flush the right workq on delayed work cancel failures. Large kudos to Michael Reed who has been working this issue for the last month. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] aic79xx: target hotplug fixesHannes Reinecke2006-04-132-44/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | When a target is added aic79xx tries to be overly clever: it changes the command on the fly to TEST UNIT READY and tries to requeue the original command. Sadly this breaks SCSI compability and of course the midlayer is getting a bit confused by it. So we're just removing that bit of code and let the midlayer deal with it. It's clever enough by now. And the driver code is getting simpler. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ibmvscsi: remove drivers/scsi/ibmvscsi/srp.hFUJITA Tomonori2006-04-131-227/+0Star
| | | | | | | | | | | | | | It's no longer needed after the convrsion to use the linux srp.h file. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] aic79xx bus reset updateHannes Reinecke2006-04-133-62/+58Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As James B. correctly noted, ahd_reset_channel() in ahd_linux_bus_reset() should be protected by ahd_lock(). However, the main reason for not doing so was a deadlock with the interesting polling mechanism to detect the end a bus reset. This patch replaces the polling mechanism with a saner signalling via flags; it also gives us the benefit of detecting any multiple calls to ahd_reset_channel(). Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] add SCSI_UNKNOWN and LUN transfer limit restrictionsJames Bottomley2006-04-133-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Original From: Ingo Flaschberger <if@xip.at> To support the RA4100 array from Compaq. This patch now correctly handles SCSI_UNKNOWN types with regard to BLIST_REPORTLUNS2 (allow it) and cdb[1] LUN inclusion (don't). It also allows a BLIST_MAX_512 flag to restrict the maximum transfer length to 512 blocks (apparently this is an RA4100 problem). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] sym2: Fix build when spinlock debugging is enabledMatthew Wilcox2006-04-131-8/+12
| | | | | | | | | | | | | | | | | | | | | | When spinlock debugging is turned on, a struct completion grows beyond the size allowed for the scsi_pointer. So move the struct completion back onto the stack. The additional memory barriers are to keep us from completing a random piece of kernel stack if the command happens to complete after the error handling has finished. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ipr: Bump versionBrian King2006-04-131-2/+2
| | | | | | | | | | | | | | Bump ipr driver version to 2.1.3 Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ipr: Reset device cleanupBrian King2006-04-131-17/+41
| | | | | | | | | | | | | | | | Encapsulate some more of the device reset processing in preparation for SATA support. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ipr: printk macro cleanup/removalBrian King2006-04-132-26/+14Star
| | | | | | | | | | | | | | | | Remove some unused printk macros, make some more robust, and convert some to use standard printk macros when possible. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ipr: Simplify status area dumpingBrian King2006-04-131-35/+4Star
| | | | | | | | | | | | | | | | | | Simplify the dumping of the command status area by removing some device specific information that has proven to not be worthwhile. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ipr: Fixup device type checkBrian King2006-04-132-2/+18
| | | | | | | | | | | | | | | | | | Fixup a check used by the ipr driver to determine if a given device is a SCSI disk. Due to the addition of support for attaching SATA devices, this check needs to be more robust. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] ipr: Disk remove path cleanupBrian King2006-04-132-3/+4
| | | | | | | | | | | | | | | | | | | | | | Instead of NULLing the resource entry pointer when a disk goes away to prevent any new commands being sent to it, set the adapter resource handle to an invalid value so new ops getting sent to it will fail with a selection timeout response. This patch is needed for future SATA patches. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] sg: fix leak when dio setup failsDouglas Gilbert2006-04-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the sg driver is unable to setup direct IO, free that scatter gather list prior to falling back to indirect IO Further to this thread started by Bryan Holty: http://marc.theaimsgroup.com/?l=linux-scsi&m=114306885116728&w=2 Here is the reworked patch again. This time it has been tested with a program provided by Bryan. Signed-off-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] expose sas internal class for the domain transportJames Bottomley2006-04-132-34/+39
| | | | | | | | | | | | necessary to make the domain class use the internal structures Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] for_each_possible_cpu: scsiKAMEZAWA Hiroyuki2006-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for_each_cpu() actually iterates across all possible CPUs. We've had mistakes in the past where people were using for_each_cpu() where they should have been iterating across only online or present CPUs. This is inefficient and possibly buggy. We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the future. This patch replaces for_each_cpu with for_each_possible_cpu. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] Version 2.2.3Matthew Wilcox2006-04-131-1/+1
| | | | | | | | | | Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] Enable clustering and large transfersMatthew Wilcox2006-04-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch enables clustering and sets max_sectors to 0xffff to enable reading and writing of large blocks with tapes (and large transfers with sg). This change is needed after the sg and st drivers started using chained bios through scsi_request_async() in 2.6.16. Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] Simplify error handlingMatthew Wilcox2006-04-131-62/+22Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use wait_for_completion_timeout() instead of using a timer (as Christoph Hellwig did for aic7xxx). That lets me eliminate the sym_eh_wait structure; the struct completion, the old_done pointer and the to_do flag can be folded into the sym_ucmd (which overrides the scsi_pointer in scsi_cmnd). The sym_eh_done() function becomes much simpler as the timeout handling is done in sym_eh_handler() directly. The host_lock can be unlocked earlier, and I cache the host in a local variable to make accesses to it quicker. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>