Brian King [Thu, 11 Aug 2016 02:45:57 +0000 (22:45 -0400)]
ipr: Fix sync scsi scan
Commit b195d5e2bffd ("ipr: Wait to do async scan until scsi host is
initialized") fixed async scan for ipr, but broke sync scan. This fixes
sync scan back up.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Tested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Yinghai Lu [Sat, 6 Aug 2016 06:37:34 +0000 (23:37 -0700)]
megaraid_sas: Fix probing cards without io port
Found one megaraid_sas HBA probe fails,
[ 187.235190] scsi host2: Avago SAS based MegaRAID driver
[ 191.112365] megaraid_sas 0000:89:00.0: BAR 0: can't reserve [io 0x0000-0x00ff]
[ 191.120548] megaraid_sas 0000:89:00.0: IO memory region busy!
and the card has resource like,
[ 125.097714] pci 0000:89:00.0: [1000:005d] type 00 class 0x010400
[ 125.104446] pci 0000:89:00.0: reg 0x10: [io 0x0000-0x00ff]
[ 125.110686] pci 0000:89:00.0: reg 0x14: [mem 0xce400000-0xce40ffff 64bit]
[ 125.118286] pci 0000:89:00.0: reg 0x1c: [mem 0xce300000-0xce3fffff 64bit]
[ 125.125891] pci 0000:89:00.0: reg 0x30: [mem 0xce200000-0xce2fffff pref]
that does not io port resource allocated from BIOS, and kernel can not
assign one as io port shortage.
The driver is only looking for MEM, and should not fail.
It turns out megasas_init_fw() etc are using bar index as mask. index 1
is used as mask 1, so that pci_request_selected_regions() is trying to
request BAR0 instead of BAR1.
Fix all related reference.
Fixes: b6d5d8808b4c ("megaraid_sas: Use lowest memory bar for SR-IOV VF support") Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Dave Carroll [Fri, 5 Aug 2016 19:44:10 +0000 (13:44 -0600)]
aacraid: Check size values after double-fetch from user
In aacraid's ioctl_send_fib() we do two fetches from userspace, one the
get the fib header's size and one for the fib itself. Later we use the
size field from the second fetch to further process the fib. If for some
reason the size from the second fetch is different than from the first
fix, we may encounter an out-of- bounds access in aac_fib_send(). We
also check the sender size to insure it is not out of bounds. This was
reported in https://bugzilla.kernel.org/show_bug.cgi?id=116751 and was
assigned CVE-2016-6480.
Reported-by: Pengfei Wang <wpengfeinudt@gmail.com> Fixes: 7c00ffa31 '[SCSI] 2.6 aacraid: Variable FIB size (updated patch)' Cc: stable@vger.kernel.org Signed-off-by: Dave Carroll <david.carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Use kfree_skb() instead of kfree() to free sk_buff.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Fix to return error code -ENOMEM from the workqueue alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
fcoe: add missing destroy_workqueue() on error in fcoe_init()
Add the missing destroy_workqueue() before return from fcoe_init() in
the fcoe transport register failed error handling case.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Check for the existence of piocb->vport before accessing it.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: James Smart <james.smart@broadcom.com> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Mon, 4 Jul 2016 08:29:23 +0000 (10:29 +0200)]
fcoe: Use default VLAN for FIP VLAN discovery
FC-BB-6 states: FIP protocols shall be performed on a per-VLAN basis. It
is recommended to use the FIP VLAN discovery protocol on the default
VLAN.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Brian King [Fri, 15 Jul 2016 19:48:03 +0000 (14:48 -0500)]
ipr: Wait to do async scan until scsi host is initialized
When performing an async scan, make sure the kthread doing scanning
doesn't start before the scsi host is fully initialized.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Uma Krishnan [Thu, 21 Jul 2016 20:44:37 +0000 (15:44 -0500)]
MAINTAINERS: Update cxlflash maintainers
Adding myself as a cxlflash maintainer.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Uma Krishnan [Thu, 21 Jul 2016 20:44:04 +0000 (15:44 -0500)]
cxlflash: Verify problem state area is mapped before notifying shutdown
If an EEH or some other hard error occurs while the adapter instance was
being initialized, on the subsequent shutdown of the device, the system
could crash with:
This crash is due to the AFU not being mapped when the shutdown
notification routine is called and is a regression that was inserted
recently with Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support
for CXL Flash cards").
As a fix, shutdown notification should only occur when the AFU is
mapped.
Fixes: 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards") Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
lpfc: fix oops in lpfc_sli4_scmd_to_wqidx_distr() from lpfc_send_taskmgmt()
The lpfc_sli4_scmd_to_wqidx_distr() function expects the scsi_cmnd
'lpfc_cmd->pCmd' not to be null, and point to the midlayer command.
That's not true in the .eh_(device|target|bus)_reset_handler path,
because lpfc_send_taskmgmt() sends commands not from the midlayer, so
does not set 'lpfc_cmd->pCmd'.
That is true in the .queuecommand path because lpfc_queuecommand()
stores the scsi_cmnd from midlayer in lpfc_cmd->pCmd; and lpfc_cmd is
stored by lpfc_scsi_prep_cmnd() in piocbq->context1 -- which is passed
to lpfc_sli4_scmd_to_wqidx_distr() as lpfc_cmd parameter.
This problem can be hit on SCSI EH, and immediately with sg_reset.
These 2 test-cases demonstrate the problem/fix with next-20160601.
Fixes: 8b0dff14164d ("lpfc: Add support for using block multi-queue") Cc: <stable@vger.kernel.org> # v4.2+ Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Arnd Bergmann [Wed, 15 Jun 2016 20:42:17 +0000 (22:42 +0200)]
scsi: lpfc: avoid harmless comparison warning
When building with -Wextra, we get a lot of warnings for the lpfc driver
concerning expressions that are always true, starting with:
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_enable_npiv_init':
drivers/scsi/lpfc/lpfc_attr.c:2786:77: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_enable_rrq_init':
drivers/scsi/lpfc/lpfc_attr.c:2802:76: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_suppress_link_up_init':
drivers/scsi/lpfc/lpfc_attr.c:2812:2050: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_log_verbose_init':
drivers/scsi/lpfc/lpfc_attr.c:3064:1930: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
The code works as intended, but it would be nice to shut up the warning
so we don't clutter up build logs with this. Using a separate inline
function for it makes it clear to the compiler that the comparison is
necessary in the caller but still lets it do the constant-folding.
[mkp: fix typo]
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 19 Jul 2016 11:49:40 +0000 (13:49 +0200)]
fcoe: implement FIP VLAN responder
When running in VN2VN mode there is no central instance which would send
out any FIP VLAN discovery notifications. So this patch adds a new sysfs
attribute 'fip_vlan_responder' which will activate a FIP VLAN discovery
responder.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 19 Jul 2016 11:49:39 +0000 (13:49 +0200)]
fcoe: Rename 'fip_frame' to 'fip_vn2vn_notify_frame'
Do not use a generic name to avoid confusions with other usages.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
lpfc: call lpfc_sli_validate_fcp_iocb() with the hbalock held
Call lpfc_sli_validate_fcp_iocb() with the hbalock held, as the pointer
to iocbq is not guaranteed to still be valid after looking it up.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Laurence Oberman <loberman@redhat.com> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Don Brace [Fri, 1 Jul 2016 18:37:38 +0000 (13:37 -0500)]
hpsa: change hpsa_passthru_ioctl timeout
Was not alloting for FW Flash times.
Reviewed-by: Scott Teel <scott.teel@microsemi.com> Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Don Brace [Fri, 1 Jul 2016 18:37:31 +0000 (13:37 -0500)]
hpsa: correct skipping masked peripherals
The SA controller spins down RAID drive spares.
A REGNEWD event causes an inquiry to be sent to all physical
drives. This causes the SA controller to spin up the spare.
The controller suspends all I/O to a logical volume until
the spare is spun up. The spin-up can take over 50 seconds.
This can result in one or both of the following:
- SML sends down aborts and resets to the logical volume
and can cause the logical volume to be off-lined.
- a negative impact on the logical volume's I/O performance
each time a REGNEWD is triggered.
Reviewed-by: Scott Teel <scott.teel@microsemi.com> Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Fixes: 969a619 ("qla2xxx: Add support for buffer to buffer credit value for ISP27XX.") Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:31 +0000 (11:14 -0400)]
qla2xxx: Separate ISP type bits out from device type.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:30 +0000 (11:14 -0400)]
qla2xxx: Correction to function qla26xx_dport_diagnostics().
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:29 +0000 (11:14 -0400)]
qla2xxx: Add support to handle Loop Init error Asynchronus event.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:28 +0000 (11:14 -0400)]
qla2xxx: Let DPORT be enabled purely by nvram.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:26 +0000 (11:14 -0400)]
qla2xxx: Add bsg interface to support D_Port Diagnostics.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
qla2xxx: Check for device state before unloading the driver.
During hot swap of PCI device, there can be PCI error on device,
during normal driver unload. The race between normal driver unload and
driver unload due to PCI error, can lead to system crash.Fix is to check
if there is unload going on and allow that function to unload the driver.
Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:24 +0000 (11:14 -0400)]
qla2xxx: Properly reset firmware statistics.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:23 +0000 (11:14 -0400)]
qla2xxx: Properly initialize IO statistics.
Properly initialize IO statistics to avoid initial 0xFFFFFFF (-1) values.
Cleanup/simplify usage of pointer to statistics structure.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:22 +0000 (11:14 -0400)]
qla2xxx: Make debug buffer log easier to view.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode.
When VP decoupling enabled, there could be a window where, FLOGI from initiators
can be dropped before VP0 is enabled, causing link level recovery.
Retry FLOGI to avoid link level recovery.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:19 +0000 (11:14 -0400)]
qla2xxx: Shutdown board on thermal shutdown aen.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:18 +0000 (11:14 -0400)]
qla2xxx: Add ram area DDR for fwdump template entry T262.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Carnuccio [Wed, 6 Jul 2016 15:14:17 +0000 (11:14 -0400)]
qla2xxx: Remove sysfs node fw_dump_template.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:14 +0000 (12:36 -0700)]
lpfc: Update lpfc version to 11.2.0.0
Update lpfc version to 11.2.0.0
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:13 +0000 (12:36 -0700)]
lpfc: Copyright updates
Copyright updates
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:12 +0000 (12:36 -0700)]
lpfc: Disable FDMI probing if not connected to a fabric
Disable FDMI probing if not connected to a fabric
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:11 +0000 (12:36 -0700)]
lpfc: Correct issue with ioremap() call on 32bit kernel
Correct issue with ioremap() call on 32bit kernel
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:10 +0000 (12:36 -0700)]
lpfc: Re-organize source for easier driver attribute management
Re-organize source for easier driver attribute management
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:09 +0000 (12:36 -0700)]
lpfc: Remove global lpfc_sli_mode attribute in leiu of per-hba lpfc_sli_mode
Remove global lpfc_sli_mode attribute in leiu of per-hba lpfc_sli_mode
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:08 +0000 (12:36 -0700)]
lpfc: Remove global lpfc_delay_discovery attribute in leiu of per-hba lpfc_delay_discovery
Remove global lpfc_delay_discovery attribute in leiu of per-hba
lpfc_delay_discovery
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:07 +0000 (12:36 -0700)]
lpfc: Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv
Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:06 +0000 (12:36 -0700)]
lpfc: Correct Port reset resulting in FC port going offline
Correct Port reset resulting in FC port going offline
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:05 +0000 (12:36 -0700)]
lpfc: Add support for XLane LUN priority
Add support for XLane LUN priority
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:04 +0000 (12:36 -0700)]
lpfc: Correct RDP response Revision location
Correct RDP response Revision location
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:03 +0000 (12:36 -0700)]
lpfc: Re-organize source for easier device-id management
Re-organize source for easier device-id management
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:02 +0000 (12:36 -0700)]
lpfc: Correct FCOE discovery to avoid loss of storage devices after system reboot
Correct FCOE discovery to avoid loss of storage devices after system reboot
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:01 +0000 (12:36 -0700)]
lpfc: Fix SLI mode 2 config failure
Fix SLI mode 2 config failure
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:36:00 +0000 (12:36 -0700)]
lpfc: Add MDS Diagnostics Support
Add MDS Diagnostics Support
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:35:59 +0000 (12:35 -0700)]
lpfc: Add sysfs proc_name support
Add sysfs proc_name support
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:35:58 +0000 (12:35 -0700)]
lpfc: Reject RDP ELS if port has no login
Reject RDP ELS if port has no login
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:35:57 +0000 (12:35 -0700)]
lpfc: Correct Buffer credit descriptor values in RDP response
Correct Buffer credit descriptor values in RDP response
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:35:56 +0000 (12:35 -0700)]
lpfc: Add recovery from adapter parity errors on some SLI4 adapters
Add recovery from adapter parity errors on some SLI4 adapters
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:35:55 +0000 (12:35 -0700)]
lpfc: Correct RDP response sizing issue
Correct RDP response sizing issue
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
James Smart [Wed, 6 Jul 2016 19:35:54 +0000 (12:35 -0700)]
lpfc: Fix Transgression Flag of Optical Element descriptor for RDP on Linux
Fix Transgression Flag of Optical Element descriptor for RDP on Linux
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Dan Carpenter [Fri, 15 Jul 2016 11:18:57 +0000 (14:18 +0300)]
ibmvfc: prevent a potential deadlock
My static checker complains that we need to unlock on this path. Seems
true.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hans de Goede [Thu, 14 Jul 2016 12:26:41 +0000 (14:26 +0200)]
usb: MAINTAINERS: Oliver Neukum is the new uas maintainer
Oliver Neukum is taking over uas maintainership from me and Gerd
Hoffmann.
Cc: Oliver Neukum <oneukum@suse.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Oliver Neukum <oneukum@suse.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
We've had scsi-mq for 2.5 years now, so we can remove the unused flag to
disable the code on a per-host basis that was put in for unexpected
emergencies during bringup.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Manjunath M B [Tue, 12 Jul 2016 13:55:36 +0000 (19:25 +0530)]
scsi: ufs: tc-dwc-g210 driver fix for 20-bit RMMI
The code was checking on PA_CONNECTEDRXLANES and PA_CONNECTEDTXLANES
attributes to program the Lane#1 attributes. The correct attributes are
PA_AVAILRXDATALANES and PA_AVAILTXDATALANES respectively.
Signed-off-by: Manjunath M B <manjumb@synopsys.com> Tested-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Kefeng Wang [Tue, 12 Jul 2016 09:43:25 +0000 (17:43 +0800)]
mpt3sas: Fix panic when aer correct error occurred
The _scsih_pci_mmio_enabled called if scsih_pci_error_detected returns
PCI_ERS_RESULT_CAN_RECOVER, at this point, read/write to the device
still works, no need to reset slot.
Or the mpt3sas_base_map_resources in scsih_pci_slot_reset will fail,
and iounamp ioc->chip, then we will meet issue when read ioc->chip
in mpt3sas_base_get_iocstate from _base_fault_reset_work.
Cc: Sathya Prakash <sathya.prakash@broadcom.com> Cc: Chaitra P B <chaitra.basappa@broadcom.com> Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Acked-by: Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
qla2xxx: setup data needed in ISR before setting up the ISR
qla2xxx first calls request_irq() and then does the setup of the queue
entry data needed in the interrupt handlers in when using MSI-X. This
could lead to a NULL pointer dereference when an IRQ fires between the
request_irq() call and the assignment of the qentry data structure to
the rsp->msix field. A possible case for such a race would be in the
kdump case when the HBA's IRQs are still enabled but the driver is
undergoing a new initialisation and thus is not aware of already
activated IRQs in the HBA.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Add the appropriate definitions and table entries for new adapters
support.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
scsi: remove current_cmnd field from struct scsi_device
The field is only used by the 53c700 driver, so move it into the
driver-private device data instead of having it in the common structure.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
megaraid_sas: Do not fire MR_DCMD_PD_LIST_QUERY to controllers which do not support it
There was an issue reported by Lucz Geza on Dell Perc 6i. As per issue
reported, megaraid_sas driver goes into an infinite error reporting loop
as soon as there is a change in the status of one of the
arrays (degrade, resync online etc ). Below are the error logs reported
continuously-
Jun 25 08:49:30 ns8 kernel: [ 757.757017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [ 757.778017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [ 757.799017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [ 757.820018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [ 757.841018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
This issue is very much specific to controllers which do not support
DCMD- MR_DCMD_PD_LIST_QUERY. In case of any hotplugging/rescanning of
drives, AEN thread will be scheduled by driver and fire DCMD-
MR_DCMD_PD_LIST_QUERY and if this DCMD is failed then driver will fail
this event processing and will not go ahead for further events. This
will cause infinite loop of same event getting retried infinitely and
causing above mentioned logs.
Fix for this problem is: not to fire DCMD MR_DCMD_PD_LIST_QUERY for
controllers which do not support it and send DCMD SUCCESS status to AEN
function so that it can go ahead with other event processing.
Reported-by: Lucz Geza <geza@lucz.com> Cc: <stable@vger.kernel.org> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds
Use defines from ethtool for 20Gbit and 40Gbit speeds instead of magic
numbers.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Mon, 4 Jul 2016 08:29:21 +0000 (10:29 +0200)]
fcoe: Update multicast addresses on FIP mode change
When the FIP mode is changed we need to update the multicast addresses
to ensure we get the correct frames.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Mon, 4 Jul 2016 08:29:20 +0000 (10:29 +0200)]
fcoe: fcoe->realdev is always set
'->realdev' is always set, so this check is pointless.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Mon, 4 Jul 2016 08:29:19 +0000 (10:29 +0200)]
fcoe: use enum for fip_mode
The FIP mode is independent on the FIP state machine, so use a separate
enum for that instead of overloading it with state machine values.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Mon, 4 Jul 2016 08:29:18 +0000 (10:29 +0200)]
fc_fip: Update to latest FC-BB-6 draft
Update to latest FC-BB-6 draft to include FIP VN2VN VLAN notifications
and additional flags.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Chris Leech [Thu, 30 Jun 2016 15:32:36 +0000 (08:32 -0700)]
libfc: sanity check cpu number extracted from xid
In the receive path libfc extracts a cpu number from the ox_id in the
fiber channel header and uses that to do a per_cpu_ptr conversion. If,
for some reason, a frame is received with an invalid ox_id, per_cpu_ptr
will return an invalid pointer and the libfc receive path will panic the
system trying to use it.
I'm currently looking at such a case, and I don't yet know why a cpu
number > nr_cpu_ids is appearing in an exchange id. But adding a sanity
check in libfc prevents a system panic, and seems like good idea when
dealing with frames coming in from the network.
Signed-off-by: Chris Leech <cleech@redhat.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
The driver creates its own per-CPU threads which are updated based on
CPU hotplug events. It is also possible to use kworkers and remove some
of the kthread infrastrucure.
The code checked ->thread to decide if there is an active per-CPU
thread. By using the kworker infrastructure this is no longer
possible (or required). The thread pointer is saved in `kthread' instead
of `thread' so anything trying to use thread is caught by the
compiler. Currently only the bnx2fc driver is using struct fcoe_percpu_s
and the kthread member.
After a CPU went offline, we may still enqueue items on the "offline"
CPU. This isn't much of a problem. The work will be done on a random
CPU. The allocated crc_eof_page page won't be cleaned up. It is probably
expected that the CPU comes up at some point so it should not be a
problem. The crc_eof_page memory is released of course once the module
is removed.
This patch was only compile-tested due to -ENODEV.
Cc: Vasu Dev <vasu.dev@intel.com> Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: fcoe-devel@open-fcoe.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Vasu is going to resign from his maintainer role and I'll take over.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
snic: Fix use-after-free in case of a dma mapping error
If there is a dma mapping error snic kfree()s buf right before printing
it. Change the order to not accidently trip on memory that's not owned
by us anymore.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Narsimhulu Musini <nmusini@cisco.com> Reviewed-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Arnd Bergmann [Tue, 21 Jun 2016 09:02:39 +0000 (11:02 +0200)]
scsi: wd7000: print sector number as 64-bit
Enabling format checking in dprintk() shows that wd7000_biosparam uses
an incorrect format string for sector_t:
drivers/scsi/wd7000.c: In function 'wd7000_biosparam':
drivers/scsi/wd7000.c:1594:21: error: format '%d' expects argument of type 'int', but argument 3 has type 'sector_t {aka long long unsigned int}' [-Werror=format=]
As sector_t can be 32-bit wide, this adds a cast to 'u64' and prints
that with the correct format. The change to use no_printk() generally
helps with finding this kind of hidden format string bug, and I found
that when building with "-Wextra", which warned about an empty else
clause in
} else
dprintk("ok!\n");
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
The fc_get_host_stats() function contains a complex conversion from
jiffies to timespec to seconds. As we try to get rid of uses of struct
timespec, we can clean this up and replace it with a simpler
computation.
Simply dividing the difference in jiffies by HZ is not only much more
efficient, it also avoids a problem that causes the
seconds_since_last_reset value to be incorrect if jiffies has overrun
since the 'boot_time' value was recorded.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Helge Deller [Fri, 10 Jun 2016 20:39:45 +0000 (22:39 +0200)]
53c700: Use proper debug printk format specifiers
When enabling the debug options NCR_700_DEBUG and NCR_700_TAG_DEBUG
various printk format warnings can be seen like:
drivers/scsi/53c700.c:357:2: warning: format %p expects argument of type void * , but argument 4 has type dma_addr_t [-Wformat=]
script_patch_32(hostdata->dev, script, MessageLocation,
Fix them by using the right printk format specifiers.
Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Jim Gill [Tue, 21 Jun 2016 01:58:28 +0000 (21:58 -0400)]
vmw_pvscsi: Change to update maintainer details (name, email)
[mkp: Updated MAINTAINERS]
Signed-off-by: Jim Gill <jgill@vmware.com> Acked-by: Arvind Kumar <arvindkumar@vmware.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Uma Krishnan [Wed, 15 Jun 2016 23:49:57 +0000 (18:49 -0500)]
cxlflash: Shutdown notify support for CXL Flash cards
Some CXL Flash cards need notification of device shutdown in order to
flush pending I/Os.
A PCI notification hook for shutdown has been added where the driver
notifies the card and returns. When the device is removed in the PCI
remove path, notification code will wait for shutdown processing to
complete.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Acked-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Uma Krishnan [Wed, 15 Jun 2016 23:49:38 +0000 (18:49 -0500)]
cxlflash: Add device dependent flags
Device dependent flags are needed to support functions that are specific
to a particular device.
One such case is - some CXL Flash cards need to be notified of device
shutdown. For other CXL devices, this feature does not prove to be
useful yet. Such distinct features need to be identified in the driver
to bypass or invoke specific functionality.
In this patch, a member 'flags' has been added to device dependent
values. These flags will be used and expanded in the future to support
various device specific functions.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Acked-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
The problem here is that the problem space area is unmapped while the
application issues the DK_CXLFLASH_RECOVER_AFU ioctl.
This is the order I observe:
proc1 proc2
1) sg_reset
2) ioctl(DK_CXLFLASH_RECOVER_AFU)
3) sg_reset again
causing a PSA unmap
4) continues RECOVER_AFU processing
The resolution to this problem is to have the reset handler drain all
outstanding user space initiated ioctls before proceeding. It is safe
to drain after the state has been changed to STATE_RESET. Also since
drain_ioctls() was static, it had to be moved up a bit to be before
cxlflash_eh_host_reset_handler().
Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Douglas Gilbert [Tue, 31 May 2016 21:15:07 +0000 (17:15 -0400)]
scsi_debug: fix sleep in invalid context
In this post: http://www.spinics.net/lists/linux-scsi/msg97124.html the
author shows some kernel infrastructure complaining about a sleep in an
invalid context. Remove offending call to vmalloc(). Instead of using
kzalloc() which reviewers didn't like, use a bucket system (64 bytes on
the stack) and potentially multiple calls to sg_pcopy_from_buffer() to
construct the 'data-in' buffer for the SCSI REPORT LUNS command.
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Acked-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Hannes Reinecke [Tue, 24 May 2016 06:11:58 +0000 (08:11 +0200)]
libfc: Update rport reference counting
Originally libfc would just be initializing the refcount to '1', and
using the disc_mutex to synchronize if and when the final put should be
happening. This has a race condition as the mutex might be delayed,
causing other threads to access an invalid structure. This patch
updates the rport reference counting to increase the reference every
time 'rport_lookup' is called, and decreases the reference
correspondingly. This removes the need to hold 'disc_mutex' when
removing the structure, and avoids the above race condition.
Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Vasu Dev <vasu.dev@intel.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Randy Dunlap [Thu, 19 May 2016 17:57:31 +0000 (10:57 -0700)]
scsi: ultrastor.c depends on ISA_DMA_API
Fix build when CONFIG_ISA_DMA_API is not enabled. Fixes these build
errors (on x86_64):
../drivers/scsi/ultrastor.c: In function 'ultrastor_14f_detect':
../drivers/scsi/ultrastor.c:519:5: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]
if (config.dma_channel && request_dma(config.dma_channel,"Ultrastor")) {
^
../drivers/scsi/ultrastor.c: In function 'ultrastor_release':
../drivers/scsi/ultrastor.c:658:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration]
free_dma(shost->dma_channel);
^
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Trivial fix to spelling mistake in printk message.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
John Garry [Tue, 31 May 2016 12:38:50 +0000 (20:38 +0800)]
hisi_sas: fix the inconsistent lock issue reported by CONFIG_PROVE_LOCKING
It is not necessary to surround call to
notify_port_event(, PORTE_BROADCAST_RCVD) by spin_lock_irqsave(),
so remove.
This was causing a warn, as below:
=================================
[ INFO: inconsistent lock state ]
4.4.8+ #12 Not tainted
---------------------------------
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
kworker/u64:1/168 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&(&hisi_hba->lock)->rlock){?.....}, at: [<ffffffc00052c708>] alloc_dev_quirk_v2_hw+0x48/0xec
{IN-HARDIRQ-W} state was registered at:
[<ffffffc0000fc764>] mark_lock+0x19c/0x6a0
[<ffffffc0000fdc14>] __lock_acquire+0xa2c/0x1d00
[<ffffffc0000ff654>] lock_acquire+0x58/0x7c
[<ffffffc0008b609c>] _raw_spin_lock_irqsave+0x54/0x6c
[<ffffffc00052d3c0>] int_chnl_int_v2_hw+0x1c4/0x248
[<ffffffc0001098e8>] handle_irq_event_percpu+0x9c/0x144
[<ffffffc0001099d4>] handle_irq_event+0x44/0x74
[<ffffffc00010cd68>] handle_fasteoi_irq+0xb4/0x188
[<ffffffc000108ea8>] generic_handle_irq+0x24/0x38
[<ffffffc0001091fc>] __handle_domain_irq+0x60/0xac
[<ffffffc00008261c>] gic_handle_irq+0xcc/0x168
[<ffffffc0000855ac>] el1_irq+0x6c/0xe0
[<ffffffc0000f7414>] default_idle_call+0x1c/0x34
[<ffffffc0000f7654>] cpu_startup_entry+0x1d4/0x228
[<ffffffc0008aecd8>] rest_init+0x150/0x160
[<ffffffc000c4b95c>] start_kernel+0x3a4/0x3b8
[<00000000008bb000>] 0x8bb000
irq event stamp: 32661
hardirqs last enabled at (32661): [<ffffffc0008b41a8>] __mutex_unlock_slowpath+0x108/0x18c
hardirqs last disabled at (32660): [<ffffffc0008b40e4>] __mutex_unlock_slowpath+0x44/0x18c
softirqs last enabled at (25114): [<ffffffc0000bde68>] __do_softirq+0x210/0x27c
softirqs last disabled at (25095): [<ffffffc0000be224>] irq_exit+0x9c/0xe8
other info that might help us debug this:
Possible unsafe locking scenario:
Cathy Avery [Mon, 23 May 2016 14:29:17 +0000 (10:29 -0400)]
scsi: storvsc: Filter out storvsc messages CD-ROM medium not present
When a virtual scsi DVD device is present with no image file
attached the storvsc driver logs all resulting unnecessary sense errors
whenever IO is issued to the device.
[storvsc] Sense Key : Not Ready [current]
[storvsc] Add. Sense: Medium not present - tray closed
[mkp: Fixed whitespace]
Signed-off-by: Cathy Avery <cavery@redhat.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
If _scsih_sas_host_add's call to mpt3sas_config_get_sas_iounit_pg0
fails, ioc->sas_hba.parent_dev may be left uninitialized. A later
device probe could invoke mpt3sas_transport_port_add which will call
sas_port_alloc_num [scsi_transport_sas] with a NULL parent_dev pointer.
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com> Acked-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joe Lawrence [Wed, 25 May 2016 19:14:28 +0000 (15:14 -0400)]
mpt3sas: set num_phys after allocating phy[] space
In _scsih_sas_host_add, the number of HBA phys are determined and then
later used to allocate an array of struct _sas_phy's. If the routine
sets ioc->sas_hba.num_phys, but then fails to allocate the
ioc->sas_hba.phy array (by kcalloc error or other intermediate
error/exit path), ioc->sas_hba is left in a dangerous state: all readers
of ioc->sas_hba.phy[] do so by indexing it from 0..ioc->sas_hba.num_phys
without checking that the space was ever allocated.
Modify _scsih_sas_host_add to set ioc->sas_hba.num_phys only after
successfully allocating ioc->sas_hba.phy[].
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com> Acked-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Joao Pinto [Mon, 23 May 2016 09:18:07 +0000 (10:18 +0100)]
ufs: Adding license info do tc-dwc-g210 and ufshcd-dwc to enable loadable module
This patch adds license info to the tc-dwc-g210 and ufshcd-dwc files in
order for them to have access to some ufshcd symbols when all are built
as modules.
Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>