Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343706
b: refs/heads/master
c: 22abeef
h: refs/heads/master
v: v3
  • Loading branch information
John Soni Jose authored and James Bottomley committed Nov 27, 2012
1 parent 577942c commit e944ec5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 139a1b1e777144aa745f10741e2fe09b93e63c38
refs/heads/master: 22abeef0fa251ec0c93e377da66800ebd881fdc7
15 changes: 13 additions & 2 deletions trunk/drivers/scsi/be2iscsi/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3325,8 +3325,19 @@ static void find_num_cpus(struct beiscsi_hba *phba)

num_cpus = num_online_cpus();

phba->num_cpus = (num_cpus >= BEISCSI_MAX_NUM_CPU) ?
(BEISCSI_MAX_NUM_CPU - 1) : num_cpus;
switch (phba->generation) {
case BE_GEN2:
case BE_GEN3:
phba->num_cpus = (num_cpus > BEISCSI_MAX_NUM_CPUS) ?
BEISCSI_MAX_NUM_CPUS : num_cpus;
break;
case BE_GEN4:
phba->num_cpus = (num_cpus > OC_SKH_MAX_NUM_CPUS) ?
OC_SKH_MAX_NUM_CPUS : num_cpus;
break;
default:
phba->num_cpus = 1;
}
}

static int hwi_init_port(struct beiscsi_hba *phba)
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/scsi/be2iscsi/be_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@
#define BE2_DEFPDU_HDR_SZ 64
#define BE2_DEFPDU_DATA_SZ 8192

#define MAX_CPUS 31
#define BEISCSI_MAX_NUM_CPU 8
#define MAX_CPUS 64
#define BEISCSI_MAX_NUM_CPUS 7
#define OC_SKH_MAX_NUM_CPUS 63


#define BEISCSI_SGLIST_ELEMENTS 30

#define BEISCSI_CMD_PER_LUN 128 /* scsi_host->cmd_per_lun */
Expand Down Expand Up @@ -279,8 +282,8 @@ struct beiscsi_hba {
unsigned short asic_revision;
unsigned int num_cpus;
unsigned int nxt_cqid;
struct msix_entry msix_entries[MAX_CPUS + 1];
char *msi_name[MAX_CPUS + 1];
struct msix_entry msix_entries[MAX_CPUS];
char *msi_name[MAX_CPUS];
bool msix_enabled;
struct be_mem_descriptor *init_mem;

Expand Down Expand Up @@ -841,7 +844,7 @@ struct hwi_context_memory {
u16 max_eqd; /* in usecs */
u16 cur_eqd; /* in usecs */
struct be_eq_obj be_eq[MAX_CPUS];
struct be_queue_info be_cq[MAX_CPUS];
struct be_queue_info be_cq[MAX_CPUS - 1];

struct be_queue_info be_def_hdrq;
struct be_queue_info be_def_dataq;
Expand Down

0 comments on commit e944ec5

Please sign in to comment.