<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-op-linux/drivers/scsi/mpt2sas, branch master</title>
<subtitle>Blackbird™ Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/'/>
<updated>2015-11-12T00:50:11+00:00</updated>
<entry>
<title>mpt3sas: Single driver module which supports both SAS 2.0 &amp; SAS 3.0 HBAs</title>
<updated>2015-11-12T00:50:11+00:00</updated>
<author>
<name>Sreekanth Reddy</name>
<email>sreekanth.reddy@avagotech.com</email>
</author>
<published>2015-11-11T12:00:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=c84b06a48c4d8ac8270624453132f3fa1a4a0f9d'/>
<id>urn:sha1:c84b06a48c4d8ac8270624453132f3fa1a4a0f9d</id>
<content type='text'>
Modified the mpt3sas driver to have a single driver module which
supports both SAS 2.0 &amp; SAS 3.0 HBA devices.

* Added SAS 2.0 HBA device IDs to the mpt3sas_pci_table pci table.

* Created two separate SCSI host templates for SAS2 and SAS3 HBAs so
  that, during the driver load time driver can use corresponding host
  template(based the pci device ID) while registering a scsi host
  adapter instance for that pci device.

* Registered two IOCTL devices, mpt2ctl is for SAS2 HBAs &amp; mpt3ctl for
  SAS3 HBAs. Also updated the code to make sure that mpt2ctl device
  processes only those ioctl cmds issued for the SAS2 HBAs and mpt3ctl
  device processes only those ioctl cmds issued for the SAS3 HBAs.

* Added separate indexing for SAS2 and SAS3 HBAs.

* Replaced compile time check 'MPT2SAS_SCSI' to run time check
  'hba_mpi_version_belonged' whereever needed.

* Aliased this merged driver to mpt2sas using MODULE_ALIAS.

* Moved global varaible 'driver_name' to per adapter instance variable.

* Created two raid function template and used corresponding raid
  function templates based on the run time check
  'hba_mpi_version_belonged'.

* Moved mpt2sas_warpdrive.c file from mpt2sas to mpt3sas folder and
  renamed it as mpt3sas_warpdrive.c.

* Also renamed the functions in mpt3sas_warpdrive.c file to follow
  current driver function name convention.

* Updated the Makefile to build mpt3sas_warpdrive.o file for these
  WarpDrive-specific functions.

* Also in function mpt3sas_setup_direct_io(), used sector_div() API
  instead of division operator (which gives compilation errors on 32 bit
  machines).

* Removed mpt2sas files, mpt2sas directory &amp; mpt3sas_module.c file.

* Added module parameter 'hbas_to_enumerate' which permits using this
  merged driver as a legacy mpt2sas driver or as a legacy mpt3sas
  driver.

  Here are the available options for this module parameter:

   0 - Merged driver which enumerates both SAS 2.0 &amp; SAS 3.0 HBAs
   1 - Acts as legacy mpt2sas driver, which enumerates only SAS 2.0 HBAs
   2 - Acts as legacy mpt3sas driver, which enumerates only SAS 3.0 HBAs

* Removed mpt2sas entries from SCSI's Kconfig and Makefile files.

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt3sas: Ported WarpDrive product SSS6200 support</title>
<updated>2015-11-11T23:56:10+00:00</updated>
<author>
<name>Sreekanth Reddy</name>
<email>sreekanth.reddy@avagotech.com</email>
</author>
<published>2015-11-11T12:00:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=7786ab6aff9cea97eb0a8d67705c68e97a664bf3'/>
<id>urn:sha1:7786ab6aff9cea97eb0a8d67705c68e97a664bf3</id>
<content type='text'>
Ported the following list of WarpDrive-specific patches:

