aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2-3/+3
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-04[SCSI] SCSI megaraid_sas: handle thrown errorsJeff Garzik1-12/+30
- handle clear_user() error - handle and properly unwind from sysfs errors thrown during mod init - adjust order of calls in megasas_exit() to precisely match registration order in megasas_init() Signed-off-by: Jeff Garzik <jeff@garzik.org> Updated for extra attribute and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04[SCSI] megaraid_sas: sets ioctl timeout and updates version,changelogSumant Patro2-7/+12
This patch sets timeout of max 180 seconds for ioctl completion. It also updates the Changelog and hikes the version to 3.05. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04[SCSI] megaraid_sas: adds tasklet for cmd completionSumant Patro2-22/+45
This patch adds a tasklet for command completion. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04[SCSI] megaraid_sas: prints pending cmds before setting hw_crit_errorSumant Patro2-0/+94
This patch adds function to print the pending frame details before returning failure from the reset routine. It also exposes a new variable megasas_dbg_lvl that allows the user to set the debug level for logging. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04[SCSI] megaraid_sas: function pointer for disable interruptSumant Patro2-23/+33
This patch adds function pointer to invoke disable interrupt for xscale and ppc IOP based controllers. Removes old implementation that checks for controller type in megasas_disable_intr. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04[SCSI] megaraid_sas: frame count optimizationSumant Patro1-25/+47
This patch removes duplicated code in frame calculation & adds megasas_get_frame_count() that also takes into account the number of frames that can be contained in the Main frame. FW uses the frame count to pull sufficient number of frames from host memory. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04[SCSI] megaraid_sas: FW transition and q size changesSumant Patro2-8/+38
This patch has the following enhancements : a. handles new transition states of FW to support controller hotplug. b. It reduces by 1 the maximum cmds that the driver may send to FW. c. Sends "Stop Processing" cmd to FW before returning failure from reset routine d. Adds print in megasas_transition routine e. Sends "RESET" flag to FW to do a soft reset of controller to move from Operational to Ready state. f. Sending correct pointer (cmd->sense) to pci_pool_free Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26[SCSI] megaraid: Use the proper type to hold the irq number.Eric W. Biederman1-1/+1
When testing on a Unisys machine it was discovered that the megaraid driver would not initialize as it was requesting irq 162 instead of irq 1442 it was assigned. The problem was the irq number had been truncated by being stored in an unsigned char. This patches fixes that problem and the driver now appears to work. The ioctl interface appears fundamentally broken as it exports the irq number to user space in an unsigned char. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-27Merge ../linux-2.6James Bottomley6-11/+51
2006-08-19[SCSI] megaraid_sas: pci_module_init to pci_register_driver conversionMichal Piotrowski1-1/+1
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Acked-by: "Patro, Sumant" <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19[SCSI] convert to PCI_DEVICE() macroHenrik Kretzschmar1-25/+9
Convert the pci_device_id-table of the megaraid_sas-driver to the PCI_DEVICE-macro, to safe some lines. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Acked-by: "Patro, Sumant" <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28[SCSI] megaraid: Add support for change_queue_depthbrking@charter.net1-0/+16
Adds support for change_queue_depth so that device queue depth can be changed at runtime through sysfs. Signed-off-by: <brking@charter.net> Acked-by: Seokmann Ju <seokmann.ju@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28[SCSI] megaraid_{mm,mbox}: a fix on "kernel unaligned access address" issueJu, Seokmann3-3/+7
There was an issue in the data structure defined by megaraid driver casuing "kernel unaligned access.." messages to be displayed during IOCTL on IA64 platform. The issue has been reported/fixed by Sakurai Hiroomi [sakurai_hiro@soft.fujitsu.com]. Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28[SCSI] megaraid_{mm,mbox}: a fix on INQUIRY with EVPDJu, Seokmann2-0/+11
With this patch, driver will protect data corruption created by INQUIRY with EVPD request to megaraid controllers. As specified in the changelog, megaraid F/W already has fixed the issue and being under process of release. Meanwhile, driver will protect the system with this patch. Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28[SCSI] megaraid_{mm,mbox}: 64-bit DMA capability checkerJu, Seokmann3-8/+33
This patch contains - a fix for 64-bit DMA capability check in megaraid_{mm,mbox} driver. - includes changes (going back to 32-bit DMA mask if 64-bit DMA mask failes) suggested by James with previous patch. - addition of SATA 150-4/6 as commented by Vasily Averin. With patch, the driver access PCIconfiguration space with dedicated offset to read a signature. If the signature read, it means that the controller has capability to handle 64-bit DMA. Without this patch, the driver used to blindly claim 64-bit DMA capability. The issue has been reported by Vasily Averin [vvs@sw.ru]. Thank you Vasily for the reporting. Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-03Merge ../scsi-misc-2.6James Bottomley2-13/+40
Conflicts: drivers/scsi/nsp32.c drivers/scsi/pcmcia/nsp_cs.c Removal of randomness flag conflicts with SA_ -> IRQF_ global replacement. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-02[PATCH] irq-flags: scsi: Use the new IRQF_ constantsThomas Gleixner2-2/+2
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26[SCSI] megaraid_sas: zcr with fixSumant Patro2-13/+40
The patch adds support for a ZCR controller (Device ID : 0x413). It also has a critical bug fix : Disable controller interrupt before firing INIT cmd to FW. Interrupt is enabled after required initialization is over. This is done to ensure that driver is ready to handle interrupts when it is generated by the controller. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-25[PATCH] megaraid_mbox: fix section mismatch warningsRandy Dunlap1-1/+1
Fix section warning: WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section mismatch: reference to .init.text: from .text between 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-10Merge ../linux-2.6James Bottomley3-24/+48
2006-06-06[SCSI] megaraid_sas: switch fw_outstanding to an atomic_tSumant Patro2-18/+11
This patch( originally submitted by Christoph Hellwig) removes instance_lock and changes fw_outstanding variable data type to atomic_t. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-27[SCSI] megaraid_{mm,mbox}: fix a bug in reset handlerJu, Seokmann2-20/+46
When abort failed, the driver gets reset handleer called. In the reset handler, driver calls 'scsi_done()' callback for same SCSI command packet (struct scsi_cmnd) multiple times if there are multiple SCSI command packet in the pend_list. More over, if there are entry in the pend_lsit with IOCTL packet associated, the driver returns it to wrong free_list so that, in turn, the driver could end up with 'NULL pointer dereference..' during I/O command building with incorrect resource. Also, the patch contains several minor/cosmetic changes besides this. Signed-off-by: Seokmann Ju <seokmann.ju@lsil.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-19[SCSI] megaraid/megaraid_mm.c: fix a NULL pointer dereferenceAdrian Bunk1-4/+2
This patch fixes a NULL pointer dereference spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-24[PATCH] s/;;/;/gAlexey Dobriyan1-1/+1
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: fixed path to moved file in include/linux/device.h Fix spelling in E1000_DISABLE_PACKET_SPLIT Kconfig description Documentation/dvb/get_dvb_firmware: fix firmware URL Documentation: Update to BUG-HUNTING Remove superfluous NOTIFY_COOKIE_LEN define add "tags" to .gitignore Fix "frist", "fisrt", typos fix rwlock usage example It's UTF-8
2006-03-22Fix "frist", "fisrt", typosUwe Zeisberger1-1/+1
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-14[SCSI] megaraid_sas: fix extended timeout handlingChristoph Hellwig1-20/+6
Replace the eh_timed_out method usage with setting sdev->timeout in slave_configure. Also only use the extended timeout for raid volumes, physical devices shouldn't need it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] megaraid_sas: fix physical disk handlingChristoph Hellwig1-14/+15
This patch hides the devices completely from the midlayer instead. It requires the patch to handle the slave_configure failure I posted earlier. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04[SCSI] megaraid_sas: support for 1078 type controller addedSumant Patro2-18/+129
This patch adds support for 1078 type controller (device id : 0x60). Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04[SCSI] megaraid_sas: register 16 byte CDB capabilityJoshua Giles2-4/+5
This patch properly registers the 16 byte command length capability of the megaraid_sas controlled hardware with the scsi midlayer. All megaraid_sas hardware supports 16 byte CDB's. Signed-off-by: Joshua Giles <joshua_giles@dell.com> Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-29[SCSI] megaraid_sas: new template defined to represent each type of controllersSumant Patro2-42/+109
This patch defines a new template to represent each type of controllers (identified by the processor used). The template has members that is set with appropriate values during driver initialisation. This change is done to support new controllers with minimal change to existing code. In future, for a new controller support, a template will be declared and its members initialised appropriately. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Rejections fixed and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-29[SCSI] megaraid_sas: cleanup queue command pathSumant Patro2-119/+53
This patch (originally submitted by Christoph Hellwig) removes code duplication in megasas_build_cmd. It also defines MEGASAS_IOC_FIRMWARE32 to allow 64 bit compiled applications to work. Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com> Rejections fixed and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[PATCH] Unlinline a bunch of other functionsArjan van de Ven2-14/+14
Remove the "inline" keyword from a bunch of big functions in the kernel with the goal of shrinking it by 30kb to 40kb Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12[SCSI] turn most scsi semaphores into mutexesArjan van de Ven1-3/+4
the scsi layer is using semaphores in a mutex way, this patch converts these into using mutexes instead Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-10[PATCH] don't include ioctl32.h in driversChristoph Hellwig1-1/+0
These days ioctl32.h is only used for communication of fs/compat.c and fs/compat_ioctl.c and doesn't contain anything of interest to drivers. Remove inclusion in various drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-13[SCSI] megaraid_{mbox,mm} : remove PCI Id overlaping between megaraid_legacy and megaraid_{mbox,mm}Ju, Seokmann3-77/+11
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-10Merge by hand (whitespace conflicts in libata.h)James Bottomley3-3/+0
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09[PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering3-3/+0
This patch removes almost all inclusions of linux/version.h. The 3 #defines are unused in most of the touched files. A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is unfortunatly in linux/version.h. There are also lots of #ifdef for long obsolete kernels, this was not touched. In a few places, the linux/version.h include was move to where the LINUX_VERSION_CODE was used. quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'` search pattern: /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-08Merge by hand (conflicts between pending drivers and kfree cleanups)James Bottomley3-71/+17
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-07[PATCH] kfree cleanup: drivers/scsiJesper Juhl2-11/+5
This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-06[SCSI] megaraid_mbox: remove scsi_assign_lock usageChristoph Hellwig2-66/+17
also remove the adapter->host_lock alias for adapter->lock and remove some superflous locking aswell as removing the tiny locking wrappers for the EH routines. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-06[SCSI] megaraid_sas: fix EH lockingChristoph Hellwig1-5/+0
recent kernels call the eh_ methods without the host lock held. megaraid_sas doesn't need it but drops it before calling a sleeping routine and reqcquires it afterwards. Just remove the spin_unlock/spin_lock calls. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-04Merge by HandJames Bottomley1-3/+2
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>
2005-10-28[SCSI] use sfoo_printk() in driversJeff Garzik1-3/+2
Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28[PATCH] PCI: Convert megaraid to use pci_driver shutdown methodRussell King1-6/+4
Convert megaraid to use pci_driver's shutdown method rather than the generic device_driver shutdown method. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-04[PATCH] missing include in megaraid_sasAl Viro1-0/+1
megaraid_sas depends on arch-specific indirect includes pulling fs.h in; on alpha they do not. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-26[SCSI] MegaRAID SAS RAID: new driverBagalkote, Sreenivas4-0/+3957
Signed-off-by: Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26[SCSI] remove scsi_set_deviceChristoph Hellwig1-1/+0
scsi_add_host is the proper place to set the device, but people copy the scsi_set_device usage from older drivers again and again. note that this leaves some legacy drivers like qlogicisp/qlogicfc without pci association in sysfs, but they're scheduled to go away soon anyway. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-20[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacksYani Ioannou1-2/+2
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>