Age | Commit message (Collapse) | Author | Files | Lines |
|
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines. This issue was reported by checkpatch.
A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):
// <smpl>
@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@
- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;
// </smpl>
[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
In _scsih_probe, delay the call to scsi_add_host until the host has been
fully set up.
Otherwise, the default .can_queue value of 1 causes scsi-mq to set the block
layer request queue size to its minimum size, resulting in awful performance.
In _scsih_probe error handling, call mpt3sas_base_detach rather than
scsi_remove_host to properly clean up in reverse order.
In _scsih_remove, call scsi_remove_host earlier to clean up in reverse order.
Signed-off-by: Robert Elliott <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nagalakshmi Nandigama <[email protected]>
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
On systems with a non power-of-two CPU count the existing MSI-X grouping
code failed to distribute interrupts correctly. Rework the code to
handle arbitrary processor counts.
Also remove the hardcoded upper limit on the number of processors so we
can boot on large systems.
Signed-off-by: Martin K. Petersen <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Tack the firmware reply event_data payload to the end of its
corresponding struct fw_event_work allocation. This matches the
convention in the mptfusion driver and simplifies the code.
This avoids the following smatch warning:
drivers/scsi/mpt3sas/mpt3sas_scsih.c:2519
mpt3sas_send_trigger_data_event() warn: possible memory leak of
'fw_event'
Signed-off-by: Joe Lawrence <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
In _scsih_{slave,target}_alloc, an incorrect structure type is passed
to sizeof() when allocating storage for hostdata. Luckily larger
structure types were used, so at least the wrong sizes were safe:
struct scsi_device (1784 bytes) > struct MPT3SAS_DEVICE (24 bytes)
struct scsi_target (760 bytes) > struct MPT3SAS_TARGET (32 bytes)
This fixes the following smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_scsih.c:1166 _scsih_target_alloc()
warn: struct type mismatch 'MPT3SAS_TARGET vs scsi_target'
drivers/scsi/mpt3sas/mpt3sas_scsih.c:1280 _scsih_slave_alloc()
warn: struct type mismatch 'MPT3SAS_DEVICE vs scsi_device'
Signed-off-by: Joe Lawrence <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Now that we're using 64-bit LUNs internally we need to increase
the size of max_luns to 64 bits, too.
Signed-off-by: Hannes Reinecke <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Ewan Milne <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Removing the host_lock from the I/O submission path gives a huge
scalability improvement.
Signed-off-by: Matthew Wilcox <[email protected]>
Reviewed-by: Nicholas Bellinger <[email protected]>
Reviewed-by: Praveen Krishnamoorthy <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
The mpt3sas_scsih_issue_tm() function does not use the 'serial_number'
argument passed to it. Removing it removes the last vestiges of the
scsi_cmnd's serial_number field from this driver.
Signed-off-by: Matthew Wilcox <[email protected]>
Reviewed-by: Nicholas Bellinger <[email protected]>
Reviewed-by: Praveen Krishnamoorthy <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
|
Pull core block IO changes from Jens Axboe:
"The major piece in here is the immutable bio_ve series from Kent, the
rest is fairly minor. It was supposed to go in last round, but
various issues pushed it to this release instead. The pull request
contains:
- Various smaller blk-mq fixes from different folks. Nothing major
here, just minor fixes and cleanups.
- Fix for a memory leak in the error path in the block ioctl code
from Christian Engelmayer.
- Header export fix from CaiZhiyong.
- Finally the immutable biovec changes from Kent Overstreet. This
enables some nice future work on making arbitrarily sized bios
possible, and splitting more efficient. Related fixes to immutable
bio_vecs:
- dm-cache immutable fixup from Mike Snitzer.
- btrfs immutable fixup from Muthu Kumar.
- bio-integrity fix from Nic Bellinger, which is also going to stable"
* 'for-3.14/core' of git://git.kernel.dk/linux-block: (44 commits)
xtensa: fixup simdisk driver to work with immutable bio_vecs
block/blk-mq-cpu.c: use hotcpu_notifier()
blk-mq: for_each_* macro correctness
block: Fix memory leak in rw_copy_check_uvector() handling
bio-integrity: Fix bio_integrity_verify segment start bug
block: remove unrelated header files and export symbol
blk-mq: uses page->list incorrectly
blk-mq: use __smp_call_function_single directly
btrfs: fix missing increment of bi_remaining
Revert "block: Warn and free bio if bi_end_io is not set"
block: Warn and free bio if bi_end_io is not set
blk-mq: fix initializing request's start time
block: blk-mq: don't export blk_mq_free_queue()
block: blk-mq: make blk_sync_queue support mq
block: blk-mq: support draining mq queue
dm cache: increment bi_remaining when bi_end_io is restored
block: fixup for generic bio chaining
block: Really silence spurious compiler warnings
block: Silence spurious compiler warnings
block: Kill bio_pair_split()
...
|
|
Race conditions are theoretically possible between the MPT PCI device
removal and the generic PCI bus rescan and device removal that can be
triggered via sysfs.
To avoid those race conditions make the MPT PCI code use
pci_stop_and_remove_bus_device_locked().
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
When we start sharing biovecs, keeping bi_vcnt accurate for splits is
going to be error prone - and unnecessary, if we refactor some code.
So bio_segments() has to go - but most of the existing users just needed
to know if the bio had multiple segments, which is easier - add a
bio_multiple_segments() for them.
(Two of the current uses of bio_segments() are going to go away in a
couple patches, but the current implementation of bio_segments() is
unsafe as soon as we start doing driver conversions for immutable
biovecs - so implement a dumb version for bisectability, it'll go away
in a couple patches)
Signed-off-by: Kent Overstreet <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Nagalakshmi Nandigama <[email protected]>
Cc: Sreekanth Reddy <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
|
|
More prep work for immutable biovecs - with immutable bvecs drivers
won't be able to use the biovec directly, they'll need to use helpers
that take into account bio->bi_iter.bi_bvec_done.
This updates callers for the new usage without changing the
implementation yet.
Signed-off-by: Kent Overstreet <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: "Ed L. Cashin" <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Lars Ellenberg <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Paul Clements <[email protected]>
Cc: Jim Paris <[email protected]>
Cc: Geoff Levand <[email protected]>
Cc: Yehuda Sadeh <[email protected]>
Cc: Sage Weil <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: Joshua Morris <[email protected]>
Cc: Philip Kelleher <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Jeremy Fitzhardinge <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: [email protected]
Cc: Nagalakshmi Nandigama <[email protected]>
Cc: Sreekanth Reddy <[email protected]>
Cc: [email protected]
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Steven Whitehouse <[email protected]>
Cc: Herton Ronaldo Krzesinski <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Guo Chao <[email protected]>
Cc: Asai Thambi S P <[email protected]>
Cc: Selvan Mani <[email protected]>
Cc: Sam Bradshaw <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Keith Busch <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Quoc-Son Anh <[email protected]>
Cc: Sebastian Ott <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Jerome Marchand <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: Mike Snitzer <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: "Darrick J. Wong" <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Acked-by: Geoff Levand <[email protected]>
|
|
Right now the Makefile for the mpt3sas driver does not even allow the
driver to be built into the kernel. So fix that up, as there doesn't
seem to be any obvious reason why this shouldn't be done.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Jan Vesely <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Added a driver module parameter max_msix_vectors. Using this module parameter
the maximum number of MSI-X vectors could be set.
The number of MSI-X vectors used would be the minimum of MSI-X vectors
supported by the HBA, the number of CPU cores and the value set to
max_msix_vectors module parameter.
The default value of this module parameter is set to 8. The default value of
this parameter is set to 8 inorder to reduce the amount of memory required for
Reply Descriptor Post queue. This is because with the higher MSI-X vectors,
some times kernel is not able to allocate the requested amount of memory and
crash is observed. To overcome this problem, the default value is set to 8.
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
If mpt3sas_base_map_resources takes an early error path then its
counterpart, mpt3sas_base_free_resources needs to be careful about
cleaning up:
1 - _base_mask_interrupts and _base_make_ioc_ready require memory
mapped I/O registers, make sure that this is true.
2 - _base_free_irq iterates over the adapter's reply_queue_list, so
move this list head initialization out of _base_enable_msix to
_scsih_probe so this will always be safe.
3 - check that the controller PCI device and its BARs have been
enabled before disabling them.
Signed-off-by: Joe Lawrence <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Bump driver version to v02.100.00.00.
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
are removed but their transport layer entries are not removed
When Async scanning mode is enabled and device scanning is in progress,
devices should not be removed. But in actuality, devices are removed but
their transport layer entries are not removed. This causes error to add
the same device to the transport layer after host reset or diagnostic
reset.
So, in this patch, modified the code in such a way that device is not removed
when Async scanning mode is enabled and device scanning is in progress.
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Change set in MPI v2.5 Rev F(v2.5.1.1) specification and 2.00.29 header files
1. Added a bit to the IOCExceptions field of the IOCFacts Reply to indicate
that the IOC detected a partial memory failure.
2. Added ElapsedSeconds field to RAID Volume Indicator Structure. Added
Elapsed Seconds Valid flag to Flags field of this structure.
3. Added ElapsedSeconds field to Integrated RAID Operations Status Event Data.
4. Added two new AbortType values for TargetModeAbort Request, one to abort
all I/Os from a single initiator, and the other to abort only Command IUs.
5. Added a new chapter covering DMA Flags and Multicast Modes.
6. In the IOCSettings field of BIOS Page 1, modified the Adapter Support bits
description to specify X86 BIOS.
7. Marked bit 0 of the ControlFlags field of SAS IO Unit Page 1 as
obsolete. This was the Clear SATA Affiliation flag.
8. Added additional requirements for certain IOCs that support more than eight
MSI-x vectors.
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned
Infinite loop can occur if IOCStatus is not equal to
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE value in the while loops in functions
_scsih_search_responding_sas_devices,
_scsih_search_responding_raid_devices and
_scsih_search_responding_expanders
So, Instead of checking for MPI2_IOCSTATUS_CONFIG_INVALID_PAGE value,
in this patch code is modified to check for IOCStatus not equals to
MPI2_IOCSTATUS_SUCCESS to break the while loop.
Signed-off-by: Sreekanth Reddy <[email protected]>
Cc: [email protected]
Signed-off-by: James Bottomley <[email protected]>
|
|
non LUN 0 configured expander
With some enclosures when LUN 0 is not created but LUN 1 or LUN X is created
then SCSI scan procedure calls target_alloc, slave_alloc call back functions
for LUN 0 and slave_destory() for same LUN 0.
In these kind of cases within slave_destroy, pointer to scsi_target in
_sas_device structure is set to NULL, following which when slave_alloc for LUN
1 is called then starget would not be set properly for this LUN. So,
scsi_target pointer pointing to NULL value would lead to a crash later in the
discovery procedure.
To solve this issue set the sas_device's scsi_target pointer to scsi_device's
scsi_target if it is NULL earlier in slave_alloc callback function.
Signed-off-by: Sreekanth Reddy <[email protected]>
Cc: [email protected]
Signed-off-by: James Bottomley <[email protected]>
|
|
Hardware timing requirements is updated in order to comply with firmware
requirement.
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
The Copyright String in all mpt3sas files are changed to 2012-2013.
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,
Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).
7kloc removed.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
don't bother with deferred freeing of fdtables
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
proc: Make the PROC_I() and PDE() macros internal to procfs
proc: Supply a function to remove a proc entry by PDE
take cgroup_open() and cpuset_open() to fs/proc/base.c
ppc: Clean up scanlog
ppc: Clean up rtas_flash driver somewhat
hostap: proc: Use remove_proc_subtree()
drm: proc: Use remove_proc_subtree()
drm: proc: Use minor->index to label things, not PDE->name
drm: Constify drm_proc_list[]
zoran: Don't print proc_dir_entry data in debug
reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
proc: Supply an accessor for getting the data from a PDE's parent
airo: Use remove_proc_subtree()
rtl8192u: Don't need to save device proc dir PDE
rtl8187se: Use a dir under /proc/net/r8180/
proc: Add proc_mkdir_data()
proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
proc: Move PDE_NET() to fs/proc/proc_net.c
...
|
|
Signed-off-by: Al Viro <[email protected]>
|
|
Correct spelling typo in various drivers.
Signed-off-by: Masanari Iida <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
The variable 'chain_flags' and 'phy_number' are initialized but never used
otherwise, So remove those unused variables.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Sreekanth Reddy <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
linux/version.h is not necessary as detected by checkversion.pl script.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: "Sreekanth Reddy" <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
ioc->diag_trigger_mpi is an SL_WH_MPI_TRIGGERS_T struct.
There is a cut and paste error here and SL_WH_EVENT_TRIGGERS_T is used
instead of SL_WH_MPI_TRIGGERS_T. Since the SL_WH_EVENT_TRIGGERS_T is
smaller than SL_WH_MPI_TRIGGERS_T, it means we only clear part of the
buffer.
I've changed it to use sizeof(ioc->diag_trigger_mpi) which is a bit
simpler.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: "Sreekanth Reddy" <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
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 <[email protected]>
Cc: Adam Radford <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These driver files are initially, substantially similar to mpt2sas but,
because mpt2sas is going into maintenance mode and mp3sas will become heavily
developed, we elected to keep the code bases separate.
Signed-off-by: Sreekanth Reddy <[email protected]>
Reviewed-by: Nagalakshmi Nandigama <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|