aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-09hpsa: add function is_logical_deviceKevin Barnett1-7/+12
simplify checking for logical/physical devices Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Matthew R. Ochs <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: simplify update scsi devicesKevin Barnett2-9/+14
remove repeated calculation that checks for physical or logical devices. Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Matthew R. Ochs <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: simplify check for device exposureKevin Barnett2-19/+12
remove macros and cleanup device exposure checking Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: correct ioaccel2 sg chain lenDon Brace1-2/+3
Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: correct check for non-disk devicesDon Brace2-15/+15
The driver is using two MACROs which seemingly are looking in the wrong location for the device_flags returned from CISS_REPORT_PHYS. Both MACROs, NON_DISK_PHYS_DEV and PHYS_IOACCEL, are using the pointer returned from figure_lunaddrbytes which is the address of the LUN.lunid element in the extended CISS_REPORT_PHYS. But the MACROS are using offsets beyond the range of the element (offset 17 of an 8 byte element). These MACROs actually are looking at the correct location but they fail static checker analysis. It also will not work if any new elements are added to the extended LUN structure. Change the code to use the structure elements directly since this MACRO is only used in one location. Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: fix physical target resetScott Teel2-6/+29
Set reset type in device_reset_handler to do either logical unit reset for logical devices, or physical target reset, for physical devices. Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: fix hpsa_adjust_hpsa_scsi_tableDon Brace2-0/+17
Fix a NULL pointer issue in the driver when devices are removed during a reset. Signed-off-by: Don Brace <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: correct transfer length for 6 byte read/write commandsDon Brace1-13/+6
handle block counts of 0. Cleanup block and block count calculations. Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: abandon rescans on memory alloaction failures.Don Brace1-5/+19
Abandon and reschedule rescan process only if device inquiries fail due to mem alloc failures, which are likely to occur for all devices. Otherwise, skip device if inquiry fails for other reasons, and continue rescanning process for other devices. Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Don Brace <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: allow driver requested rescansDon Brace2-2/+16
Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by; Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: fix null device issuesDon Brace1-5/+17
Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Manoj Kumar <[email protected]> Signed-off-by: Don Brace <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: check for null arguments to dev_printkDon Brace1-0/+3
Check for NULLs. Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Manoj Kumar <[email protected]> Signed-off-by: Don Brace <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: change devtype to unsignedDon Brace1-1/+1
This member is used in calls to scsi_device_type. It should be unsigned since the kernel checks for upper bounds and it should never be negative. Suggested-by: Tomas Henzl <[email protected]> Suggested-by: Hannes Reinecke <[email protected]> Suggested-by: Matthew R. Ochs <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: remove unused hpsa_tag_discard_error_bitsDon Brace1-10/+1
This function is no longer used. Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Reviewed-by: Manoj Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: stop zeroing reset_cmds_out and ioaccel_cmds_out during rescanDon Brace1-2/+0
pulling the rug out from under the reset handler likewise for ioaccel_cmds_out Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09hpsa: remove unused parameter hostnoDon Brace1-16/+14
This parameter was once used before scan_start was defined but now it is no longer used. Signed-off-by: Don Brace <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09scsi_sysfs: Fix queue_ramp_up_period return codePeter Oberparleiter1-1/+1
Writing a number to /sys/bus/scsi/devices/<sdev>/queue_ramp_up_period returns the value of that number instead of the number of bytes written. This behavior can confuse programs expecting POSIX write() semantics. Fix this by returning the number of bytes written instead. Signed-off-by: Peter Oberparleiter <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Cc: [email protected] Reviewed-by: Matthew R. Ochs <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09scsi: Export SCSI Inquiry data to sysfsJohannes Thumshirn1-0/+24
Export the RAW SCSI Inquiry to sysfs as binfile. This way the data can be used by userland without the need to have and ioctl or use the sg_inq tool. Here is an example of the provided data linux:~ # hexdump /sys/class/scsi_device/1\:0\:0\:0/device/inquiry 0000000 8005 3205 001f 0000 4551 554d 2020 2020 0000010 4551 554d 4420 4456 522d 4d4f 2020 2020 0000020 2e32 2e33 0000024 Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09megaraid_sas: Fix sparse warningSumit Saxena1-1/+1
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09megaraid_sas: Make tape drives visible on PERC5 controllersSumit Saxena2-3/+18
The DELL PERC5 controller firmware does not list tape drives in response to MR_DCMD_PD_LIST_QUERY. This causes tape drives not be exposed to the OS when connected to a PERC5 controller. This patch permits detection of tape drives connected to a PERC5 controller by exposing non-TYPE_DISK devices unconditionally. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02sg: Fix double-free when drives detach during SG_IOCalvin Owens1-1/+7
In sg_common_write(), we free the block request and return -ENODEV if the device is detached in the middle of the SG_IO ioctl(). Unfortunately, sg_finish_rem_req() also tries to free srp->rq, so we end up freeing rq->cmd in the already free rq object, and then free the object itself out from under the current user. This ends up corrupting random memory via the list_head on the rq object. The most common crash trace I saw is this: ------------[ cut here ]------------ kernel BUG at block/blk-core.c:1420! Call Trace: [<ffffffff81281eab>] blk_put_request+0x5b/0x80 [<ffffffffa0069e5b>] sg_finish_rem_req+0x6b/0x120 [sg] [<ffffffffa006bcb9>] sg_common_write.isra.14+0x459/0x5a0 [sg] [<ffffffff8125b328>] ? selinux_file_alloc_security+0x48/0x70 [<ffffffffa006bf95>] sg_new_write.isra.17+0x195/0x2d0 [sg] [<ffffffffa006cef4>] sg_ioctl+0x644/0xdb0 [sg] [<ffffffff81170f80>] do_vfs_ioctl+0x90/0x520 [<ffffffff81258967>] ? file_has_perm+0x97/0xb0 [<ffffffff811714a1>] SyS_ioctl+0x91/0xb0 [<ffffffff81602afb>] tracesys+0xdd/0xe2 RIP [<ffffffff81281e04>] __blk_put_request+0x154/0x1a0 The solution is straightforward: just set srp->rq to NULL in the failure branch so that sg_finish_rem_req() doesn't attempt to re-free it. Additionally, since sg_rq_end_io() will never be called on the object when this happens, we need to free memory backing ->cmd if it isn't embedded in the object itself. KASAN was extremely helpful in finding the root cause of this bug. Signed-off-by: Calvin Owens <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: avoid a panic if MSI(X) interrupts are disabledBenjamin Rood1-5/+11
If MSI(X) interrupts are disabled via the kernel command line (pci=nomsi), the pm8001 driver will kernel panic because it does not detect that MSI interrupts are disabled and will soldier on and attempt to configure MSI interrupts anyways. This leads to a kernel panic, most likely because a required data structure is not available down the line. Using the pci_msi_enabled() function in order to detect if MSI interrupts are enabled before configuring them resolves this issue and avoids a kernel panic when the module is loaded. Additionally, the irq_vector structure must be initialized when legacy interrupts are being used otherwise legacy interrupts will simply not function and result in another panic. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: wait a minimum of 500ms before issuing commands to SPCvBenjamin Rood1-0/+13
The documentation for the 8070 and 8072 SPCv chip explicitly states that a minimum of 500ms must elapse before issuing commands, otherwise the SPCv may not process them and the firmware may get into an unrecoverable state requiring a reboot. While the Linux guys will probably think this is 'racy', it is called out in the chip documentation and inserting this delay makes power management function properly. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: do not examine registers for iButton feature if ATTO adapterBenjamin Rood1-0/+2
ATTO adapters do not support this feature. If the firmware fails to be ready, it should not check the examined registers in order to examine the state of the feature in order to prevent undefined behavior. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: set PHY profiles for ATTO 12Gb SAS controllersBenjamin Rood3-0/+164
PHY profiles are not saved in NVRAM on ATTO 12Gb SAS controllers. Therefore, in order for the controller to function in a wide range of configurations, the PHY profiles must be statically set. This patch provides the necessary functionality to do so. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: add support for ATTO devices during SAS address initiailizationBenjamin Rood1-0/+10
ATTO SAS controllers retrieve the SAS address from the NVRAM in a location different from non-ATTO PMC Sierra SAS controllers. This patch makes the necessary adjustments in order to retrieve the SAS address on these types of adapters. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: add ATTO PCI IDs to pm8001_pci_tableBenjamin Rood1-0/+14
These PCI IDs allow the pm8001 driver to load against ATTO 12Gb SAS controllers that use PMC Sierra 8070 and PMC Sierra 8072 SAS chips. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: add support for PMC Sierra 8070 and PMC Sierra 8072 SAS controllersBenjamin Rood3-2/+8
These SAS controllers support speeds up to 12Gb. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02pm80xx: configure PHY settings based on subsystem vendor IDBenjamin Rood1-6/+20
Previuosly, all PMC Sierra 80xx controllers are assumed to be a motherboard controller, except if the subsystem vendor ID was equal to PCI_VENDOR_ID_ADAPTEC. The driver then attempts to load PHY settings from NVRAM. While this may be correct behavior for most controllers, it does not work with Adaptec and ATTO controllers since they do not store PHY settings in NVRAM and choose to use either custom PHY settings or chip defaults. Loading random values from NVRAM may cause the controllers to malfunction in this edge case. Signed-off-by: Benjamin Rood <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02SCSI: Increase REPORT_LUNS timeoutBrian King1-1/+2
This patch fixes an issue seen with an IBM 2145 (SVC) where, following an error injection test which results in paths going offline, when they came back online, the path would timeout the REPORT_LUNS issued during the scan. This timeout situation continued until retries were expired, resulting in falling back to a sequential LUN scan. Then, since the target responds with PQ=1, PDT=0 for all possible LUNs, due to the way the sequential LUN scan code works, we end up adding 512 LUNs for each target, when there is really only a small handful of LUNs that are actually present. This patch increases the timeout used on the REPORT_LUNS to 30 seconds. This patch solves the issue of 512 non existent LUNs showing up after this event. Signed-off-by: Brian King <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02megaraid_sas : Remove debug print from function megasas_update_span_set[email protected]1-4/+0
Signed-off-by: Sumit Saxena <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02megaraid_sas : Driver version upgrade[email protected]1-2/+2
Signed-off-by: Sumit Saxena <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-02megaraid_sas : SMAP restriction--do not access user memory from IOCTL code[email protected]1-2/+11
This is an issue on SMAP enabled CPUs and 32 bit apps running on 64 bit OS. Do not access user memory from kernel code. The SMAP bit restricts accessing user memory from kernel code. Cc: <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Make PI enabled VD 8 byte DMA aligned[email protected]1-0/+34
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Initialize tasklet before setting up IRQs[email protected]1-2/+3
It may happen (kdump), that an interrupt is invoked just after the setup_irqs function was called but before the tasklet was initialised. At this phase the hw ints should have been disabled, but for unknown reason this mechanism seems to not work properly. From: Tomas Henzl <[email protected]> Signed-off-by: Tomas Henzl <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Indicate online firmware upgrade support for Secure JBOD feature[email protected]1-4/+4
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Update OCR capability on controller properties change[email protected]2-4/+8
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Do not use PAGE_SIZE for max_sectors[email protected]2-1/+3
Do not use PAGE_SIZE marco to calculate max_sectors per I/O request. Driver code assumes PAGE_SIZE will be always 4096 which can lead to wrongly calculated value if PAGE_SIZE is not 4096. This issue was reported in Ubuntu Bugzilla Bug #1475166. Cc: <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Support for Cutlass (12 Gbps) controller[email protected]3-0/+23
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Support for Intruder (12 Gbps) controller[email protected]2-0/+17
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Remove PCI id checks[email protected]4-146/+76
Remove PCI id based checks and use instance->ctrl_context to decide whether controller is MFI-based or a Fusion adapter. Additionally, Fusion adapters are divided into two categories: Thunderbolt and Invader. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Expose TAPE drives unconditionally[email protected]1-2/+3
Expose non-disk (TAPE drive, CD-ROM) unconditionally. Cc: <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Version update[email protected]1-2/+2
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Code refactor for use of requestorId[email protected]1-17/+18
Some of these code changes were proposed by David Binderman. Removed redudant check of requestorId. Redundant condition: instance.requestorId. Check for plasma firmware 1.11 are now restructured to support only specific device id. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Fix validHandles check in I/O path[email protected]1-1/+1
Syncro firmware supports round robin I/O switching on dual path. Driver uses validHandles to check for dual path. However, it is supposed to check for values > 1 (not > 2). Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Print critical firmware event messages[email protected]2-0/+71
Print firmware events in human-readable form. This will help users track any critical firmware events without special application support. Sample syslogd output: megaraid_sas 0000:02:00.0: 8619 (491648347s/0x0020/WARN) - Controller temperature threshold exceeded. This may indicate inadequate system cooling. Switching to low performance mode. The format of logged events is: "<pci_dev_id>: <sequence_number> (<timestamp>/<locale>/<class>) - <description>" Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Chip reset if driver fails to get IOC ready[email protected]1-75/+68
Fix the issue reported at: http://marc.info/?l=linux-scsi&m=143694494104544&w=2 Try to do chip reset at driver load time. If firmware fails to reach ready state, try chip reset using adp_reset() callback. For Fusion adapters the call back was previously void. Provide a suitable reset function. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Support for max_io_size 1MB[email protected]3-20/+58
Driver will expose max sge = 256 (earlier it was 64) if firmware supports extended IO size (1M). Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: Code cleanup-use local variable drv_ops inside ↵[email protected]1-10/+10
megasas_ioc_init_fusion Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-10-29megaraid_sas: JBOD sequence number support[email protected]4-16/+242
Implemented JBOD map which will provide quick access for JBOD path and also provide sequence number. This will help hardware to fail command to the FW in case of any sequence mismatch. Fast Path I/O for JBOD will refer JBOD map (which has sequence number per JBOD device) instead of RAID map. Previously, the driver used RAID map to get device handle for fast path I/O and this not have sequence number information. Now, driver will use JBOD map instead. As part of error handling, if JBOD map is failed/not supported by firmware, driver will continue using legacy behavior. Now there will be three IO paths for JBOD (syspd): - JBOD map with sequence number (Fast Path) - RAID map without sequence number (Fast Path) - FW path via h/w exception queue deliberately setup devhandle 0xFFFF (FW path). Relevant data structures: - Driver send new DCMD MR_DCMD_SYSTEM_PD_MAP_GET_INFO for this purpose. - struct MR_PD_CFG_SEQ- This structure represent map of single physical device. - struct MR_PD_CFG_SEQ_NUM_SYNC- This structure represent whole JBOD map in general(size, count of sysPDs configured, struct MR_PD_CFG_SEQ of syspD with 0 index). - JBOD sequence map size is: sizeof(struct MR_PD_CFG_SEQ_NUM_SYNC) + (sizeof(struct MR_PD_CFG_SEQ) * (MAX_PHYSICAL_DEVICES - 1)) which is allocated while setting up JBOD map at driver load time. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Martin Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>