Commit Graph

179501 Commits

Author SHA1 Message Date
Stephen M. Cameron 900c54404a [SCSI] hpsa: interrupt pending function should return bool not unsigned long
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:19:52 -06:00
Stephen M. Cameron 84ca0be2a2 [SCSI] hpsa: fix some debug printks to use dev_dbg instead
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:19:37 -06:00
Stephen M. Cameron a104c99f38 [SCSI] hpsa: make tag macros into functions
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:19:25 -06:00
Stephen M. Cameron 6df1e95496 [SCSI] hpsa: eliminate unnecessary memcpys
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:19:14 -06:00
Stephen M. Cameron a9a44cbd4b [SCSI] hpsa: remove unwanted debug code
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:19:04 -06:00
Stephen M. Cameron ea6d3bc314 [SCSI] hpsa: use kzalloc not kmalloc plus memset
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:18:53 -06:00
Stephen M. Cameron e89c0ae7ba [SCSI] hpsa: use sizeof() not an inline constant in memset.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:18:38 -06:00
Stephen M. Cameron ecd9aad402 [SCSI] hpsa: return proper error codes not minus one.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:18:10 -06:00
Stephen M. Cameron bcc4425548 [SCSI] hpsa: remove superfluous returns from void functions.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:17:58 -06:00
Stephen M. Cameron 4967bd3e5c [SCSI] hpsa: make adjust_hpsa_scsi_table return void.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:17:50 -06:00
Stephen M. Cameron b2ed4f7919 [SCSI] hpsa: Use BUG_ON instead of an if statement.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:17:22 -06:00
Stephen M. Cameron 82a72c0a12 [SCSI] hpsa: avoid unwanted promotion from unsigned to signed for raid level index
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:17:09 -06:00
Stephen M. Cameron 01a02ffcd5 [SCSI] hpsa: Use kernel integer types, not userland ones
That is, use u64, u32, u16 and u8 rather than __u64, __u32, __u16 and __u8.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:17:00 -06:00
Stephen M. Cameron 466dc22409 [SCSI] hpsa: fix typo in comments
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:16:46 -06:00
Roel Kluin 08002af25a [SCSI] qla2xxx: negative error return in qla2x00_change_queue_depth()
The *change_queue_depth functions usually return a negative error return.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:15:39 -06:00
Yang, Bo 63bad45db1 [SCSI] megaraid_sas: version and documentation update
Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:13:00 -06:00
Yang, Bo c978684254 [SCSI] megaraid_sas: driver fixed the device update issue
driver fixed the device update issue after get the AEN PD delete/ADD
and LD add/delete from FW.

Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:12:40 -06:00
Yang, Bo bdc6fb8d69 [SCSI] megaraid_sas: add the logical drive list to driver
Driver issue the get ld list to fw to get the logic drive list.
Driver will keep the logic drive list for the internal use after
driver load.

Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:12:10 -06:00
Yang, Bo 780a3762fb [SCSI] megaraid_sas: Zero pad_0 in mfi structure
Add the pad_0 in mfi frame structure to 0 to fix the context value
larger than 32bit value issue.

Signed-off-by Bo Yang<bo.yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17 13:11:26 -06:00
James Smart 7c0616b85b [SCSI] lpfc 8.3.8: Update Driver version to 8.3.8
Update Driver version to 8.3.8

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:41:03 -06:00
James Smart 3b5dd52aaf [SCSI] lpfc 8.3.8: (BSG4) Add new vendor specific BSG Commands
Add the following new vendor specific BSG commands.
- Add LPFC_BSG_VENDOR_GET_MGMT_REV command
- Add LPFC_BSG_VENDOR_MBOX command
- Add LPFC_BSG_VENDOR_DIAG_MODE command
- Add LPFC_BSG_VENDOR_DIAG_TEST command

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:40:49 -06:00
James Smart 4cc0e56e97 [SCSI] lpfc 8.3.8: (BSG3) Modify BSG commands to operate asynchronously
Modify the following BSG commands to operate asynchronously.
- FC_BSG_RPT_ELS
- FC_BSG_RPT_CT
- LPFC_BSG_VENDOR_GET_CT_EVENT
- LPFC_BSG_VENDOR_SET_CT_EVENT

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:40:33 -06:00
James Smart c79c1292df [SCSI] lpfc 8.3.8: (BSG2) Create lpfc_bsg.h
Create lpfc_bsg.h
  - structures, etc used by bsg-related routines.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:39:18 -06:00
