23 May, 2012
3 commits
-
Currently the fcoe_ctlr associated with an interface is allocated
as a member of struct fcoe_interface. This causes problems when
attempting to use the new fcoe_sysfs APIs which allow us to allocate
the fcoe_interface as private data to the fcoe_ctlr_device instance.
The problem is that libfcoe wants to be able use pointer math to find a
fcoe_ctlr's fcoe_ctlr_device as well as finding a fcoe_ctlr_device's
assocated fcoe_ctlr. To do this we need to allocate the
fcoe_ctlr_device, with private data for the LLD. The private data
contains the fcoe_ctlr and its private data is the fcoe_interface.
This patch only allocates the fcoe_interface with the fcoe_ctlr, the
fcoe_ctlr_device will be added in a later patch, which will complete
the below diagram-+------------------+
| fcoe_ctlr_device |
+------------------+
| fcoe_ctlr |
+------------------+
| fcoe_interface |
+------------------+This prep work will allow us to go from a fcoe_ctlr_device instance
to its fcoe_ctlr as well as from a fcoe_ctlr to its fcoe_ctlr_device
once the fcoe_sysfs API is in use (later patches in this series).Signed-off-by: Robert Love
Tested-by: Ross Brattain
Signed-off-by: James Bottomley -
block congestion control doesn't have any concept of fairness across
multiple queues. This means that if SCSI reports the host as busy in
the queue congestion control it can result in an unfair starvation
situation in dm-mp if there are multiple multipath devices on the same
host. For example:
http://www.redhat.com/archives/dm-devel/2012-May/msg00123.htmlThe fix for this is to report only the sdev busy state (and ignore the
host busy state) in the block congestion control call back.
The host is still congested, but the SCSI subsystem will sort out the
congestion in a fair way because it knows the relation between the
queues and the host.[jejb: fixed up trailing whitespace]
Reported-by: Bernd Schubert
Tested-by: Bernd Schubert
Signed-off-by: Jun'ichi Nomura
Cc:
Signed-off-by: James Bottomley -
Avoid dereferencing a NULL pointer if scsi_host_alloc is failed.
Signed-off-by: Namjae Jeon
Signed-off-by: James Bottomley
22 May, 2012
37 commits
-
In the original code, if dma_pool_alloc() fails then we call
dma_pool_free(). It causes an error, possibly a NULL dereference.Signed-off-by: Dan Carpenter
Acked-by: Chad Dupuis
Signed-off-by: James Bottomley -
We introduced a new return here and forgot to unlock the mutex.
Signed-off-by: Dan Carpenter
Acked-by: "Nandigama, Nagalakshmi"
Signed-off-by: James Bottomley -
This patch adds support for tcm_qla2xxx fabric module for target-core
using the new qla_target.c LLD logic. This includes support for explict
NodeACLs via configfs using tcm_qla2xxx_setup_nacl_from_rport() from libfc
struct fc_host->rports, and demo-mode support for virtual LUN=0 access.This patch also adds support for using tcm_qla2xxx_lport->lport_fcport_map
and ->lport_loopid_map of btree_head32 to track struct se_node_acl pointers
for individual 24-bit Port ID and 16-bit Loop ID values w/ qla_target_template
->find_sess_by_s_id() and ->find_sess_by_loop_id() used in a number of
locations into the primary I/O dispatch logic in qla_target.c LLD code.The main piece for FC Nexus setup is in tcm_qla2xxx_check_initiator_node_acl(),
which calls tcm_qla2xxx_set_sess_by_[s_id,loop_id]() to setup our
lport->lport_fcport_map and lport_loopid_map pointers respectively, and
register the new nexus with TCM via __transport_register_session().(nab: Add qla_tgt_mgmt_cmd usage with TARGET_SCF_ACK_KREF during TMRs +
change tcm_qla2xxx_nacl->nport_id to u32 (DanC))
(danc: tcm_qla2xxx: checking for NULL instead of IS_ERR())
(roland: Fix up v3.5 breakage for removal of transport_do_task_sg_chain +
Add hook so qla_target code can shutdown sessions)
(steveh: Convert FC address map from flat array to btree)
(randy: fix qla2xxx printk format warnings for size_t)
(joern: Make most of tcm_qla2xxx static + remove unnecessary
workqueue_struct prototypes + use WWN_SIZE instead of hard-coded
constants)Signed-off-by: Nicholas A. Bellinger
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Add LLD target mode for >= 24xx series HW. This code was originally based on
external qla2x00t module based on 8.02.01-k4, and has been refactored to
push the bulk of code into mainline qla2xxx.ko LLD -> qla_target.c.The implementation uses internal workqueues for I/O context submission
into tcm_qla2xxx code, and includes the struct qla_tgt_func_tmpl API for
external interaction to allow qla2xxx LDD to function without direct
target-core dependencies:It also enables qla_target.c usage within existing qla2xxx LLD code.
This includes:*) Addition of target mode specific members to existing data
structures in qla_def.h and struct qla_hw_data->tgt_ops using
qla_target.h:struct qla_tgt_func_tmpl*) Addition of struct qla_tgt_func_tmpl and direct calls into
qla_target.c logic w/ qlt_* prefixed functions.*) Addition of qla_iocb.c:qla2x00_req_pkt() for ring processing, and
qla2x00_issue_marker() for handling request/response queue processing
for target mode operation*) Addition of various qla_tgt_mode_enabled() logic checks in
qla24xx_nvram_config(), qla2x00_initialize_adapter(), qla2x00_rff_id(),
qla2x00_abort_isp(), qla24xx_modify_vp_config(), and
qla2x00_vp_abort_isp().By default the new qlini_mode module parameter is setting initiator-mode
to 'enabled' in order for 'modprobe qla2xxx' to continue to function as
expected in initiator only mode. Enabling target-mode operation will
currently require a:modprobe qla2xxx qlini_mode="disabled"
in order to explictly disabled initiator mode and allow target-mode
to be enabled via tcm_qla2xxx configfs fabric callers.(nab: Convert to qlini_mode='enabled' by default in qla_target.c)
(joern: Remove loop_id from qla_tgt_make_local_sess() arguments +
Remove unused s_id + fix s_id endianness bug +
simplify qla_tgt_abort_work)
(gerard: fix section __exit mismatch in qla_tgt_exit)
(arun: Capture ATIO queue during firmware dump + Send SCR in target mode +
Target mode review comments)
(roland: Don't create duplicate target sessions to address tearing down
ACLs with IO in flight + Add missing call to qlt_fc_port_deleted
call during qla2x00_schedule_rport_del timeout)Signed-off-by: Nicholas A. Bellinger
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
commit 491118dff9aeb207408bd42aa4897bc2c145747f
Author: Saurav Kashyap
Date: Tue Aug 16 11:31:50 2011 -0700[SCSI] qla2xxx: During loopdown perform Diagnostic loopback.
The LOOP_DOWN test is not needed.
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Joe Carnuccio
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Saurav Kashyap
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Joe Carnuccio
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
The field vp_idx in struct fc_port is a redundant/mirror copy of
the same field in struct scsi_qla_host;struct fc_port has a pointer vha to scsi_qla_host which allows
the original copy of vp_idx to be readily accessed.Signed-off-by: Joe Carnuccio
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Nigel Kirkland
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Both the target-id and LUN are munged in the original printk().
Signed-off-by: Andrew Vasquez
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Currently stats is part of ha data structure, common for physical and virtual
ports. Moved the stats to vha, each port will have its own stat.Signed-off-by: Saurav Kashyap
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Add an extra layer of logging granularity for messages that are necessary in
some circumstances but may flood the kernel log buffer with too many messages
otherwise.Signed-off-by: Saurav Kashyap
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
If interrupt registration failed we could crash the machine as we were trying
to deference some pointers which weren't allocated yet. Move the allocation
a little earlier and make some checks to the free resource code to make sure
that we don't try to free a resource that was never allocated.Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Signed-off-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Correct spelling "occured" to "occurred" in
drivers/scsi/qla2xxx/qla_mbx.cSigned-off-by: Masanari Iida
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Optimized queuecommand handler's to eliminate double head-room checks.
The checks are moved inside the 1st if-loop otherwise you would end up checking twice when there is
enough head room.Signed-off-by: Chetan Loke
Reviewed-by: Andrew Vasquez
Reviewed-by: Giridhar Malavali
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
Replace "Inconisistent" with "Inconsistent" in drivers/scsi/qla2xxx/qla_init.c
Signed-off-by: Raul Porcel
Signed-off-by: Chad Dupuis
Signed-off-by: James Bottomley -
For scsi devices which use scsi bus runtime callback, runtime suspend
will call scsi_dev_type_suspend, and if the drv->suspend failed, the
device will still be in active state. But since scsi_device_quiesce is
called, the device will not be able to respond any more commands.
So add a check here to see if err occured, if so, bring the device back
to normal state with scsi_device_resume.Signed-off-by: Aaron Lu
Acked-by: Alan Stern
Signed-off-by: James Bottomley -
Made changes to set the fc_host sysfs entries supported_speeds,
supported_classes etc., during the vport creation from the
FC transport template.Signed-off-by: Krishna Gudipati
Signed-off-by: James Bottomley -
Signed-off-by: Bhanu Prakash Gollapudi
Signed-off-by: James Bottomley -
When the task management IO times out, or a flush operation is performed while
task management IO is pending, driver is not cleaning up the IO. This patch
cleans up the IO for the above cases.Signed-off-by: Bhanu Prakash Gollapudi
Signed-off-by: James Bottomley -
When IO abort times out during eh_abort or a flush operation is performed while
abort is pending, the driver is not cleaning up the IO and thus not reducing
the IO reference count. With this change, as part of explicit logout, the IO is
cleaned up.Signed-off-by: Bhanu Prakash Gollapudi
Signed-off-by: James Bottomley -
Commit 907c07d45199f954ddcf66c2c9763c87d012cb15 added more cases to do FLOGI
retry on receiving bad response. Remove the code that drops the packet and
allow the stack to handle bad FLOGI response.Signed-off-by: Bhanu Prakash Gollapudi
Signed-off-by: James Bottomley -
When using the MERAM the LCDC line size needs to be programmed with a
MERAM-specific value different than the real frame buffer pitch. Fix it.Reported-by: Guennadi Liakhovetski
Signed-off-by: Laurent Pinchart
Acked-by: Florian Tobias Schandinat
Cc: stable@vger.kernel.org # for 3.4
Signed-off-by: Linus Torvalds -
Pull core irq changes from Ingo Molnar:
"A collection of small fixes."By Thomas Gleixner
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hexagon: Remove select of not longer existing Kconfig switches
arm: Select core options instead of redefining them
genirq: Do not consider disabled wakeup irqs
genirq: Allow check_wakeup_irqs to notice level-triggered interrupts
genirq: Be more informative on irq type mismatch
genirq: Reject bogus threaded irq requests
genirq: Streamline irq_action -
Pull security subsystem updates from James Morris:
"New notable features:
- The seccomp work from Will Drewry
- PR_{GET,SET}_NO_NEW_PRIVS from Andy Lutomirski
- Longer security labels for Smack from Casey Schaufler
- Additional ptrace restriction modes for Yama by Kees Cook"Fix up trivial context conflicts in arch/x86/Kconfig and include/linux/filter.h
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (65 commits)
apparmor: fix long path failure due to disconnected path
apparmor: fix profile lookup for unconfined
ima: fix filename hint to reflect script interpreter name
KEYS: Don't check for NULL key pointer in key_validate()
Smack: allow for significantly longer Smack labels v4
gfp flags for security_inode_alloc()?
Smack: recursive tramsmute
Yama: replace capable() with ns_capable()
TOMOYO: Accept manager programs which do not start with / .
KEYS: Add invalidation support
KEYS: Do LRU discard in full keyrings
KEYS: Permit in-place link replacement in keyring list
KEYS: Perform RCU synchronisation on keys prior to key destruction
KEYS: Announce key type (un)registration
KEYS: Reorganise keys Makefile
KEYS: Move the key config into security/keys/Kconfig
KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat
Yama: remove an unused variable
samples/seccomp: fix dependencies on arch macros
Yama: add additional ptrace scopes
... -
…sty/linux-2.6-for-linus
Pull virtio updates from Rusty Russell.
* tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
virtio: fix typo in comment
virtio-mmio: Devices parameter parsing
virtio_blk: Drop unused request tracking list
virtio-blk: Fix hot-unplug race in remove method
virtio: Use ida to allocate virtio index
virtio: balloon: separate out common code between remove and freeze functions
virtio: balloon: drop restore_common()
9p: disconnect channel when PCI device is removed
virtio: update documentation to v0.9.5 of spec -
- Delete "@request_vqs" and "@free_vqs" comments, since
they are no longer in struct virtio_config_ops.
- According to the macro below, "@val" should be "@v".Signed-off-by: Chen Baozi
Signed-off-by: Rusty Russell -
This patch adds an option to instantiate guest virtio-mmio devices
basing on a kernel command line (or module) parameter, for example:virtio_mmio.devices=0x100@0x100b0000:48
Signed-off-by: Pawel Moll
Signed-off-by: Rusty Russell -
Benchmark shows small performance improvement on fusion io device.
Before:
seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msecAfter:
seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msecSigned-off-by: Asias He
Signed-off-by: Rusty Russell