GitHub/LineageOS/android_kernel_motorola_exynos9610.git
13 years ago[SCSI] qla2xxx: During loopdown perform Diagnostic loopback.
Saurav Kashyap [Tue, 16 Aug 2011 18:31:50 +0000 (11:31 -0700)]
[SCSI] qla2xxx: During loopdown perform Diagnostic loopback.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Fix array out of bound warning.
Saurav Kashyap [Tue, 16 Aug 2011 18:31:49 +0000 (11:31 -0700)]
[SCSI] qla2xxx: Fix array out of bound warning.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: check for marker IOCB during response queue processing.
Saurav Kashyap [Tue, 16 Aug 2011 18:31:48 +0000 (11:31 -0700)]
[SCSI] qla2xxx: check for marker IOCB during response queue processing.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Enable write permission to some debug related module parameters to...
Chad Dupuis [Tue, 16 Aug 2011 18:31:47 +0000 (11:31 -0700)]
[SCSI] qla2xxx: Enable write permission to some debug related module parameters to be changed dynamically.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Prevent CPU lockups when "ql2xdontresethba" module param is set.
Saurav Kashyap [Tue, 16 Aug 2011 18:31:46 +0000 (11:31 -0700)]
[SCSI] qla2xxx: Prevent CPU lockups when "ql2xdontresethba" module param is set.

Driver is not releasing the lock if ql2xdontresethba is set, this might lead
to a lockup.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Implemeted beacon on/off for ISP82XX.
Saurav Kashyap [Tue, 16 Aug 2011 18:31:45 +0000 (11:31 -0700)]
[SCSI] qla2xxx: Implemeted beacon on/off for ISP82XX.

[jejb: fix up checkpatch.pl errors]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Add support for ISP82xx to capture dump (minidump) on failure.
Giridhar Malavali [Tue, 16 Aug 2011 18:31:44 +0000 (11:31 -0700)]
[SCSI] qla2xxx: Add support for ISP82xx to capture dump (minidump) on failure.

Minidump allows us to catpure a snapshot of the firmware/hardware states at the
time of failure for further analysis.

[jejb: added missing #include <linux/vmalloc.h>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> ]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] zfcp: support for hardware data router
Swen Schillig [Mon, 15 Aug 2011 12:40:32 +0000 (14:40 +0200)]
[SCSI] zfcp: support for hardware data router

FICON Express8S supports hardware data router, which requires an
adapted qdio request format.
This part 2/2 exploits the functionality in zfcp.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qdio: base support for hardware data router with zfcp
Swen Schillig [Mon, 15 Aug 2011 12:40:31 +0000 (14:40 +0200)]
[SCSI] qdio: base support for hardware data router with zfcp

FICON Express8S supports hardware data router, which requires an
adapted qdio request format.
This part 1/2 provides the qdio base required for exploitation in
zfcp.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] zfcp: non-experimental support for DIF/DIX
Steffen Maier [Mon, 15 Aug 2011 12:40:30 +0000 (14:40 +0200)]
[SCSI] zfcp: non-experimental support for DIF/DIX

DIF/DIX support for zfcp is no longer experimental,
and config option is no longer necessary.
Return error from queuecommand for unsupported data directions.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mvumi: Add Marvell UMI driver
Jianyun Li [Wed, 11 May 2011 15:22:44 +0000 (23:22 +0800)]
[SCSI] mvumi: Add Marvell UMI driver

The Marvell Universal Message Interface (UMI) defines a messaging
interface between host and Marvell products (Plato, for example). It
considers situations of limited system resource and optimized system
performance.
UMI driver translates host request to message and sends message
to FW via UMI, FW receives message and processes it, then sends response
to UMI driver.
FW generates an interrupt when it needs to send information or
response to UMI driver

Signed-off-by: Jianyun Li <jyli@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: export iface name
Mike Christie [Mon, 15 Aug 2011 01:42:56 +0000 (20:42 -0500)]
[SCSI] qla4xxx: export iface name

Export the name of iface session is attached to. This is needed
so tools like iscsiadm/iscsistart can match the sessions to
userspace ifaces when rebuilding iscsid's state during boot.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Added support for adapter and firmware reset
Vikas Chaudhary [Fri, 12 Aug 2011 09:51:29 +0000 (02:51 -0700)]
[SCSI] qla4xxx: Added support for adapter and firmware reset

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi: Added support for adapter and firmware reset
Vikas Chaudhary [Fri, 12 Aug 2011 09:51:28 +0000 (02:51 -0700)]
[SCSI] scsi: Added support for adapter and firmware reset

Added new sysfs attr 'host_reset' in scsi_sysfs.c to
perform adapter or firmware reset as suggested by
Mike Christie here:
http://marc.info/?l=linux-scsi&m=127359347111167&w=2