1. commit 0bdccdb0a090ad8dc5f851cad5e843244c410ee8 ("mpt2sas: WarpDrive
   New product SSS6200 support added")

2. commit 82a452581230b3ffc9d6475dffdb2568497b5fec ("mpt2sas: WarpDrive
   Infinite command retries due to wrong scsi command entry in MPI
   message")

3. commit ba96bd0b1d4a4e11f23671e1f375a5c8f46b0fe7 ("mpt2sas: Support
   for greater than 2TB capacity WarpDrive")

4. commit 4da7af9494b2f98a1503a2634059300c3e4615e6 ("mpt2sas: Do not
   retry a timed out direct IO for Warpdrive")

5. commit daeaa9df92bd742f4e6d4d6039d689277a8e31bd ("mpt2sas: Avoid type
   casting for direct I/O commands").

Also set the mpt2_ioctl_iocinfo adapter_type to:

1. MPT3_IOCTL_INTERFACE_SAS3 for Gen3 HBAs

2. MPT2_IOCTL_INTERFACE_SAS2_SSS6200 for Warp Drive

3. MPT2_IOCTL_INTERFACE_SAS2  for other Gen2 HBAs

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig</title>
<updated>2015-11-11T23:31:14+00:00</updated>
<author>
<name>Sreekanth Reddy</name>
<email>sreekanth.reddy@avagotech.com</email>
</author>
<published>2015-11-11T12:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=af0094115b080b41eb5a3567c177ce960a07dea4'/>
<id>urn:sha1:af0094115b080b41eb5a3567c177ce960a07dea4</id>
<content type='text'>
Currently there is a logging level option provided for each of our
drivers in the kernel configuration utility. Users can enable this
option to get more verbose information. By default it is enabled.

Only when this option is enabled will the functions which display the
required information get compiled in.

As we are merging the both drivers we can no longer provide this
configuration option. Remove the SCSI_MPTXSAS_LOGGING entry from Kconfig
and unconditionally enable logging (by removing the #ifdef
CONFIG_SCSI_MPT3SAS_LOGGING preprocessor check conditions) so that all
functions which are defined to display more verbose information get
compiled in.

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt3sas: Define 'hba_mpi_version_belonged' IOC variable</title>
<updated>2015-11-11T23:29:34+00:00</updated>
<author>
<name>Sreekanth Reddy</name>
<email>sreekanth.reddy@avagotech.com</email>
</author>
<published>2015-11-11T12:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=d357e84d65dfcdb502fdb1aaab2873a82a828db5'/>
<id>urn:sha1:d357e84d65dfcdb502fdb1aaab2873a82a828db5</id>
<content type='text'>
1. Use 'hba_mpi_version_belonged' IOC varable to uniquely identify each
individual generation driver functionality at runtime.

2. Declare global variable 'driver_name' and use this variable while
reserving PCI regions and while allocating the IRQs.

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas: Remove .c and .h files from mpt2sas driver</title>
<updated>2015-11-11T23:27:24+00:00</updated>
<author>
<name>Sreekanth Reddy</name>
<email>sreekanth.reddy@avagotech.com</email>
</author>
<published>2015-11-11T12:00:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=09ec55ed74ebb8a61859609011d28ab0bcb15e08'/>
<id>urn:sha1:09ec55ed74ebb8a61859609011d28ab0bcb15e08</id>
<content type='text'>
Remove .c and .h files which are no longer needed from mpt2sas
driver. We are reusing this code from mpt3sas.

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas: Move Gen2 HBA's device registration to a separate file</title>
<updated>2015-11-11T23:22:27+00:00</updated>
<author>
<name>Sreekanth Reddy</name>
<email>sreekanth.reddy@avagotech.com</email>
</author>
<published>2015-11-11T12:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=78f97c8f612d0e7d7d08d741549e89e8c951920a'/>
<id>urn:sha1:78f97c8f612d0e7d7d08d741549e89e8c951920a</id>
<content type='text'>
1. Create a mpt2sas_module.c file for mpt2sas where GEN2 HBA devices
register with PCI, SML, IOCTL subsystems.

2. Updated the Makefile to use the object files from mpt3sas folder.

3. Defined a compilation flag SCSI_MPT2SAS which can be used to not
include those sections of code from mpt3sas driver which are not
required for mpt2sas driver.

4. Inherited automatic diag buffer feature from mpt3sas driver.

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas: Use mpi headers from mpt3sas</title>
<updated>2015-11-11T23:11:23+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-11-11T12:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=3c5866565f37d45e3b812e3045caf2358f2f2377'/>
<id>urn:sha1:3c5866565f37d45e3b812e3045caf2358f2f2377</id>
<content type='text'>
Use a single set of the hardware description headers instead of having
them in the source tree twice.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sreekanth Reddy &lt;sreekanth.reddy@avagotech.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas: setpci reset kernel oops fix</title>
<updated>2015-09-06T18:57:25+00:00</updated>
<author>
<name>Nagarajkumar Narayanan</name>
<email>nagarajkumar.narayanan@seagate.com</email>
</author>
<published>2015-08-18T07:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=6229b414b3adb3aac0b54e67d72d6462fc230c0d'/>
<id>urn:sha1:6229b414b3adb3aac0b54e67d72d6462fc230c0d</id>
<content type='text'>
mpt2sas: setpci reset on nytro warpdrive card along with sysfs access and
cli ioctl access resulted in kernel oops

1. pci_access_mutex lock added to provide synchronization between IOCTL,
   sysfs, PCI resource handling path

2. gioc_lock spinlock to protect list operations over multiple
controllers

&gt;From c53a1cff4c07528b8b9ec7f6716e94950283e8f9 Mon Sep 17 00:00:00 2001
From: Nagarajkumar Narayanan &lt;nagarajkumar.narayanan@seagate.com&gt;
Date: Tue, 18 Aug 2015 11:58:13 +0530
Subject: [PATCH] mpt2sas setpci reset oops fix

In mpt2sas driver due to lack of synchronization between ioctl,
BRM status access through sysfs, pci resource removal kernel oops
happen as ioctl path and BRM status sysfs access path still tries
to access the removed resources

Two locks added to provide syncrhonization

1. pci_access_mutex: Mutex to synchronize ioctl,sysfs show path and
pci resource handling. PCI resource freeing will lead to free
vital hardware/memory resource, which might be in use by cli/sysfs
path functions resulting in Null pointer reference followed by kernel
crash. To avoid the above race condition we use mutex syncrhonization
which ensures the syncrhonization between cli/sysfs_show path

Note: pci_access_mutex is used only if nytro warpdrive cards
(ioc-&gt;is_warpdrive based on device id) are used
as we could not test this case with other SAS2 HBA cards
We can remove this check if this behaviour confirmed from other
cards.

2. spinlock on list operations over IOCs

Case: when multiple warpdrive cards(IOCs) are in use
Each IOC will added to the ioc list stucture on initialization.
Watchdog threads run at regular intervals to check IOC for any
fault conditions which will trigger the dead_ioc thread to
deallocate pci resource, resulting deleting the IOC netry from list,
this deletion need to protected by spinlock to enusre that
ioc removal is syncrhonized, if not synchronized it might lead to
list_del corruption as the ioc list is traversed in cli path

Signed-off-by: Nagarajkumar Narayanan &lt;nagarajkumar.narayanan@seagate.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Acked-by: Sreekanth Reddy &lt;sreekanth.reddy@avagotech.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas: Refcount fw_events and fix unsafe list usage</title>
<updated>2015-09-06T17:56:17+00:00</updated>
<author>
<name>Calvin Owens</name>
<email>calvinowens@fb.com</email>
</author>
<published>2015-08-14T01:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=008549f6e8a1dc4aeea4a8d64184909786b27713'/>
<id>urn:sha1:008549f6e8a1dc4aeea4a8d64184909786b27713</id>
<content type='text'>
The fw_event_work struct is concurrently referenced at shutdown, so
add a refcount to protect it, and refactor the code to use it.

Additionally, refactor _scsih_fw_event_cleanup_queue() such that it
no longer iterates over the list without holding the lock, since
_firmware_event_work() concurrently deletes items from the list.

Signed-off-by: Calvin Owens &lt;calvinowens@fb.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Tested-by: Chaitra Basappa &lt;chaitra.basappa@avagotech.com&gt;
Acked-by: Sreekanth Reddy &lt;sreekanth.reddy@avagotech.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>mpt2sas: Refcount sas_device objects and fix unsafe list usage</title>
<updated>2015-09-06T17:55:18+00:00</updated>
<author>
<name>Calvin Owens</name>
<email>calvinowens@fb.com</email>
</author>
<published>2015-08-14T01:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=d224fe0d609734888af63656ddaf3a8352f0a7b5'/>
<id>urn:sha1:d224fe0d609734888af63656ddaf3a8352f0a7b5</id>
<content type='text'>
These objects can be referenced concurrently throughout the driver, we
need a way to make sure threads can't delete them out from under each
other. This patch adds the refcount, and refactors the code to use it.

Additionally, we cannot iterate over the sas_device_list without
holding the lock, or we risk corrupting random memory if items are
added or deleted as we iterate. This patch refactors _scsih_probe_sas()
to use the sas_device_list in a safe way.

Signed-off-by: Calvin Owens &lt;calvinowens@fb.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Tested-by: Chaitra Basappa &lt;chaitra.basappa@avagotech.com&gt;
Acked-by: Sreekanth Reddy &lt;sreekanth.reddy@avagotech.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
</feed>
