aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-12-04[SCSI] fcoe: Use NETIF_F_FCOE_MTU flag to set up max frame size (lport->mfs)Yi Zou2-2/+14
Add a define of FCOE_MTU as 2158 bytes and use FCOE_MTU when the LLD is found to support NETIF_F_FCOE_MTU. The lport->mfs is then calculated out of the 2158 FCOE_MTU. Otherwise, we stick with the netdev->mtu, i.e., LAN MTU. Also, change the notification on NETDEV_CHANGEMTU event to bypass changing mfs when LAN MTU is changed if NETIF_F_FCOE_MTU is supported. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] fcoe: initialize return value in fcoe_destroyMike Christie1-1/+1
When doing echo ethX > /sys..../destroy I am getting errors when the tear down succeeds. It looks like the reason for this is because the rc var is not getting set when the destruction works. This just sets it to zero. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: removes unused disc_work and ex_listVasu Dev2-2/+0
Reported-by: Alex Lyakas <alexl@mellanox.co.il> Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: adds missing exch release for accepted RRQVasu Dev1-4/+5
Adds missing exch release when RRQ is accepted by calling fc_seq_ls_acc. Adds common exch release for fc_exch_els_rrq by use of out label. Reported-by: Alex Lyakas <alexl@mellanox.co.il> Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: removes initializing fc_cpu_order and fc_cpu_mask per lportVasu Dev1-10/+14
Initializing these libfc globals per lport could mess up exch allocation/free for existing lport. So this patch moves their initialization to fc_setup_exch_mgr so that these globals gets initialized only once for libfc. Reported-by: Alex Lyakas <alexl@mellanox.co.il> Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: don't WARN_ON in lport_timeout for RESET stateJoe Eykholt1-1/+4
It's possible and harmless to get FLOGI timeouts while in RESET state. Don't do a WARN_ON in that case. Also, split out the other WARN_ONs in fc_lport_timeout, so we can tell which one is hit by its line number. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: lport: fix minor documentation errorsJoe Eykholt1-10/+10
Fix minor errors. A debug message said an RLIR was received instead of ECHO. "Expected" was misspelled in several places. Fix a type cast from u32 to __be32. Rob, Some of these may have been also taken care of in your other doc cleanup patch. Feel free to fold them in. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: Fix wrong scsi return status under FC_DATA_UNDRUNYi Zou1-1/+2
This bug is exposed when there is a link flap in LLD. Particularly, when it happens right after a SCSI write command is sent out, no FCP_DATA is sent, causing fsp->status_code to be set as FC_DATA_UNDRUN in fc_fcp_complete_locked even no SCSI status is received. Consequently, fc_io_compl treats this as DID_OK. This results in SCSI returning successful to the initial I/O request even there is no DATA actually sent. Particularly, if you run an I/O tool w/ data verification on, the read back for verification is gonna fail. This is fixed here by checking when FC_DATA_UNDRUN happens, SCSI status is received w/ FC_SRB_RCV_STATUS set in fsp->state. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: Remove unused fc_lport pointer from fc_fcp_pkt_abortRobert Love1-2/+2
This argument isn't used, let's not pass it into the routine. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc, fcoe: Don't EXPORT_SYMBOLS unnecessarilyRobert Love4-5/+0
These are a few functions that were not used by other modules. They did not need to be exported so this patch removes the EXPORT_SYMBOLS call for each. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] fcoe: remove redundant checking of netdev->netdev_opsYi Zou1-2/+2
Remove the redundant checking of netdev->netdev_ops as it will never be NULL. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: fix ddp in fc_fcp for 0 xidYi Zou1-2/+6
xid 0 was used as an indication of invalid xid before but now xid 0 can be used as a valid exchange i. This patch fixes the ddp completion in fcp layer, i.e., in fc_fcp.c:fc_fcp_ddp_done() function, to make sure it does not use xid 0 for indication of an invalid xid, instead, it now uses use FC_XID_UNKNOWN for such indication. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc: fix typo in retry check on received PRLIJoe Eykholt1-1/+1
A received Fibre Channel ELS PRLI request contains a bit that indicates whether the remote port supports certain retry processing sequences. The test for this bit was somehow coded to use multiply instead of AND! This case would apply only for target mode operation, and it is unlikely to be noticed as an initiator. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] ibmvfc: Driver version 1.0.7Brian King1-2/+2
Bump driver version to 1.0.7. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] ibmvfc: Add FC Passthru supportBrian King2-1/+286
Adds support for FC passthru via BSG. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] ibmvfc: Fix adapter cancel flags for terminate_rport_ioBrian King1-4/+16
When issuing a Cancel to the virtual fibre channel adapter, the interface specifies a flags field for the client to indicate what kind of error recovery is being performed. Fix up these flags for terminate_rport_io to indicate an abort task set rather than a target reset. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] ibmvfc: Remove unnecessary parameter to ibmvfc_init_hostBrian King1-9/+6
Remove a parameter to ibmvfc_init_host which is always set to zero by all callers. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] ibmvfc: Fix locking in ibmvfc_removeBrian King1-0/+4
Need to grab the host lock around the call to ibmvfc_link_down. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] ibmvfc: Fixup TMF response handlingBrian King1-2/+8
When processing the response to either a LUN reset, target reset, or an abort task set, the ibmvfc driver needs to treat as success receiving a response with a non-zero status in the response IU along with a general transport error with the FCP response code being zero. The VIOS currently guarantees this cannot happen, but a future version of VIOS may allow this to be returned, so ensure we handle this response combination correctly for TMFs, as we already do for SCSI commands. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] scsi_debug: Thin provisioning supportMartin K. Petersen1-3/+335
This version fixes 64-bit modulo on 32-bit as well as inadvertent map updates when TP was disabled. Implement support for thin provisioning in scsi_debug. No actual memory de-allocation is taking place. The intent is to emulate a thinly provisioned storage device, not to be one. There are four new module options: - unmap_granularity specifies the granularity at which to track mapped blocks (specified in number of logical blocks). 2048 (1 MB) is a realistic value for disk arrays although some may have a finer granularity. - unmap_alignment specifies the first LBA which is naturally aligned on an unmap_granularity boundary. - unmap_max_desc specifies the maximum number of ranges that can be unmapped using one UNMAP command. If this is 0, only WRITE SAME is supported and UNMAP will cause a check condition. - unmap_max_blocks specifies the maximum number of blocks that can be unmapped using a single UNMAP command. Default is 0xffffffff. These parameters are reported in the new and extended block limits VPD. If unmap_granularity is specified the device is tagged as thin provisioning capable in READ CAPACITY(16). A bitmap is allocated to track whether blocks are mapped or not. A WRITE request will cause a block to be mapped. So will WRITE SAME unless the UNMAP bit is set. Blocks can be unmapped using either WRITE SAME or UNMAP. No accounting is done to track partial blocks. This means that only whole blocks will be marked free. This is how the array people tell me their firmwares work. GET LBA STATUS is also supported. This command reports whether a block is mapped or not, and how long the adjoining mapped/unmapped extent is. The block allocation bitmap can also be viewed from user space via: /sys/bus/pseudo/drivers/scsi_debug/map Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] scsi: Add missing command definitionsMartin K. Petersen2-0/+5
Add definitions for UNMAP, WRITE SAME{16,32} and GET LBA STATUS commands. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Update version number to 8.03.01-k7Giridhar Malavali1-1/+1
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Properly handle UNDERRUN completion statuses.Lalit Chandivade1-63/+57
Correct issues where the lower scsi-status would be improperly cleared, instead, allow the midlayer to process the status after the proper residual-count checks are performed. Finally, validate firmware status flags prior to assigning values from the FCP_RSP frame. Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Michael Hernandez <michael.hernandez@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Properly re-register FC4/FDMI after physical and logical link disruptions.Andrew Vasquez3-6/+8
Original code would not register FC4 nor FDMI information after a logical tear-down of an VFC link. Code now triggers registration date during processing of a 'Report ID Acquisition IOCB', which is submitted after a FLOGI or FDISC completes. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Properly check FCP_RSP response-info field after TMF completion.Andrew Vasquez1-4/+22
Original code discarded response-info field information and assumed the command completed successfully without verifying the target's status within the FCP_RSP packet. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Retrieve firmware's maximum number of supported FCFs.Andrew Vasquez3-6/+11
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Set the size of the host buffer used to fetch DCBX and XGMAC parameters to 4K.Giridhar Malavali1-2/+2
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Reread firmware versions information after an ISP abort.Lalit Chandivade1-0/+9
In some case, the MPI and PHY versions when retrieved after the Execute-FW mailbox-command are incorrect (255.255.255.255). Instead, query the information after the check for firmware ready is done in the abort ISP path. Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Display additional mailbox registers during AEN handling.Andrew Vasquez1-9/+15
The mailbox register values may assist in debugging efforts. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qla2xxx: Add firmware-dump kobject uevent notification.Andrew Vasquez5-55/+72
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] bfa: fixed checkpatch errors for bfad filesJing Huang53-539/+324
This patch fixes checkpatch errors/warnings in bfad files. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] scsi_transport_fc: remove invalid BUG_ONMichael Reed1-26/+42
I was doing some large lun count testing with 2.6.31 and hit a BUG_ON() in fc_timeout_deleted_rport(), and it seems like it should have been just a matter of time before someone did. It seems invalid to set port_state under lock, then expect it to remain set after releasing the lock. Another thread called fc_remote_port_add() when the lock was released, changing the port_state. This patch removes the BUG_ON and moves the test of the port_state to inside the host_lock. It's been running for several weeks now with no ill effect. Signed-off-by: Michael Reed <mdr@sgi.com> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] fix propogation of integrity errorsMike Christie1-1/+1
When the Integrity check is done in scsi_io_completion it will set error to -EILSEQ. However, at this point error is no longer used, and blk_end_request_err has -EIO hardcoded. It looks like there was just porting mistake with this patch http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3e695f89c5debb735e4ff051e9e58d8fb4e95110 and we meant to send error upwards, so this patch changes the hard coded EIO to the error variable. I have only boot tested this patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] stex: update version to 4.6.0000.4Ed Lin1-4/+4
Update version to 4.6.0000.4. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] stex: add support for reset request from firmwareEd Lin1-83/+166
Add support for reset request from firmware for controllers of st_shasta and st_yel type. Code adjustments necessary for this change are also included. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] stex: add small dma buffer supportEd Lin1-5/+20
The controllers of st_seq and st_vsc type can work if only small dma buffer is available, with a reduced firmware feature set. Add support for this case. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mptfusion: Bump version to 3.04.13Kashyap, Desai1-2/+2
Bump version 3.04.13. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mptspi: Fix for incorrect data underrun errataKashyap, Desai1-5/+81
Errata: Certain conditions on the scsi bus may casue the 53C1030 to incorrectly signal a SCSI_DATA_UNDERRUN to the host. Workaround 1: For an Errata on LSI53C1030 When the length of request data and transfer data are different with result of command (READ or VERIFY), DID_SOFT_ERROR is set. Workaround 2: For potential trouble on LSI53C1030. It is checked whether the length of request data is equal to the length of transfer and residual. MEDIUM_ERROR is set by incorrect data. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mptctl : Remove printk which floods unnecessary messages to var/log/messageKashyap, Desai1-4/+1
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: Update version number and documentationYang, Bo3-4/+66
Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: use the firmware boot timeout when waiting for commandsYang, Bo1-11/+17
use the constant MEGASAS_RESET_WAIT_TIME when waiting for firmware commands to complete (currently 3 minutes). Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: fix 64 bit sense pointer truncationYang, Bo1-4/+4
The current sense pointer is cast to a u32 pointer, which can truncate on 64 bits. Fix by using unsigned long instead. Signed-off-by Bo Yang<bo.yang@lsi.com> Cc: stable@kernel.org Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: Add the support for updating the OS after adding/removing the devices from FWYang, Bo2-1/+141
Driver will update the OS devices after adding and deleting the device from FW. When driver receive add or delete AEN from FW, driver will send the DCMD cmd to get the System PD list from FW. Then driver will check if this device already in the OS: If add event and OS don't have the device (but it is in the list), driver add the device to OS, otherwise driver will not add. If remove event, driver will check the list, if is not in the list, but OS have the device, driver will remove the device. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: Fix the fix for fw hang caused by megaraid sas applicationYang, Bo2-23/+77
Add a lock to the skinny firmware initialisation sequence to prevent the two stage write being non atomic if multiple instances use it. Add a flag to the driver shutdown sequence to prevent aen ioctls being called after shutdown begins. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: add the IEEE SGE support to SAS2 controllerYang, Bo2-7/+82
To increase the performance, megaraid sas driver added the IEEE SGE support to support SAS2 controller. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: allocate the application cmds to sas2 controllerYang, Bo2-3/+22
MegaRAID SAS2 controller ioctl can't use 32 cmd for applications. Driver need to divide different number of cmds to IO and application. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: report system PDs to OSYang, Bo1-26/+65
When OS issue inquiry, it will check driver's internal pd_list. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: infrastructure to get PDs from FWYang, Bo2-2/+182
Add system PDs to OS. Driver implemented the get_pd_list function to get the system PD from FW. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: Add new megaraid SAS 2 controller support to the driverYang, Bo2-5/+138
Add the new megaraid sas 2 controller to the driver. megaraid sas2 is LSI next generation SAS products. driver add the interface to support this product. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] megaraid_sas: add sysfs for AEN pollingYang, Bo1-1/+23
update the sysfs parameter to tell application driver support AEN poll Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>