user/application can write "adapter" or "firmware" on
this attr and it will call newly added function hook
in scsi_host_template to call LDD adapter or firmware
reset implementation.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Added Get ACB support using BSG
Harish Zunjarrao [Fri, 12 Aug 2011 09:51:27 +0000 (02:51 -0700)]
[SCSI] qla4xxx: Added Get ACB support using BSG

This command is used to read ACB params from firmware

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Added restore factory defaults support using BSG
Harish Zunjarrao [Fri, 12 Aug 2011 09:51:26 +0000 (02:51 -0700)]
[SCSI] qla4xxx: Added restore factory defaults support using BSG

This command will causes the firmware to update all
configurations to pre-defined factory default settings.

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] Fix out of spec CD-ROM problem with media change
TARUISI Hiroaki [Thu, 11 Aug 2011 11:25:20 +0000 (20:25 +0900)]
[SCSI] Fix out of spec CD-ROM problem with media change

Some CD-ROMs fail to report a media change correctly.  The specific
one for this patch simply fails to respond to commands, then gives a
UNIT ATTENTION after being reset which returns ASC/ASCQ 28/00.  This
is out of spec behaviour, but add a check in the eat CC/UA on reset
path to catch this case so the CD-ROM will function somewhat properly.

[jejb: fixed up white space and accepted without signoff]
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: added support to update initiator iscsi port
Vikas Chaudhary [Mon, 1 Aug 2011 10:26:19 +0000 (03:26 -0700)]
[SCSI] qla4xxx: added support to update initiator iscsi port

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_transport_iscsi: Added support to update initiator iscsi port
Vikas Chaudhary [Mon, 1 Aug 2011 10:26:18 +0000 (03:26 -0700)]
[SCSI] scsi_transport_iscsi: Added support to update initiator iscsi port

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Added vendor specific sysfs attributes
Vikas Chaudhary [Mon, 1 Aug 2011 10:26:17 +0000 (03:26 -0700)]
[SCSI] qla4xxx: Added vendor specific sysfs attributes

Added board_id, fw_state, phy_port_cnt, phy_port_num,
iscsi_func_cnt, hba_model

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Add read/update NVRAM support for 40xx adapters using BSG
Harish Zunjarrao [Mon, 1 Aug 2011 10:26:16 +0000 (03:26 -0700)]
[SCSI] qla4xxx: Add read/update NVRAM support for 40xx adapters using BSG

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Add get ACB state support using BSG
Harish Zunjarrao [Mon, 1 Aug 2011 10:26:15 +0000 (03:26 -0700)]
[SCSI] qla4xxx: Add get ACB state support using BSG

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Code cleanup for read/update flash using BSG
Harish Zunjarrao [Mon, 1 Aug 2011 10:26:14 +0000 (03:26 -0700)]
[SCSI] qla4xxx: Code cleanup for read/update flash using BSG

- Corrected return status
- Added reset active check
- Removed unused dma_map_sg calls
- Added debug prints on failure

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Added support to update mtu
Vikas Chaudhary [Mon, 1 Aug 2011 10:26:13 +0000 (03:26 -0700)]
[SCSI] qla4xxx: Added support to update mtu

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_transport_iscsi: Added support to update mtu
Vikas Chaudhary [Mon, 1 Aug 2011 10:26:12 +0000 (03:26 -0700)]
[SCSI] scsi_transport_iscsi: Added support to update mtu

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Boot from SAN support for open-iscsi
Manish Rangankar [Mon, 25 Jul 2011 18:48:55 +0000 (13:48 -0500)]
[SCSI] qla4xxx: Boot from SAN support for open-iscsi

Hook qla4xxx in fw boot sysfs interface so iscsi tools
can use the info to create boot sessions.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Remove reduandant code after open-iscsi integration.
Manish Rangankar [Mon, 25 Jul 2011 18:48:54 +0000 (13:48 -0500)]
[SCSI] qla4xxx: Remove reduandant code after open-iscsi integration.

1. Remove device database entry (ddb) state.
2. Remove device database (DDB) list building.
                With open-iscsi integration the logins to the target devices are
        handled by the user space. So the information of target is now
        maintained in the iscsi_session object. This is handled at
        libiscsi level so there is no need to maintain a list of DDBs in
        the qla4xxx LLD.
3. qla4xxx: Remove add_device_dynamically.
                Since autologin in FW is disabled with open-iscsi integration,
        driver will never get an AEN for which driver has not requested
        a DDB index. So remove the add_device_dynamically function.
4. Remove qla4xxx_tgt_dscvr
        Since firmware autologin is disabled this function will not work.
        Now user has the ability to do the target discovery and login to
        each target individually. Firwmare will not do the login on its own.
5. Remove relogin related code
        All relogin is handled by userspace now. qla4xxx just need to
        notify userspace of a connection failure, this triggers the
        relogin.
6. Remove add_session and alloc_session
        Now qla4xxx uses iscsi_session_setup that would do the necessary
        allocations for session and ddb_entry.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: support iscsiadm session mgmt
