projects/linux·commit d4e06701

Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

d4e06701 · Linus Torvalds <[email protected]> · 2011-07-23 11:13:11 -07:00

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (77 commits)
  [SCSI] fix crash in scsi_dispatch_cmd()
  [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise
  [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu
  [SCSI] bfa: Update the driver version to 3.0.2.1
  [SCSI] bfa: Driver and BSG enhancements.
  [SCSI] bfa: Added support to query PHY.
  [SCSI] bfa: Added HBA diagnostics support.
  [SCSI] bfa: Added support for flash configuration
  [SCSI] bfa: Added support to obtain SFP info.
  [SCSI] bfa: Added support for CEE info and stats query.
  [SCSI] bfa: Extend BSG interface.
  [SCSI] bfa: FCS bug fixes.
  [SCSI] bfa: DMA memory allocation enhancement.
  [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.
  [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.
  [SCSI] bfa: Added Fabric Assigned Address(FAA) support
  [SCSI] bfa: IOC bug fixes.
  [SCSI] bfa: Enable ASIC block configuration and query.
  [SCSI] bnx2i: Updated copyright and bump version
  [SCSI] bnx2i: Modified to skip CNIC registration if iSCSI is not supported
  ...

Fix up some trivial conflicts in:
 - drivers/scsi/bnx2fc/{bnx2fc.h,bnx2fc_fcoe.c}:
	Crazy broadcom version number conflicts
 - drivers/target/tcm_fc/tfc_cmd.c
	Just trivial cleanups done on adjacent lines
Commit
d4e06701b89286a306b31e20ec69a904fae374a1
Parents
e4980371 · 87045b03

Merge commit. Changes below are compared with the first parent: e4980371.

Changes

96 files changed · +13311 −3194

FileStatusAddDelContent
MAINTAINERSmodified+8−1View file
block/blk-core.cmodified+3−0View file
block/blk-exec.cmodified+7−0View file
drivers/firmware/iscsi_ibft.cmodified+11−3View file
drivers/scsi/aha152x.cmodified+13−4View file
drivers/scsi/atari_NCR5380.cmodified+5−1View file
drivers/scsi/atari_scsi.cmodified+1−0View file
drivers/scsi/be2iscsi/be_main.cmodified+102−97View file
drivers/scsi/bfa/Makefilemodified+1−1View file
drivers/scsi/bfa/bfa.hmodified+74−70View file
drivers/scsi/bfa/bfa_core.cmodified+634−244View file
drivers/scsi/bfa/bfa_defs.hmodified+549−34View file
drivers/scsi/bfa/bfa_defs_fcs.hmodified+15−12View file
drivers/scsi/bfa/bfa_defs_svc.hmodified+160−10View file
drivers/scsi/bfa/bfa_fc.hmodified+1−10View file
drivers/scsi/bfa/bfa_fcbuild.cmodified+41−8View file
drivers/scsi/bfa/bfa_fcbuild.hmodified+13−3View file
drivers/scsi/bfa/bfa_fcpim.cmodified+371−107View file
drivers/scsi/bfa/bfa_fcpim.hmodified+67−22View file
drivers/scsi/bfa/bfa_fcs.cmodified+137−16View file
drivers/scsi/bfa/bfa_fcs.hmodified+27−4View file
drivers/scsi/bfa/bfa_fcs_fcpim.cmodified+10−0View file
drivers/scsi/bfa/bfa_fcs_lport.cmodified+309−20View file
drivers/scsi/bfa/bfa_fcs_rport.cmodified+82−39View file
drivers/scsi/bfa/bfa_hw_cb.cmodified+47−47View file
drivers/scsi/bfa/bfa_hw_ct.cmodified+34−55View file
drivers/scsi/bfa/bfa_ioc.cmodified+2819−173View file
drivers/scsi/bfa/bfa_ioc.hmodified+537−72View file
drivers/scsi/bfa/bfa_ioc_cb.cmodified+27−42View file
drivers/scsi/bfa/bfa_ioc_ct.cmodified+425−91View file
drivers/scsi/bfa/bfa_modules.hmodified+17−10View file
drivers/scsi/bfa/bfa_port.cmodified+408−20View file
drivers/scsi/bfa/bfa_port.hmodified+60−2View file
drivers/scsi/bfa/bfa_svc.cmodified+852−284View file
drivers/scsi/bfa/bfa_svc.hmodified+121−30View file
drivers/scsi/bfa/bfad.cmodified+154−141View file
drivers/scsi/bfa/bfad_attr.cmodified+44−9View file
drivers/scsi/bfa/bfad_bsg.cadded+2163−0View file
drivers/scsi/bfa/bfad_bsg.hadded+509−0View file
drivers/scsi/bfa/bfad_debugfs.cmodified+7−7View file
drivers/scsi/bfa/bfad_drv.hmodified+9−17View file
drivers/scsi/bfa/bfad_im.cmodified+13−19View file
drivers/scsi/bfa/bfad_im.hmodified+3−0View file
drivers/scsi/bfa/bfi.hmodified+595−42View file
drivers/scsi/bfa/bfi_cbreg.hdeleted+0−305View before deletion
drivers/scsi/bfa/bfi_ctreg.hdeleted+0−636View before deletion
drivers/scsi/bfa/bfi_ms.hmodified+122−37View file
drivers/scsi/bfa/bfi_reg.hadded+450−0View file
drivers/scsi/bnx2fc/bnx2fc.hmodified+7−1View file
drivers/scsi/bnx2fc/bnx2fc_fcoe.cmodified+30−1View file
drivers/scsi/bnx2fc/bnx2fc_hwi.cmodified+23−1View file
drivers/scsi/bnx2fc/bnx2fc_io.cmodified+1−1View file
drivers/scsi/bnx2i/57xx_iscsi_constants.hmodified+1−1View file
drivers/scsi/bnx2i/57xx_iscsi_hsi.hmodified+1−1View file
drivers/scsi/bnx2i/bnx2i.hmodified+29−4View file
drivers/scsi/bnx2i/bnx2i_hwi.cmodified+167−32View file
drivers/scsi/bnx2i/bnx2i_init.cmodified+135−18View file
drivers/scsi/bnx2i/bnx2i_iscsi.cmodified+33−5View file
drivers/scsi/bnx2i/bnx2i_sysfs.cmodified+1−1View file
drivers/scsi/cxgbi/cxgb3i/cxgb3i.cmodified+3−1View file
drivers/scsi/fcoe/fcoe.cmodified+133−41View file
drivers/scsi/fnic/fnic.hmodified+1−1View file
drivers/scsi/fnic/fnic_main.cmodified+4−17View file
drivers/scsi/fnic/fnic_scsi.cmodified+1−1View file
drivers/scsi/iscsi_boot_sysfs.cmodified+22−9View file
drivers/scsi/iscsi_tcp.cmodified+41−20View file
drivers/scsi/libfc/fc_exch.cmodified+24−2View file
drivers/scsi/libfc/fc_lport.cmodified+2−0View file
drivers/scsi/libfc/fc_rport.cmodified+14−0View file
drivers/scsi/libiscsi.cmodified+7−7View file
drivers/scsi/libiscsi_tcp.cmodified+3−11View file
drivers/scsi/lpfc/lpfc_debugfs.cmodified+2−1View file
drivers/scsi/mac_scsi.cmodified+2−12View file
drivers/scsi/mpt2sas/mpi/mpi2.hmodified+9−3View file
drivers/scsi/mpt2sas/mpi/mpi2_cnfg.hmodified+58−16View file
drivers/scsi/mpt2sas/mpi/mpi2_init.hmodified+5−1View file
drivers/scsi/mpt2sas/mpi/mpi2_ioc.hmodified+3−1View file
drivers/scsi/mpt2sas/mpt2sas_base.cmodified+42−42View file
drivers/scsi/mpt2sas/mpt2sas_base.hmodified+69−8View file
drivers/scsi/mpt2sas/mpt2sas_ctl.cmodified+6−6View file
drivers/scsi/mpt2sas/mpt2sas_debug.hmodified+1−1View file
drivers/scsi/mpt2sas/mpt2sas_scsih.cmodified+218−61View file
drivers/scsi/mpt2sas/mpt2sas_transport.cmodified+9−15View file
drivers/scsi/scsi_devinfo.cmodified+2−0View file
drivers/scsi/scsi_lib.cmodified+2−0View file
drivers/scsi/ses.cmodified+5−1View file
drivers/scsi/sr.cmodified+42−4View file
drivers/scsi/sr.hmodified+7−0View file
drivers/scsi/sun3_NCR5380.cmodified+23−75View file
drivers/scsi/sun3_scsi.cmodified+8−3View file
drivers/scsi/sun3_scsi_vme.cmodified+8−3View file
drivers/target/tcm_fc/tfc_cmd.cmodified+19−7View file
include/linux/iscsi_boot_sysfs.hmodified+13−3View file
include/scsi/iscsi_proto.hmodified+9−9View file
include/scsi/libfc.hmodified+8−0View file
include/scsi/libiscsi.hmodified+1−1View file

Only the first 600 diff lines are shown. Download the complete patch.

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 7521440..612316c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1553,6 +1553,12 @@ L: [email protected]
S: Supported
F: drivers/staging/brcm80211/
+BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER
+M: Bhanu Prakash Gollapudi <[email protected]>
+S: Supported
+F: drivers/scsi/bnx2fc/
+
BROCADE BFA FC SCSI DRIVER
M: Jing Huang <[email protected]>
@@ -1775,7 +1781,8 @@ F: include/linux/clk.h
CISCO FCOE HBA DRIVER
M: Abhijeet Joglekar <[email protected]>
-M: Joe Eykholt <[email protected]>
+M: Venkata Siva Vijayendra Bhamidipati <[email protected]>
+M: Brian Uchino <[email protected]>
S: Supported
F: drivers/scsi/fnic/

block/blk-core.c

View file
diff --git a/block/blk-core.c b/block/blk-core.c
index d2f8f40..1d49e1c 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -839,6 +839,9 @@ struct request *blk_get_request(struct request_queue *q, int rw, gfp_t gfp_mask)
{
struct request *rq;
+ if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
+ return NULL;
+
BUG_ON(rw != READ && rw != WRITE);
spin_lock_irq(q->queue_lock);

block/blk-exec.c

View file
diff --git a/block/blk-exec.c b/block/blk-exec.c
index 8a0e7ec..a1ebceb 100644
--- a/block/blk-exec.c
+++ b/block/blk-exec.c
@@ -50,6 +50,13 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
{
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
+ if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) {
+ rq->errors = -ENXIO;
+ if (rq->end_io)
+ rq->end_io(rq, rq->errors);
+ return;
+ }
+
rq->rq_disk = bd_disk;
rq->end_io = done;
WARN_ON(irqs_disabled());

drivers/firmware/iscsi_ibft.c

View file
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index ce33f46..c811cb1 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -566,6 +566,11 @@ static mode_t __init ibft_check_initiator_for(void *data, int type)
return rc;
}
+static void ibft_kobj_release(void *data)
+{
+ kfree(data);
+}
+
/*
* Helper function for ibft_register_kobjects.
*/
@@ -595,7 +600,8 @@ static int __init ibft_create_kobject(struct acpi_table_ibft *header,
boot_kobj = iscsi_boot_create_initiator(boot_kset, hdr->index,
ibft_kobj,
ibft_attr_show_initiator,
- ibft_check_initiator_for);
+ ibft_check_initiator_for,
+ ibft_kobj_release);
if (!boot_kobj) {
rc = -ENOMEM;
goto free_ibft_obj;
@@ -610,7 +616,8 @@ static int __init ibft_create_kobject(struct acpi_table_ibft *header,
boot_kobj = iscsi_boot_create_ethernet(boot_kset, hdr->index,
ibft_kobj,
ibft_attr_show_nic,
- ibft_check_nic_for);
+ ibft_check_nic_for,
+ ibft_kobj_release);
if (!boot_kobj) {
rc = -ENOMEM;
goto free_ibft_obj;
@@ -625,7 +632,8 @@ static int __init ibft_create_kobject(struct acpi_table_ibft *header,
boot_kobj = iscsi_boot_create_target(boot_kset, hdr->index,
ibft_kobj,
ibft_attr_show_target,
- ibft_check_tgt_for);
+ ibft_check_tgt_for,
+ ibft_kobj_release);
if (!boot_kobj) {
rc = -ENOMEM;
goto free_ibft_obj;

drivers/scsi/aha152x.c

View file
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index c5169f0..f17c92c 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -422,10 +422,19 @@ MODULE_PARM_DESC(aha152x1, "parameters for second controller");
#ifdef __ISAPNP__
static struct isapnp_device_id id_table[] __devinitdata = {
- { ISAPNP_ANY_ID, ISAPNP_ANY_ID,
- ISAPNP_VENDOR('A','D','P'), ISAPNP_FUNCTION(0x1505), 0 },
- { ISAPNP_ANY_ID, ISAPNP_ANY_ID,
- ISAPNP_VENDOR('A','D','P'), ISAPNP_FUNCTION(0x1530), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1502), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1505), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1510), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1515), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1520), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x2015), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1522), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x2215), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1530), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x3015), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1532), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x3215), 0 },
+ { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x6360), 0 },
{ ISAPNP_DEVICE_SINGLE_END, }
};
MODULE_DEVICE_TABLE(isapnp, id_table);

drivers/scsi/atari_NCR5380.c

View file
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index ea439f9..2db79b4 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -892,6 +892,11 @@ static int __init NCR5380_init(struct Scsi_Host *instance, int flags)
return 0;
}
+static void NCR5380_exit(struct Scsi_Host *instance)
+{
+ /* Empty, as we didn't schedule any delayed work */
+}
+
/*
* Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
* void (*done)(Scsi_Cmnd *))
@@ -914,7 +919,6 @@ static int NCR5380_queue_command_lck(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
{
SETUP_HOSTDATA(cmd->device->host);
Scsi_Cmnd *tmp;
- int oldto;
unsigned long flags;
#if (NDEBUG & NDEBUG_NO_WRITE)

drivers/scsi/atari_scsi.c

View file
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index 3e8658e..04a154f 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -730,6 +730,7 @@ int atari_scsi_release(struct Scsi_Host *sh)
free_irq(IRQ_TT_MFP_SCSI, sh);
if (atari_dma_buffer)
atari_stram_free(atari_dma_buffer);
+ NCR5380_exit(sh);
return 1;
}

drivers/scsi/be2iscsi/be_main.c

View file
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 94b9a07..0a9bdfa 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -215,73 +215,62 @@ unlock:
static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf)
{
struct beiscsi_hba *phba = data;
+ struct mgmt_session_info *boot_sess = &phba->boot_sess;
+ struct mgmt_conn_info *boot_conn = &boot_sess->conn_list[0];
char *str = buf;
int rc;
switch (type) {
case ISCSI_BOOT_TGT_NAME:
rc = sprintf(buf, "%.*s\n",
- (int)strlen(phba->boot_sess.target_name),
- (char *)&phba->boot_sess.target_name);
+ (int)strlen(boot_sess->target_name),
+ (char *)&boot_sess->target_name);
break;
case ISCSI_BOOT_TGT_IP_ADDR:
- if (phba->boot_sess.conn_list[0].dest_ipaddr.ip_type == 0x1)
+ if (boot_conn->dest_ipaddr.ip_type == 0x1)
rc = sprintf(buf, "%pI4\n",
- (char *)&phba->boot_sess.conn_list[0].
- dest_ipaddr.ip_address);
+ (char *)&boot_conn->dest_ipaddr.ip_address);
else
rc = sprintf(str, "%pI6\n",
- (char *)&phba->boot_sess.conn_list[0].
- dest_ipaddr.ip_address);
+ (char *)&boot_conn->dest_ipaddr.ip_address);
break;
case ISCSI_BOOT_TGT_PORT:
- rc = sprintf(str, "%d\n", phba->boot_sess.conn_list[0].
- dest_port);
+ rc = sprintf(str, "%d\n", boot_conn->dest_port);
break;
case ISCSI_BOOT_TGT_CHAP_NAME:
rc = sprintf(str, "%.*s\n",
- phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- target_chap_name_length,
- (char *)&phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- target_chap_name);
+ boot_conn->negotiated_login_options.auth_data.chap.
+ target_chap_name_length,
+ (char *)&boot_conn->negotiated_login_options.
+ auth_data.chap.target_chap_name);
break;
case ISCSI_BOOT_TGT_CHAP_SECRET:
rc = sprintf(str, "%.*s\n",
- phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- target_secret_length,
- (char *)&phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- target_secret);
-
+ boot_conn->negotiated_login_options.auth_data.chap.
+ target_secret_length,
+ (char *)&boot_conn->negotiated_login_options.
+ auth_data.chap.target_secret);
break;
case ISCSI_BOOT_TGT_REV_CHAP_NAME:
rc = sprintf(str, "%.*s\n",
- phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- intr_chap_name_length,
- (char *)&phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- intr_chap_name);
-
+ boot_conn->negotiated_login_options.auth_data.chap.
+ intr_chap_name_length,
+ (char *)&boot_conn->negotiated_login_options.
+ auth_data.chap.intr_chap_name);
break;
case ISCSI_BOOT_TGT_REV_CHAP_SECRET:
- rc = sprintf(str, "%.*s\n",
- phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- intr_secret_length,
- (char *)&phba->boot_sess.conn_list[0].
- negotiated_login_options.auth_data.chap.
- intr_secret);
+ rc = sprintf(str, "%.*s\n",
+ boot_conn->negotiated_login_options.auth_data.chap.
+ intr_secret_length,
+ (char *)&boot_conn->negotiated_login_options.
+ auth_data.chap.intr_secret);
break;
case ISCSI_BOOT_TGT_FLAGS:
- rc = sprintf(str, "2\n");
+ rc = sprintf(str, "2\n");
break;
case ISCSI_BOOT_TGT_NIC_ASSOC:
- rc = sprintf(str, "0\n");
+ rc = sprintf(str, "0\n");
break;
default:
rc = -ENOSYS;
@@ -315,10 +304,10 @@ static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf)
switch (type) {
case ISCSI_BOOT_ETH_FLAGS:
- rc = sprintf(str, "2\n");
+ rc = sprintf(str, "2\n");
break;
case ISCSI_BOOT_ETH_INDEX:
- rc = sprintf(str, "0\n");
+ rc = sprintf(str, "0\n");
break;
case ISCSI_BOOT_ETH_MAC:
rc = beiscsi_get_macaddr(buf, phba);
@@ -391,40 +380,6 @@ static mode_t beiscsi_eth_get_attr_visibility(void *data, int type)
return rc;
}
-static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
-{
- struct iscsi_boot_kobj *boot_kobj;
-
- phba->boot_kset = iscsi_boot_create_host_kset(phba->shost->host_no);
- if (!phba->boot_kset)
- return -ENOMEM;
-
- /* get boot info using mgmt cmd */
- boot_kobj = iscsi_boot_create_target(phba->boot_kset, 0, phba,
- beiscsi_show_boot_tgt_info,
- beiscsi_tgt_get_attr_visibility);
- if (!boot_kobj)
- goto free_kset;
-
- boot_kobj = iscsi_boot_create_initiator(phba->boot_kset, 0, phba,
- beiscsi_show_boot_ini_info,
- beiscsi_ini_get_attr_visibility);
- if (!boot_kobj)
- goto free_kset;
-
- boot_kobj = iscsi_boot_create_ethernet(phba->boot_kset, 0, phba,
- beiscsi_show_boot_eth_info,
- beiscsi_eth_get_attr_visibility);
- if (!boot_kobj)
- goto free_kset;
- return 0;
-
-free_kset:
- if (phba->boot_kset)
- iscsi_boot_destroy_kset(phba->boot_kset);
- return -ENOMEM;
-}
-
/*------------------- PCI Driver operations and data ----------------- */
static DEFINE_PCI_DEVICE_TABLE(beiscsi_pci_id_table) = {
{ PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) },
@@ -483,14 +438,6 @@ static struct beiscsi_hba *beiscsi_hba_alloc(struct pci_dev *pcidev)
if (iscsi_host_add(shost, &phba->pcidev->dev))
goto free_devices;
- if (beiscsi_setup_boot_info(phba))
- /*
- * log error but continue, because we may not be using
- * iscsi boot.
- */
- shost_printk(KERN_ERR, phba->shost, "Could not set up "
- "iSCSI boot info.");
-
return phba;
free_devices:
@@ -3511,6 +3458,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
unsigned int tag, wrb_num;
unsigned short status, extd_status;
struct be_queue_info *mccq = &phba->ctrl.mcc_obj.q;
+ int ret = -ENOMEM;
tag = beiscsi_get_boot_target(phba);
if (!tag) {
@@ -3535,8 +3483,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
boot_resp = embedded_payload(wrb);
if (boot_resp->boot_session_handle < 0) {
- printk(KERN_ERR "No Boot Session for this pci_func,"
- "session Hndl = %d\n", boot_resp->boot_session_handle);
+ shost_printk(KERN_INFO, phba->shost, "No Boot Session.\n");
return -ENXIO;
}
@@ -3574,14 +3521,70 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
wrb = queue_get_wrb(mccq, wrb_num);
free_mcc_tag(&phba->ctrl, tag);
session_resp = nonemb_cmd.va ;
+
memcpy(&phba->boot_sess, &session_resp->session_info,
sizeof(struct mgmt_session_info));
- pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
- nonemb_cmd.va, nonemb_cmd.dma);
- return 0;
+ ret = 0;
+
boot_freemem:
pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
nonemb_cmd.va, nonemb_cmd.dma);
+ return ret;
+}
+
+static void beiscsi_boot_release(void *data)
+{
+ struct beiscsi_hba *phba = data;
+
+ scsi_host_put(phba->shost);
+}
+
+static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
+{
+ struct iscsi_boot_kobj *boot_kobj;
+
+ /* get boot info using mgmt cmd */
+ if (beiscsi_get_boot_info(phba))
+ /* Try to see if we can carry on without this */
+ return 0;
+
+ phba->boot_kset = iscsi_boot_create_host_kset(phba->shost->host_no);
+ if (!phba->boot_kset)
+ return -ENOMEM;
+
+ /* get a ref because the show function will ref the phba */
+ if (!scsi_host_get(phba->shost))
+ goto free_kset;
+ boot_kobj = iscsi_boot_create_target(phba->boot_kset, 0, phba,
+ beiscsi_show_boot_tgt_info,
+ beiscsi_tgt_get_attr_visibility,
+ beiscsi_boot_release);
+ if (!boot_kobj)
+ goto put_shost;
+
+ if (!scsi_host_get(phba->shost))
+ goto free_kset;
+ boot_kobj = iscsi_boot_create_initiator(phba->boot_kset, 0, phba,
+ beiscsi_show_boot_ini_info,
+ beiscsi_ini_get_attr_visibility,
+ beiscsi_boot_release);
+ if (!boot_kobj)
+ goto put_shost;
+
+ if (!scsi_host_get(phba->shost))
+ goto free_kset;
+ boot_kobj = iscsi_boot_create_ethernet(phba->boot_kset, 0, phba,
+ beiscsi_show_boot_eth_info,
+ beiscsi_eth_get_attr_visibility,
+ beiscsi_boot_release);
+ if (!boot_kobj)
+ goto put_shost;
+ return 0;
+
+put_shost:
+ scsi_host_put(phba->shost);
+free_kset:
+ iscsi_boot_destroy_kset(phba->boot_kset);
return -ENOMEM;
}
@@ -3963,11 +3966,10 @@ static int beiscsi_iotask(struct iscsi_task *task, struct scatterlist *sg,
}
memcpy(&io_task->cmd_bhs->iscsi_data_pdu.
dw[offsetof(struct amap_pdu_data_out, lun) / 32],
- io_task->cmd_bhs->iscsi_hdr.lun, sizeof(struct scsi_lun));
+ &io_task->cmd_bhs->iscsi_hdr.lun, sizeof(struct scsi_lun));
AMAP_SET_BITS(struct amap_iscsi_wrb, lun, pwrb,
- cpu_to_be16((unsigned short)io_task->cmd_bhs->iscsi_hdr.
- lun[0]));
+ cpu_to_be16(*(unsigned short *)&io_task->cmd_bhs->iscsi_hdr.lun));
AMAP_SET_BITS(struct amap_iscsi_wrb, r2t_exp_dtl, pwrb, xferlen);
AMAP_SET_BITS(struct amap_iscsi_wrb, wrb_idx, pwrb,
io_task->pwrb_handle->wrb_index);
@@ -4150,8 +4152,7 @@ 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_boot_destroy_kset(phba->boot_kset);
iscsi_host_remove(phba->shost);
pci_dev_put(phba->pcidev);
iscsi_host_free(phba->shost);
@@ -4310,11 +4311,15 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev,
goto free_blkenbld;
}
hwi_enable_intr(phba);
- ret = beiscsi_get_boot_info(phba);
- if (ret < 0) {
- shost_printk(KERN_ERR, phba->shost, "beiscsi_dev_probe-"
- "No Boot Devices !!!!!\n");
- }
+
+ if (beiscsi_setup_boot_info(phba))
+ /*
+ * log error but continue, because we may not be using
+ * iscsi boot.
+ */
+ shost_printk(KERN_ERR, phba->shost, "Could not set up "
+ "iSCSI boot info.");
+
SE_DEBUG(DBG_LVL_8, "\n\n\n SUCCESS - DRIVER LOADED\n\n\n");
return 0;

drivers/scsi/bfa/Makefile

View file
diff --git a/drivers/scsi/bfa/Makefile b/drivers/scsi/bfa/Makefile
index 4ce6f49..475cf92 100644
--- a/drivers/scsi/bfa/Makefile
+++ b/drivers/scsi/bfa/Makefile
@@ -1,6 +1,6 @@
obj-$(CONFIG_SCSI_BFA_FC) := bfa.o
-bfa-y := bfad.o bfad_im.o bfad_attr.o bfad_debugfs.o
+bfa-y := bfad.o bfad_im.o bfad_attr.o bfad_debugfs.o bfad_bsg.o
bfa-y += bfa_ioc.o bfa_ioc_cb.o bfa_ioc_ct.o bfa_hw_cb.o bfa_hw_ct.o
bfa-y += bfa_fcs.o bfa_fcs_lport.o bfa_fcs_rport.o bfa_fcs_fcpim.o bfa_fcbuild.o
bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_svc.o

drivers/scsi/bfa/bfa.h

View file
diff --git a/drivers/scsi/bfa/bfa.h b/drivers/scsi/bfa/bfa.h
index 7be6b5a..3b0af11 100644
--- a/drivers/scsi/bfa/bfa.h
+++ b/drivers/scsi/bfa/bfa.h
@@ -27,7 +27,6 @@
struct bfa_s;
typedef void (*bfa_isr_func_t) (struct bfa_s *bfa, struct bfi_msg_s *m);
-typedef void (*bfa_cb_cbfn_t) (void *cbarg, bfa_boolean_t complete);
/*
* Interrupt message handlers
@@ -54,7 +53,8 @@ void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m);
((void *)((struct bfi_msg_s *)((__bfa)->iocfc.req_cq_ba[__reqq].kva) \
+ bfa_reqq_pi((__bfa), (__reqq)))))
-#define bfa_reqq_produce(__bfa, __reqq) do { \
+#define bfa_reqq_produce(__bfa, __reqq, __mh) do { \
+ (__mh).mtag.h2i.qid = (__bfa)->iocfc.hw_qid[__reqq];\
(__bfa)->iocfc.req_cq_pi[__reqq]++; \
(__bfa)->iocfc.req_cq_pi[__reqq] &= \
((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1); \
@@ -76,16 +76,6 @@ void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m);
} while (0)
/*
- * Queue element to wait for room in request queue. FIFO order is
- * maintained when fullfilling requests.
- */
-struct bfa_reqq_wait_s {
- struct list_head qe;
- void (*qresume) (void *cbarg);
- void *cbarg;
-};
-
-/*
* Circular queue usage assignments
*/
enum {
@@ -128,18 +118,6 @@ bfa_reqq_winit(struct bfa_reqq_wait_s *wqe, void (*qresume) (void *cbarg),
#define bfa_reqq_wcancel(__wqe) list_del(&(__wqe)->qe)
-
-/*
- * Generic BFA callback element.
- */
-struct bfa_cb_qe_s {
- struct list_head qe;
- bfa_cb_cbfn_t cbfn;
- bfa_boolean_t once;
- u32 rsvd;
- void *cbarg;
-};
-
#define bfa_cb_queue(__bfa, __hcb_qe, __cbfn, __cbarg) do { \
(__hcb_qe)->cbfn = (__cbfn); \
(__hcb_qe)->cbarg = (__cbarg); \
@@ -172,44 +150,14 @@ struct bfa_pciid_s {
extern char bfa_version[];
-/*
- * BFA memory resources
- */
-enum bfa_mem_type {
- BFA_MEM_TYPE_KVA = 1, /* Kernel Virtual Memory *(non-dma-able) */
- BFA_MEM_TYPE_DMA = 2, /* DMA-able memory */
- BFA_MEM_TYPE_MAX = BFA_MEM_TYPE_DMA,
-};
-
-struct bfa_mem_elem_s {
- enum bfa_mem_type mem_type; /* see enum bfa_mem_type */
- u32 mem_len; /* Total Length in Bytes */
- u8 *kva; /* kernel virtual address */
- u64 dma; /* dma address if DMA memory */
- u8 *kva_curp; /* kva allocation cursor */
- u64 dma_curp; /* dma allocation cursor */
-};
-
-struct bfa_meminfo_s {
- struct bfa_mem_elem_s meminfo[BFA_MEM_TYPE_MAX];
-};
-#define bfa_meminfo_kva(_m) \
- ((_m)->meminfo[BFA_MEM_TYPE_KVA - 1].kva_curp)
-#define bfa_meminfo_dma_virt(_m) \
- ((_m)->meminfo[BFA_MEM_TYPE_DMA - 1].kva_curp)
-#define bfa_meminfo_dma_phys(_m) \
- ((_m)->meminfo[BFA_MEM_TYPE_DMA - 1].dma_curp)
-
struct bfa_iocfc_regs_s {
void __iomem *intr_status;
void __iomem *intr_mask;
void __iomem *cpe_q_pi[BFI_IOC_MAX_CQS];
void __iomem *cpe_q_ci[BFI_IOC_MAX_CQS];
- void __iomem *cpe_q_depth[BFI_IOC_MAX_CQS];
void __iomem *cpe_q_ctrl[BFI_IOC_MAX_CQS];
void __iomem *rme_q_ci[BFI_IOC_MAX_CQS];
void __iomem *rme_q_pi[BFI_IOC_MAX_CQS];
- void __iomem *rme_q_depth[BFI_IOC_MAX_CQS];
void __iomem *rme_q_ctrl[BFI_IOC_MAX_CQS];
};
@@ -231,25 +179,55 @@ struct bfa_hwif_s {
void (*hw_reqq_ack)(struct bfa_s *bfa, int reqq);
void (*hw_rspq_ack)(struct bfa_s *bfa, int rspq);
void (*hw_msix_init)(struct bfa_s *bfa, int nvecs);
- void (*hw_msix_install)(struct bfa_s *bfa);

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_defs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_defs_fcs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_defs_svc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcbuild.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcbuild.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcpim.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcpim.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs_fcpim.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs_lport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs_rport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_hw_cb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_hw_ct.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc_cb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc_ct.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_modules.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_port.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_port.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_svc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_svc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_attr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_bsg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_bsg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_drv.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_im.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_im.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi_cbreg.h

View before deletion

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi_ctreg.h

View before deletion

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi_ms.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi_reg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2fc/bnx2fc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2fc/bnx2fc_fcoe.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2fc/bnx2fc_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2fc/bnx2fc_io.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/57xx_iscsi_constants.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/57xx_iscsi_hsi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_iscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/cxgbi/cxgb3i/cxgb3i.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fcoe/fcoe.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fnic/fnic.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fnic/fnic_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fnic/fnic_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/iscsi_boot_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/iscsi_tcp.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libfc/fc_exch.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libfc/fc_lport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libfc/fc_rport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libiscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libiscsi_tcp.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mac_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_init.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_ioc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_base.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_ctl.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_debug.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_scsih.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_transport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_devinfo.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ses.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sr.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sun3_NCR5380.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sun3_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sun3_scsi_vme.c

View file

This diff is incomplete. Download the complete patch.

drivers/target/tcm_fc/tfc_cmd.c

View file

This diff is incomplete. Download the complete patch.

include/linux/iscsi_boot_sysfs.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/iscsi_proto.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/libfc.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/libiscsi.h

View file

This diff is incomplete. Download the complete patch.