James Smart 4fede78f75 [SCSI] lpfc 8.3.8: (BSG1) Update BSG infrastructure
Update BSG infrastructure to handle new vendor specific BSG commands.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:39:02 -06:00
James Smart 65467b6bdf [SCSI] lpfc 8.3.8: Add code to display logical link speed
Display Logical Link Speed when supported and is non-zero.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:38:44 -06:00
James Smart 695a814e18 [SCSI] lpfc 8.3.8: BugFixes: Discovery relates changes
Discovery relates changes:
- Separated VPI_REGISTERED state of physical port into VFI_REGISTERED and
  VPI_REGISTERED state so that driver can unregister physical port VPI
  independent of VFI.
- Add code to unregister, re-init and re-register physical port VPI
  when physical port NportID change.
- Add code to unregister and re-register VPI of a vport when its Nport
  ID change.
- Add code in FDISC completion path to re-start FLOGI discovery when
  a FDISC complete with LOGIN_REQUIRED reason code.
- Fix a memory leak in lpfc_init_vpi_cmpl
- Add code to start a timer for vport to retry FDISC when CVL is received
  by a vport or physical port. If all Nports receive CVLs, then all timers
  are cancelled and a logical link level discovery will be started after
  one second.
- Flush ELS commands after killing all delayed ELS commands.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:38:28 -06:00
James Smart 341af10239 [SCSI] lpfc 8.3.8: BugFixes: SLI relates changes
Fix hardware/SLI relates issues:
- Handle XB bit so that ELS XRIs are not prematurely released.
- Handle XB bit so that FCP XRIs are not prematurely released.
- Define new security SLI Commands.
- Remove unused security SLI commands
- Skip receive data size parameter check on received FLOGI.
- Added LPFC_USE_FCPWQIDX flag to iocb to force SLI layer
  to submit abort WQE on same WQ as the command WQE.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:37:53 -06:00
Ben Hutchings 2cec802980 [SCSI] qla1280: Drop host_lock while requesting firmware
request_firmware() may sleep and it appears to be safe to release the
spinlock here.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:35:14 -06:00
Jayamohan Kallickal 7c56533cf4 [SCSI] be2iscsi: correction in the claculation for num_cxn_wrb
This patch correct the math done for num_cxn_wrb

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:20 -06:00
Jayamohan Kallickal b30c6dab1d [SCSI] be2iscsi: changing the chip opcode for TEXT
This patch corrects the chipopcode for text and chooses
correct paramters for that command

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:18 -06:00
Jayamohan Kallickal caf818f118 [SCSI] be2iscsi: Ensure clean reuse of wrb
This patch ensures that wrb is cleanly resued for io path
and is memset to zero for non io path

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:16 -06:00
Jayamohan Kallickal f55a24f2c2 [SCSI] be2iscsi: correcting the return
This patch fixes an issue where return was not called properly.
Thanks to Mike Christie for spotting this

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:15 -06:00
Jayamohan Kallickal 5dc1c416b3 [SCSI] be2iscsi: Proper checking of state
This patch adds proper checking of value in for hba state.
We would be adding more states later on

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:13 -06:00
Jayamohan Kallickal 230dceb431 [SCSI] be2iscsi: Fix for first_burst
This patch fixes the first_burst being modified
instead of max_burst

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:11 -06:00
Jayamohan Kallickal d2eeb1ac35 [SCSI] be2iscsi: changing copyright to 2010
This patch replaces 2009 with 2010 in copyright statement

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:09 -06:00
Jayamohan Kallickal 32951dd8cd [SCSI] be2iscsi: Remove Ring mode from driver
Ring mode is not used. This patch removes the code.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:34:07 -06:00
Dmitry Torokhov d0e2ddff7c [SCSI] vmw_pvscsi: fix signedness warning with newer compilers
pvscsi_setup_msix() expects 'irq' argument to be an int but is being
passed unsigned int. Unsigned int is more proper type for IRQ number
so let's use it. This shuts off a compile warning with recent
compilers.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Acked-by: Alok Kataria <akataria@vmware.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:31:28 -06:00
Martin K. Petersen fa4698fcf5 [SCSI] sd: Combine DIF/DIX error handling
DIF and DIX errors are handled identically at this point.  Collapse the
switch cases into one and let scsi_io_completion print result and sense
data.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:30:39 -06:00
Roel Kluin d44a6d2bbf [SCSI] lpfc: unify two if branches with the same code in lpfc_decode_firmware_rev()
Regardless of the flag state, the branches execute the same code

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:28:38 -06:00
Jayamohan Kallickal a3babda5b3 [SCSI] be2iscsi: Fix to allow driver to load when the FW allows more cids
This fix allows the driver to load when the FW allows more cids
than than the driver supports. The driver will limit the number of cid
to what it can support. There was no reason to fail the driver load,so,
correcting that

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:26:05 -06:00
Jayamohan Kallickal aa3590329f [SCSI] be2iscsi: Fixing the number of SGE's
The number of SGE's supported is fixed to what the
chip expects. Also, the max sectors set to tested values

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:26:03 -06:00
Jayamohan Kallickal 48bd86cf21 [SCSI] be2iscsi: Fixing Bug for multiple SGEs
The patch fixes a but where the sg_next is not assigned and hence
the first sge was being resused wrongly

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:26:01 -06:00
Kashyap, Desai e4b8972c61 [SCSI] mpt2sas: Bump version 04.100.01.00
Version upgraded to 04.100.01.00.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:45 -06:00
Kashyap, Desai 84f0b04a0e [SCSI] mpt2sas: Enable TLR for SSP TAPE drives (Added SAS Transport APIs)
If TLR is supported for end device, MPT2SAS driver will enable the TLR
bit in the SCSI_IO for every request. If there is a response with
MPI2_SCSITASKMGMT_RSP_INVALID_FRAME, the driver will turn off the TLR
logic.