Manish Rangankar [Mon, 25 Jul 2011 18:48:53 +0000 (13:48 -0500)]
[SCSI] qla4xxx: support iscsiadm session mgmt

Add scsi_transport_iscsi hooks in qla4xxx to support
iSCSI session management using iscsiadm.

This patch is based on discussion here
http://groups.google.com/group/open-iscsi/browse_thread/thread/e89fd888baf656a0#

Now users can use iscsiadm to do target discovery and do login/logout to
individual targets using the qla4xxx iSCSI class interface.

This patch leaves some dead code, but to make it easier to review
we are leaving and in the next patch we will remove that old code.

V2 - NOTE: Added code to avoid waiting for AEN during login/logout
in the driver, instead added a kernel to user event
to notify iscsid about login status. Because of this
iscsid will not get blocked.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_transport_iscsi: Add conn login, kernel to user, event to support offload...
Manish Rangankar [Mon, 25 Jul 2011 18:48:52 +0000 (13:48 -0500)]
[SCSI] scsi_transport_iscsi: Add conn login, kernel to user, event to support offload session login.

Offload drivers like qla4xxx will offload the sending of the login/logout
pdus still, so this patch adds iscsi_conn_login_event which is
used by these types of drivers to notify userspace that the connection
has changed state.

It also adds a iscsi_is_session_online helper so the lld
can query the sessions state field.

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: add bsg support
Vikas Chaudhary [Mon, 25 Jul 2011 18:48:51 +0000 (13:48 -0500)]
[SCSI] qla4xxx: add bsg support

This patch adds bsg support to qla4xxx.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi class: add bsg support to iscsi class
Mike Christie [Mon, 25 Jul 2011 18:48:50 +0000 (13:48 -0500)]
[SCSI] iscsi class: add bsg support to iscsi class

This patch adds bsg support to the iscsi class. There is only
1 request, the host vendor one, supported. It is expected that
this would be used for things like flash updates.

This patch is made over this one
http://marc.info/?l=linux-scsi&m=131149780020992&w=2

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Add VLAN support
Vikas Chaudhary [Mon, 25 Jul 2011 18:48:49 +0000 (13:48 -0500)]
[SCSI] qla4xxx: Add VLAN support

Add support to set VLAN and show vlan settings in sysfs

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
[Patch updated to new defines]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libiscsi: don't bugon when if user sets markers
Mike Christie [Mon, 25 Jul 2011 18:48:48 +0000 (13:48 -0500)]
[SCSI] libiscsi: don't bugon when if user sets markers

libiscsi does not support markers and if someone tries
to set them the driver does a BUG(). There is not need
to be that extreme. Just return -ENOSYS.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi class: expand vlan support
Mike Christie [Mon, 25 Jul 2011 18:48:47 +0000 (13:48 -0500)]
[SCSI] iscsi class: expand vlan support

Add support to set vlan priority and enable/disble a vlan.

Patch based on code from Vikas Chaudhary.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] be2iscsi: remove host and session casts
Mike Christie [Mon, 25 Jul 2011 18:48:46 +0000 (13:48 -0500)]
[SCSI] be2iscsi: remove host and session casts

iscsi_session_to_shost is a macro around dev_to_shost which returns a
Scsi_Host so there is no need to cast.

iscsi_session_to_shost is a macro around shost_priv which
returns a void pointer so no need to cast.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi class: sysfs group is_visible callout for iscsi host attrs
Mike Christie [Mon, 25 Jul 2011 18:48:45 +0000 (13:48 -0500)]
[SCSI] iscsi class: sysfs group is_visible callout for iscsi host attrs

The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's host attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi class: remove iface param mask
Mike Christie [Mon, 25 Jul 2011 18:48:44 +0000 (13:48 -0500)]
[SCSI] iscsi class: remove iface param mask

We can replace the iface param mask with the
attr_is_visible callback.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi class: sysfs group is_visible callout for session attrs
Mike Christie [Mon, 25 Jul 2011 18:48:43 +0000 (13:48 -0500)]
[SCSI] iscsi class: sysfs group is_visible callout for session attrs

The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's session attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi cls: sysfs group is_visible callout for conn attrs
Mike Christie [Mon, 25 Jul 2011 18:48:42 +0000 (13:48 -0500)]
[SCSI] iscsi cls: sysfs group is_visible callout for conn attrs

The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and drivers to use the attribute container
sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: added support to show multiple iface in sysfs
Vikas Chaudhary [Mon, 25 Jul 2011 18:48:41 +0000 (13:48 -0500)]
[SCSI] qla4xxx: added support to show multiple iface in sysfs

Add support for default ipv4 and ipv6 ifaces in qla4xxx.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Reviewed-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
[make iface creation dynamic]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi class: add iface representation
Mike Christie [Mon, 25 Jul 2011 18:48:40 +0000 (13:48 -0500)]
[SCSI] iscsi class: add iface representation

