1
0
Fork 0
Commit Graph

62 Commits (7c59a3df15df29c8402a05b92385e83e55355778)

Author SHA1 Message Date
Alexander Gordeev b427d00fab bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()
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>
2014-07-29 08:38:52 -04:00
Alexander Gordeev 8cb7f63d68 bfa: Cleanup bfad_setup_intr() function
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-07-29 08:38:52 -04:00
Alexander Gordeev cd69a09eb2 bfa: Do not call pci_enable_msix() after it failed once
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>
2014-07-29 08:38:52 -04:00
Alexey Khoroshilov dc6d2a0f97 bfa: allocate memory with GFP_ATOMIC in spinlock context
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>
2014-05-19 19:12:22 +02:00
James Bottomley 4b1a9a5e40 Merge branch 'misc' into for-linus 2014-01-22 09:57:27 -08:00
Vijaya Mohan Guvva 2da11ad218 [SCSI] bfa: Driver version upgrade to 3.2.23.0
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>
2013-12-19 07:39:06 -08:00
Vijaya Mohan Guvva da3e0bee18 [SCSI] bfa: Register port with SCSI even on port init failure
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>
2013-12-19 07:39:05 -08:00
Vijaya Mohan Guvva dcaf9aed99 [SCSI] bfa: Chinook quad port 16G FC HBA claim issue
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>
2013-12-18 08:28:17 -08:00
Linus Torvalds 9073e1a804 Merge branch 'for-linus' of 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
  ...
2013-11-15 16:47:22 -08:00
Jingoo Han 08b7e10716 SCSI: remove unnecessary pci_set_drvdata()
Since commit 0998d06310
(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>
2013-10-14 15:26:04 +02:00
Yijing Wang c0102c00d8 [SCSI] bfa: Use pcie_set()/get_readrq() to simplify code
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>
2013-09-23 17:30:03 -06:00
Rasesh Mody 71b3ba7dbf [SCSI] bfa: firmware update to 3.2.1.1
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>
2013-09-03 07:27:58 -07:00
Vijaya Mohan Guvva 607be2cff4 [SCSI] bfa: Update the driver version to 3.2.21.1
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>
2013-06-26 17:38:38 -07:00
Vijaya Mohan Guvva f9c867b45c [SCSI] bfa: Support for chinook-quad port card
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>
2013-06-26 17:16:09 -07:00
Dan Carpenter 30ac379a69 [SCSI] bfa: fix strncpy() limiter in bfad_start_ops()
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>
2013-01-30 11:54:54 +11:00
Greg Kroah-Hartman 6f03979051 Drivers: scsi: remove __dev* attributes.
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>
2013-01-03 15:57:01 -08:00
Krishna Gudipati 7d0ecef383 [SCSI] bfa: Firmware image naming convention update
- 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>
2012-10-07 11:28:06 +01:00
Krishna Gudipati 61ba43947e [SCSI] bfa: Add support for max target ports discovery
- 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>
2012-09-24 12:10:57 +04:00
Krishna Gudipati 881c1b3c48 [SCSI] bfa: Add PowerPC support and enable PCIE AER handling.
- 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>
2012-09-24 12:10:56 +04:00
Kyle McMartin 0b1017aab1 [SCSI] bfa: squelch lockdep complaint with a spin_lock_init
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>
2012-07-20 08:59:03 +01:00
Krishna Gudipati 17c201b328 [SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo 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>
2012-04-25 09:58:31 +01:00
Krishna Gudipati 5b7db7af52 [SCSI] bfa: Implement LUN Masking feature using the SCSI Slave Callouts.
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>
2012-01-10 17:01:24 -06:00
Krishna Gudipati 7826f304b1 [SCSI] bfa: Add FC-transport based Asynchronous Event Notification support.
- 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>
2011-07-27 14:41:24 +04:00
Krishna Gudipati 61e62e21af [SCSI] bfa: Driver and BSG enhancements.
- 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>
2011-06-29 17:28:17 -05:00
Krishna Gudipati d7be54cc5c [SCSI] bfa: FCS bug fixes.
- 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>
2011-06-29 17:12:11 -05:00
Krishna Gudipati 4507025d01 [SCSI] bfa: DMA memory allocation enhancement.
- 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>
2011-06-29 17:11:09 -05:00
Krishna Gudipati 10a0737924 [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.
- 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>
2011-06-29 16:59:59 -05:00
Krishna Gudipati 1a4d8e1bd8 [SCSI] bfa: Enable ASIC block configuration and query.
- 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>
2011-06-29 16:56:05 -05:00
Krishna Gudipati 75332a70a8 [SCSI] bfa: Driver initialization and model description fix
- 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>
2011-06-29 15:56:05 -05:00
Krishna Gudipati be540a991e [SCSI] bfa: FC credit recovery and misc bug fixes.
- 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>
2011-06-29 15:52:21 -05:00
Krishna Gudipati 8b070b4a02 [SCSI] bfa: Brocade-1860 Fabric Adapter 16Gbs support and flash controller 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>
2011-06-29 15:50:50 -05:00
Krishna Gudipati 111892082e [SCSI] bfa: Brocade-1860 Fabric Adapter Hardware Enablement
- 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>
2011-06-29 15:31:31 -05:00
Krishna Gudipati 7c38c05b3e [SCSI] bfa: Move debugfs initialization before bfa init.
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>
2011-05-01 10:55:56 -05:00
Jing Huang 61338a0b34 [SCSI] bfa: firmware download fix
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>
2011-05-01 10:53:49 -05:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Jing Huang 2f2f40a458 [SCSI] bfa: remove inactive functions
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>
2010-12-31 09:38:53 -06:00
Jing Huang d4b671c58e [SCSI] bfa: replace bfa_assert with WARN_ON
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31 09:36:53 -06:00
Maggie Zhang f16a17507b [SCSI] bfa: remove all OS wrappers
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>
2010-12-21 12:32:56 -06:00
Maggie Zhang f7f73812e9 [SCSI] bfa: clean up one line functions
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>
2010-12-21 12:32:43 -06:00
Maggie 52f94b6fd0 [SCSI] bfa: fix regular sparse check warnings.
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>
2010-12-21 12:24:16 -06:00
Jing Huang 8816624222 [SCSI] bfa: rename log_level to bfa_log_level
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>
2010-12-20 12:28:34 -06:00
Jing Huang 5fbe25c7a6 [SCSI] bfa: fix comments for c files
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>
2010-10-25 16:28:09 -05:00
Jing Huang e0a08a30c9 [SCSI] bfa: fix frame size over 1024 compile warning
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>
2010-10-25 16:25:35 -05:00
Jing Huang 6a18b1675f [SCSI] bfa: remove os wrapper and unused functions
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>
2010-10-25 16:15:58 -05:00
Krishna Gudipati a36c61f902 [SCSI] bfa: cleanup driver
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>
2010-09-16 22:54:24 -04:00
Rusty Russell d6d1b650ae param: simple locking for sysfs-writable charp parameters
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
2010-08-11 23:04:31 +09:30
Jing Huang ab2a9ba189 [SCSI] bfa: add debugfs support
- 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>
2010-07-27 12:04:32 -05:00
Jing Huang 604158ade0 [SCSI] bfa: add description for module parameters
Add description for bfa driver module parameters.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27 12:04:22 -05:00
Jing Huang d9883548a0 [SCSI] bfa: PBC vport create
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>
2010-07-27 12:04:04 -05:00
Jing Huang 293f82d59e [SCSI] bfa: enable new hardware
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>
2010-07-27 12:04:03 -05:00