summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next' of ↵Linus Torvalds2011-07-274-26/+10
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Convert to DIV_ROUND_UP_SECTOR_T usage for sectors / dev_max_sectors kernel.h: Add DIV_ROUND_UP_ULL and DIV_ROUND_UP_SECTOR_T macro usage iscsi-target: Add iSCSI fabric support for target v4.1 iscsi: Add Serial Number Arithmetic LT and GT into iscsi_proto.h iscsi: Use struct scsi_lun in iscsi structs instead of u8[8] iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsi
| * iscsi: Add Serial Number Arithmetic LT and GT into iscsi_proto.hNicholas Bellinger2011-07-251-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the iscsi_sna_lt() and iscsi_sna_lte(), along with iscsi_sna_gt() and iscsi_sna_gte() from iscsi_target_mod into static inlines inside of include/scsi/iscsi_proto.h This patch also includes the ISCSI_HDR_LEN and ISCSI_CRC_LEN definitions. (Added JesperJ simpliciation for iscsi_sna_* usage) Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
| * iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]Andy Grover2011-07-253-14/+13
| | | | | | | | | | | | | | | | | | | | struct scsi_lun is also just a struct with an array of 8 octets (64 bits) but using it instead in iscsi structs lets us call scsilun_to_int without a cast, and also lets us copy it using assignment, instead of memcpy(). Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsiNicholas Bellinger2011-07-254-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch renames the following iscsi_proto.h structures to avoid namespace issues with drivers/target/iscsi/iscsi_target_core.h: *) struct iscsi_cmd -> struct iscsi_scsi_req *) struct iscsi_cmd_rsp -> struct iscsi_scsi_rsp *) struct iscsi_login -> struct iscsi_login_req This patch includes useful ISCSI_FLAG_LOGIN_[CURRENT,NEXT]_STAGE*, and ISCSI_FLAG_SNACK_TYPE_* definitions used by iscsi_target_mod, and fixes the incorrect definition of struct iscsi_snack to following RFC-3720 Section 10.16. SNACK Request. Also, this patch updates libiscsi, iSER, be2iscsi, and bn2xi to use the updated structure definitions in a handful of locations. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
* | atomic: use <linux/atomic.h>Arun Sharma2011-07-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'for-linus' of ↵Linus Torvalds2011-07-253-7/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
| * | treewide: fix potentially dangerous trailing ';' in #defined values/expressionsPhil Carmody2011-07-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All these are instances of #define NAME value; or #define NAME(params_opt) value; These of course fail to build when used in contexts like if(foo $OP NAME) while(bar $OP NAME) and may silently generate the wrong code in contexts such as foo = NAME + 1; /* foo = value; + 1; */ bar = NAME - 1; /* bar = value; - 1; */ baz = NAME & quux; /* baz = value; & quux; */ Reported on comp.lang.c, Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com> Initial analysis of the dangers provided by Keith Thompson in that thread. There are many more instances of more complicated macros having unnecessary trailing semicolons, but this pile seems to be all of the cases of simple values suffering from the problem. (Thus things that are likely to be found in one of the contexts above, more complicated ones aren't.) Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | Merge branch 'master' into for-nextJiri Kosina2011-07-1138-7/+23605
| |\ \ | | | | | | | | | | | | | | | | Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
| * | | scsi: qla_isr.c: fix comment typo 'hammmer'Justin P. Mattock2011-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2011-07-2387-3170/+13232
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (77 commits) [SCSI] fix crash in scsi_dispatch_cmd() [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu [SCSI] bfa: Update the driver version to 3.0.2.1 [SCSI] bfa: Driver and BSG enhancements. [SCSI] bfa: Added support to query PHY. [SCSI] bfa: Added HBA diagnostics support. [SCSI] bfa: Added support for flash configuration [SCSI] bfa: Added support to obtain SFP info. [SCSI] bfa: Added support for CEE info and stats query. [SCSI] bfa: Extend BSG interface. [SCSI] bfa: FCS bug fixes. [SCSI] bfa: DMA memory allocation enhancement. [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support. [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes. [SCSI] bfa: Added Fabric Assigned Address(FAA) support [SCSI] bfa: IOC bug fixes. [SCSI] bfa: Enable ASIC block configuration and query. [SCSI] bnx2i: Updated copyright and bump version [SCSI] bnx2i: Modified to skip CNIC registration if iSCSI is not supported ... Fix up some trivial conflicts in: - drivers/scsi/bnx2fc/{bnx2fc.h,bnx2fc_fcoe.c}: Crazy broadcom version number conflicts - drivers/target/tcm_fc/tfc_cmd.c Just trivial cleanups done on adjacent lines
| * | | Merge branch 'scsi-fixes'James Bottomley2011-07-2341-11/+23656
| |\ \ \
| | * | | [SCSI] fix crash in scsi_dispatch_cmd()James Bottomley2011-07-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB surprise removal of sr is triggering an oops in scsi_dispatch_command(). What seems to be happening is that USB is hanging on to a queue reference until the last close of the upper device, so the crash is caused by surprise remove of a mounted CD followed by attempted unmount. The problem is that USB doesn't issue its final commands as part of the SCSI teardown path, but on last close when the block queue is long gone. The long term fix is probably to make sr do the teardown in the same way as sd (so remove all the lower bits on ejection, but keep the upper disk alive until last close of user space). However, the current oops can be simply fixed by not allowing any commands to be sent to a dead queue. Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwiseKay Sievers2011-07-212-4/+49
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some broken devices indicates that media has changed on every GET_EVENT_STATUS_NOTIFICATION. This translates into MEDIA_CHANGE uevent on every open() which lets udev run into a loop. Verify GET_EVENT result against TUR and if it generates spurious events for several times in a row, ignore the GET_EVENT events, and trust only the TUR status. This is the log of a USB stick with a (broken) fake CDROM drive: scsi 5:0:0:0: Direct-Access SanDisk U3 Cruzer Micro 8.02 PQ: 0 ANSI: 0 CCS sd 5:0:0:0: Attached scsi generic sg3 type 0 scsi 5:0:0:1: CD-ROM SanDisk U3 Cruzer Micro 8.02 PQ: 0 ANSI: 0 sd 5:0:0:0: [sdb] Attached SCSI removable disk sr2: scsi3-mmc drive: 48x/48x tray sr 5:0:0:1: Attached scsi CD-ROM sr2 sr 5:0:0:1: Attached scsi generic sg4 type 5 sr2: GET_EVENT and TUR disagree continuously, suppress GET_EVENT events sd 5:0:0:0: [sdb] 31777279 512-byte logical blocks: (16.2 GB/15.1 GiB) sd 5:0:0:0: [sdb] No Caching mode page present sd 5:0:0:0: [sdb] Assuming drive cache: write through sd 5:0:0:0: [sdb] No Caching mode page present sd 5:0:0:0: [sdb] Assuming drive cache: write through sdb: sdb1 -tj: Updated to consider only spurious GET_EVENT events among different types of disagreement and allow using TUR for kernel event polling after GET_EVENT is ignored. Reported-By: Markus Rathgeb maggu2810@googlemail.com Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable@kernel.org # >= v2.6.38, fixes udev busy looping w/ certain devices Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpuEddie Wai2011-07-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A kernel panic was observed when passing the sc->request->cpu = -1 to retrieve the per_cpu variable pointer: #0 [ffff880011203960] machine_kexec at ffffffff81022bc3 #1 [ffff8800112039b0] crash_kexec at ffffffff81088630 #2 [ffff880011203a80] __die at ffffffff8139ea20 #3 [ffff880011203aa0] no_context at ffffffff8102f3a7 #4 [ffff880011203ae0] __bad_area_nosemaphore at ffffffff8102f665 #5 [ffff880011203ba0] retint_signal at ffffffff8139dd1f #6 [ffff880011203cc8] bnx2i_indicate_kcqe at ffffffffa03dc4f2 #7 [ffff880011203da8] service_kcqes at ffffffffa03cb04f #8 [ffff880011203e68] cnic_service_bnx2x_kcq at ffffffffa03cb14a #9 [ffff880011203e88] cnic_service_bnx2x_bh at ffffffffa03cb1b3 The problem lies in the slow path sg_io (and perhaps sg_scsi_ioctl) call to blk_get_request->get_request/wait->blk_alloc_request->blk_rq_init which re-initializes the request->cpu to -1. There is no assignment for cpu from that to the request_fn call to low level drivers. When this happens, the sc->request->cpu will be using the init value of -1. This will create a kernel panic when it hits bnx2i because the code refers it to get the per_cpu variables ptr. This change is to put in a guard against that and also for cases when bio affinity/queue completion to the same cpu is not enabled. In those cases, the request->cpu will remain a -1 also. This bug was created from commit: b5cf6b63f73abdc051035f0050b367beeb2ef94c For the case when the blk layer did not setup the request->cpu, bnx2i will complete the sc with the current CPU of the thread. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Update the driver version to 3.0.2.1Krishna Gudipati2011-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Driver and BSG enhancements.Krishna Gudipati2011-06-296-34/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added a new module parameter max_xfer_size to set the max_sectors in the scsi_host template. - Added logic to handle request_irq() failure so that msix vector resource is de-allocated immediately when failure happens. - BSG enhancements to collect vHBA releated info and port log. - Removed the workaround of incrementing the module refcnt on bsg request. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Added support to query PHY.Krishna Gudipati2011-06-299-0/+867
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added PHY sub-module. - Implemented interface to obtain stats and to read/update the fw from the PHY module. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Added HBA diagnostics support.Krishna Gudipati2011-06-2911-9/+1665
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added diagnostics sub-module to BFA. - Implemented interface to perform memtest/loopback test and some other diagnostics tests. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Added support for flash configurationKrishna Gudipati2011-06-299-47/+910
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added flash sub-module. - Implemented the interface to read/erase/update flash partition. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Added support to obtain SFP info.Krishna Gudipati2011-06-298-0/+903
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added SFP sub-module to BFA. - Added interface to collect sfp media info and sfp speed. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Added support for CEE info and stats query.Krishna Gudipati2011-06-298-0/+683
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added CEE sub-module. - Added support to collect stats/cee module info using BSG interface. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Extend BSG interface.Krishna Gudipati2011-06-2911-7/+867
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added support to collect driver/fw stats. - Added support to perform adapter/ioc enable, disable operations. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: FCS bug fixes.Krishna Gudipati2011-06-2912-55/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added logic to initiate a PLOGI to the target, while processing a LOGO from the same target in Direct attach mode. - Added logic to generate a FCCT Reject indicating unsupported command, upon receiving FCCT/FCGS requests. - Added logic to set the fcpim in offline state and avoid any PRLI retries if a PRLI response is a reject with a reason Command Not Supported. - Updated the FDMI Supported/Current speeds. - Added logic to wait for the response from the firmware before sending ACC to PLOGI and transitioning to subsequent states - while processing an Incoming PLOGI in online state. - Added a wait state in the fcs_vport state machine - For case where FDISC is in progress and we get a vport delete request we wait for fdisc response and will transition to the appropriate state based on rsp status, else its causing both driver/fw resources to be not freed. - Remove the fc_credit_recovery module param. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: DMA memory allocation enhancement.Krishna Gudipati2011-06-2913-569/+624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Modified the design such that each BFA sub-module will provide the amount of DMA and KVA memory needed by it and queues the same request to the global dma and kva info queues. - During the memory allocation we iterate over this queue to allocate the dma and kva memory requested by sub-modules. - The change is needed to avoid requesting the aggregate amount of memory needed by all the BFA sub-modules as one contiguous chunk. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.Krishna Gudipati2011-06-2912-118/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduced partitioning of the BFA resources. - Added h/w queue ID in CPE messages, firmware uses h/w queue ID from messages to pick a matching RME queue. - Added message header to bfa_reqq_produce(). h/w queue ID is set in the message header and firmware modules use h/w queue ID from message header instead of from cpqe event. - Made changes to allow using all 256 queues of Brocade-1860 asic. Previously only a single queue per queue group was used. - Added function tag to BFI message header. Only used by FC BFI messages. Used to translate host tag to firmware tag. bfa_lpuid() is changed to bfa_fn_lpu() that encodes both PCI function and port ID in BFI message header. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.Krishna Gudipati2011-06-299-132/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If flash controller is halted unconditionally, this results in illegal write access to flash controller register domain. Since flash controller registers are only accessible once s_clk is started - added logic to check for WGN status and halt flash controller only if it is already running. - Added check to wait for flash controller halt to be completed before proceeding with s_clk/l_clk initializations. - Removed unnecessary reset logic for PMM 1T memory and moved memory initialization after flash access enable. - Disable Brocade-1860 asic MBOX interrupt before PLL initialization. - Remove reset enable for S_CLK/L_CLK after both PLL initializations are complete. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Added Fabric Assigned Address(FAA) supportKrishna Gudipati2011-06-2912-6/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Updated/added data structures and definitions to support FAA protocol. - Modified the IOC state machine to support FAA. - Introduced FAA feature configuration - enable/disable/query. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: IOC bug fixes.Krishna Gudipati2011-06-295-34/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add logic to handle the case where PCI mapping goes away when IOCPF state machine is waiting for semaphore. - Added logic to unlock hw semaphore if the previos FW boot was from flash based and the current FW initialization attempt is from OS. - Added fix to update hbfails and hb_count stats during hwerror event. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bfa: Enable ASIC block configuration and query.Krishna Gudipati2011-06-2910-9/+863
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added ASIC block configuration APIs: - to create/delete/update the physical functions - to do adapter/port mode configuration - to query the current ASIC block configuration. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bnx2i: Updated copyright and bump versionEddie Wai2011-06-297-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumped version from 2.6.2.3 to 2.7.0.3 Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bnx2i: Modified to skip CNIC registration if iSCSI is not supportedEddie Wai2011-06-291-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The init routine will now examine the cnic->max_iscsi_conn variable before registering to CNIC during ulp_init. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] bnx2i: Added the use of kthreads to handle SCSI cmd completionEddie Wai2011-06-294-35/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch breaks the SCSI cmd completion into two parts: 1. The bh will allocate and queued work to the cmd specific CPU IO completion kthread. The CPU for the cmd is from the sc->request->cpu. 2. The CPU specific IO completion kthread will call the scsi_cmd_resp routine to do the actual cmd completion. In the normal case, these IO completion kthreads should complete before the blk IO times out at 60s. However, in the case when these kthreads are blocked for whatever reason and exceeded the timeout, the call to conn_destroy will have to iterate and exhaust all related work in the percpu work list for all online CPUs. This will guarantee the protection of the work->session and conn pointers before they get freed. Also modified the event coalescing formula to have at least the event_coal_min outstanding cmds in the pipeline so the SCSI producer would not get underrun. Also changed the following SCSI parameters: - can_queue from 1024 to 2048 - cmds_per_lun from 24 to 128 Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Acked-by: Benjamin Li <benli@broadcom.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] libiscsi_tcp: fix LLD data allocationMike Christie2011-06-291-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have libiscsi_tcp have upper layers allocate the LLD data along with the iscsi_cls_conn struct, so it is refcounted. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] iscsi_tcp: fix locking around iscsi sk user dataMike Christie2011-06-291-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iscsi_sw_tcp_conn_restore_callbacks could have set the sk_user_data field to NULL then iscsi_sw_tcp_data_ready could read that and try to access the NULL pointer. This adds some checks for NULL sk_user_data in the sk callback functions and it uses the sk_callback_lock to set/get that sk_user_data field. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] iscsi_ibft, be2iscsi, iscsi_boot: fix boot kobj data lifetime managementMike Christie2011-06-292-100/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be2iscsi passes the boot functions its phba object which is allocated in the shost, but iscsi_ibft passes in a object allocated for each item to display. The problem is that iscsi_boot_sysfs was managing the lifetime of the object passed in and doing a kfree on release. This causes a double free for be2iscsi which frees the shost in its pci_remove. This patch fixes the problem by adding a release callback which the drivers can call kfree or a put() type of function (needed for be2iscsi which will do a get/put on the shost). Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] iscsi_boot_sysfs: have this module check for null on destructionMike Christie2011-06-292-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the check for NULL boot_sets to the iscsi_boot_sysfs module instead of having the drivers do it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] cxgb3i: fixed programing of the dma page sizesKaren Xie2011-06-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed missing programming of the pages sizes for DMA. Signed-off-by: Karen Xie <kxie@chelsio.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] fcoe: Rearrange fcoe port and NPIV port cleanupNeerav Parikh2011-06-291-37/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When NPIV port destroy handler is called it does not do all the cleanup required for the given NPIV port. This was happening as some of the lport cleanup moved to fcoe_interface_cleanup() routine, which is not called as part of the vport delete process. This patch rearranges the sequence in which the fcoe_if_destory() and fcoe_interface_cleanup() functions are being called from various places in the code. It now matches the sequence they are constructed during the create process for both N_Port as well as NPIV port. Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] libfc: post reset event on lport resetVasu Dev2011-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post an FCH_EVT_LIPRESET event on lport reset as as lport reset occurs on FIP cleat virtual link, this could be due to change in fcoe vlan and this event will allow user app fcoemon to switch to new fcoe vlan. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] libfc:Fix for exchange/seq loopup failure when FCoE stack is used as ↵Kiran Patil2011-06-291-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target and connected to windows initaitor Problem: Linux based SW target (TCM) connected to windows initiator was unable to satisfy write request of size > 2K. Fix: Existing linux implememtation of FCoE stack is expecting sequence number to match w.r.t incoming framme. When DDP is used on target in response to write request from initiator, SW stack is notified only when last data frame arrives and only the pakcket header of last data frame is posted to NetRx queue of storage. When that last packet was processed in libfc:Exchange layer, implementation was expecting sequence number to match, but in this case sequence number which is embedded in FC Header is assigned by windows initaitor, hence due to sequence number mismatch post-processing which shall result into sending RSP is not done. Enhanced the code to utilize the sequence number of incoming last frame and process the packet so that, it will eventually complete the write request by sending write response (RSP) GOOD. Notes/Dependencies: This patch is validated using windows and linux initiator to make sure, it doesn't break anything. Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] fcoe: Amends previous patch, Round-robin based selection of CPU for ↵Kiran Patil2011-06-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | post processing of incoming request for FCoE target Problem: Selection of RX queue on target is based on RX-ID. FCoE used 8 Net Rx queues. HW post the packets based on rx_id % num_rx_queue. Due to this has based filtering, only one CPU is busy servicing incoming request including post-processing of incoming request. This is gating factor because 1. Only one CPU is utilized 100% while others CPUs are not used at all. 2. CPU which received request assign "sequence' by selecting exchange from per CPU pool (num_ddp_context / num_online_cpus, approxi.). Due to which if if rate of incoming request is higher than rate of servicing request, existing code path end of sending "BUSY" response (SAM_STAT_BUSY because unable to allocate exchange). Fix: Fan-out incoming request to all other CPUs excluding the CPU which is receiving all incoiming request. This path also addresses, selecting same CPU based on rx_id from received frame for completion of the request such as "releasing exchange to the per CPU Pool". This fix is applicable for FCoE target since initiator code path already takes care of selecting CPU to complete post-processing of request once OX_ID is assigned. Notes: N/A Dependencines: N/A Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] fcoe: Round-robin based selection of CPU for post-processing of ↵Kiran Patil2011-06-291-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incoming commands Problem: Earlier mechanism of selection of CPU was, to select the same CPU which has received incoming request. Hence in case of rx_id = 0xFFFF, request was always posted to same NetRx queue, hence only 1 CPU is utilized for handling the command. It was also causing problem of "running out of exchanges from per CPU pool of exchanges (in case of DDP offload) Fix: Implemented new algo. to select CPU for post-processing of incoming commands when rx_id is unknown. This is simple Round robin algo. for CPU selection. Notes/Dependencies: N/A Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] fcoe: Unable to select the exchangeID from offload pool for storage ↵Kiran Patil2011-06-291-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | targets Problem: When initiator sends write command to target, target tries to assign new sequence. It allocates new exchangeID (RX_ID) always from non-offloaded pool (Non-offload EMA) Fix: Enhanced fcoe_oem_match routine to look at F_CTL flags and if it is exchange responder and command type is WRITEDATA, then function returns TRUE instead of FALSE. This function is used to determine which pool to use (offload pool of exchange is used only if this function returns TRUE). Technical Notes: N/A Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] fcoe: support ndo_fcoe_ddp_target() for DDP in FCoE targeYi Zou2011-06-291-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ddp_target() support to the Open-FCoE sw fcoe hba driver (fcoe.ko). Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] libfc: Enhancement to RPORT state machine applicable only for VN2VN modeKiran Patil2011-06-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Existing RPORT state machine continues witg FLOGI/PLOGI process only after it receices beacon from other end. Once claiming stage is over (either clain notify or clain repose), beacon is sent and state machine enters into operational mode where it initiates the rlogin process (FLOGI/PLOGI) to the peer but before this rlogin is initiated, exitsing implementation checks if it received beacon from other end, it beacon is not received yet, rlogin process is not initiated. Other end initiates FLOGI but peer end keeps on rejecting FLOGI, hence after 3 retries other end deletes associated rport, then sends a beacon. Once the beacon is received, peer end now initiates rlogin to the peer end but since associated rport is deleted FLOGI is neither accepted nor the reject response send out because rport is deleted. Hence unable to proceed withg FLOGI/PLOGI process and fails to establish VN2VN connection. Fix: VN2VN spec is not standard yet but based on exitsing collateral on T11, it appears that, both end shall send beacon and enter into 'operational mode' without explictly waiting for beacon from other end. Fix is to allow the RPORT login process as long as respective RPORT is created (as part of claim notification / claim response) even though state of RPORT is INIT. Means don't wait for beacon from peer end, if peer end initiates FLOGI (means peer end exist and responding). Notes: This patch is preparing the FCoE stack for target wrt offload. This is generic patch and harmless even if applied on storage initiator because 'else if' condition of function 'fcoe_oem_found' shall evaluate to TRUE only for targets. Dependencies: None Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]Andy Grover2011-06-293-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct scsi_lun is also just a struct with an array of 8 octets (64 bits) but using it instead in iscsi structs lets us call scsilun_to_int without a cast, and also lets us copy it using assignment, instead of memcpy(). Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] mpt2sas: Bump version 09.100.00.00Kashyap, Desai2011-06-291-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] mpt2sas: Adding support for customer specific brandingKashyap, Desai2011-06-292-2/+20
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] mpt2sas: Added DID_NO_CONNECT return when driver remove and avoid ↵Kashyap, Desai2011-06-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shutdown call Driver should not call shutdown call from _scsih_remove otherwise, The scsi midlayer can be deadlocked when devices are removed from the driver pci_driver->shutdown handler. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * | | [SCSI] mpt2sas: fix broadcast AEN and task management issueKashyap, Desai2011-06-293-56/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly handling of target reset in multi-initiator environment Clean up in broadcast change handling: (1) Need to look at the status of each task management request, and retry the TM when there are failures. (2) Need quiescence IO so the driver doesn't take on more IO request while it's in the middle of sending TM request to firmware (3) Add support to keep track of how many pending broadcast AEN events are received while the broadcast handling is active, then loop back at the end of this routine if there were any events received. Clean up in mpt2sas_scsih_issue_tm routine: (1) Make sure proper status is returned when host reset fails (2) Clean up sanity checks near end of routine, insuring all outstanding IOs were completed. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
OpenPOWER on IntegriCloud