Commit e2aed29f authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.10: Added management for LP21000 through BSG.

Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 0f65ff68
...@@ -37,6 +37,9 @@ struct lpfc_sli2_slim; ...@@ -37,6 +37,9 @@ struct lpfc_sli2_slim;
the NameServer before giving up. */ the NameServer before giving up. */
#define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */ #define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */
#define LPFC_DEFAULT_SG_SEG_CNT 64 /* sg element count per scsi cmnd */ #define LPFC_DEFAULT_SG_SEG_CNT 64 /* sg element count per scsi cmnd */
#define LPFC_DEFAULT_MENLO_SG_SEG_CNT 128 /* sg element count per scsi
cmnd for menlo needs nearly twice as for firmware
downloads using bsg */
#define LPFC_DEFAULT_PROT_SG_SEG_CNT 4096 /* sg protection elements count */ #define LPFC_DEFAULT_PROT_SG_SEG_CNT 4096 /* sg protection elements count */
#define LPFC_MAX_SG_SEG_CNT 4096 /* sg element count per scsi cmnd */ #define LPFC_MAX_SG_SEG_CNT 4096 /* sg element count per scsi cmnd */
#define LPFC_MAX_PROT_SG_SEG_CNT 4096 /* prot sg element count per scsi cmd*/ #define LPFC_MAX_PROT_SG_SEG_CNT 4096 /* prot sg element count per scsi cmd*/
...@@ -806,6 +809,9 @@ struct lpfc_hba { ...@@ -806,6 +809,9 @@ struct lpfc_hba {
struct list_head ct_ev_waiters; struct list_head ct_ev_waiters;
struct unsol_rcv_ct_ctx ct_ctx[64]; struct unsol_rcv_ct_ctx ct_ctx[64];
uint32_t ctx_idx; uint32_t ctx_idx;
uint8_t menlo_flag; /* menlo generic flags */
#define HBA_MENLO_SUPPORT 0x1 /* HBA supports menlo commands */
}; };
static inline struct Scsi_Host * static inline struct Scsi_Host *
......
This diff is collapsed.
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#define LPFC_BSG_VENDOR_DIAG_TEST 5 #define LPFC_BSG_VENDOR_DIAG_TEST 5
#define LPFC_BSG_VENDOR_GET_MGMT_REV 6 #define LPFC_BSG_VENDOR_GET_MGMT_REV 6
#define LPFC_BSG_VENDOR_MBOX 7 #define LPFC_BSG_VENDOR_MBOX 7
#define LPFC_BSG_VENDOR_MENLO_CMD 8
#define LPFC_BSG_VENDOR_MENLO_DATA 9
struct set_ct_event { struct set_ct_event {
uint32_t command; uint32_t command;
...@@ -96,3 +98,13 @@ struct dfc_mbox_req { ...@@ -96,3 +98,13 @@ struct dfc_mbox_req {
uint8_t mbOffset; uint8_t mbOffset;
}; };
/* Used for menlo command or menlo data. The xri is only used for menlo data */
struct menlo_command {
uint32_t cmd;
uint32_t xri;
};
struct menlo_response {
uint32_t xri; /* return the xri of the iocb exchange */
};
...@@ -2597,6 +2597,14 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev) ...@@ -2597,6 +2597,14 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev)
init_timer(&vport->els_tmofunc); init_timer(&vport->els_tmofunc);
vport->els_tmofunc.function = lpfc_els_timeout; vport->els_tmofunc.function = lpfc_els_timeout;
vport->els_tmofunc.data = (unsigned long)vport; vport->els_tmofunc.data = (unsigned long)vport;
if (phba->pcidev->device == PCI_DEVICE_ID_HORNET) {
phba->menlo_flag |= HBA_MENLO_SUPPORT;
/* check for menlo minimum sg count */
if (phba->cfg_sg_seg_cnt < LPFC_DEFAULT_MENLO_SG_SEG_CNT) {
phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT;
shost->sg_tablesize = phba->cfg_sg_seg_cnt;
}
}
error = scsi_add_host_with_dma(shost, dev, &phba->pcidev->dev); error = scsi_add_host_with_dma(shost, dev, &phba->pcidev->dev);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment