You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (110 commits) [SCSI] qla2xxx: Refactor call to qla2xxx_read_sfp for thermal temperature. [SCSI] qla2xxx: Unify the read/write sfp mailbox command routines. [SCSI] qla2xxx: Clear complete initialization control block. [SCSI] qla2xxx: Allow an override of the registered maximum LUN. [SCSI] qla2xxx: Add host number in reset and quiescent message logs. [SCSI] qla2xxx: Correctly read sfp single byte mailbox register. [SCSI] qla2xxx: Add qla82xx_rom_unlock() function. [SCSI] qla2xxx: Log if qla82xx firmware fails to load from flash. [SCSI] qla2xxx: Use passed in host to initialize local scsi_qla_host in queuecommand function [SCSI] qla2xxx: Correct buffer start in edc sysfs debug print. [SCSI] qla2xxx: Update firmware version after flash update for ISP82xx. [SCSI] qla2xxx: Fix hang during driver unload when vport is active. [SCSI] qla2xxx: Properly set the dsd_list_len for dsd_chaining in cmd type 6. [SCSI] qla2xxx: Fix virtual port failing to login after chip reset. [SCSI] qla2xxx: Fix vport delete hang when logins are outstanding. [SCSI] hpsa: Change memset using sizeof(ptr) to sizeof(*ptr) [SCSI] ipr: Rate limit DMA mapping errors [SCSI] hpsa: add P2000 to list of shared SAS devices [SCSI] hpsa: do not attempt PCI power management reset method if we know it won't work. [SCSI] hpsa: remove superfluous sleeps around reset code ...
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
Copyright (c) 2003-2005 QLogic Corporation
|
||||
QLogic Linux Fibre Channel HBA Driver
|
||||
Copyright (c) 2003-2011 QLogic Corporation
|
||||
QLogic Linux/ESX Fibre Channel HBA Driver
|
||||
|
||||
This program includes a device driver for Linux 2.6 that may be
|
||||
This program includes a device driver for Linux 2.6/ESX that may be
|
||||
distributed with QLogic hardware specific firmware binary file.
|
||||
You may modify and redistribute the device driver code under the
|
||||
GNU General Public License as published by the Free Software
|
||||
Foundation (version 2 or a later version).
|
||||
GNU General Public License (a copy of which is attached hereto as
|
||||
Exhibit A) published by the Free Software Foundation (version 2).
|
||||
|
||||
You may redistribute the hardware specific firmware binary file
|
||||
under the following terms:
|
||||
@@ -43,3 +43,285 @@ OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
|
||||
TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN
|
||||
ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN
|
||||
COMBINATION WITH THIS PROGRAM.
|
||||
|
||||
|
||||
EXHIBIT A
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
+2
-2
@@ -5611,9 +5611,9 @@ F: include/linux/ata.h
|
||||
F: include/linux/libata.h
|
||||
|
||||
SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
|
||||
M: Jayamohan Kallickal <jayamohank@serverengines.com>
|
||||
M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
W: http://www.serverengines.com
|
||||
W: http://www.emulex.com
|
||||
S: Supported
|
||||
F: drivers/scsi/be2iscsi/
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
#define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR
|
||||
#endif
|
||||
|
||||
#define MPT_LINUX_VERSION_COMMON "3.04.18"
|
||||
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.18"
|
||||
#define MPT_LINUX_VERSION_COMMON "3.04.19"
|
||||
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.19"
|
||||
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
|
||||
|
||||
#define show_mptmod_ver(s,ver) \
|
||||
|
||||
@@ -5012,7 +5012,6 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
|
||||
(ioc_stat & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE)) {
|
||||
VirtTarget *vtarget = NULL;
|
||||
u8 id, channel;
|
||||
u32 log_info = le32_to_cpu(reply->IOCLogInfo);
|
||||
|
||||
id = sas_event_data->TargetID;
|
||||
channel = sas_event_data->Bus;
|
||||
@@ -5023,7 +5022,8 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
|
||||
"LogInfo (0x%x) available for "
|
||||
"INTERNAL_DEVICE_RESET"
|
||||
"fw_id %d fw_channel %d\n", ioc->name,
|
||||
log_info, id, channel));
|
||||
le32_to_cpu(reply->IOCLogInfo),
|
||||
id, channel));
|
||||
if (vtarget->raidVolume) {
|
||||
devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"Skipping Raid Volume for inDMD\n",
|
||||
|
||||
@@ -1415,11 +1415,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
|
||||
dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n",
|
||||
ioc->name, SCpnt, done));
|
||||
|
||||
if (ioc->taskmgmt_quiesce_io) {
|
||||
dtmprintk(ioc, printk(MYIOC_s_WARN_FMT "qcmd: SCpnt=%p timeout + 60HZ\n",
|
||||
ioc->name, SCpnt));
|
||||
if (ioc->taskmgmt_quiesce_io)
|
||||
return SCSI_MLQUEUE_HOST_BUSY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Put together a MPT SCSI request...
|
||||
@@ -1773,7 +1770,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
|
||||
int scpnt_idx;
|
||||
int retval;
|
||||
VirtDevice *vdevice;
|
||||
ulong sn = SCpnt->serial_number;
|
||||
MPT_ADAPTER *ioc;
|
||||
|
||||
/* If we can't locate our host adapter structure, return FAILED status.
|
||||
@@ -1859,8 +1855,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
|
||||
vdevice->vtarget->id, vdevice->lun,
|
||||
ctx2abort, mptscsih_get_tm_timeout(ioc));
|
||||
|
||||
if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx &&
|
||||
SCpnt->serial_number == sn) {
|
||||
if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) {
|
||||
dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"task abort: command still in active list! (sc=%p)\n",
|
||||
ioc->name, SCpnt));
|
||||
@@ -1873,9 +1868,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
|
||||
}
|
||||
|
||||
out:
|
||||
printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p) (sn=%ld)\n",
|
||||
printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)\n",
|
||||
ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), retval,
|
||||
SCpnt, SCpnt->serial_number);
|
||||
SCpnt);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -867,6 +867,10 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
|
||||
struct _x_config_parms cfg;
|
||||
struct _CONFIG_PAGE_HEADER hdr;
|
||||
int err = -EBUSY;
|
||||
u32 nego_parms;
|
||||
u32 period;
|
||||
struct scsi_device *sdev;
|
||||
int i;
|
||||
|
||||
/* don't allow updating nego parameters on RAID devices */
|
||||
if (starget->channel == 0 &&
|
||||
@@ -904,6 +908,24 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
|
||||
pg1->Header.PageNumber = hdr.PageNumber;
|
||||
pg1->Header.PageType = hdr.PageType;
|
||||
|
||||
nego_parms = le32_to_cpu(pg1->RequestedParameters);
|
||||
period = (nego_parms & MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK) >>
|
||||
MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD;
|
||||
if (period == 8) {
|
||||
/* Turn on inline data padding for TAPE when running U320 */
|
||||
for (i = 0 ; i < 16; i++) {
|
||||
sdev = scsi_device_lookup_by_target(starget, i);
|
||||
if (sdev && sdev->type == TYPE_TAPE) {
|
||||
sdev_printk(KERN_DEBUG, sdev, MYIOC_s_FMT
|
||||
"IDP:ON\n", ioc->name);
|
||||
nego_parms |= MPI_SCSIDEVPAGE1_RP_IDP;
|
||||
pg1->RequestedParameters =
|
||||
cpu_to_le32(nego_parms);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters));
|
||||
|
||||
if (mpt_config(ioc, &cfg)) {
|
||||
|
||||
@@ -361,7 +361,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
|
||||
*/
|
||||
error = le32_to_cpu(msg->body[0]);
|
||||
|
||||
osm_debug("Completed %ld\n", cmd->serial_number);
|
||||
osm_debug("Completed %0x%p\n", cmd);
|
||||
|
||||
cmd->result = error & 0xff;
|
||||
/*
|
||||
@@ -678,7 +678,7 @@ static int i2o_scsi_queuecommand_lck(struct scsi_cmnd *SCpnt,
|
||||
/* Queue the message */
|
||||
i2o_msg_post(c, msg);
|
||||
|
||||
osm_debug("Issued %ld\n", SCpnt->serial_number);
|
||||
osm_debug("Issued %0x%p\n", SCpnt);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -75,8 +75,10 @@ MODULE_AUTHOR("Nick Cheng <support@areca.com.tw>");
|
||||
MODULE_DESCRIPTION("ARECA (ARC11xx/12xx/16xx/1880) SATA/SAS RAID Host Bus Adapter");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_VERSION(ARCMSR_DRIVER_VERSION);
|
||||
static int sleeptime = 10;
|
||||
static int retrycount = 12;
|
||||
|
||||
#define ARCMSR_SLEEPTIME 10
|
||||
#define ARCMSR_RETRYCOUNT 12
|
||||
|
||||
wait_queue_head_t wait_q;
|
||||
static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
|
||||
struct scsi_cmnd *cmd);
|
||||
@@ -171,24 +173,6 @@ static struct pci_driver arcmsr_pci_driver = {
|
||||
****************************************************************************
|
||||
****************************************************************************
|
||||
*/
|
||||
int arcmsr_sleep_for_bus_reset(struct scsi_cmnd *cmd)
|
||||
{
|
||||
struct Scsi_Host *shost = NULL;
|
||||
int i, isleep;
|
||||
shost = cmd->device->host;
|
||||
isleep = sleeptime / 10;
|
||||
if (isleep > 0) {
|
||||
for (i = 0; i < isleep; i++) {
|
||||
msleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
isleep = sleeptime % 10;
|
||||
if (isleep > 0) {
|
||||
msleep(isleep*1000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void arcmsr_free_hbb_mu(struct AdapterControlBlock *acb)
|
||||
{
|
||||
@@ -323,66 +307,64 @@ static void arcmsr_define_adapter_type(struct AdapterControlBlock *acb)
|
||||
|
||||
default: acb->adapter_type = ACB_ADAPTER_TYPE_A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t arcmsr_hba_wait_msgint_ready(struct AdapterControlBlock *acb)
|
||||
{
|
||||
struct MessageUnit_A __iomem *reg = acb->pmuA;
|
||||
uint32_t Index;
|
||||
uint8_t Retries = 0x00;
|
||||
do {
|
||||
for (Index = 0; Index < 100; Index++) {
|
||||
if (readl(®->outbound_intstatus) &
|
||||
ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
|
||||
writel(ARCMSR_MU_OUTBOUND_MESSAGE0_INT,
|
||||
®->outbound_intstatus);
|
||||
return true;
|
||||
}
|
||||
msleep(10);
|
||||
}/*max 1 seconds*/
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2000; i++) {
|
||||
if (readl(®->outbound_intstatus) &
|
||||
ARCMSR_MU_OUTBOUND_MESSAGE0_INT) {
|
||||
writel(ARCMSR_MU_OUTBOUND_MESSAGE0_INT,
|
||||
®->outbound_intstatus);
|
||||
return true;
|
||||
}
|
||||
msleep(10);
|
||||
} /* max 20 seconds */
|
||||
|
||||
} while (Retries++ < 20);/*max 20 sec*/
|
||||
return false;
|
||||
}
|
||||
|
||||
static uint8_t arcmsr_hbb_wait_msgint_ready(struct AdapterControlBlock *acb)
|
||||
{
|
||||
struct MessageUnit_B *reg = acb->pmuB;
|
||||
uint32_t Index;
|
||||
uint8_t Retries = 0x00;
|
||||
do {
|
||||
for (Index = 0; Index < 100; Index++) {
|
||||
if (readl(reg->iop2drv_doorbell)
|
||||
& ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
|
||||
writel(ARCMSR_MESSAGE_INT_CLEAR_PATTERN
|
||||
, reg->iop2drv_doorbell);
|
||||
writel(ARCMSR_DRV2IOP_END_OF_INTERRUPT, reg->drv2iop_doorbell);
|
||||
return true;
|
||||
}
|
||||
msleep(10);
|
||||
}/*max 1 seconds*/
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2000; i++) {
|
||||
if (readl(reg->iop2drv_doorbell)
|
||||
& ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) {
|
||||
writel(ARCMSR_MESSAGE_INT_CLEAR_PATTERN,
|
||||
reg->iop2drv_doorbell);
|
||||
writel(ARCMSR_DRV2IOP_END_OF_INTERRUPT,
|
||||
reg->drv2iop_doorbell);
|
||||
return true;
|
||||
}
|
||||
msleep(10);
|
||||
} /* max 20 seconds */
|
||||
|
||||
} while (Retries++ < 20);/*max 20 sec*/
|
||||
return false;
|
||||
}
|
||||
|
||||
static uint8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *pACB)
|
||||
{
|
||||
struct MessageUnit_C *phbcmu = (struct MessageUnit_C *)pACB->pmuC;
|
||||
unsigned char Retries = 0x00;
|
||||
uint32_t Index;
|
||||
do {
|
||||
for (Index = 0; Index < 100; Index++) {
|
||||
if (readl(&phbcmu->outbound_doorbell) & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
|
||||
writel(ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR, &phbcmu->outbound_doorbell_clear);/*clear interrupt*/
|
||||
return true;
|
||||
}
|
||||
/* one us delay */
|
||||
msleep(10);
|
||||
} /*max 1 seconds*/
|
||||
} while (Retries++ < 20); /*max 20 sec*/
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2000; i++) {
|
||||
if (readl(&phbcmu->outbound_doorbell)
|
||||
& ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) {
|
||||
writel(ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE_DOORBELL_CLEAR,
|
||||
&phbcmu->outbound_doorbell_clear); /*clear interrupt*/
|
||||
return true;
|
||||
}
|
||||
msleep(10);
|
||||
} /* max 20 seconds */
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb)
|
||||
{
|
||||
struct MessageUnit_A __iomem *reg = acb->pmuA;
|
||||
@@ -459,10 +441,11 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb)
|
||||
struct CommandControlBlock *ccb_tmp;
|
||||
int i = 0, j = 0;
|
||||
dma_addr_t cdb_phyaddr;
|
||||
unsigned long roundup_ccbsize = 0, offset;
|
||||
unsigned long roundup_ccbsize;
|
||||
unsigned long max_xfer_len;
|
||||
unsigned long max_sg_entrys;
|
||||
uint32_t firm_config_version;
|
||||
|
||||
for (i = 0; i < ARCMSR_MAX_TARGETID; i++)
|
||||
for (j = 0; j < ARCMSR_MAX_TARGETLUN; j++)
|
||||
acb->devstate[i][j] = ARECA_RAID_GONE;
|
||||
@@ -472,23 +455,20 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb)
|
||||
firm_config_version = acb->firm_cfg_version;
|
||||
if((firm_config_version & 0xFF) >= 3){
|
||||
max_xfer_len = (ARCMSR_CDB_SG_PAGE_LENGTH << ((firm_config_version >> 8) & 0xFF)) * 1024;/* max 4M byte */
|
||||
max_sg_entrys = (max_xfer_len/4096);
|
||||
max_sg_entrys = (max_xfer_len/4096);
|
||||
}
|
||||
acb->host->max_sectors = max_xfer_len/512;
|
||||
acb->host->sg_tablesize = max_sg_entrys;
|
||||
roundup_ccbsize = roundup(sizeof(struct CommandControlBlock) + (max_sg_entrys - 1) * sizeof(struct SG64ENTRY), 32);
|
||||
acb->uncache_size = roundup_ccbsize * ARCMSR_MAX_FREECCB_NUM + 32;
|
||||
acb->uncache_size = roundup_ccbsize * ARCMSR_MAX_FREECCB_NUM;
|
||||
dma_coherent = dma_alloc_coherent(&pdev->dev, acb->uncache_size, &dma_coherent_handle, GFP_KERNEL);
|
||||
if(!dma_coherent){
|
||||
printk(KERN_NOTICE "arcmsr%d: dma_alloc_coherent got error \n", acb->host->host_no);
|
||||
printk(KERN_NOTICE "arcmsr%d: dma_alloc_coherent got error\n", acb->host->host_no);
|
||||
return -ENOMEM;
|
||||
}
|
||||
acb->dma_coherent = dma_coherent;
|
||||
acb->dma_coherent_handle = dma_coherent_handle;
|
||||
memset(dma_coherent, 0, acb->uncache_size);
|
||||
offset = roundup((unsigned long)dma_coherent, 32) - (unsigned long)dma_coherent;
|
||||
dma_coherent_handle = dma_coherent_handle + offset;
|
||||
dma_coherent = (struct CommandControlBlock *)dma_coherent + offset;
|
||||
ccb_tmp = dma_coherent;
|
||||
acb->vir2phy_offset = (unsigned long)dma_coherent - (unsigned long)dma_coherent_handle;
|
||||
for(i = 0; i < ARCMSR_MAX_FREECCB_NUM; i++){
|
||||
@@ -2602,12 +2582,8 @@ static int arcmsr_iop_confirm(struct AdapterControlBlock *acb)
|
||||
if (cdb_phyaddr_hi32 != 0) {
|
||||
struct MessageUnit_C *reg = (struct MessageUnit_C *)acb->pmuC;
|
||||
|
||||
if (cdb_phyaddr_hi32 != 0) {
|
||||
unsigned char Retries = 0x00;
|
||||
do {
|
||||
printk(KERN_NOTICE "arcmsr%d: cdb_phyaddr_hi32=0x%x \n", acb->adapter_index, cdb_phyaddr_hi32);
|
||||
} while (Retries++ < 100);
|
||||
}
|
||||
printk(KERN_NOTICE "arcmsr%d: cdb_phyaddr_hi32=0x%x\n",
|
||||
acb->adapter_index, cdb_phyaddr_hi32);
|
||||
writel(ARCMSR_SIGNATURE_SET_CONFIG, ®->msgcode_rwbuffer[0]);
|
||||
writel(cdb_phyaddr_hi32, ®->msgcode_rwbuffer[1]);
|
||||
writel(ARCMSR_INBOUND_MESG0_SET_CONFIG, ®->inbound_msgaddr0);
|
||||
@@ -2955,12 +2931,12 @@ static int arcmsr_bus_reset(struct scsi_cmnd *cmd)
|
||||
arcmsr_hardware_reset(acb);
|
||||
acb->acb_flags &= ~ACB_F_IOP_INITED;
|
||||
sleep_again:
|
||||
arcmsr_sleep_for_bus_reset(cmd);
|
||||
ssleep(ARCMSR_SLEEPTIME);
|
||||
if ((readl(®->outbound_msgaddr1) & ARCMSR_OUTBOUND_MESG1_FIRMWARE_OK) == 0) {
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d \n", acb->host->host_no, retry_count);
|
||||
if (retry_count > retrycount) {
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d\n", acb->host->host_no, retry_count);
|
||||
if (retry_count > ARCMSR_RETRYCOUNT) {
|
||||
acb->fw_flag = FW_DEADLOCK;
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!! \n", acb->host->host_no);
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!!\n", acb->host->host_no);
|
||||
return FAILED;
|
||||
}
|
||||
retry_count++;
|
||||
@@ -3025,12 +3001,12 @@ sleep_again:
|
||||
arcmsr_hardware_reset(acb);
|
||||
acb->acb_flags &= ~ACB_F_IOP_INITED;
|
||||
sleep:
|
||||
arcmsr_sleep_for_bus_reset(cmd);
|
||||
ssleep(ARCMSR_SLEEPTIME);
|
||||
if ((readl(®->host_diagnostic) & 0x04) != 0) {
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d \n", acb->host->host_no, retry_count);
|
||||
if (retry_count > retrycount) {
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, retry=%d\n", acb->host->host_no, retry_count);
|
||||
if (retry_count > ARCMSR_RETRYCOUNT) {
|
||||
acb->fw_flag = FW_DEADLOCK;
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!! \n", acb->host->host_no);
|
||||
printk(KERN_ERR "arcmsr%d: waiting for hw bus reset return, RETRY TERMINATED!!\n", acb->host->host_no);
|
||||
return FAILED;
|
||||
}
|
||||
retry_count++;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -8,11 +8,11 @@
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#ifndef BEISCSI_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -8,11 +8,11 @@
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#include "be.h"
|
||||
@@ -458,6 +458,7 @@ void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
|
||||
req_hdr->opcode = opcode;
|
||||
req_hdr->subsystem = subsystem;
|
||||
req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr));
|
||||
req_hdr->timeout = 120;
|
||||
}
|
||||
|
||||
static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -8,11 +8,11 @@
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#ifndef BEISCSI_CMDS_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -7,15 +7,14 @@
|
||||
* as published by the Free Software Foundation. The full GNU General
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Written by: Jayamohan Kallickal (jayamohank@serverengines.com)
|
||||
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#include <scsi/libiscsi.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -7,15 +7,14 @@
|
||||
* as published by the Free Software Foundation. The full GNU General
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Written by: Jayamohan Kallickal (jayamohank@serverengines.com)
|
||||
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#ifndef _BE_ISCSI_
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -7,16 +7,16 @@
|
||||
* as published by the Free Software Foundation. The full GNU General
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Written by: Jayamohan Kallickal (jayamohank@serverengines.com)
|
||||
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -420,7 +420,8 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
|
||||
return 0;
|
||||
|
||||
free_kset:
|
||||
iscsi_boot_destroy_kset(phba->boot_kset);
|
||||
if (phba->boot_kset)
|
||||
iscsi_boot_destroy_kset(phba->boot_kset);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -3464,23 +3465,23 @@ static void hwi_enable_intr(struct beiscsi_hba *phba)
|
||||
addr = (u8 __iomem *) ((u8 __iomem *) ctrl->pcicfg +
|
||||
PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET);
|
||||
reg = ioread32(addr);
|
||||
SE_DEBUG(DBG_LVL_8, "reg =x%08x\n", reg);
|
||||
|
||||
enabled = reg & MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
|
||||
if (!enabled) {
|
||||
reg |= MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
|
||||
SE_DEBUG(DBG_LVL_8, "reg =x%08x addr=%p\n", reg, addr);
|
||||
iowrite32(reg, addr);
|
||||
if (!phba->msix_enabled) {
|
||||
eq = &phwi_context->be_eq[0].q;
|
||||
}
|
||||
|
||||
if (!phba->msix_enabled) {
|
||||
eq = &phwi_context->be_eq[0].q;
|
||||
SE_DEBUG(DBG_LVL_8, "eq->id=%d\n", eq->id);
|
||||
hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
|
||||
} else {
|
||||
for (i = 0; i <= phba->num_cpus; i++) {
|
||||
eq = &phwi_context->be_eq[i].q;
|
||||
SE_DEBUG(DBG_LVL_8, "eq->id=%d\n", eq->id);
|
||||
hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
|
||||
} else {
|
||||
for (i = 0; i <= phba->num_cpus; i++) {
|
||||
eq = &phwi_context->be_eq[i].q;
|
||||
SE_DEBUG(DBG_LVL_8, "eq->id=%d\n", eq->id);
|
||||
hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4019,12 +4020,17 @@ static int beiscsi_mtask(struct iscsi_task *task)
|
||||
hwi_write_buffer(pwrb, task);
|
||||
break;
|
||||
case ISCSI_OP_NOOP_OUT:
|
||||
AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
|
||||
INI_RD_CMD);
|
||||
if (task->hdr->ttt == ISCSI_RESERVED_TAG)
|
||||
if (task->hdr->ttt != ISCSI_RESERVED_TAG) {
|
||||
AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
|
||||
TGT_DM_CMD);
|
||||
AMAP_SET_BITS(struct amap_iscsi_wrb, cmdsn_itt,
|
||||
pwrb, 0);
|
||||
AMAP_SET_BITS(struct amap_iscsi_wrb, dmsg, pwrb, 0);
|
||||
else
|
||||
} else {
|
||||
AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
|
||||
INI_RD_CMD);
|
||||
AMAP_SET_BITS(struct amap_iscsi_wrb, dmsg, pwrb, 1);
|
||||
}
|
||||
hwi_write_buffer(pwrb, task);
|
||||
break;
|
||||
case ISCSI_OP_TEXT:
|
||||
@@ -4144,10 +4150,11 @@ static void beiscsi_remove(struct pci_dev *pcidev)
|
||||
phba->ctrl.mbox_mem_alloced.size,
|
||||
phba->ctrl.mbox_mem_alloced.va,
|
||||
phba->ctrl.mbox_mem_alloced.dma);
|
||||
if (phba->boot_kset)
|
||||
iscsi_boot_destroy_kset(phba->boot_kset);
|
||||
iscsi_host_remove(phba->shost);
|
||||
pci_dev_put(phba->pcidev);
|
||||
iscsi_host_free(phba->shost);
|
||||
iscsi_boot_destroy_kset(phba->boot_kset);
|
||||
}
|
||||
|
||||
static void beiscsi_msix_enable(struct beiscsi_hba *phba)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -7,15 +7,14 @@
|
||||
* as published by the Free Software Foundation. The full GNU General
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Written by: Jayamohan Kallickal (jayamohank@serverengines.com)
|
||||
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#ifndef _BEISCSI_MAIN_
|
||||
@@ -35,7 +34,7 @@
|
||||
|
||||
#include "be.h"
|
||||
#define DRV_NAME "be2iscsi"
|
||||
#define BUILD_STR "2.0.549.0"
|
||||
#define BUILD_STR "2.103.298.0"
|
||||
#define BE_NAME "ServerEngines BladeEngine2" \
|
||||
"Linux iSCSI Driver version" BUILD_STR
|
||||
#define DRV_DESC BE_NAME " " "Driver"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -7,15 +7,14 @@
|
||||
* as published by the Free Software Foundation. The full GNU General
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Written by: Jayamohan Kallickal (jayamohank@serverengines.com)
|
||||
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#include "be_mgmt.h"
|
||||
@@ -203,8 +202,8 @@ int mgmt_epfw_cleanup(struct beiscsi_hba *phba, unsigned short chute)
|
||||
OPCODE_COMMON_ISCSI_CLEANUP, sizeof(*req));
|
||||
|
||||
req->chute = chute;
|
||||
req->hdr_ring_id = 0;
|
||||
req->data_ring_id = 0;
|
||||
req->hdr_ring_id = cpu_to_le16(HWI_GET_DEF_HDRQ_ID(phba));
|
||||
req->data_ring_id = cpu_to_le16(HWI_GET_DEF_BUFQ_ID(phba));
|
||||
|
||||
status = be_mcc_notify_wait(phba);
|
||||
if (status)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (C) 2005 - 2010 ServerEngines
|
||||
* Copyright (C) 2005 - 2011 Emulex
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -7,15 +7,14 @@
|
||||
* as published by the Free Software Foundation. The full GNU General
|
||||
* Public License is included in this distribution in the file called COPYING.
|
||||
*
|
||||
* Written by: Jayamohan Kallickal (jayamohank@serverengines.com)
|
||||
* Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
|
||||
*
|
||||
* Contact Information:
|
||||
* linux-drivers@serverengines.com
|
||||
*
|
||||
* ServerEngines
|
||||
* 209 N. Fair Oaks Ave
|
||||
* Sunnyvale, CA 94085
|
||||
* linux-drivers@emulex.com
|
||||
*
|
||||
* Emulex
|
||||
* 3333 Susan Street
|
||||
* Costa Mesa, CA 92626
|
||||
*/
|
||||
|
||||
#ifndef _BEISCSI_MGMT_
|
||||
|
||||
+43
-18
@@ -57,9 +57,19 @@ int pcie_max_read_reqsz;
|
||||
int bfa_debugfs_enable = 1;
|
||||
int msix_disable_cb = 0, msix_disable_ct = 0;
|
||||
|
||||
/* Firmware releated */
|
||||
u32 bfi_image_ct_fc_size, bfi_image_ct_cna_size, bfi_image_cb_fc_size;
|
||||
u32 *bfi_image_ct_fc, *bfi_image_ct_cna, *bfi_image_cb_fc;
|
||||
|
||||
#define BFAD_FW_FILE_CT_FC "ctfw_fc.bin"
|
||||
#define BFAD_FW_FILE_CT_CNA "ctfw_cna.bin"
|
||||
#define BFAD_FW_FILE_CB_FC "cbfw_fc.bin"
|
||||
|
||||
static u32 *bfad_load_fwimg(struct pci_dev *pdev);
|
||||
static void bfad_free_fwimg(void);
|
||||
static void bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
|
||||
u32 *bfi_image_size, char *fw_name);
|
||||
|
||||
static const char *msix_name_ct[] = {
|
||||
"cpe0", "cpe1", "cpe2", "cpe3",
|
||||
"rme0", "rme1", "rme2", "rme3",
|
||||
@@ -222,6 +232,9 @@ bfad_sm_created(struct bfad_s *bfad, enum bfad_sm_event event)
|
||||
if ((bfad->bfad_flags & BFAD_HAL_INIT_DONE)) {
|
||||
bfa_sm_send_event(bfad, BFAD_E_INIT_SUCCESS);
|
||||
} else {
|
||||
printk(KERN_WARNING
|
||||
"bfa %s: bfa init failed\n",
|
||||
bfad->pci_name);
|
||||
bfad->bfad_flags |= BFAD_HAL_INIT_FAIL;
|
||||
bfa_sm_send_event(bfad, BFAD_E_INIT_FAILED);
|
||||
}
|
||||
@@ -991,10 +1004,6 @@ bfad_cfg_pport(struct bfad_s *bfad, enum bfa_lport_role role)
|
||||
bfad->pport.roles |= BFA_LPORT_ROLE_FCP_IM;
|
||||
}
|
||||
|
||||
/* Setup the debugfs node for this scsi_host */
|
||||
if (bfa_debugfs_enable)
|
||||
bfad_debugfs_init(&bfad->pport);
|
||||
|
||||
bfad->bfad_flags |= BFAD_CFG_PPORT_DONE;
|
||||
|
||||
out:
|
||||
@@ -1004,10 +1013,6 @@ out:
|
||||
void
|
||||
bfad_uncfg_pport(struct bfad_s *bfad)
|
||||
{
|
||||
/* Remove the debugfs node for this scsi_host */
|
||||
kfree(bfad->regdata);
|
||||
bfad_debugfs_exit(&bfad->pport);
|
||||
|
||||
if ((supported_fc4s & BFA_LPORT_ROLE_FCP_IM) &&
|
||||
(bfad->pport.roles & BFA_LPORT_ROLE_FCP_IM)) {
|
||||
bfad_im_scsi_host_free(bfad, bfad->pport.im_port);
|
||||
@@ -1389,6 +1394,10 @@ bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid)
|
||||
bfad->pport.bfad = bfad;
|
||||
INIT_LIST_HEAD(&bfad->pbc_vport_list);
|
||||
|
||||
/* Setup the debugfs node for this bfad */
|
||||
if (bfa_debugfs_enable)
|
||||
bfad_debugfs_init(&bfad->pport);
|
||||
|
||||
retval = bfad_drv_init(bfad);
|
||||
if (retval != BFA_STATUS_OK)
|
||||
goto out_drv_init_failure;
|
||||
@@ -1404,6 +1413,9 @@ out_bfad_sm_failure:
|
||||
bfa_detach(&bfad->bfa);
|
||||
bfad_hal_mem_release(bfad);
|
||||
out_drv_init_failure:
|
||||
/* Remove the debugfs node for this bfad */
|
||||
kfree(bfad->regdata);
|
||||
bfad_debugfs_exit(&bfad->pport);
|
||||
mutex_lock(&bfad_mutex);
|
||||
bfad_inst--;
|
||||
list_del(&bfad->list_entry);
|
||||
@@ -1445,6 +1457,10 @@ bfad_pci_remove(struct pci_dev *pdev)
|
||||
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
|
||||
bfad_hal_mem_release(bfad);
|
||||
|
||||
/* Remove the debugfs node for this bfad */
|
||||
kfree(bfad->regdata);
|
||||
bfad_debugfs_exit(&bfad->pport);
|
||||
|
||||
/* Cleaning the BFAD instance */
|
||||
mutex_lock(&bfad_mutex);
|
||||
bfad_inst--;
|
||||
@@ -1550,7 +1566,7 @@ bfad_exit(void)
|
||||
}
|
||||
|
||||
/* Firmware handling */
|
||||
u32 *
|
||||
static void
|
||||
bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
|
||||
u32 *bfi_image_size, char *fw_name)
|
||||
{
|
||||
@@ -1558,27 +1574,25 @@ bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
|
||||
|
||||
if (request_firmware(&fw, fw_name, &pdev->dev)) {
|
||||
printk(KERN_ALERT "Can't locate firmware %s\n", fw_name);
|
||||
goto error;
|
||||
*bfi_image = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
*bfi_image = vmalloc(fw->size);
|
||||
if (NULL == *bfi_image) {
|
||||
printk(KERN_ALERT "Fail to allocate buffer for fw image "
|
||||
"size=%x!\n", (u32) fw->size);
|
||||
goto error;
|
||||
goto out;
|
||||
}
|
||||
|
||||
memcpy(*bfi_image, fw->data, fw->size);
|
||||
*bfi_image_size = fw->size/sizeof(u32);
|
||||
|
||||
return *bfi_image;
|
||||
|
||||
error:
|
||||
return NULL;
|
||||
out:
|
||||
release_firmware(fw);
|
||||
}
|
||||
|
||||
u32 *
|
||||
bfad_get_firmware_buf(struct pci_dev *pdev)
|
||||
static u32 *
|
||||
bfad_load_fwimg(struct pci_dev *pdev)
|
||||
{
|
||||
if (pdev->device == BFA_PCI_DEVICE_ID_CT_FC) {
|
||||
if (bfi_image_ct_fc_size == 0)
|
||||
@@ -1598,6 +1612,17 @@ bfad_get_firmware_buf(struct pci_dev *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
bfad_free_fwimg(void)
|
||||
{
|
||||
if (bfi_image_ct_fc_size && bfi_image_ct_fc)
|
||||
vfree(bfi_image_ct_fc);
|
||||
if (bfi_image_ct_cna_size && bfi_image_ct_cna)
|
||||
vfree(bfi_image_ct_cna);
|
||||
if (bfi_image_cb_fc_size && bfi_image_cb_fc)
|
||||
vfree(bfi_image_cb_fc);
|
||||
}
|
||||
|
||||
module_init(bfad_init);
|
||||
module_exit(bfad_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
* mount -t debugfs none /sys/kernel/debug
|
||||
*
|
||||
* BFA Hierarchy:
|
||||
* - bfa/host#
|
||||
* where the host number corresponds to the one under /sys/class/scsi_host/host#
|
||||
* - bfa/pci_dev:<pci_name>
|
||||
* where the pci_name corresponds to the one under /sys/bus/pci/drivers/bfa
|
||||
*
|
||||
* Debugging service available per host:
|
||||
* Debugging service available per pci_dev:
|
||||
* fwtrc: To collect current firmware trace.
|
||||
* drvtrc: To collect current driver trace
|
||||
* fwsave: To collect last saved fw trace as a result of firmware crash.
|
||||
@@ -489,11 +489,9 @@ static atomic_t bfa_debugfs_port_count;
|
||||
inline void
|
||||
bfad_debugfs_init(struct bfad_port_s *port)
|
||||
{
|
||||
struct bfad_im_port_s *im_port = port->im_port;
|
||||
struct bfad_s *bfad = im_port->bfad;
|
||||
struct Scsi_Host *shost = im_port->shost;
|
||||
struct bfad_s *bfad = port->bfad;
|
||||
const struct bfad_debugfs_entry *file;
|
||||
char name[16];
|
||||
char name[64];
|
||||
int i;
|
||||
|
||||
if (!bfa_debugfs_enable)
|
||||
@@ -510,17 +508,15 @@ bfad_debugfs_init(struct bfad_port_s *port)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup the host# directory for the port,
|
||||
* corresponds to the scsi_host num of this port.
|
||||
*/
|
||||
snprintf(name, sizeof(name), "host%d", shost->host_no);
|
||||
/* Setup the pci_dev debugfs directory for the port */
|
||||
snprintf(name, sizeof(name), "pci_dev:%s", bfad->pci_name);
|
||||
if (!port->port_debugfs_root) {
|
||||
port->port_debugfs_root =
|
||||
debugfs_create_dir(name, bfa_debugfs_root);
|
||||
if (!port->port_debugfs_root) {
|
||||
printk(KERN_WARNING
|
||||
"BFA host root dir creation failed\n");
|
||||
"bfa %s: debugfs root creation failed\n",
|
||||
bfad->pci_name);
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -536,8 +532,8 @@ bfad_debugfs_init(struct bfad_port_s *port)
|
||||
file->fops);
|
||||
if (!bfad->bfad_dentry_files[i]) {
|
||||
printk(KERN_WARNING
|
||||
"BFA host%d: create %s entry failed\n",
|
||||
shost->host_no, file->name);
|
||||
"bfa %s: debugfs %s creation failed\n",
|
||||
bfad->pci_name, file->name);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
@@ -550,8 +546,7 @@ err:
|
||||
inline void
|
||||
bfad_debugfs_exit(struct bfad_port_s *port)
|
||||
{
|
||||
struct bfad_im_port_s *im_port = port->im_port;
|
||||
struct bfad_s *bfad = im_port->bfad;
|
||||
struct bfad_s *bfad = port->bfad;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bfad_debugfs_files); i++) {
|
||||
@@ -562,9 +557,7 @@ bfad_debugfs_exit(struct bfad_port_s *port)
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the host# directory for the port,
|
||||
* corresponds to the scsi_host num of this port.
|
||||
*/
|
||||
* Remove the pci_dev debugfs directory for the port */
|
||||
if (port->port_debugfs_root) {
|
||||
debugfs_remove(port->port_debugfs_root);
|
||||
port->port_debugfs_root = NULL;
|
||||
|
||||
@@ -141,29 +141,4 @@ extern struct device_attribute *bfad_im_vport_attrs[];
|
||||
|
||||
irqreturn_t bfad_intx(int irq, void *dev_id);
|
||||
|
||||
/* Firmware releated */
|
||||
#define BFAD_FW_FILE_CT_FC "ctfw_fc.bin"
|
||||
#define BFAD_FW_FILE_CT_CNA "ctfw_cna.bin"
|
||||
#define BFAD_FW_FILE_CB_FC "cbfw_fc.bin"
|
||||
|
||||
u32 *bfad_get_firmware_buf(struct pci_dev *pdev);
|
||||
u32 *bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
|
||||
u32 *bfi_image_size, char *fw_name);
|
||||
|
||||
static inline u32 *
|
||||
bfad_load_fwimg(struct pci_dev *pdev)
|
||||
{
|
||||
return bfad_get_firmware_buf(pdev);
|
||||
}
|
||||
|
||||
static inline void
|
||||
bfad_free_fwimg(void)
|
||||
{
|
||||
if (bfi_image_ct_fc_size && bfi_image_ct_fc)
|
||||
vfree(bfi_image_ct_fc);
|
||||
if (bfi_image_ct_cna_size && bfi_image_ct_cna)
|
||||
vfree(bfi_image_ct_cna);
|
||||
if (bfi_image_cb_fc_size && bfi_image_cb_fc)
|
||||
vfree(bfi_image_cb_fc);
|
||||
}
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user