aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] fix remaining missing includesTim Schmielau2005-11-074-0/+7
| | | | | | | | | | Fix more include file problems that surfaced since I submitted the previous fix-missing-includes.patch. This should now allow not to include sched.h from module.h, which is done by a followup patch. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [libata] restore sg on DMA mapping failureTejun Heo2005-11-051-2/+8
|
* Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6Linus Torvalds2005-11-05125-36804/+28676
|\
| * [SCSI] sd: Fix refcountingAlan Stern2005-11-051-37/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the driver takes a reference only for requests coming by way of the gendisk, not for requests coming by way of the struct device or struct scsi_device. Such requests can arrive in the rescan, flush, and shutdown pathways. The patch also makes the scsi_disk keep a reference to the underlying scsi_device, and it erases the scsi_device's pointer to the scsi_disk when the scsi_device is removed (since the pointer should no longer be used). This resolves Bugzilla entry #5237. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * Fix ips.c compileJames Bottomley2005-11-041-0/+1
| | | | | | | | | | | | | | It looks like one of the ips patches was missing a closing brace in a function Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * Merge by HandJames Bottomley2005-11-04125-36767/+28613
| |\ | | | | | | | | | | | | | | | | | | Conflicts in dec_esp.c (Thanks Bacchus), scsi_transport_iscsi.c and scsi_transport_fc.h Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] ips: Fix initialization bug with kdumpJack Hammer2005-10-311-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If I/O is active on the adapter, and an unexpected interrupt is pending during initialization, the driver blows it's brains out. Since the driver didn't initiate the I/O, the data in it's internal tables will contain NULL pointers. When this condition is detected, a "flush cache and reset" is performed. The flush cache allows any pending "lazy writes" that the adapter is processing to complete ( a "must have" for a RAID adapter ) and the reset puts the adapter back into a known, good state. Signed-off-by: Jack Hammer <jack_hammer@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] ips: Fix up for correct scatter/gather processingJack Hammer2005-10-291-13/+36
| | | | | | | | | | | | | | | | | | | | | Added kmap_atomic/kunmap_atomic. Added protection of KM_IRQ0 slot with local_irq_save(), local_irq_restore(), and comments. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Change version number to 8.1.0James.Smart@Emulex.Com2005-10-291-1/+1
| | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc 8.1.0 : Add owner field to struct pci_driverJames.Smart@Emulex.Com2005-10-291-0/+1
| | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Fix eh_ return codes for commandsJames.Smart@Emulex.Com2005-10-297-217/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return FAILED from eh_ routines if command(s) is(are) not completed There were scenarios where we may have returned from the error handlers prior to all affected commands being flushed to the midlayer. Add changes to ensure this doesn't happen. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Remove unneeded IOCB_t * castJames.Smart@Emulex.Com2005-10-291-1/+1
| | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Adjust lpfc_scsi_buf allocationJames.Smart@Emulex.Com2005-10-291-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust lpfc_scsi_buf allocation to account for lun_queue_depth and error handling Under high load and high duress, the error handler could steal some command resources from the normal i/o path. Rework to allocate additional resources to avoid this scneario. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Replace lpfc_sli_issue_iocb_wait_high_priorityJames.Smart@Emulex.Com2005-10-294-90/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace lpfc_sli_issue_iocb_wait_high_priority with lpfc_sli_issue_iocb_wait. Simplify code paths, as there really wasn't a "priority" Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Fix for "command completion for iotax x?? not found"James Bottomley2005-10-299-206/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: James Smart <James.Smart@emulex.com> There were scenarios where the error handlers could reuse an iotag value of an active io. Remove all possibility of this by pre-assigning iotag resources to command resources. Signed-off-by: James Smart <James.Smart@emulex.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Remove RPI hash from the driverJames.Smart@Emulex.Com2005-10-295-90/+15
| | | | | | | | | | | | | | | | | | | | | | | | Table was not providing a lot of value and injected a couple of errors. Removed it and made functionality inline. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Restore HEX safe bahavior of the sysfs xxx_store functions.James.Smart@Emulex.Com2005-10-291-3/+36
| | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Fix for "Unknown IOCB command Data: x0 x3 x0 x0"James.Smart@Emulex.Com2005-10-294-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for "Unknown IOCB command Data: x0 x3 x0 x0" messages and inability to see devices On some platforms, the host-memory based ring mgmt area was not zero. Also, driver wasn't manipulating the entire 32bits of the ring pointers. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Fix comments for nodev_tmoJames.Smart@Emulex.Com2005-10-291-1/+1
| | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Add range checking for attributes passed as options at load time.James.Smart@Emulex.Com2005-10-291-44/+64
| | | | | | | | | | | | | | | | | | | | | | | | Reuse macros defined for sysfs store callbacks in the initialization code in order to enforce the same range checking. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Return -EINVAL, -EPERM, and -EIO instead of 0 from sysfs callbacksJames.Smart@Emulex.Com2005-10-291-11/+7
| | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Update to Emulex hba model namesJames.Smart@Emulex.Com2005-10-291-6/+20
| | | | | | | | | | | | | | | | | | | | | Update adapter names to match Emulex naming conventions. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] lpfc: Cleanup code in lpfc_get_stats().James.Smart@Emulex.Com2005-10-291-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | Cleanup white spaces in argument calls & initializations, prune if statements, remove casting and remove redundant if checks. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] remove broken driver cpqfcJames Bottomley2005-10-2912-13274/+0
| | | | | | | | | | | | | | | | | | | | | | | | Hopefully there should be a brand new replacement driver for this heap of junk by the beginning of next year. Acked By: Martin K. Petersen <mkp@mkp.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] fix up mismerge in osstJames Bottomley2005-10-291-1/+1
| | | | | | | | | | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] update fc_transport for removal of block/unblock functionsJames.Smart@Emulex.Com2005-10-288-274/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently went back to implement a board reset. When we perform the reset, we wanted to tear down the internal data structures and rebuild them. Unfortunately, when it came to the rport structure, things were odd. If we deleted them, the scsi targets and sdevs would be torn down. Not a good thing for a temporary reset. We could block the rports, but we either maintain the internal structures to keep the rport reference (perhaps even replicating what's in the transport), or we have to fatten the fc transport with new search routines to find the rport (and deal with a case of a dangling rport that the driver forgets). It dawned on me that we had actually reached this state incorrectly. When the fc transport first started, we did the block/unblock first, then added the rport interface. The purpose of block/unblock is to hide the temporary disappearance of the rport (e.g. being deleted, then readded). Why are we making the driver do the block/unblock ? We should be making the transport have only an rport add/delete, and the let the transport handle the block/unblock. So... This patch removes the existing fc_remote_port_block/unblock functions. It moves the block/unblock functionality into the fc_remote_port_add/delete functions. Updates for the lpfc driver are included. Qlogic driver updates are also enclosed, thanks to the contributions of Andrew Vasquez. [Note: the qla2xxx changes are relative to the scsi-misc-2.6 tree as of this morning - which does not include the recent patches sent by Andrew]. The zfcp driver does not use the block/unblock functions. One last comment: The resulting behavior feels very clean. The LLDD is concerned only with add/delete, which corresponds to the physical disappearance. However, the fact that the scsi target and sdevs are not immediately torn down after the LLDD calls delete causes an interesting scenario... the midlayer can call the xxx_slave_alloc and xxx_queuecommand functions with a sdev that is at the location the rport used to be. The driver must validate the device exists when it first enters these functions. In thinking about it, this has always been the case for the LLDD and these routines. The existing drivers already check for existence. However, this highlights that simple validation via data structure dereferencing needs to be watched. To deal with this, a new transport function, fc_remote_port_chkready() was created that LLDDs should call when they first enter these two routines. It validates the rport state, and returns a scsi result which could be returned. In addition to solving the above, it also creates consistent behavior from the LLDD's when the block and deletes are occuring. Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] use scmd_id(), scmd_channel() throughout codeJeff Garzik2005-10-2825-90/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap a highly common idiom. Makes the code easier to read, helps pave the way for sdev->{id,channel} removal, and adds a token that can easily by grepped-for in the future. There are a couple sdev_id() and scmd_printk() updates thrown in as well. Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] use sfoo_printk() in driversJeff Garzik2005-10-2821-160/+149
| | | | | | | | | | | | | | | Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] use {sdev,scmd,starget,shost}_printk in generic codeJeff Garzik2005-10-287-39/+33
| | | | | | | | | | | | | | | rejections fixed and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] kill unused scsi_scan_single_target()Jeff Garzik2005-10-281-13/+0
| | | | | | | | | | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] Add an 'Issue LIP' device attribute in fc_transport classAndrew Vasquez2005-10-284-13/+48
| | | | | | | | | | | | | | | | | | | | | Ok, here's a patch to add such a common API for fc transport users. Relevant LLD changes (lpfc and qla2xxx) also present. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] sas: add support for PHY resetsChristoph Hellwig2005-10-281-2/+41
| | | | | | | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] sas: add flag for locally attached PHYsChristoph Hellwig2005-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flag to mark a PHY as attached to the HBA as opposed to beeing on an expander. This is needed because various features are only supported on those. This is a crude hack, the proper fix would be to use different classes for host-attached vs expander phys. I'm looking into that. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] sr: remove dead codeJayachandran C2005-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue reported in drivers/scsi/sr.c by Coverity Error reported: Pointer returned from "scsi_cd" is never used Patch description: Remove the scsi_cd() call as it does not have any effect. Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] Fix issue reported by coverity in drivers/scsi/scsi_ioctl.cJayachandran C2005-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch attempts to fix an issue found in drivers/scsi/scsi_ioctl.c by Coverity. Error reported: CID: 3437 Checker: FORWARD_NULL (help) File: /export2/p4-coverity/mc2/linux26/drivers/scsi/scsi_ioctl.c Function: scsi_ioctl_send_command Description: Variable "buf" tracked as NULL was passed to a function that dereferences it. Patch description: buf can be NULL if inlen and outlen are both 0. This patch adds check if the length is non-zero before calling copy from/to user. Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: put back label erroneously removed by eh_active patchJames Bottomley2005-10-281-1/+1
| | | | | | | | | | | | | | | | | | The label eh_dev_reset_done is still in use Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] scsi_transport_sas: support link error attributesChristoph Hellwig2005-10-281-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | For now supporting the ->get_linkerrors method is mandatory. I'll probably be beaten to implement the .show_foo variables and different types of attributes soon.. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] sgiwd93: small fixesRalf Baechle2005-10-282-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the remaining bits of sgiwd93.h into sgiwd93.c; replace the use of CMD_PER_LUN and CAN_QUEUE by raw numbers. Signed-off-by: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] dec_esp: Use the right address space macroRalf Baechle2005-10-281-5/+7
| | | | | | | | | | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] dec_esp: Use physical addressesRalf Baechle2005-10-281-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Use physical addresses at the interface level, letting drivers remap them as appropriate. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] dec_esp: Fix mapping of ESP.Ralf Baechle2005-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Maciej W. Rozycki <macro@linux-mips.org> Date: Mon Jun 13 19:55:42 2005 +0000 These should really be addresses obtained with ioremap() or some bus-specific backend, but for now... Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: fix unnecessary activation of blk tag queueJames Bottomley2005-10-281-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: 'Andrew Vasquez' <andrew.vasquez@qlogic.com> Drop scsi_populate_tag_msg() interrogation. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: fix compile warningAndrew Vasquez2005-10-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The file is missing an include of scsi_transport_fc.h drivers/scsi/qla2xxx/qla_rscn.c:334: error: implicit declaration of function 'fc_remote_port_unblock' Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] move the mid-layer printk's over to shost/starget/sdev_printkJames Bottomley2005-10-2814-119/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | This should eliminate (at least in the mid layer) to make numeric assumptions about any of the enumeration variables. As a side effect, it will also make all the messages consistent and line us up nicely for the error logging strategy (if it ever shows itself again). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: remove eh_active checks in qla2xxx error handlingAndrew Vasquez2005-10-281-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | Here's a patch which drops the eh_active checks in the qla2xxx eh_handler callbacks. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] avoid overflows in disk size calculationsJames Bottomley2005-10-281-4/+3
| | | | | | | | | | | | | | | | | | Be more careful about doing the arithmetic in the non-LBD case. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: Resync with latest released ISP23xx/63xx firmware -- 3.03.18.James Bottomley2005-10-283-21052/+21098
| | | | | | | | | | | | | | | Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: Update license.Andrew Vasquez2005-10-2827-393/+113
| | | | | | | | | | | | | | | Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: Use midlayer's int_to_scsilun() function.Andrew Vasquez2005-10-282-4/+3
| | | | | | | | | | | | | | | | | | | | | While populating command type 6 and 7 IOCBs. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| | * [SCSI] qla2xxx: Add support to dynamically enable/disable ZIO.Andrew Vasquez2005-10-287-41/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISP23xx and ISP24xx chips have support for an adaptive method of posting SCSI command completions for multiple SCSI commands during a single system interrupt. SCSI commands are placed on the system response queue without interrupting the host until 1) a delay timer expires; or 2) a SCSI command completes with an error. As long as the host software (qla2xxx) services the response queue for completions (this polling is done during queuecommand()) within the 'delay timer' period, the firmware will not generate system interrupt. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>