[jejb: updated to new transport class TLR API]
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:44 -06:00
Kashyap, Desai f4af3c1411 [SCSI] mpt2sas: Update driver header to latest MPI Spec.
Update header to latest MPI SPEC revision.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:44 -06:00
Kashyap, Desai 50d5c60634 [SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support.
Added new callbacks phy_enable and set_phy_speed in the
mpt2sas_transport_functions template. This will allow end user to
enable/disable phys and change links rates using the SysFS interface.
Current implementation only supports direct attached phys, but we
could in the future add support for expander based phys.
A new subroutine mpt2sas_config_set_sas_iounit_pg1 was added;
this wrapper function used to send request to controller firmware to modify
the phys and link rates. A new subroutine _transport_find_local_phy was added;
a function for easly obtaining the local phy object for direct attached.

Example to disable a phy
echo 0 > /sys/class/phy3:0/enable

Example to enable the same phy
echo 1 > /sys/class/phy3:0/enable

Example to change the link rate to 1.5
#echo "1.5 Gbit" > /sys/class/phy3:0/maximum_linkrate
#cat /sys/class/phy3:0/negotiated_linkrate
1.5 Gbit

Example to change the link rate to 3.0
#echo "3.0 Gbit" > /sys/class/phy3:0/maximum_linkrate
#cat /sys/class/phy3:0/negotiated_linkrate
3.0 Gbit

Example to change the link rate to 6.0
#echo "6.0 Gbit" > /sys/class/phy3:0/maximum_linkrate
#cat /sys/class/phy3:0/negotiated_linkrate
6.0 Gbit

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:42 -06:00
Kashyap, Desai f7c95ef02b [SCSI] mpt2sas: Added raid transport support
Adding support for raid transport layer.  This will provide sysfs attributes
containing raid level, state, and resync rate.

MPT2SAS module will select RAID_ATTRS.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:41 -06:00
Kashyap, Desai 22c88425e0 [SCSI] mpt2sas: Use compat_ptr to setup the pointer compatibility.
On ppc64, an 32bit application was failing due to data buffers not being
copied properly from user to kernel memory.  The problem due to improper
conversion of 32 to 64 bit pointers.  The fix is to use compat_ptr to
setup the pointer compatibility in the routine _ctl_compat_mpt_command.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:40 -06:00
Kashyap, Desai e75b9b6d9d [SCSI] mpt2sas: Set ioc->fwfault_debug to the cmd line option mpt2sas_fwfault_debug.
(1) change the formentioned string from logging_level to fwfault_debug
(2) set ioc->fwfault_debug to the command line option mpt2sas_fwfault_debug
setting at driver load time.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:39 -06:00
Kashyap, Desai 6846e75cdf [SCSI] mpt2sas: User resource_size_t instead of unsigned long
Use resource_size_t to define the type resource for the system interface
register set.
The existing implementation was using "unsigned long" which would be 32 bit
in 32 bit OS.  If 32 bit OS is using 64 bit physical
address space for the system interface register set, we need to shift to
using resource_size_t which takes care of physical address space.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08 18:19:38 -06:00