A iscsi host can have multiple interfaces. This patch
adds a new iface iscsi class for this. It exports the
network settings now, and will be extended to also
export iscsi initiator port settings like the isid
and initiator name for drivers that can support multiple
initiator ports.

Based on patch from Lalit Chandivade.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: Added new "struct ipaddress_config"
Vikas Chaudhary [Mon, 25 Jul 2011 18:48:39 +0000 (13:48 -0500)]
[SCSI] qla4xxx: Added new "struct ipaddress_config"

- Move all ipaddress related param to "struct ipaddress_config"
  from "struct scsi_qla_host"
- update function - qla4xxx_update_local_ip()
- Rename IPOPT_IPv4_PROTOCOL_ENABLE to IPOPT_IPV4_PROTOCOL_ENABLE

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
[update for new ISCSI_IFACE values]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla4xxx: add support for set_net_config
Mike Christie [Mon, 25 Jul 2011 18:48:38 +0000 (13:48 -0500)]
[SCSI] qla4xxx: add support for set_net_config

Allows user space (iscsiadm) to send down network configuration
parameters for LLD to set private network configuration on the iSCSI
adapters.

Based on patches from Vikas Chaudhary.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] iscsi_transport: add support for net settings
Mike Christie [Mon, 25 Jul 2011 18:48:37 +0000 (13:48 -0500)]
[SCSI] iscsi_transport: add support for net settings

Allows user space (iscsiadm) to send down network configuration
parameters for LLD to set private network configuration on the iSCSI
adapters.

Based on patch from Lalit Chandivade.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] ipr: Always initiate hard reset in kdump kernel
Anton Blanchard [Mon, 1 Aug 2011 09:43:45 +0000 (19:43 +1000)]
[SCSI] ipr: Always initiate hard reset in kdump kernel

During kdump testing I noticed timeouts when initialising each IPR
adapter. While the driver has logic to detect an adapter in an
indeterminate state, it wasn't triggering and each adapter went
through a 5 minute timeout before finally going operational.

Some analysis showed the needs_hard_reset flag wasn't getting set.
We can check the reset_devices kernel parameter which is set by
kdump and force a full reset. This fixes the problem.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mptfusion: Fix for device offline while doing aggressive HBA reset
kashyap.desai@lsi.com [Fri, 5 Aug 2011 05:34:37 +0000 (11:04 +0530)]
[SCSI] mptfusion: Fix for device offline while doing aggressive HBA reset

[Resend patch as per Bernd Schubert comment ]

Issue:

Device goes offline while doing aggressive HBA reset
along with IO using some utility.

Root cause:

FW goes into bad state due to aggressive reset. Softreset does not
help to recover FW. And also aggressive reset open up the window for
Error handling thread to kicked off at the same time HBA will be in
constant RESET loop as part of aggressive reset test case can lead
Device to goes offline.

Changes:

1. Added extra check as below inside eh_timed_out call back as below.
   if(ioc->ioc_reset_in_progress) Rc = EH_TIMER_RESET

2. Removed " DOORBELL_ACTIVE" check for SAS controller from task
   management context.  Since SAS controller uses high priority queue
   for task management. This check is not required for SAS controller.

3. Moved SoftReset call to HardReset from Task Mgmt context.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Bump version to 1.0.5
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:52 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Bump version to 1.0.5

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Prevent creating of NPIV port with duplicate WWN
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:51 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Prevent creating of NPIV port with duplicate WWN

This patch adds a validation step before allowing creation of a new NPIV port.
It checks whether the WWPN passed for the new NPIV port to be created is unique
for the given physical port.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Obtain WWNN/WWPN from the shared memory
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:50 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Obtain WWNN/WWPN from the shared memory

bnx2x driver would obtain the WWNN/WWPN from the shared memory and can be
obtained by the bnx2fc driver via ndo_fcoe_get_wwn.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] fcoe: Move common functions to fcoe_transport library
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:49 +0000 (17:38 -0700)]
[SCSI] fcoe: Move common functions to fcoe_transport library

Export fcoe_get_wwn, fcoe_validate_vport_create and fcoe_wwn_to_str so that all
LLDs can use these common function.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Drop incoming ABTS
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:48 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Drop incoming ABTS

As an initiator, driver need not handle incoming ABTS. It initiates an ABTS if
any IO requests time out.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: code cleanup in bnx2fc_offload_session
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:47 +0000 (17:38 -0700)]
[SCSI] bnx2fc: code cleanup in bnx2fc_offload_session

- Free session resources before rport logoff
- Do not free session resources in bnx2fc_alloc_session_resc() as it is handled
  in caller's error handling path.
- Do not call bnx2fc_free_session_resc() if bnx2fc_init_tgt() fails as cq_lock
  is not yet initialized.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Fix NULL pointer deref during arm_cq.
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:46 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Fix NULL pointer deref during arm_cq.

