aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-12-04[SCSI] libfc: add FC-BB-5 LESB counters to fcoe_dev_statsYi Zou1-0/+4
FC-BB-5 Rev2.0, Clause 7.10 extends the FC-LS-3 LESB for FC-BB_E. We are already tracking Link Failure Count so add the rest in this patch. For VLinkFailureCount and MissDiscAdvCount, they are part of the per-cpu fcoe_dev_stats. For SymbolErrorCount, ErroredBlockCount, and FCSErrorCount, they are defined in IEEE 802.3-2008 and are per LLD. They are expected to come from LLD. 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: allow SCSI-FCP to be processed directly in softirq contextChris Leech1-110/+135
Allow FCP frames to bypass the FCoE receive processing threads and handle them directly in softirq context, if they are received on the correct CPU. This preserves the queuing to threads for scaling out receive processing to multiple CPUs, but allows FCoE-aware multi-queue network drivers that direct frames to the originating CPUs to handle FCP processing with less scheduling latency. Only FCP is handled directly, because libfc makes use of mutexes in ELS handling routines. The bulk of this change is just moving the FCoE receive processing out of the receive thread function, leaving behind just the thread and queue management. The interesting bits are in fcoe_rcv() Signed-off-by: Chris Leech <christopher.leech@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 payload size passed to fc_frame_alloc() in fc_lport_els_requestYi Zou1-2/+1
Frame header room is already incluced, just pass the length of payload. 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] lpfc 8.3.6 : Update lpfc driver version to 8.3.6James Smart1-1/+1
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.6 : Hardware related fixes and changesJames Smart5-104/+133
Hardware related Fixes and Changes. - Added new Adapter IDs and update default Adapter names. - Added PCI read after EQarm doorbell PCI write to flush the write and avoid spurrious interrupts when in INTx mode. - Phase out use of ONLINE registers. - Fix for lost MSI interrupt Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.6 : Fix critical errorsJames Smart3-13/+38
Fix errors relating to crashes and hangs. - Fix crash due to list corruption while unloading driver. - Fix panic during pci-hot-plug testing. - Fix panic when unmapping luns. - Fixed total_scsi_bufs counting could cause exhausted memory. - Fixed locking issue causing hang. - Fixed the call from lpfc_new_scsi_buf_s3 to use lpfc_release_scsi_buf_s3. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.6 : Fix AER issuesJames Smart3-12/+60
Fix AER issues. - Made AER sysfs entry point return "Operation not permitted" to OneConnect HBAs - Stop and abort all I/Os on HBA for AER uncorrectable non-fatal error handling Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.6 : FC Protocol FixesJames Smart12-119/+235
FC protocol fixes. - Fix send sequence logic to handle multi SGL IOCBs. - Fix FDISC completion always setting VPORT state to failed. - Ported the fix on reporting of max_vpi to uppper layer. - Fix incorrect number of Vports allowed to be created. - Fixed Dead FCoE port after creating vports. - Added handling of ELS request for Reinstate Recovery Qualifier (RRQ) - Handle unsolicited CT exchange initiator receiving CT exchange ABTS - Migrate LUN queue depth ramp up code to scsi mid-layer. - Made ABTS WQE go to the same WQ as the WQE to be aborted. - Fix Vport does not rediscover after FCF goes away. - Fixed lpfc_unreg_vfi failure after devloss timeout. - Fixed RPI bit leak. - Fix hbq pointer corruption during target discovery. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.6 : FCoE Protocol FixesJames Smart10-21/+56
FCoE Protocol fixes. - Fixed FIP frame designation for ELS commands. - Fix CVL received on Port 1 not processed by driver. - Fix Zeroed frame on wire after FLOGI - Fix vport keep-alive does not contain the correct WWN. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] st: fix test of value range in st_set_options()Roel Kluin1-1/+2
value cannot logically be less than START and greater than BUFFERSIZE. #define EXTENDED_SENSE_START 18 // vi include/scsi/scsi_cmnd.h +105 #define SCSI_SENSE_BUFFERSIZE 96 [akpm@linux-foundation.org: fix warning] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] fix func names in kernel-docRandy Dunlap1-2/+2
Fix scsi_devinfo.c kernel-doc function names to match actual function names. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] osd_protocol.h: Add missing #includeMartin Michlmayr1-0/+1
include/scsi/osd_protocol.h uses ALIGN() without an #include <linux/kernel.h>, leading to: | include/scsi/osd_protocol.h:362: error: implicit declaration of function 'ALIGN' Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libosd: Error handling revampedBoaz Harrosh2-12/+99
Administer some love to the osd_req_decode_sense function * Fix a bad bug with osd_req_decode_sense(). If there was no scsi residual, .i.e the request never reached the target, then all the osd_sense_info members where garbage. * Add grossly missing in/out_resid to osd_sense_info and fill them in properly. * Define an osd_err_priority enum which divides the possible errors into 7 categories in ascending severity. Each category is also assigned a Linux return code translation. Analyze the different osd/scsi/block returned errors and set the proper osd_err_priority and Linux return code accordingly. * extra check a few situations so not to get stuck with inconsistent error view. Example an empty residual with an error code, and other places ... Lots of libosd's osd_req_decode_sense clients had this logic in some form or another. Consolidate all these into one place that should actually know about osd returns. Thous translating it to a more abstract error. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libosd: Bugfix of error handling in attributes-list decodingBoaz Harrosh1-0/+1
When an error was detected in an attribute list do to a target bug. We would print an error but spin endlessly regardless. Fix it. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libosd: bug in osd_req_decode_sense_full()Boaz Harrosh1-4/+5
The (never tested) osd_sense_attribute_identification case has never worked. The loop was never advanced on. Fix it to work as intended. On 10/30/2009 04:39 PM, Roel Kluin wrote: I found this by code analysis, searching for while loops that test a local variable, but do not modify the variable. Reported-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libosd: osd_dev_info: Unique Identification of an OSD deviceBoaz Harrosh3-13/+151
Define an osd_dev_info structure that Uniquely identifies an OSD device lun on the network. The identification is built from unique target attributes and is the same for all network/SAN machines. osduld_info_lookup() - NEW New API that will lookup an osd_dev by its osd_dev_info. This is used by pNFS-objects for cross network global device identification. And by exofs multy-device support, the device info is specified in the on-disk exofs device table. osduld_device_info() - NEW Given an osd_dev handle returns its associated osd_dev_info. The ULD fetches this information at startup and hangs it on each OSD device. (This is a fast operation that can be called at any condition) osduld_device_same() - NEW With a given osd_dev at one hand and an osd_dev_info at another, we would like to know if they are the same device. Two osd_dev handles can be checked by: osduld_device_same(od1, osduld_device_info(od2)); osd_auto_detect_ver() - REVISED Now returns an osd_dev_info structure. Is only called once by ULD as before. See added comments for how to use. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] osduld: Use device->release instead of internal krefBoaz Harrosh2-86/+77
The true logic of this patch will be clear in the next patch where we use the class_find_device() API. When doing so the use of an internal kref leaves us a narrow window where a find is started while the actual object can go away. Using the device's kobj reference solves this problem because now the same kref is used for both operations. (Remove and find) Core changes * Embed a struct device in uld_ structure and use device_register instead of devie_create. Set __remove to be the device release function. * __uld_get/put is just get_/put_device. Now every thing is accounted for on the device object. Internal kref is removed. * At __remove() we can safely de-allocate the uld_ structure. (The function has moved to avoid forward declaration) Some cleanups * Use class register/unregister is cleaner for this driver now. * cdev ref-counting games are no longer necessary I have incremented the device version string in case of new bugs. Note: Previous bugfix of taking the reference around fput() still applies. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] osduld: Ref-counting bug fixBoaz Harrosh1-0/+8
If scsi has released the device (logout), and exofs has last reference on the osduld_device it will be freed by osd_uld_release() within the call to fput(). But this will oops in cdev_release() which is called after the fops->release. (cdev is embedded within osduld_device). __uld_get/put pair makes sure we have a cdev for the duration of fput() Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libosd: osd_sense: OSD_CFO_PERMISSIONSBoaz Harrosh1-0/+3
Add one more important cdb_field_offset that can be returned with scsi_invalid_field_in_cdb. It is the offset of the permissions_bit_mask field in the capabilities structure. Interestingly, the offset is the same for V1/V2 Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libosd: osd_dev_is_ver1 - Minor API cleanupBoaz Harrosh1-6/+10
define a new osd_dev_is_ver1 that operates on devices and the old osd_req_is_ver1 uses that new API. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.5: Update the lpfc driver version to 8.3.5James Smart1-2/+1
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.5: fix fcp command polling, add FIP mode, performance optimisations and devloss timout fixesJames Smart12-277/+307
This patch includes the following changes: - Fixed Panic/Hang when using polling mode for fcp commands - Added support for Read_rev mbox bits indicating FIP mode of HBA - Optimize performance of slow-path handling of els responses - Add code to cleanup orphaned unsolicited receive sequences - Fixed Devloss timeout when multiple initiators are in same zone Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.5: Add AER supportJames Smart4-24/+278
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.5: fix sysfs parameters, vport creation and other bugs and update loggingJames Smart12-197/+214
This patch include the following fixes and changes: - Fix crash when "error" is echoed to board_mode sysfs parameter - Fix FCoE Parameter parsing in regions 23 - Fix driver crash when creating vport with large number of targets on SLI4 - Fix bug with npiv message being logged when it is not supported by the adapter - Fix a potential dereferencing mailbox structure after free bug - Fix firmware crash after vport create with high target count - Error out requests to set board_mode to warm restart via sysfs on SLI4 HBAs - Fix Block guard logging - Fix a memory corruption issue during GID_FT IO prep - Fix crash while processing unsolicited FC frames - Fix failed to allocate XRI message is not a critical failure - Update and fix formatting in some log messages - Fix missing new line characters in log messages - Removed the use of the locally defined FC transport layer related macros - Check the rsplen in lpfc_handle_fcp_err function before using rsplen Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.5: fix VPI registration, error clean up and add support for vlink eventsJames Smart11-47/+498
This patch includes the following fixes and new features: - Fix mask size for CT field in WQE - Fix VPI base not used when unregistering VPI on port 1. - Fix UNREG_VPI mailbox command to unreg the correct VPI - Fixed Check for aborted els command - Fix error when trying to load driver with wrong firmware on FCoE HBA. - Fix bug with probe_one routines not putting the Scsi_Host back upon error - Add support for Clear Virtual Link Async Events - Add support for unsolicited CT exchange sequence abort - Add 0x0714 OCeXXXXX PCI ID Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] lpfc 8.3.5: fix reset path, ELS ordering and discovery issuesJames Smart9-220/+242
This patch includes the following fixes: - Fixed panic during HBA reset. - Fixed FCoE event tag passed in resume_rpi. - Fix out of order ELS commands - Fixed discovery issues found during VLAN testing. - Fix UNREG_VPI failure on extended link pull - Fixed crash while processing unsolicited FC frames. - Clear retry count in the delayed ELS handler - Fixed discovery failure during quick link bounce. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libiscsi: hook into ramp up/down handlingMike Christie1-3/+12
It is rare to get a queue full with iscsi, because targets seem to just reduce the iscsi cmd window. However, there is at least one iscsi target that will throw a queue full when overloaded. This hooks the iscsi code in to the ramp up/down code, so we can handle it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] iser: set tgt and lu reset timeoutMike Christie1-0/+1
When iser enabled lu reset support it did not set the bit to allow userspace to get/set the timeout. This sets the tgt and lu reset timeout bits. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] iscsi class: modify handling of replacement timeoutMike Christie1-4/+5
This patch modifies the replacement/recovery_timeout so it works more like the fc fast io fail tmo. If userspace tries to set the replacement/recovery_timeout to less than zero, we will turn off the forced recovery cleanup. If userspace sets the value to 0 then we will force the recovery cleanup immediately. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libiscsi: add warm target reset tmf supportMike Christie8-77/+190
This implements warm target reset tmf support for the scsi-ml target reset callback. Previously we would just drop the session in that callback. This patch will now try a target reset and if that fails drop the session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libiscsi: Check TMF state before sending PDUMike Christie2-12/+103
Patch and mail from both MikeC and HannesR: Before we're trying to send a PDU we have to check whether a TMF is active. If so and if the PDU will be affected by the TMF we should allow only Data-out PDUs to be sent. If fast_abort is set, no Data-out PDUs will be sent while a LUN reset is being processed for a affected LUN. fast_abort is now ingored during a ABORT TASK tmf. We will not send any Data-outs for a task if the task is being aborted. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libiscsi: fix login/text checks in pdu injection codeMike Christie1-6/+15
For some reason we used to check for the the immediate bit set and the opcocde in many places instead of just masking the opcode. In the passthrough code this is a problem because userspace may or may not have set the immediate bit and it does not have to. This fixes up the opcode checks in the passthrough code, so we mask off the opcode then check against the iscsi proto definition like is done in other places. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] bnx2i: use common iscsi suspend queueMike Christie2-8/+1
This just has bnx2i use the iscsi_suspend_queue helper. The suspend works as follows: When ep_poll has succeeed iscsid will call conn_bind, the LLD will then call iscsi_conn_bind which will clear the suspend bit. When ep_disconnect is called (or if there is a conn error) we set the suspend bit. For the ep_disconnect case I added a helper in the previous kernel that will take the session lock to make sure iscsi_queuecommand/xmit_task is not running and it will set the suspend bit. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] scsi_devinfo: update Hitachi entries (v2)Takahiro Yasui1-5/+4
Four models, OPEN-/DF400/DF500/DISK-SUBSYSTEM, can handle REPORT_LUN, and the BLIST_REPORTLUN2 flag needs to be set. And DF600 doesn't require any flags because it returns ANSI 03h (SPC). Signed-off-by: Takahiro Yasui <tyasui@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] add scsi target reset support to scsi ioctlMike Christie1-0/+3
The scsi ioctl code path was missing scsi target reset support. This patch just adds it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] fc class: fail fast bsg requestsMike Christie1-2/+3
If the port state is blocked and the fast io fail tmo has fired then this patch will fail bsg requests immediately. This is needed if userspace is sending IOs to test the transport like with fcping, so it will not have to wait for the dev loss tmo. With this patch he bsg req fast io fail code behaves like the normal and sg io/passthrough fast io fail. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-By: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] pm8001: Fixes for tag alloc, error goto and code cleanupjack_wang2-35/+36
Allocate right size for bitmap tag,fix error goto and cleanup print message and undocable commemts. patch attached. Signed-off-by: Lindar Liu <lindar_liu@usish.com> Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] pm8001: enhance IOMB process modulesjack_wang2-106/+141
We set interupt cascading count of outbound queue to get better performance, correct some unnecessary return values and some noisy print messages. patch attached. Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: Lindar Liu <lindar_liu@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] pm8001: add reinitialize SPC parameters before phy startjack_wang4-12/+85
Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: Lindar Liu <lindar_liu@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] scsi_lib_dma: fix bug with dma maps on nested scsi objectsJames Bottomley5-8/+30
Some of our virtual SCSI hosts don't have a proper bus parent at the top, which can be a problem for doing DMA on them This patch makes the host device cache a pointer to the physical bus device and provides an extra API for setting it (the normal API picks it up from the parent). This patch also modifies the qla2xxx and lpfc vport logic to use the new DMA host setting API. Acked-By: James Smart <james.smart@emulex.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] scsi_dh: create sysfs file, dh_state for all SCSI disk devicesChandra Seetharaman1-7/+4
Create the sysfs file, dh_state even if the new SCSI device is not in the any of the device handler's internal lists. Signed-Off-by: Chandra Seetharaman <sekharan@us.ibm.com> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] qlogicpti: add missing parenthesesRoel Kluin1-1/+1
`+' has a higher precedence than `?' so the condition always evaluates to true and this is preprocessed to `7*((ql) - 1)' Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] libfc fcoe: increase ELS and CT timeoutsJoe Eykholt4-12/+22
The FC-LS spec. says ELS timeouts should be 2 x R_A_TOV. The FC-GS spec. says CT timeouts should be 3 x R_A_TOV. We've been using E_D_TOV for both of those. Change for all ELS and CT requests except FLOGI, which we leave at 2 seconds (using E_D_TOV). One could argue that R_A_TOV is locally determined until after FLOGI succeeds. This does change FLOGI for vports which becomes FDISC. This does not change the REC/SRR timeout which is 2 seconds. 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] libfcoe: Do not pad FIP keep-alive to full frame sizeYi Zou1-2/+1
According to the FC-BB-5 Rev2.0, 7.8.6.2, we should not pad FIP keep-alive frames. 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 an issue of pending exch/es after i/f destroyed or rmmod fcoeVasu Dev1-8/+8
All exches must be freed before its EM mempool destroyed in this case but currently some exches could be still pending in their scheduled delayed work after EM mempool is destroyed causing this issue discussed and reported in this latest email thread:- http://www.open-fcoe.org/pipermail/devel/2009-October/004788.html This patch fixes this issue by adding dedicated work queue thread fc_exch_workqueue for exch delayed work and then flush this work queue before destroying EM mempool. The cancel_delayed_work_sync cannot be called during final fc_exch_reset due to lport and exch locking ordering, so removes related comment block not relevant any more with this patch. Reported-by: Joe Eykholt <jeykholt@cisco.com> 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, fcoe: fixes for highmem skb linearize panicsChris Leech3-14/+16
There are cases outside of our control that may result in a transmit skb being linearized in dev_queue_xmit. There are a couple of bugs in libfc/fcoe that can result in a panic at that point. This patch contains two fixes to prevent those panics. 1) use fast cloning instead of shared skbs with dev_queue_xmit dev_queue_xmit doen't want shared skbuffs being passed in, and __skb_linearize will BUG if the skb is shared. FCoE is holding an extra reference around the call to dev_queue_xmit, so that when it returns an error code indicating the frame has been dropped it can maintain it's own backlog and retransmit. Switch to using fast skb cloning for this instead. 2) don't append compound pages as > PAGE_SIZE skb fragments fc_fcp_send_data will append pages from a scatterlist to the nr_frags[] if the netdev supports it. But, it's using > PAGE_SIZE compound pages as a single skb_frag. In the highmem linearize case that page will be passed to kmap_atomic to get a mapping to copy out of, but kmap_atomic will only allow access to the first PAGE_SIZE part. The memcpy will keep going and cause a page fault once is crosses the first boundary. If fc_fcp_send_data uses linear buffers from the start, it calls kmap_atomic one PAGE_SIZE at a time. That same logic needs to be applied when setting up skb_frags. Signed-off-by: Chris Leech <christopher.leech@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: Fix using VLAN ID in creating lport's WWWN/WWPNYi Zou1-2/+9
If the underlying netdev is a VLAN device, make sure the VLAN ID is integrated into the WWNN/WWPN name generation. Also added/updated the comments to reflect this change. 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: do not use DID_NO_CONNECT for pkt alloc failures.Mike Christie1-1/+0
DID_NO_CONNECT is not a nice value to use for pkt alloc failures, because you can probably retry and IO will become available again. For the device reset callout, we do not want to set the scsi command result for the above reason, and because we do not need to set the scsi_cmd->result in this path. We and other drivers do not set it for success for example, and we do not set it for other failure. And scsi-ml does not send every command through this path, and it is not expecting us to use the scsi_cmnd struct like a cmd coming thruogh queuecommand. I think it is more for storage in case we need a cmd struct for a tmf and to give us certain params like the LUN. Patch was made over scsi-misc today. 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] fcoe: Fix setting lport's WWNN/WWPN to use san mac addressYi Zou1-2/+2
We are still using netdev->dev_addr to generate lport's WWNN/WWPN even if the LLD has support for NETDEV_HW_ADDR_T_SAN. Instead, we should just use the fip->ctl_src_addr, which is the NETDEV_HW_ADDR_T_SAN if LLD supports it or it is just the netdev->dev_addr if it does not. 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: Fix getting san mac for VLAN interfaceYi Zou1-1/+4
Make sure we are get the SAN MAC address from the real netdev if the input netdev is a VLAN device. 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>