Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch fixes the following compiler warning:
drivers/scsi/fcoe/fcoe_ctlr.c: In function fcoe_sysfs_fcf_add:
drivers/scsi/fcoe/fcoe_ctlr.c:211:1: warning: the frame size of 1480 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
FCoE debug statements must end in a newline. Add one where it is missing.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
The function fcoe_ctlr_mode_set() is local, hence declare it static.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
This patch avoids that the FCoE initiator sends a REC message after
having received a SCSI response with non-zero status and non-zero
DATA IN buffer length.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
While the FCoE initiator driver invokes fc_exch_done() from inside
the libfc response handler, FCoE target drivers typically invoke
fc_exch_done() from outside the libfc response handler. The object
fc_exch.arg points at may disappear as soon as fc_exch_done() has
finished. So it's important not to invoke the response handler
function after fc_exch_done() has finished. Modify libfc such that
this guarantee is provided if fc_exch_done() is invoked from
outside a response handler. This patch fixes a sporadic crash in
FCoE target implementations after a command has been aborted.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Reduce the time during which the exchange lock is held by allocating
a frame before obtaining the exchange lock.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Calling fc_seq_send() after an ABTS message has been received triggers
a kernel warning (WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT))). Avoid
this by returning -ENXIO to the caller if fc_seq_send() is invoked after
an ABTS message has been received.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
This patch avoids that the WARN_ON(!(ep->esb_stat & ESB_ST_SEQ_INIT))
statement in fc_seq_send_locked() gets triggered sporadically when
running FCoE target code due to concurrent ep->esb_stat modifications.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
It is allowed to pass a zero timeout value to fc_seq_exch_abort().
Avoid that this can cause the timeout function to drop the exchange
reference before it has been increased by fc_exch_timer_set_locked().
This patch fixes a crash when running FCoE target code with poisoning
enabled in the memory allocator.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
The condition ep != NULL && ep->xid != xid can never be met. Make
this explicit.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Convert a loop into an ilog2() call. Although this code is not performance
sensitive this conversion makes this code easier to read.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
The second argument of fc_lport_error() may be a valid frame pointer.
Hence only print it as an error code if it really is an error code.
Debug statements must end in a newline. Add one where it is missing.
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Change 'initiaive' into 'initiative', 'remainig' into 'remaining'
and change 'exected' into 'expected'.
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
the return codes from fcoe_rcv should be NET_RX_*, not 0 or -1.
Signed-off-by: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Based on my last patch I noticed that fcoe_rcv has a simmilar problem, in that
it manipulates the passed in skb without checking to see if it has other users.
Making manipulations to a shared skb can result in various corruptions.
Easy fix, just make sure the skb is unshared prior to doing anything with it.
Signed-off-by: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Recently had this Oops reported to me on the 3.10 kernel:
[ 807.554955] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[ 807.562799] IP: [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70
[ 807.568296] PGD 20c889067 PUD 20c8b8067 PMD 0
[ 807.572769] Oops: 0002 [#1] SMP
[ 807.655597] Hardware name: Dell Inc. PowerEdge R415/0DDT2D, BIOS 1.8.6 12/06/2011
[ 807.663079] Workqueue: events fcoe_ctlr_recv_work [libfcoe]
[ 807.668656] task: ffff88020b42a160 ti: ffff88020ae6c000 task.ti: ffff88020ae6c000
[ 807.676126] RIP: 0010:[<ffffffff814e6fc7>] [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70
[ 807.684046] RSP: 0000:ffff88020ae6dd70 EFLAGS: 00010097
[ 807.689349] RAX: 0000000000000246 RBX: ffff8801d04d6700 RCX: 0000000000000000
[ 807.696474] RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff88020df26434
[ 807.703598] RBP: ffff88020ae6dd88 R08: 00000000000173e0 R09: ffff880216e173e0
[ 807.710723] R10: ffffffff814e5897 R11: ffffea0007413580 R12: ffff88020df26420
[ 807.717847] R13: ffff88020df26434 R14: 0000000000000004 R15: ffff8801d04c42ce
[ 807.724972] FS: 00007fdaab6048c0(0000) GS:ffff880216e00000(0000) knlGS:0000000000000000
[ 807.733049] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 807.738785] CR2: 0000000000000008 CR3: 000000020cbc9000 CR4: 00000000000006f0
[ 807.745910] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 807.753033] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 807.760156] Stack:
[ 807.762162] ffff8801d04d6700 0000000000000001 ffff88020df26400 ffff88020ae6de20
[ 807.769586] ffffffffa0444409 ffff88020b046a00 ffff88020ae6dde8 ffffffff810105be
[ 807.777008] ffff88020b42a868 0000000000000000 ffff88020df264a8 ffff88020df26348
[ 807.784431] Call Trace:
[ 807.786885] [<ffffffffa0444409>] fcoe_ctlr_recv_work+0x59/0x9a0 [libfcoe]
[ 807.793755] [<ffffffff810105be>] ? __switch_to+0x13e/0x4a0
[ 807.799324] [<ffffffff8107d0e6>] process_one_work+0x176/0x420
[ 807.805151] [<ffffffff8107dd0b>] worker_thread+0x11b/0x3a0
[ 807.810717] [<ffffffff8107dbf0>] ? rescuer_thread+0x350/0x350
[ 807.816545] [<ffffffff810842b0>] kthread+0xc0/0xd0
[ 807.821416] [<ffffffff810841f0>] ? insert_kthread_work+0x40/0x40
[ 807.827503] [<ffffffff8160ce2c>] ret_from_fork+0x7c/0xb0
[ 807.832897] [<ffffffff810841f0>] ? insert_kthread_work+0x40/0x40
[ 807.858500] RIP [<ffffffff814e6fc7>] skb_dequeue+0x47/0x70
[ 807.864076] RSP <ffff88020ae6dd70>
[ 807.867558] CR2: 0000000000000008
Looks like the root cause is the fact that the packet recieve function
fcoe_ctlr_recv enqueues the skb to a sk_buff_head_list prior to ensuring that
the skb is unshared. This can happen when multiple packet listeners recieve an
skb, as the deliver_skb function just increments skb->users for each handler.
As a result, having multiple users of a single skb results in multiple
manipulators of its methods, implying list corruption, and the oops recorded
above.
The fix is pretty easy, just make sure that we clone the skb if its got multiple
users with the skb_share_check function, like other protocols do.
Signed-off-by: Neil Horman <[email protected]>
Signed-off-by: Robert Love <[email protected]>
|
|
Tyops should be fixed.
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata changes from Tejun Heo:
"Two interesting changes.
- libata acpi handling has been restructured so that the association
between ata devices and ACPI handles are less convoluted. This
change shouldn't change visible behavior.
- Queued TRIM support, which enables sending TRIM to the device
without draining in-flight RW commands, is added. Currently only
enabled for ahci (and likely to stay that way for the foreseeable
future).
Other changes are driver-specific updates / fixes"
* 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
libata: bugfix: Remove __le32 in ata_tf_to_fis()
libata: acpi: Remove ata_dev_acpi_handle stub in libata.h
libata: Add support for queued DSM TRIM
libata: Add support for SEND/RECEIVE FPDMA QUEUED
libata: Add H2D FIS "auxiliary" port flag
libata: Populate host-to-device FIS "auxiliary" field
ata: acpi: rework the ata acpi bind support
sata, highbank: send extra clock cycles in SGPIO patterns
sata, highbank: set tx_atten override bits
devicetree: create a separate binding description for sata_highbank
drivers/ata/sata_rcar.c: simplify use of devm_ioremap_resource
sata highbank: enable 64-bit DMA mask when using LPAE
ata: pata_samsung_cf: add missing __iomem annotation
ata: pata_arasan: Staticize local symbols
sata_mv: Remove unneeded CONFIG_HAVE_CLK ifdefs
ata: use dev_get_platdata()
sata_mv: Remove unneeded forward declaration
libata: acpi: remove dead code for ata_acpi_(un)bind
libata: move 'struct ata_taskfile' and friends from ata.h to libata.h
|
|
Pull first round of SCSI updates from James Bottomley:
"This patch set is a set of driver updates (ufs, zfcp, lpfc, mpt2/3sas,
qla4xxx, qla2xxx [adding support for ISP8044 + other things]).
We also have a new driver: esas2r which has a number of static checker
problems, but which I expect to resolve over the -rc course of 3.12
under the new driver exception.
We also have the error return that were discussed at LSF"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (118 commits)
[SCSI] sg: push file descriptor list locking down to per-device locking
[SCSI] sg: checking sdp->detached isn't protected when open
[SCSI] sg: no need sg_open_exclusive_lock
[SCSI] sg: use rwsem to solve race during exclusive open
[SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0
[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
[SCSI] qla2xxx: Update the driver version to 8.06.00.08-k.
[SCSI] qla2xxx: print MAC via %pMR.
[SCSI] qla2xxx: Correction to message ids.
[SCSI] qla2xxx: Correctly print out/in mailbox registers.
[SCSI] qla2xxx: Add a new interface to update versions.
[SCSI] qla2xxx: Move queue depth ramp down message to i/o debug level.
[SCSI] qla2xxx: Select link initialization option bits from current operating mode.
[SCSI] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support.
[SCSI] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware doesn't provide it
[SCSI] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log for normal temperature AEN
[SCSI] qla2xxx: Correct Interrupt Register offset for ISPFX00
[SCSI] qla2xxx: Remove handling of Shutdown Requested AEN from qlafx00_process_aen().
[SCSI] qla2xxx: Send all AENs for ISPFx00 to above layers.
[SCSI] qla2xxx: Add changes in initialization for ISPFX00 cards with BIOS
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core patches from Greg KH:
"Here's the big driver core pull request for 3.12-rc1.
Lots of tiny changes here fixing up the way sysfs attributes are
created, to try to make drivers simpler, and fix a whole class race
conditions with creations of device attributes after the device was
announced to userspace.
All the various pieces are acked by the different subsystem
maintainers"
* tag 'driver-core-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (119 commits)
firmware loader: fix pending_fw_head list corruption
drivers/base/memory.c: introduce help macro to_memory_block
dynamic debug: line queries failing due to uninitialized local variable
sysfs: sysfs_create_groups returns a value.
debugfs: provide debugfs_create_x64() when disabled
rbd: convert bus code to use bus_groups
firmware: dcdbas: use binary attribute groups
sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
driver core: add #include <linux/sysfs.h> to core files.
HID: convert bus code to use dev_groups
Input: serio: convert bus code to use drv_groups
Input: gameport: convert bus code to use drv_groups
driver core: firmware: use __ATTR_RW()
driver core: core: use DEVICE_ATTR_RO
driver core: bus: use DRIVER_ATTR_WO()
driver core: create write-only attribute macros for devices and drivers
sysfs: create __ATTR_WO()
driver-core: platform: convert bus code to use dev_groups
workqueue: convert bus code to use dev_groups
MEI: convert bus code to use dev_groups
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc patches from Greg KH:
"Here is the big char/misc driver pull request for 3.12-rc1
Lots of driver updates all over the char/misc tree, full details in
the shortlog"
* tag 'char-misc-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (62 commits)
drivers: uio: Kconfig: add MMU dependancy for UIO
drivers: uio: Add driver for Humusoft MF624 DAQ PCI card
drivers: uio_pdrv_genirq: use dev_get_platdata()
drivers: uio_pruss: use dev_get_platdata()
drivers: uio_dmem_genirq: use dev_get_platdata()
drivers: parport: Kconfig: exclude h8300 for PARPORT_PC
drivers: misc: ti-st: fix potential race if st_kim_start fails
Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely
misc: vmw_balloon: Remove braces to fix build for clang.
Drivers: hv: vmbus: Fix a bug in the handling of channel offers
vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()
VMCI: Add support for virtual IOMMU
VMCI: Remove non-blocking/pinned queuepair support
uio: uio_pruss: remove unnecessary platform_set_drvdata()
parport: amiga: remove unnecessary platform_set_drvdata()
vme: vme_vmivme7805.c: add missing __iomem annotation
vme: vme_ca91cx42.c: add missing __iomem annotation
vme: vme_tsi148.c: add missing __iomem annotation
drivers/misc/hpilo: Correct panic when an AUX iLO is detected
uio: drop unused vma_count member in uio_device struct
...
|
|
Push file descriptor list locking down to per-device locking. Let sg_index_lock
only protect device lookup.
sdp->detached is also set and checked with this lock held.
Signed-off-by: Vaughan Cao <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
@detached is set under the protection of sg_index_lock. Without getting the
lock, new sfp will be added during sg removal and there is no chance for it
to be picked out. So check with sg_index_lock held in sg_add_sfp().
Signed-off-by: Vaughan Cao <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Open exclusive check is protected by o_sem, no need sg_open_exclusive_lock.
@exclude is used to record which type of rwsem we are holding.
Signed-off-by: Vaughan Cao <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
A race condition may happen if two threads are both trying to open the same sg
with O_EXCL simultaneously. It's possible that they both find fsds list is
empty and get_exclude(sdp) returns 0, then they both call set_exclude() and
break out from wait_event_interruptible and resume open.
Now use rwsem to protect this process. Exclusive open gets write lock and
others get read lock. The lock will be held until file descriptor is closed.
This also leads 'exclude' only a status rather than a check mark.
Signed-off-by: Vaughan Cao <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
unmap_alignment != 0
Commit b90ebc3d5c41c9164ae04efd2e4f8204c2a186f1 ("[SCSI] scsi_debug:
fix logical block provisioning support") fixed several issues with
logical block provisioning support, but it still doesn't properly fix
the cases when unmap_alignment > 0.
For example, load scsi_debug module with the following module parameters
and make all blocks mapped by filling the storage with zero.
# modprobe scsi_debug lbpu=1 unmap_alignment=1 unmap_granularity=4
# dd if=/dev/zero of=$DEV
Then, try to unmap the first unmappable blocks at lba=1, but GET LBA STATUS
unexpectedly reports that the last UNMAP has done nothing.
# sg_unmap --lba=1 --num=4 $DEV
# sg_get_lba_status --lba=1 $DEV
descriptor LBA: 0x0000000000000001 blocks: 16383 mapped
The problem is in map_index_to_lba(), which should return the first
LBA which is corresponding to a given index of provisioning map
(map_storep).
Signed-off-by: Akinobu Mita <[email protected]>
Acked-by: "Martin K. Petersen" <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
With module parameter num_parts > 0, partition table is built on the
ramdisk storage when loading the driver. Unfortunately, there is an
endianness bug in sdebug_build_parts(). So the partition table is not
correctly initialized on big-endian systems.
Signed-off-by: Akinobu Mita <[email protected]>
Tested-by: Martin Peschke <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Giridhar Malavali <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Giridhar Malavali <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
At mailbox/buffer debug level, print the correct values of the
outgoing and incoming mailbox registers.
Signed-off-by: Joe Carnuccio <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
On any Adapter when we flash through FC/FCoE without card reset option it still
shows the Running FW version in Flashed FW version. This new interface will be
used by API to instruct the driver to update its cache versions.
Signed-off-by: Sawan Chandak <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Unless there is a need to observe them, the queue depth ramp up/down messages
are a nuisance and may cause the system to become unresponsive so move it a
non-default logging level.
Signed-off-by: Chad Dupuis <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
operating mode.
Signed-off-by: Joe Carnuccio <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Earlier IDC-TIME-EXTEND aen was a nop and ignored by driver.
We now have to handle the aen so that other protocol drivers can use time
extension during some loopback operations.
Signed-off-by: Santosh Vernekar <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
firmware doesn't provide it
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
add log for normal temperature AEN
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
qlafx00_process_aen().
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Add the missing FCP statistics to sysfs.
Add reset FCP statistics functionality via sysfs.
Signed-off-by: Joe Carnuccio <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
requires a port down more readable.
Signed-off-by: Chad Dupuis <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Armen Baloyan <[email protected]>
Acked-by: Srinivasa Rao <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
shut down.
Signed-off-by: Armen Baloyan <[email protected]>
Acked-by: Srinivasa Rao <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
For supported ISPS, Read asic temperature by calling the
GET PARAMS (type C) mailbox command.
Signed-off-by: Joe Carnuccio <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Joe Carnuccio <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Chad Dupuis <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|
|
Signed-off-by: Armen Baloyan <[email protected]>
Signed-off-by: Saurav Kashyap <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
|