There exists a race condition between CQ doorbell unmap and IO completion path
that arms the CQ which causes a NULL dereference. Protect the ctx_base with
cq_lock to avoid this. Also, wait for the CQ doorbell to be successfully mapped
before arming the CQ.

Also, do not count uncolicited CQ completions for free_sqes.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: IO errors when receiving unsolicited LOGO
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:45 +0000 (17:38 -0700)]
[SCSI] bnx2fc: IO errors when receiving unsolicited LOGO

During the unsolicited LOGO processing, the session is uploaded and offloaded
after the relogin is complete. In between any new IOs are errored back as the
upload completion flag is set. Upon exhausting the retry count, the application
fails the IOs. Return target busy for all the cases when session is not ready.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Do not reuse the fcoe connection id immediately
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:44 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Do not reuse the fcoe connection id immediately

CFC_DELETE is issued 2 secs after CONN_TERM is completed. If the session is
uploaded and offloaded immediately, it has to wait for the connection id to be
available.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Clear DESTROY_CMPL flag after firmware destroy
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:43 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Clear DESTROY_CMPL flag after firmware destroy

Since this flag was never cleared, the driver does not wait for firmware
destroy completions, causing missed KCQEs.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Handle NETDEV_UNREGISTER for vlan devices
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:42 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Handle NETDEV_UNREGISTER for vlan devices

Since the driver holds the reference for vlan netdev, the reference has to be
released by the driver when the vlan device is removed. Driver handles this in
NETDEV_UNREGISTER event.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Reorganize cleanup code between interface_cleanup and if_destory
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:41 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Reorganize cleanup code between interface_cleanup and if_destory

Move interface specific cleanup functionality to from bnx2fc_if_destroy to
bnx2fc_interface_cleanup. Do not access interface/hba in bnx2fc_if_destroy as
by the time this function is called interface may already be destroyed. This
patch is in preparation to handle NETDEV_UNREGISTER on a vlan device.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Change function names of bnx2fc_netdev_setup/bnx2fc_netdev_cleanup
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:40 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Change function names of bnx2fc_netdev_setup/bnx2fc_netdev_cleanup

Change them to bnx2fc_interface_setup/bnx2fc_interface_cleanup in preperation
for the patches to follow. Interface specific cleanup functionality will be
moved to bnx2fc_interface_cleanup.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Do not attempt destroying NPIV port twice
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:39 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Do not attempt destroying NPIV port twice

When NPIV ports are created/deleted rapidly there is a race condition between
bnx2fc_vport_destroy() from sysfs and bnx2fc_flogi_resp(), which could try to
delete the NPIV port from the list twice. Fix is to loop through the list of
NPIV ports to find a match, and only when it exists remove it.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Remove erroneous kref_get on IO request
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:38 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Remove erroneous kref_get on IO request

During sequence cleanup, an additional reference for an IO has been
taken. Because of this, the IO is never released into the free list.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Enable bsg_request support for bnx2fc
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:37 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Enable bsg_request support for bnx2fc

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Bug fixes in percpu_thread_create/destroy
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:36 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Bug fixes in percpu_thread_create/destroy

Look up p->work_list to process cq completions, and correct the error check for
thread creation.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] bnx2fc: Reset the max receive frame size
Bhanu Prakash Gollapudi [Fri, 5 Aug 2011 00:38:35 +0000 (17:38 -0700)]
[SCSI] bnx2fc: Reset the max receive frame size

Reset max receive frame size every time before attempting FLOGI. Without this,
the stale MFS value will be used.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mpt2sas: Added missing mpt2sas_base_detach call from scsih_remove context
kashyap.desai@lsi.com [Thu, 4 Aug 2011 11:17:50 +0000 (16:47 +0530)]
[SCSI] mpt2sas: Added missing mpt2sas_base_detach call from scsih_remove context

mpt2sas_base_detach() call was removed from _scsih_remove() while
doing some code shuffling.  Mainly when we work on adding code for
scsih_shutdown().  I have added back mpt2sas_base_detach() which will
get callled from _scsih_remove().

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mptfusion: Bump version 3.4.20
kashyap.desai@lsi.com [Thu, 4 Aug 2011 11:13:32 +0000 (16:43 +0530)]
[SCSI] mptfusion: Bump version 3.4.20

Upgrade version string.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mptfusion: Avoid out of order Event processing due to cpu migration
kashyap.desai@lsi.com [Thu, 4 Aug 2011 11:12:46 +0000 (16:42 +0530)]
[SCSI] mptfusion: Avoid out of order Event processing due to cpu migration

Driver will now schedule MPI event using "delay_work_queue_on" to
specify same CPU to be used to schedule work.  Earlier it used
"delay_work_queue" which can cause migration of work due to kernel'
timer migration feature.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mptfusion: Better handling of DEAD IOC PCI-E Link down error condition
kashyap.desai@lsi.com [Thu, 4 Aug 2011 11:12:15 +0000 (16:42 +0530)]
[SCSI] mptfusion: Better handling of DEAD IOC PCI-E Link down error condition

