Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130279
b: refs/heads/master
c: 41bbdbe
h: refs/heads/master
i:
  130277: 160416f
  130275: 8eccfcf
  130271: 4093be6
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Jan 25, 2009
1 parent 99b1156 commit cbe817a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 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: 2f5899a39dcffb404c9a3d06ad438aff3e03bf04
refs/heads/master: 41bbdbebbbe7e06871d25f51c2eb1d6466bb9e5f
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ struct ddb_entry {
uint8_t ip_addr[ISCSI_IPADDR_SIZE];
uint8_t iscsi_name[ISCSI_NAME_SIZE]; /* 72 x48 */
uint8_t iscsi_alias[0x20];
uint8_t isid[6];
};

/*
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/scsi/qla4xxx/ql4_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,12 @@ static struct ddb_entry* qla4xxx_get_ddb_entry(struct scsi_qla_host *ha,
DEBUG2(printk("scsi%ld: %s: Looking for ddb[%d]\n", ha->host_no,
__func__, fw_ddb_index));
list_for_each_entry(ddb_entry, &ha->ddb_list, list) {
if (memcmp(ddb_entry->iscsi_name, fw_ddb_entry->iscsi_name,
ISCSI_NAME_SIZE) == 0) {
if ((memcmp(ddb_entry->iscsi_name, fw_ddb_entry->iscsi_name,
ISCSI_NAME_SIZE) == 0) &&
(ddb_entry->tpgt ==
le32_to_cpu(fw_ddb_entry->tgt_portal_grp)) &&
(memcmp(ddb_entry->isid, fw_ddb_entry->isid,
sizeof(ddb_entry->isid)) == 0)) {
found++;
break;
}
Expand Down Expand Up @@ -430,6 +434,8 @@ static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha,

ddb_entry->port = le16_to_cpu(fw_ddb_entry->port);
ddb_entry->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp);
memcpy(ddb_entry->isid, fw_ddb_entry->isid, sizeof(ddb_entry->isid));

memcpy(&ddb_entry->iscsi_name[0], &fw_ddb_entry->iscsi_name[0],
min(sizeof(ddb_entry->iscsi_name),
sizeof(fw_ddb_entry->iscsi_name)));
Expand Down

0 comments on commit cbe817a

Please sign in to comment.