summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfad.c
Commit message (Collapse)AuthorAgeFilesLines
* bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()Alexander Gordeev2014-07-291-14/+6
| | | | | | | | | | | | | As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* bfa: Cleanup bfad_setup_intr() functionAlexander Gordeev2014-07-291-10/+8
| | | | | | Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* bfa: Do not call pci_enable_msix() after it failed onceAlexander Gordeev2014-07-291-25/+23
| | | | | | | | | Function pci_enable_msix() should not be called in case it threw a negative errno from a previous call. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* bfa: allocate memory with GFP_ATOMIC in spinlock contextAlexey Khoroshilov2014-05-191-1/+1
| | | | | | | | | | | | | bfa_fcb_pbc_vport_create() is called only from bfa_fcs_pbc_vport_init(), that is called only from bfad_drv_start() with bfad_lock spinlock held. So the patch replaces GFP_KERNEL with GFP_ATOMIC to avoid sleeping in atomic spinlock context. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* Merge branch 'misc' into for-linusJames Bottomley2014-01-221-47/+44
|\
| * [SCSI] bfa: Driver version upgrade to 3.2.23.0Vijaya Mohan Guvva2013-12-191-3/+3
| | | | | | | | | | | | | | | | Patch includes changes to upgrade bfa driver version to 3.2.23.0 and use firmware version 3.2.3.0 Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * [SCSI] bfa: Register port with SCSI even on port init failureVijaya Mohan Guvva2013-12-191-44/+41
| | | | | | | | | | | | | | | | | | | | This patch addresses the issue of port not being registered with SCSI layer on bfa or firmware initialization failure and subsequently failure in collecting driver traces for debugging port init failures. Also it has minor changes related to bfad state machine clean up. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* | [SCSI] bfa: Chinook quad port 16G FC HBA claim issueVijaya Mohan Guvva2013-12-181-2/+4
|/ | | | | | | | | | | | | | | | Bfa driver crash is observed while pushing the firmware on to chinook quad port card due to uninitialized bfi_image_ct2 access which gets initialized only for CT2 ASIC based cards after request_firmware(). For quard port chinook (CT2 ASIC based), bfi_image_ct2 is not getting initialized as there is no check for chinook PCI device ID before request_firmware and instead bfi_image_cb is initialized as it is the default case for card type check. This patch includes changes to read the right firmware for quad port chinook. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2013-11-151-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual earth-shaking, news-breaking, rocket science pile from trivial.git" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits) doc: usb: Fix typo in Documentation/usb/gadget_configs.txt doc: add missing files to timers/00-INDEX timekeeping: Fix some trivial typos in comments mm: Fix some trivial typos in comments irq: Fix some trivial typos in comments NUMA: fix typos in Kconfig help text mm: update 00-INDEX doc: Documentation/DMA-attributes.txt fix typo DRM: comment: `halve' -> `half' Docs: Kconfig: `devlopers' -> `developers' doc: typo on word accounting in kprobes.c in mutliple architectures treewide: fix "usefull" typo treewide: fix "distingush" typo mm/Kconfig: Grammar s/an/a/ kexec: Typo s/the/then/ Documentation/kvm: Update cpuid documentation for steal time and pv eoi treewide: Fix common typo in "identify" __page_to_pfn: Fix typo in comment Correct some typos for word frequency clk: fixed-factor: Fix a trivial typo ...
| * SCSI: remove unnecessary pci_set_drvdata()Jingoo Han2013-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound), the driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | [SCSI] bfa: Use pcie_set()/get_readrq() to simplify codeYijing Wang2013-09-231-41/+12
|/ | | | | | | | | | | | | | Use pcie_get_readrq()/pcie_set_readrq() to simplify code. Jon Mason proposed a similar patch a couple years ago (see below). [bhelgaas: validate pcie_max_read_reqsz, add pointer to Jon's patch] Reference: http://lkml.kernel.org/r/1309191190-14670-1-git-send-email-jdmason@kudzu.us Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: Anil Gurumurthy <agurumur@brocade.com> Cc: Vijaya Mohan Guvva <vmohan@brocade.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
* [SCSI] bfa: firmware update to 3.2.1.1Rasesh Mody2013-09-031-3/+3
| | | | | | | This patch updates the firmware to address the thermal notification issue Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Update the driver version to 3.2.21.1Vijaya Mohan Guvva2013-06-261-3/+3
| | | | | | | | Update bfa driver version to 3.2.21.1 Update bfa to use firmware image versions 3.2.1.0 Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Support for chinook-quad port cardVijaya Mohan Guvva2013-06-261-0/+8
| | | | | | | This patch enables support for chinook quad port 16G FC card (falcon) Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: fix strncpy() limiter in bfad_start_ops()Dan Carpenter2013-01-301-1/+1
| | | | | | | | | The closing parenthesis is in the wrong place so it takes the sizeof a pointer instead of the sizeof the buffer minus one. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Anil Gurumurthy <agurumur@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* Drivers: scsi: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-1/+1
| | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Adam Radford <linuxraid@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* [SCSI] bfa: Firmware image naming convention updateKrishna Gudipati2012-10-071-3/+3
| | | | | | | | | | | | - Modified the firmware naming convention to contain the firmware image version (3.1.0.0). - The new convention is <firmware-image>-<firmware-version>.bin - The change will enforce loading only compatible firmware with this driver and also avoid over-writing the old firmware image in-order to load new version driver as the firmware names used to be the same. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Add support for max target ports discoveryKrishna Gudipati2012-09-241-0/+4
| | | | | | | | | | | | | | | - Changes to avoid discovering NPIV port as remote port by the other NPIV ports created on same physical port when all the NPIV ports are part of the same zone in a fabric. - Provided mechanism to support maximum number of target ports for a given initiator port (physical port + NPIV ports) irrespective of the way in which the initiator and target ports are zoned in the fabric. - Introduced module_parameter max_rport_logins to restrict number of remote ports discovery which includes target and initiator remote ports. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Add PowerPC support and enable PCIE AER handling.Krishna Gudipati2012-09-241-6/+226
| | | | | | | | | | | | | | - Added few missing endian swap changes to support BFA on PowerPC. - Added PCIE AER support to BFA: a) Implemented the PCI error handler entry points. b) Made changes to FCS state machine to handle STOP event from the PCI error detected entry point. c) Made changes to the IO Controller state machine to handle SUSPEND event from the PCI error detected entry point. d) Made changes to restart the BFA operations on a slot_reset completion. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: squelch lockdep complaint with a spin_lock_initKyle McMartin2012-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spotted this while looking at another issue... INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 298, comm: udevd Not tainted 3.3.0 #1 Call Trace: [<ffffffff810cee63>] __lock_acquire+0x1363/0x1bb0 [<ffffffff816593d2>] ? __slab_alloc+0x4a0/0x4fd [<ffffffff81020063>] ? native_sched_clock+0x13/0x80 [<ffffffff810200d9>] ? sched_clock+0x9/0x10 [<ffffffff810cfd81>] lock_acquire+0xa1/0x1e0 [<ffffffffa0321b83>] ? bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [<ffffffff816630e5>] _raw_spin_lock_irqsave+0x65/0xb0 [<ffffffffa0321b83>] ? bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [<ffffffffa0321b83>] bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [<ffffffffa032fa57>] bfa_fcs_lport_init+0x97/0x120 [bfa] [<ffffffffa031d4ff>] bfa_fcs_fabric_sm_uninit+0x1cf/0x250 [bfa] [<ffffffffa031c1da>] bfa_fcs_fabric_modinit+0x2a/0xb0 [bfa] [<ffffffffa031bef2>] ? bfa_fcs_fabric_attach+0xf2/0x170 [bfa] [<ffffffffa031e75a>] bfa_fcs_init+0x2a/0x40 [bfa] [<ffffffffa02facf7>] bfad_drv_init+0x107/0x1f0 [bfa] [<ffffffffa02fb057>] bfad_pci_probe+0x277/0x450 [bfa] [<ffffffff81354d4c>] local_pci_probe+0x5c/0xd0 [<ffffffff81354ed1>] pci_device_probe+0x111/0x120 [<ffffffff8141c0e6>] driver_probe_device+0x96/0x2f0 [<ffffffff8141c3eb>] __driver_attach+0xab/0xb0 [<ffffffff8141c340>] ? driver_probe_device+0x2f0/0x2f0 [<ffffffff8141a2e5>] bus_for_each_dev+0x55/0x90 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffff8141bbce>] driver_attach+0x1e/0x20 [<ffffffff8141b8d8>] bus_add_driver+0x1b8/0x2b0 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffff8141cbc7>] driver_register+0x77/0x160 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffff81353b23>] __pci_register_driver+0x73/0xf0 [<ffffffffa037b000>] ? 0xffffffffa037afff [<ffffffffa037b083>] bfad_init+0x83/0x1000 [bfa] [<ffffffff8100212a>] do_one_initcall+0x12a/0x180 [<ffffffff810df0d0>] sys_init_module+0xc0/0x220 [<ffffffff8166bbe9>] system_call_fastpath+0x16/0x1b Signed-off-by: Kyle McMartin <kmcmarti@redhat.com> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo ↵Krishna Gudipati2012-04-251-17/+0
| | | | | | | | | | | | | | | | | | | response. Made changes to avoid queuing the vport delete work to IM driver work queue in the bfa_fcb_lport_delete() - since at this stage we are not completely done with using the vport structure as we are still waiting for the LOGO response from the fw in online state or just doing some cleanup. Since queuing up the vport delete work at this stage will result in the FC transport layer to clean up the vport before we get the response from firmware. Made changes to queue the port delete work to the IM driver work queue - from the bfa_fcs_vport_free() function since at this state we are done with using the vport data structure and the FCS state machine is completely cleaned up. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Implement LUN Masking feature using the SCSI Slave Callouts.Krishna Gudipati2012-01-101-0/+2
| | | | | | | | | | | | | | | | This patch re-implements LUN Masking feature using SCSI Slave Callouts. With the new design in the slave_alloc entry point; for each new LUN discovered we check with our internal LUN Masking config whether to expose or to mask this particular LUN. We return -ENXIO (No such device or address) from slave_alloc for the LUNs we don't want to be exposed. We also notify the SCSI mid-layer to do a sequential LUN scan rather than REPORT_LUNS based scan if LUN masking is enabled on our HBA port, since a -ENXIO from any LUN in REPORT_LUNS based scan translates to a scan abort. This patch also handles the dynamic lun masking config change from enable to disable or vice-versa by resetting sdev_bflags of LUN 0 appropriately. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Add FC-transport based Asynchronous Event Notification support.Krishna Gudipati2011-07-271-1/+7
| | | | | | | | - Added support to post vendor unique events on fc_host. - Supports adapter, port, ioc, flash and remote port based AEN events. 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-291-1/+15
| | | | | | | | | | | | | - 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: FCS bug fixes.Krishna Gudipati2011-06-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | - 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-291-95/+54
| | | | | | | | | | | | | - 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 PLL init fixes.Krishna Gudipati2011-06-291-2/+13
| | | | | | | | | | | | | | | | | | - 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: Enable ASIC block configuration and query.Krishna Gudipati2011-06-291-0/+1
| | | | | | | | | | - 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] bfa: Driver initialization and model description fixKrishna Gudipati2011-06-291-9/+27
| | | | | | | | | | | | | | - Moved FCS initialization, which internally does the im_port creation as well as the scsi_host creation before bfa_init. Once the bfa_init is complete & successful: - Reset the FCS base port cfg params such as pwwn/nwwn and setup fc host params - based on the values learned during the ioc getattr request. - Change needed to support BSG commands even on bfa init failure. - Model description fixes for Brocade adapters. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: FC credit recovery and misc bug fixes.Krishna Gudipati2011-06-291-0/+5
| | | | | | | | | | | | | | | | - Introduce FC credit recovery. - Added module parameter to enable/disable credit recovery. Bug Fixes: - Removed check for ignoring plogi from initiator in switched fabric mode. - The ABTS for PLOGI is going out few millisecs earlier due to FW timer calibration (around 300 miilisecs earlier). So there is a window if an accept comes during this time HBA would have initiated an ABORT. - Added 1 to FC_ELS_TOV for compensating for FW timer. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Brocade-1860 Fabric Adapter 16Gbs support and flash controller ↵Krishna Gudipati2011-06-291-2/+1
| | | | | | | | | | | | | | | | | | fixes. - Added support for 16Gbps. - Added logic to flush pending mailbox command queue when IOC is disabled. - Fix to Halt the flash controller during fw initialization - since when asic blck is programmed flash controller's continuous access blocks f/w access to flash. - Added new asic based card types and modified IOC get card model routine. - Added PLL init fix to do LPU reset every time we do a memory initialization, since not doing so will cause LPU to be uninitialized during driver load. - Added fix to Halt flash controller before PLL initialization. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Brocade-1860 Fabric Adapter Hardware EnablementKrishna Gudipati2011-06-291-35/+46
| | | | | | | | | | | | | | | | - Added support for Brocade-1860 Fabric Adapter. - Made changes to support single firmware image per asic type. - Combined bfi_cbreg.h and bfi_ctreg.h defines into bfi_reg.h with only minimal defines used by host. - Added changes to setup CPE/RME Queue register offsets based on firmware response. - Removed queue register offset initializations and added register offsets to BFI config response message. - Added Brocade-1860 asic specific interrupt status definitions and mailbox interfaces. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Move debugfs initialization before bfa init.Krishna Gudipati2011-05-011-8/+14
| | | | | | | | | Move the initialization of debugfs before bfa init, to enable us to collect driver/firmware traces if init fails. Also add a printk to display message on bfa_init failure. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: firmware download fixJing Huang2011-05-011-10/+29
| | | | | | | | | | | | This patch includes fixes for two issues releated to firmware download implementation: 1) Merged memory leak fix provided by Jesper Juhl <jj@chaosbits.net>. Basically we need to call release_firmware() after request_firmware(). 2) fixed issues with the firmware download interface as pointed out by Rolf Eike Beer <eike@sf-mail.de> in linux-scsi. Rearranged the code and fixed related function protypes. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* [SCSI] bfa: remove inactive functionsJing Huang2010-12-311-1/+0
| | | | | | | This patch removes some inactive functions and macros. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: replace bfa_assert with WARN_ONJing Huang2010-12-311-1/+1
| | | | | Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: remove all OS wrappersMaggie Zhang2010-12-211-5/+4
| | | | | | | | Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: clean up one line functionsMaggie Zhang2010-12-211-11/+11
| | | | | | | | Cleaned up one line functions. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: fix regular sparse check warnings.Maggie2010-12-211-2/+2
| | | | | | | Fix all sparse check warnings from make C=2. Signed-off-by: Maggie <xmzhang@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: rename log_level to bfa_log_levelJing Huang2010-12-201-4/+4
| | | | | | | | | Rename log_level to bfa_log_level to make the global variable more bfa specific and avoid clashes with other drivers which was causing a build failure. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: fix comments for c filesJing Huang2010-10-251-16/+16
| | | | | | | | | | This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com) regarding comment blocks that begining with "/**". bfa driver comments currently do not follow kernel-doc convention, we hence replace all /** with /* and **/ with */. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: fix frame size over 1024 compile warningJing Huang2010-10-251-17/+0
| | | | | | | Fix compile warning for frame size over 1024 in gcc 4.4. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: remove os wrapper and unused functionsJing Huang2010-10-251-24/+0
| | | | | | | | | | | This patch removes os wrapper and unused functions. bfa_os_assign(), bfa_os_memset(), bfa_os_memcpy(), bfa_os_udelay() bfa_os_vsprintf(), bfa_os_snprintf(), and bfa_os_get_clock() are replaced with direct assignment or native linux functions. Some unused functions related to VF (Vitual fabric) are also removed. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: cleanup driverKrishna Gudipati2010-09-161-543/+812
| | | | | | | | We have flattened the BFA hierarchy and also reduced the number of source and header files we used to have earlier. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* param: simple locking for sysfs-writable charp parametersRusty Russell2010-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Since the writing to sysfs can free the old one, we need to block that when we access the charp variables. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Dan Williams <dcbw@redhat.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Jing Huang <huangj@brocade.com> Cc: James E.J. Bottomley <James.Bottomley@suse.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: David S. Miller <davem@davemloft.net> Cc: user-mode-linux-devel@lists.sourceforge.net Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: linux-usb@vger.kernel.org
* [SCSI] bfa: add debugfs supportJing Huang2010-07-271-0/+12
| | | | | | | | | | | | | | | | | | | - Add debugfs support to obtain firmware trace, driver trace and read/write to registers. - debugfs hierarchy: /sys/kernel/debug/bfa/host# where the host number corresponds to the one under /sys/class/scsi_host/host# - Following are the new debugfs entries added: drvtrc: collect current driver trace fwtrc: collect current firmware trace. fwsave: collect last saved fw trace as a result of firmware crash. regwr: write one word to chip register regrd: read one or more words from chip register. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: add description for module parametersJing Huang2010-07-271-3/+30
| | | | | | | Add description for bfa driver module parameters. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: PBC vport createJing Huang2010-07-271-5/+56
| | | | | | | | | | | This patch enables creating PBC vport. During fcs init, fcs will read PBC vport using bfa iocfc API and invoke fcb callback to add the pbc vport entries into a list. The pbc vport list will be traversed in the subsequent pci probe process and vport will be created using fc transport provided vport create function. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: enable new hardwareJing Huang2010-07-271-0/+8
| | | | | | | | | | | | This patch enables support of new mezzanine cards for HP and IBM blade server. - Add new pciids for HP and IBM mezzanine card. - Add a new firmware image for HP mezzanine card, which is running in FC only mode. Rename firmware image to reflect the difference. Change the firmware download code accordingly for the above changes. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
OpenPOWER on IntegriCloud