Find Non-Operation IOC and remove it from OS: Detecting
dead(non-functional) ioc will be done reading doorbell register value
from fault reset thread, which has been called from work thread
context after each specific interval. If doorbell value is 0xFFFFFFFF,
it will be considered as IOC is non-operational and marked as dead
ioc.

Once Dead IOC has been detected, it will be removed at pci layer using
"pci_remove_bus_device" API.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] mptfusion: Set max sector count module parameter
kashyap.desai@lsi.com [Thu, 4 Aug 2011 11:11:55 +0000 (16:41 +0530)]
[SCSI] mptfusion: Set max sector count module parameter

The max_sector setting is currently hard-coded in the driver to 8192
sectors (4MB transfers). Using new module parameter, if max_sectors is
specified at load time, the default of 8192 will be overridden.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: export sas_alloc_task()
Dan Williams [Sat, 30 Jul 2011 00:26:39 +0000 (17:26 -0700)]
[SCSI] libsas: export sas_alloc_task()

Now that isci has added a 3rd open coded user of this functionality just
share the libsas version.

Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Update version number to 8.03.07.07-k.
Chad Dupuis [Tue, 16 Aug 2011 18:29:30 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Update version number to 8.03.07.07-k.

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Set the task attributes after memsetting fcp cmnd.
Saurav Kashyap [Tue, 16 Aug 2011 18:29:29 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Set the task attributes after memsetting fcp cmnd.

The memset of the fcp_cmnd struct needs to be moved so that it will not
zero-out valid data.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Correct inadvertent loop state transitions during port-update handling.
Andrew Vasquez [Tue, 16 Aug 2011 18:29:28 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Correct inadvertent loop state transitions during port-update handling.

Transitioning to a LOOP_UPDATE loop-state could cause the driver
to miss normal link/target processing.  LOOP_UPDATE is a crufty
artifact leftover from at time the driver performed it's own
internal command-queuing.  Safely remove this state.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Save and restore irq in the response queue interrupt handler.
Saurav Kashyap [Tue, 16 Aug 2011 18:29:27 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Save and restore irq in the response queue interrupt handler.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Double check for command completion if abort mailbox command fails.
Chad Dupuis [Tue, 16 Aug 2011 18:29:26 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Double check for command completion if abort mailbox command fails.

Close a small window where we could falsely fail an abort request if the mailbox
command fails but the command was returned during interrupt context.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Acquire hardware lock while manipulating dsd list.
Saurav Kashyap [Tue, 16 Aug 2011 18:29:25 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Acquire hardware lock while manipulating dsd list.

The dsd list shouldn't be manipulated without taking the per host hardware
lock to prevent multiple callers from trampling upon one another.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: Fix qla24xx revision check while enabling interrupts.
Chad Dupuis [Tue, 16 Aug 2011 18:29:24 +0000 (11:29 -0700)]
[SCSI] qla2xxx: Fix qla24xx revision check while enabling interrupts.

Since we enable interrupts before initializing the firmware, use the chip
revision from PCI config space directly to perform the chip revision check.
Also remove the unnecessary firmware attributes test.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.
Arun Easi [Tue, 16 Aug 2011 18:29:23 +0000 (11:29 -0700)]
[SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.

This fix:
    - Disables app tag peeking; correct tag check will be added when the
      SCSI API is available.
    - Always derive ref_tag from scsi_get_lba()
    - Removes incorrect swap of FCP_LUN in FCP_CMND
    - Moves app-tag error check before ref-tag check. The reason being,
      currently there is no interface in SCSI to retrieve the app-tag
      for protection I/Os, so driver puts zero for app-tag in the
      firmware interface, but requests not to validate it, but when a
      ref-tag error is detected by firmware, it would put
      expected/actual tags for all the protection tags (guard/app/ref).
      As driver checks for app tag error first, a ref-tag error is
      incorrectly flagged as app-tag error.
    - Convert HBA specific checks to capability based.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.
Arun Easi [Tue, 16 Aug 2011 18:29:22 +0000 (11:29 -0700)]
[SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.

Driver needs to update protection bytes for uninitialized sectors as they are
not DMA-d.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Reviewed-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] hpsa: fix physical device lun and target numbering problem
Stephen M. Cameron [Tue, 9 Aug 2011 13:18:01 +0000 (08:18 -0500)]
[SCSI] hpsa: fix physical device lun and target numbering problem

If a physical device exposed to the OS by hpsa
is replaced (e.g. one hot plug tape drive is replaced
by another, or a tape drive is placed into "OBDR" mode
in which it acts like a CD-ROM device) and a rescan is
initiated, the replaced device will be added to the
SCSI midlayer with target and lun numbers set to -1.
After that, a panic is likely to ensue.  When a physical
device is replaced, the lun and target number should be
preserved.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] hpsa: fix problem that OBDR devices are not detected
Stephen M. Cameron [Tue, 9 Aug 2011 13:17:30 +0000 (08:17 -0500)]
[SCSI] hpsa: fix problem that OBDR devices are not detected

The test to detect OBDR ("One Button Disaster Recovery")
cd-rom devices was comparing against uninitialized data.

Fixed by moving the test for the device to where the
inquiry data is collected, and uninitialized variable
altogether as it wasn't really being used.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: add version number
Dan Williams [Sat, 30 Jul 2011 00:17:21 +0000 (17:17 -0700)]
[SCSI] isci: add version number

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix event-get pointer increment
Dan Williams [Sat, 30 Jul 2011 00:17:16 +0000 (17:17 -0700)]
[SCSI] isci: fix event-get pointer increment

Hardware only increments the put pointer on event types >= 4.  Do not
increment the get pointer for event type 3.

Reported-by: Kapil Karkra <kapil.karkra@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: dynamic interrupt coalescing
Dan Williams [Sat, 30 Jul 2011 00:17:10 +0000 (17:17 -0700)]
[SCSI] isci: dynamic interrupt coalescing

Hardware allows both an outstanding number commands and a timeout value
(whichever occurs first) as a gate to the next interrupt generation.  This
scheme at completion time looks at the remaining number of outstanding tasks
and sets the timeout to maximize small transaction operation.  If transactions
are large (take more than a few 10s of microseconds to complete) then
performance is not interrupt processing bound, so the small timeouts this
scheme generates are overridden by the time it takes for a completion to
arrive.

Tested-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: Leave requests alone if already terminating.
Jeff Skirvin [Sat, 30 Jul 2011 00:17:05 +0000 (17:17 -0700)]
[SCSI] isci: Leave requests alone if already terminating.

Instead of immediately completing any request that has a second
termination call made on it, wait for the TC done/abort HW event.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: Adding documentation to API change and fixup sysfs registration
Dave Jiang [Sat, 30 Jul 2011 00:17:00 +0000 (17:17 -0700)]
[SCSI] isci: Adding documentation to API change and fixup sysfs registration

Adding API update for adding isci_id entry scsi_host sysfs entry.
Also fixing up the sysfs registration to the scsi_host template

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: Update MAINTAINERS entry for the isci driver
Dave Jiang [Sat, 30 Jul 2011 00:16:55 +0000 (17:16 -0700)]
[SCSI] isci: Update MAINTAINERS entry for the isci driver

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: change sas phy timeouts from 54us to 59us
Marcin Tomczak [Sat, 30 Jul 2011 00:16:50 +0000 (17:16 -0700)]
[SCSI] isci: change sas phy timeouts from 54us to 59us

Need the following workaround in the driver for interoperability with
the older Intel SSD drives and any other SATA drive that may exhibit the
same behavior. This is a corner case where SCU speed is limited to
either 3G or 1.5G and the drive has a period of DC idle when it switches
speed during SATA speed negotiation. Workaround :change PHYTOV[31:24]
from 0x36 to 0x3B.

Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n
Dan Williams [Sat, 30 Jul 2011 00:16:45 +0000 (17:16 -0700)]
[SCSI] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n

The unsolicited frame control infrastructure requires a table of dma
addresses for the hardware to lookup the frame buffer location by an
index.  The hardware expects the elements of this table to be 64-bit
quantities, so we cannot reference these elements as dma_addr_t.  All
unsolicited frame protocols are affected, particularly SATA-PIO and SMP
which prevented direct-attached SATA drives and expander-attached drives
to not be discovered.

Cc: <stable@kernel.org>
Reported-by: Jacek Danecki <jacek.danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] isci: fix sata response handling
Dan Williams [Sat, 30 Jul 2011 00:16:40 +0000 (17:16 -0700)]
[SCSI] isci: fix sata response handling

A bug (likely copy/paste) that has been carried from the original
implementation.  The unsolicited frame handling structure returns the
d2h fis in the isci_request.stp.rsp buffer.

Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agom68k: fix __page_to_pfn for a const struct page argument
Ian Campbell [Thu, 18 Aug 2011 08:37:02 +0000 (09:37 +0100)]
m68k: fix __page_to_pfn for a const struct page argument

Fixes fallout due to the removal of the cast in commit aa462abe8aaf
("mm: fix __page_to_pfn for a const struct page argument")

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Tue, 23 Aug 2011 18:41:44 +0000 (11:41 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix tracing builds inside the source tree
  xfs: remove subdirectories
  xfs: don't expect xfs headers to be in subdirectories

13 years agoMerge git://git.infradead.org/users/cbou/battery-3.1
Linus Torvalds [Tue, 23 Aug 2011 17:46:56 +0000 (10:46 -0700)]
Merge git://git.infradead.org/users/cbou/battery-3.1

* git://git.infradead.org/users/cbou/battery-3.1:
  s3c-adc-battery: Fix compilation error due to missing header (module.h)
  max8997_charger: Needs module.h
  max8998_charger: Needs module.h

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 23 Aug 2011 17:46:21 +0000 (10:46 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon: Extended DDC Probing for Toshiba L300D Radeon Mobility X1100 HDMI-A Connector
  drm/ttm: ensure ttm for new node is bound before calling move_notify()
  drm/ttm: unbind ttm before destroying node in accel move cleanup
  drm/ttm: fix ttm_bo_add_ttm(user) failure path
  drm/radeon: Make vramlimit parameter actually work.
  drm/radeon: Explicitly print GTT/VRAM offsets on test failure.
  drm/radeon: Take IH ring into account for test size calculation.
  drm/radeon/alpha: Add Alpha support to Radeon DRM code

13 years agoRevert "irq: Always set IRQF_ONESHOT if no primary handler is specified"
Linus Torvalds [Tue, 23 Aug 2011 17:36:51 +0000 (10:36 -0700)]
Revert "irq: Always set IRQF_ONESHOT if no primary handler is specified"

This reverts commit f3637a5f2e2eb391ff5757bc83fb5de8f9726464.

It turns out that this breaks several drivers, one example being OMAP
boards which use the on-board OMAP UARTs and the omap-serial driver that
will not boot to userspace after the commit.

Paul Walmsley reports that enabling CONFIG_DEBUG_SHIRQ reveals 'IRQ
handler type mismatch' errors:

  IRQ handler type mismatch for IRQ 74
  current handler: serial idle
  ...

and the reason is that setting IRQF_ONESHOT will now result in those
interrupt handlers having different IRQF flags, and thus being
unsharable.  So the commit log in the reverted commit:

                            "Since it is required for those users and
    there is no difference for others it makes sense to add this flag
    unconditionally."

is simply not true: there may not be any difference from a "actions at
irq time", but there is a *big* difference wrt this flag testing irq
management (see __setup_irq() in kernel/irq/manage.c).

One solution may be to stop verifying IRQF_ONESHOT in __setup_irq(), but
right now the safe course of action is to revert the change.  Let's
revisit this in a later merge window.

Reported-by: Paul Walmsley <paul@pwsan.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Requested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrm/radeon: Extended DDC Probing for Toshiba L300D Radeon Mobility X1100 HDMI-A Connector
Thomas Reim [Wed, 17 Aug 2011 09:03:32 +0000 (09:03 +0000)]
drm/radeon: Extended DDC Probing for Toshiba L300D Radeon Mobility X1100 HDMI-A Connector

Toshiba Satellite L300D with ATI Mobility Radeon X1100 sends data
   to i2c bus for a HDMI connector that is not implemented/existent
   on the notebook's board.

   Fix by applying extented DDC probing for this connector.

   Requires [PATCH] drm/radeon: Extended DDC Probing for Connectors
   with Improperly Wired DDC Lines

   Tested for kernel 2.6.38 on Toshiba Satellite L300D notebook

BugLink: http://bugs.launchpad.net/bugs/826677
Signed-off-by: Thomas Reim <reimth@gmail.com>
Acked-by: Chris Routh <routhy@gmail.com>
Cc: <stable@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/ttm: ensure ttm for new node is bound before calling move_notify()
Ben Skeggs [Mon, 22 Aug 2011 03:15:05 +0000 (03:15 +0000)]
drm/ttm: ensure ttm for new node is bound before calling move_notify()

This was true for new TTM_PL_SYSTEM and new TTM_PL_TT cases, but wasn't
the case on TTM_PL_SYSTEM<->TTM_PL_TT moves, which causes trouble on some
paths as nouveau's move_notify() hook requires that the dma addresses be
valid at this point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/ttm: unbind ttm before destroying node in accel move cleanup
Ben Skeggs [Mon, 22 Aug 2011 03:15:04 +0000 (03:15 +0000)]
drm/ttm: unbind ttm before destroying node in accel move cleanup

Nouveau makes the assumption that if a TTM is bound there will be a mm_node
around for it and the backwards ordering here resulted in a use-after-free
on some eviction paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/ttm: fix ttm_bo_add_ttm(user) failure path
Marcin Slusarz [Mon, 22 Aug 2011 21:17:57 +0000 (21:17 +0000)]
drm/ttm: fix ttm_bo_add_ttm(user) failure path

ttm_tt_destroy kfrees passed object, so we need to nullify
a reference to it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoxfs: fix tracing builds inside the source tree
Christoph Hellwig [Sun, 14 Aug 2011 17:13:00 +0000 (17:13 +0000)]
xfs: fix tracing builds inside the source tree

The code really requires the current source directory to be in the
header search path.  We already do this if building with an object
tree separate from the source, but it needs to be added manually
if building inside the source.  The cflags addition for it accidentally
got removed when collapsing the xfs directory structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Alex Elder <aelder@sgi.com>