- May 10, 2013
-
-
Sakthivel K authored
Update of function prototype for common function to SPC and SPCv/ve. Multiple queues implementation for IO. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Memory allocation and configuration of multiple inbound and outbound queues. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Updated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros. Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware functionalities. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Jan 03, 2013
-
-
Greg Kroah-Hartman authored
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Adam Radford <linuxraid@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- May 10, 2012
-
-
Mark Salyzyn authored
This is a followup to a patch provided by Jack Wang on September 21 2011. After increasing the CAN_QUEUE to 510 in pm8001 we discovered some performance degredation from time to time. We needed to increase the MPI queue to compensate and ensure we never hit that limit. We also needed to double the margin to support event and administrivial commands that take from the pool resulting in an occasional largely unproductive command completion with soft error to the caller when the command pool is overloaded temporarily. Signed-off-by:
Mark Salyzyn <mark_salyzyn@xyratex.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Apr 23, 2012
-
-
Santosh Nayak authored
Data type of the 'tag' field of 'fw_flash_Update_resp' should be __le32. Data type of 'pHeader' should be __le32. Remove 2nd cast to 'piomb'. Signed-off-by:
Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Mar 28, 2012
-
-
Santosh Nayak authored
Signed-off-by:
Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Feb 29, 2012
-
-
Santosh Nayak authored
1. Fix endian issue. 2. Fix the following warning : " drivers/scsi/pm8001/pm8001_hwi.c:2932:32: warning: comparison between ‘enum sas_device_type’ and ‘enum sas_dev_type’". 3. Few code optimization. Signed-off-by:
Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Santosh Nayak authored
There is a possble racing scenario. 'process_oq' is called by two routines, as shown below. pm8001_8001_dispatch = { ....... .isr = pm8001_chip_isr --> process_oq,// A .isr_process_oq = process_oq, // B ..... } process_oq() --> process_one_iomb() --> mpi_sata_completion() In 'mpi_sata_completion', "pm8001_ha->lock" is first released. It means lock is taken before, which is true for the context A, as 'pm8001_ha->lock' is taken in 'pm8001_chip_isr()' But for context B there is no lock taken before and pm8001_ha->lock is unlocked in 'mpi_sata_completion()'. This may unlock the lock taken in context A. Possible racing ?? If 'pm8001_ha->lock' is taken in 'process_oq()' instead of 'pm8001_chip_isr' then the above issue can be avoided. Signed-off-by:
Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Santosh Nayak authored
Static checker is giving following warning: " error: calling 'spin_unlock_irqrestore()' with bogus flags" The code flow is as shown below: process_oq() --> process_one_iomb --> mpi_sata_completion In 'mpi_sata_completion' the first call for 'spin_unlock_irqrestore()' is with flags=0, which is as good as 'spin_unlock_irq()' ( unconditional interrupt enabling). So for better performance 'spin_unlock_irqrestore()' can be replaced with 'spin_unlock_irq()' and 'spin_lock_irqsave()' can be replaced by 'spin_lock_irq()'. Signed-off-by:
Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Feb 19, 2012
-
-
Mark Salyzyn authored
IO_XFER_ERROR_BREAK and IO_XFER_OPEN_RETRY_TIMEOUT are deficient of the required actions as outlined in the programming manual for the pm8001. Due to the overlapping code requirements of these recovery responses, we found it necessary to bundle them together into one patch. When a break is received during the command phase (ssp_completion), this is a result of a timeout or interruption on the bus. Logic suggests that we should retry the command. When a break is received during the data-phase (ssp_event), the task must be aborted on the target or it will retain a data-phase lock turning the target reticent to all future media commands yet will successfully respond to TUR, INQUIRY and ABORT leading eventually to target failure through several abort-cycle loops. The open retry interval is exceedingly short resulting in occasional target drop-off during expander resets or when targets push-back during bad-block remapping. Increased effective timeout from 130ms to 1.5 seconds for each try so as to trigger after the administrative inquiry/tur timeout in the scsi subsystem to keep error-recovery harmonics to a minimum. When an open retry timeout event is received, the action required by the targets is to issue an abort for the outstanding command then logic suggests we retry the command as this state is usually an indication of a credit block or busy condition on the target. We hijacked the pm8001_handle_event work queue handler so that it will handle task as an argument instead of device for the workers in support of the deferred handling outlined above. Moderate to Heavy bad-path testing on a 2.6.32 vintage kernel, compile-testing on scsi-misc-2.6 kernel ... Signed-off-by:
Mark Salyzyn <mark_salyzyn@xyratex.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Mark Salyzyn authored
Jack noticed I dropped a patch fragment associated with a flags automatic variable in mpi_set_phys_g3_with_ssc (ooops) and that the pre-emptive locking that piggy-backed this patch was not in-fact necessary because of underlying atomic accesses to the hardware. Here is the updated patch fixing these two issues. The pm8001 driver is missing the FUNC_GET_EVENTS handler in the phy control function. Since the pm8001_bar4_shift function was not designed to be called at runtime, added locking surrounding the adjustment for all accesses. Signed-off-by:
Mark Salyzyn <mark_salyzyn@xyratex.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Feb 03, 2012
-
-
Masanari Iida authored
Correct typo "unresgister" to "unregister" and "deviece" to "device" in drivers/scsi/pm8001/pm8001_hwi.c Signed-off-by:
Masanari Iida <standby24x7@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Oct 02, 2011
-
-
Mark Salyzyn authored
Code Inspection: found two missing break directives. First one will result in not retrying an a task that report IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY, the second will result in cosmetic debug printk conflicting statement stutter. Because checkpatch.pl came up with a warning regarding unnecessary space before a newline on one of the fragments associated with the diff context, I took the liberty of fixing all the cases of this issue in the pair of files touched by this defect. These cosmetic changes hide the break changes :-( To help focus, break changes are in pm8001_hwi.c fragment line 1649 for the IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY case statement and pm8001_sas.c line 1000 deals with the conflicting debug print stutter. Signed-off-by:
Mark Salyzyn <mark_salyzyn@us.xyratex.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- Mar 31, 2011
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- Feb 12, 2011
-
-
Tejun Heo authored
pm8001 manages its own list of pending works and cancel them on device free. It is unnecessarily complex and has a race condition - the works are canceled but not synced, so the work could still be running during and after the data structures are freed. This patch simplifies workqueue usage. * A driver specific workqueue pm8001_wq is created to serve these work items. * To avoid confusion, the "queue" suffixes are dropped from work items and functions. * Delayed queueing was never used. pm8001_work now uses work_struct instead. * The driver no longer keeps track of pending works. All pm8001_works are queued to pm8001_wq and the workqueue is flushed as necessary. flush_scheduled_work() usage is removed during conversion. Signed-off-by:
Tejun Heo <tj@kernel.org> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
- Sep 09, 2010
-
-
Dan Carpenter authored
Return -ENOMEM if the allocations fail. Signed-off-by:
Dan Carpenter <error27@gmail.com> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
- Aug 06, 2010
-
-
Julia Lawall authored
Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/ ) // <smpl> @r exists@ local idexpression x; expression E; identifier f,f1; position p1,p2; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); <... when != x when != if (...) { <+...x...+> } when != (x) == NULL when != (x) != NULL when != (x) == 0 when != (x) != 0 ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return <+...x...+>; | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Acked-by:
jack wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
- Jul 28, 2010
-
-
James Bottomley authored
We have two separate definitions for identical constants with nearly the same name. One comes from the generic headers in scsi.h; the other is an enum in libsas.h ... it's causing confusion about which one is correct (fortunately they both are). Fix this by eliminating the libsas.h duplicate Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
- Jun 16, 2010
-
-
Uwe Kleine-König authored
Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Uwe Kleine-König authored
Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Apr 11, 2010
-
-
Julia Lawall authored
The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @@ expression e1,e2,e3,e4; @@ - memset(e1,e2,e3); memcpy(e1,e4,e3); // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Acked-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
- Mar 30, 2010
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by:
Tejun Heo <tj@kernel.org> Guess-its-ok-by:
Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- Feb 09, 2010
-
-
Daniel Mack authored
In particular, several occurances of funny versions of 'success', 'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address', 'beginning', 'desirable', 'separate' and 'necessary' are fixed. Signed-off-by:
Daniel Mack <daniel@caiaq.de> Cc: Joe Perches <joe@perches.com> Cc: Junio C Hamano <gitster@pobox.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Dec 10, 2009
-
-
jack wang authored
Add more data to printk's, add some spaces around arithmetic ops and improve comments. Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
jack wang authored
Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
jack wang authored
Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
jack wang authored
Enhance error handle for IO patch, when the port is down, fast return phy down for task. Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
jack wang authored
This patch fix for sata IO circular lock dependency. When we call task_done for SATA IO, we have got pm8001_ha->lock ,and in sas_ata_task_done, it will get (dev->sata_dev.ap->lock. then cause circular lock dependency .So we should drop pm8001_ha->lock when we call task_done for SATA task. Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
Lindar Liu <lindar_liu@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
- Dec 04, 2009
-
-
jack_wang authored
We set interupt cascading count of outbound queue to get better performance, correct some unnecessary return values and some noisy print messages. patch attached. Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
Lindar Liu <lindar_liu@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
jack_wang authored
Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
Lindar Liu <lindar_liu@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-
jack wang authored
This driver supports PMC-Sierra PCIe SAS/SATA 8x6G SPC 8001 chip based host adapters. Signed-off-by:
Jack Wang <jack_wang@usish.com> Signed-off-by:
Lindar Liu <lindar_liu@usish.com> Signed-off-by:
Tom Peng <tom_peng@usish.com> Signed-off-by:
Kevin Ao <aoqingyun@usish.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de>
-