aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-12-24Merge branch 'master'Jeff Garzik16-88/+86
2005-12-18[PATCH] dpt_i2o fix for deadlock conditionSalyzyn, Mark1-5/+20
Miquel van Smoorenburg <miquels@cistron.nl> forwarded me this fix to resolve a deadlock condition that occurs due to the API change in 2.6.13+ kernels dropping the host locking when entering the error handling. They all end up calling adpt_i2o_post_wait(), which if you call it unlocked, might return with host_lock locked anyway and that causes a deadlock. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] iscsi gfp_t annotationsAl Viro2-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-14Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds13-81/+64
2005-12-13[SCSI] Consolidate REQ_BLOCK_PC handling path (fix ipod panic)James Bottomley4-62/+26
This follows on from Jens' patch and consolidates all of the ULD separate handlers for REQ_BLOCK_PC into a single call which has his fix for our direction bug. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] Negotiate correctly with async-only devicesMatthew Wilcox1-2/+2
When we got a device only capable of async, we would zero out goal->period which would cause us to try PPR negotiations. Leave goal->period alone, and check goal->offset before doing PPR. Kudos to Daniel Forsgren for figuring this out. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13Merge branch 'upstream-fixes'Jeff Garzik4-10/+15
2005-12-13[libata] mark certain hardware (or drivers) with a no-atapi flagJeff Garzik4-10/+15
Some hardware does not support the PACKET command at all. Other hardware supports ATAPI, but the driver does something nasty such as calling BUG() when an ATAPI command is issued. For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI. Initial version contributed by Ben Collins.
2005-12-13[PATCH] libata: remove unused qc->waitingTejun Heo1-12/+2
There is no user of qc->waiting left after ata_exec_internal() changes. Kill the field. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-13[PATCH] libata: remove unused functionsTejun Heo2-30/+0
There is no user of ata_qc_wait_err() and ata_qc_complete_noop() after ata_exec_internal() changes. Remove unused functions. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-13[PATCH] libata: use ata_exec_internal()Tejun Heo1-101/+44
This patch converts all users of libata internal commands to use ata_exec_internal(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-13[PATCH] libata: implement ata_exec_internal()Tejun Heo1-0/+99
This patch implements ata_exec_internal() function which performs libata internal command execution. Previously, this was done by each user by manually initializing a qc, issueing it, waiting for its completion and handling errors. In addition to obvious code factoring, using ata_exec_internal() fixes the following bugs. * qc not freed on issue failure * ap->qactive clearing could race with the next internal command * race between timeout handling and irq * ignoring error condition not represented in tf->status Also, qc & hardware are not accessed anymore once it's completed, making internal commands more conformant with general semantics. ata_exec_internal() also makes it easy to issue internal commands from multiple threads if that becomes necessary. This patch only implements ata_exec_internal(). A following patch will convert all users. Signed-off-by: Tejun Heo <htejun@gmail.com> -- Jeff, all patches have been regenerated against upstream branch as of today. (575ab52a218e4ff0667a6cbd972c3af443ee8713) Also, I took out a debug printk from ata_exec_internal (don't know how that one got left there). Other than that, all patches are identical to the previous posting. Thanks. :-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12Merge branch 'upstream-fixes'Jeff Garzik1-2/+2
2005-12-12[PATCH] libata: ata_piix 450NX errataAlan Cox1-1/+43
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12[PATCH] libata-core.c: fix parameter bug on kunmap_atomic() callsMark Lord1-2/+2
Fix incorrect pointer usage on two calls to kunmap_atomic(). This seems to happen a lot, because kunmap() wants the struct page *, whereas kunmap_atomic() instead wants the mapped virtual address. Signed-off-by: Mark Lord <liml@rtr.ca> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12Merge branch 'master'Jeff Garzik2-4/+8
2005-12-12[PATCH] Fix SCSI scanning slab corruptionBrian King1-3/+0
There is a double free in the scsi scan code if a LLDD's slave_alloc() call fails. There is a direct call to scsi_free_queue and then the following put_device calls the release function, which also frees the queue. Remove the redundant scsi_free_queue. Signed-off-by: Brian King <brking@us.ibm.com> Tested-by: Nathan Lynch <ntl@pobox.com> [ Also removed some strange whitespace artifacts in that area ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] libata: add ata_piix notesAlan Cox1-0/+43
Ok lets start with the 'easy' stuff. This includes my research and summary of chip errata into the new driver so that people can refer to it when updating ata_piix. No code changes Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12[SCSI] fix double free of scsi request queueBrian King1-1/+0
Current scsi scanning code appears to have a use after free bug is a LLDD's slave_alloc fails. Remove the redundant scsi_free_queue. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-12Revert revert of "[SCSI] fix usb storage oops"Linus Torvalds1-1/+8
This reverts commit 1b0997f561bf46689cc6e0903f342e9bf2506bf1, which in turn reverted 34ea80ec6a02ad02e6b9c75c478c18e5880d6713 (which is thus re-instated). Quoth James Bottomley: "All it's doing is deferring the device_put() from the scsi_put_command() to after the scsi_run_queue(), which doesn't fix the sleep while atomic problem of the device release method. In both cases we still get the semaphore in atomic context problem which is caused by scsi_reap_target() doing a device_del(), which I assumed (wrongly) was valid from atomic context." who also promised to fix scsi_reap_target(). Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-09[SCSI] fix panic when ejecting ieee1394 ipodJens Axboe1-4/+4
The scsi_library routines don't correctly set DMA_NONE when req->data_len is zero (instead they check the command type first, so if it's write, we end up with req->data_len == 0 and direction as DMA_TO_DEVICE which confuses some drivers) Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-08[SCSI] fix OOPS due to clearing eh_action prior to aborting eh commandMichael Reed1-1/+6
The eh_action semaphore in scsi_eh_send_command is cleared after a command timeout. The command is subsequently aborted and the abort will try to call scsi_done() on it. Unfortunately, the scsi_eh_done() routine unconditinally completes the semaphore (which is now null). Fix this race by makiong the scsi_eh_done() routine check that the semaphore is non null before completing it (mirroring the ordinary command done/timeout logic). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-08[SCSI] Fix incorrect pointer in megaraid.c MODE_SENSE emulationMark Lord1-1/+1
The SCSI megaraid drive goes to great effort to kmap the scatterlist buffer (if used), but then uses the wrong pointer when copying to it afterward. Signed-off-by: Mark Lord <lkml@rtr.ca> Acked by: Ju, Seokmann <Seokmann.Ju@engenio.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-07[SCSI] qla2xxx: Correct short-WRITE status handling.Andrew Vasquez1-0/+15
Properly check FC_RESID for any non-transfered bytes regardless of firmware completion status. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-07[SCSI] qla2xxx: Correct mis-handling of AENs.Andrew Vasquez2-12/+4
A regression in a recent change 33135aa2a568ec1a30e734f18e5315e10516e4f3 caused the driver to mistakenly drop handling of AENs. Due to the incorrect handling, ports would not reappear after RSCNs and LIPs. Drops unused/incorrect compound #define from qla_def.h. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-07[SCSI] ibmvscsi kexec fixDave C Boutcher3-3/+10
This makes ibmvscsi work correctly with the recent set of kexec patches that went in. This is based on work by Michael Ellerman, who chased this initially. He validated that it works during kexec. Handle kexec correctly in ibmvscsi. During kexec the adapter will not get cleaned up correctly, so we may need to reset it to make it sane again. Signed-off-by: Dave Boutcher <sleddog@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-06[PATCH] libata: err_mask misc fixAlbert Lee1-5/+13
1. ata_pio_complete(): It seems unnecessary to wait for the clearing of the DRQ bit. (Waiting for BSY=0 should be enough. ata_ok() also checks the correctness of the status bits later.) 2. ata_pio_block(): - added error checking, before transfering data. - minor comments fix Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: determine the err_mask directly in atapi_packet_task()Albert Lee1-6/+7
- set qc->err_mask directly when we found the error - remove the code to determine err_mask from device status Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: determine the err_mask when the error is foundAlbert Lee1-1/+9
- move "qc->err_mask |= AC_ERR_ATA_BUS" to where the error is found - add "assert(qc->err_mask)" to ata_pio_error() to make sure qc->err_mask was available when we enter the error state Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: move err_mask to ata_queued_cmdAlbert Lee10-54/+81
- remove err_mask from the parameter list of the complete functions - move err_mask to ata_queued_cmd - initialize qc->err_mask when needed - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: minor patch before moving err_maskAlbert Lee1-3/+7
- add qc to ata_pio_poll() - reorder the initialization of qc in ata_pio_complete() Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =================== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-03Merge branch 'upstream-fixes'Jeff Garzik9-27/+39
2005-12-03[PATCH] libata: fix ata_scsi_pass_thru error handlingTejun Heo1-2/+7
This patch makes ata_scsi_pass_thru() properly set result code and sense data on translation failures. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-02Revert "[SCSI] fix usb storage oops"Linus Torvalds1-8/+1
This reverts commit 34ea80ec6a02ad02e6b9c75c478c18e5880d6713. It does a put_device() from softirq context, which is bad since it gets a semaphore for reading. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-02Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds7-17/+31
2005-12-02[SCSI] sg: fix a bug in st_map_user_pages failure pathHugh Dickins1-1/+3
sg's st_map_user_pages is modelled on an earlier version of st's sgl_map_user_pages, and has the same bug: if get_user_pages got some but not all of the pages, then those got were released, but the positive res code returned implied that they were still to be freed. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-02[SCSI] sg and st unmap_user_pages allow PageReservedHugh Dickins2-4/+0
2.6.15-rc1 made sg's st_unmap_user_pages and st's sgl_unmap_user_pages BUG on a PageReserved page. But that's wrong: they could be unmapping the ZERO_PAGE, which is marked PG_reserved; and perhaps others (while get_user_pages is still permitted on VM_PFNMAP areas - that may change). More change is needed here: sg claims to dirty even pages written from, and st claims not to dirty even pages read into; and SetPageDirty is not adequate for this nowadays. Fixes to those follow in a later patch: for the moment just fix the 2.6.15 regression. Signed-off-by: Hugh Dickins <hugh@veritas.com> Acked-by: Nick Piggin <npiggin@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01[SCSI] st: fix a bug in sgl_map_user_pages failure path Hugh Dickins1-0/+1
Nick and I had already been looking at drivers/scsi/{sg.c,st.c}, brought there by __put_page in sg.c's peculiar sg_rb_correct4mmap, which we'd like to remove. But that's irrelevant to your pain, except... One extract from the patches I'd like to send Doug and Kai for 2.6.15 or 2.6.16 is this below: since the incomplete get_user_pages path omits to reset res, but has already released all the pages, it will result in premature freeing of user pages, and behaviour just like you've seen. Though I'd have thought incomplete get_user_pages was an exceptional case, and a bit surprised you'd encounter it. Perhaps there's some other premature freeing in the driver, and this instance has nothing whatever to do with it. If the problem were easily reproducible, it'd be great if you could try this patch; but I think you've said it's not :-( Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01[SCSI] sym2: Disable IU and QAS negotiationMatthew Wilcox1-1/+4
Enabling these features causes problems with some drives, so disable them until they're debugged Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01[SCSI] aacraid: Check scsi_bios_ptabe return codeMark Haverkamp1-0/+2
Received from Mark Salyzyn. scsi_bios_ptable return value is not being checked in aac_biosparm. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01[SCSI] SPI DV: be more conservative about echo buffer usageJames Bottomley1-9/+19
Some SCSI devices apparently get very confused if we try to use the echo buffer on a non-DT negotiated bus (this mirrors the problems of using PPR on non-LVD for some devices). The fix is to be far more conservative about when we use an echo buffer. With this patch, we'll now see what parameters are negotiated by the read only test, and only look for an echo buffer if DT is negotiated. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01[PATCH] mark several libata datastructures constArjan van de Ven8-11/+11
Hi, the patch below marks several libata (and libata-driver) structures const so that they end up in the .rodata segment and don't false-share cachelines with things that get dirtied often. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-01Merge branch 'master'Jeff Garzik1-15/+14
2005-11-30[libata sata_promise] minor whitespace cleanupJeff Garzik1-2/+2
2005-11-29[PATCH] fix megaraid.c lockingChristoph Hellwig1-15/+14
This fixes locking in megaraid.c, namely: (1) make sure megaraid_queue release the adapter lock by changing the code to have a single return (2) remove the errornous scsi_assign_lock call Testing by Burton Windle. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Burton Windle <bwindle@fint.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-29Merge branch 'master'Jeff Garzik2-5/+6
2005-11-28[SCSI] aic7xxx: reset handler selects a wrong commandVasily Averin2-2/+2
To transport scsi reset command to device aic7xxx reset handler looks at the driver's pending_list and searches any proper command. However the search condition has been inverted: ahc_match_scb() returns TRUE if a matched command is found. As a result the reset on required devices did not turn out well, a correctly working neighbour device may be surprised by the reset. aic7xxx reset handler reports about the success, but really the original situation is not corrected yet. Signed-off-by: Vasily Averin <vvs@sw.ru> Naturally, there's a corresponding problem in the aic79xx driver, so I've also added the same fix for that. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-27[PATCH] drivers/scsi/dpt_i2o.c: fix a NULL pointer dereferenceAdrian Bunk1-4/+5
The Coverity checker spotted this obvious NULL pointer dereference. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22[PATCH] Fix a bug in scsi_get_commandMatthew Dobson1-1/+1
scsi_get_command() attempts to write into a structure that may not have been successfully allocated. Move this write inside the if statement that ensures we won't panic the kernel with a NULL pointer dereference. Signed-off-by: Matthew Dobson <colpatch@us.ibm.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-20[libata] Print out SATA speed, if link is upJeff Garzik1-4/+16
Make the SATA phy probe messages a bit more informative. Note this only applies to drivers that use __sata_phy_reset(), which excludes some drivers.