[SCSI] bfa: BSG and User interface fixes.
Made changes to set the rport maxfrsize param to use a value that is equal to or less than the Buffer-to-Buffer Receive Data_Field size specified in the Common Service Parameters. Increased the diag memtest timeout for the Brocade-1860 adapters. Made changes to enable valid port speed configuration check for all adapters. Made changes to increase the max hw segments in a request, in order to support larger data transfers from user space. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
ff179e0f4a
commit
bd5a026019
|
@ -2169,7 +2169,10 @@ bfa_fcs_rport_update(struct bfa_fcs_rport_s *rport, struct fc_logi_s *plogi)
|
|||
* - MAX receive frame size
|
||||
*/
|
||||
rport->cisc = plogi->csp.cisc;
|
||||
rport->maxfrsize = be16_to_cpu(plogi->class3.rxsz);
|
||||
if (be16_to_cpu(plogi->class3.rxsz) < be16_to_cpu(plogi->csp.rxsz))
|
||||
rport->maxfrsize = be16_to_cpu(plogi->class3.rxsz);
|
||||
else
|
||||
rport->maxfrsize = be16_to_cpu(plogi->csp.rxsz);
|
||||
|
||||
bfa_trc(port->fcs, be16_to_cpu(plogi->csp.bbcred));
|
||||
bfa_trc(port->fcs, port->fabric->bb_credit);
|
||||
|
|
|
@ -4449,7 +4449,7 @@ bfa_flash_read_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type,
|
|||
*/
|
||||
|
||||
#define BFA_DIAG_MEMTEST_TOV 50000 /* memtest timeout in msec */
|
||||
#define BFA_DIAG_FWPING_TOV 1000 /* msec */
|
||||
#define CT2_BFA_DIAG_MEMTEST_TOV (9*30*1000) /* 4.5 min */
|
||||
|
||||
/* IOC event handler */
|
||||
static void
|
||||
|
@ -4804,6 +4804,8 @@ bfa_diag_memtest(struct bfa_diag_s *diag, struct bfa_diag_memtest_s *memtest,
|
|||
u32 pattern, struct bfa_diag_memtest_result *result,
|
||||
bfa_cb_diag_t cbfn, void *cbarg)
|
||||
{
|
||||
u32 memtest_tov;
|
||||
|
||||
bfa_trc(diag, pattern);
|
||||
|
||||
if (!bfa_ioc_adapter_is_disabled(diag->ioc))
|
||||
|
@ -4823,8 +4825,10 @@ bfa_diag_memtest(struct bfa_diag_s *diag, struct bfa_diag_memtest_s *memtest,
|
|||
/* download memtest code and take LPU0 out of reset */
|
||||
bfa_ioc_boot(diag->ioc, BFI_FWBOOT_TYPE_MEMTEST, BFI_FWBOOT_ENV_OS);
|
||||
|
||||
memtest_tov = (bfa_ioc_asic_gen(diag->ioc) == BFI_ASIC_GEN_CT2) ?
|
||||
CT2_BFA_DIAG_MEMTEST_TOV : BFA_DIAG_MEMTEST_TOV;
|
||||
bfa_timer_begin(diag->ioc->timer_mod, &diag->timer,
|
||||
bfa_diag_memtest_done, diag, BFA_DIAG_MEMTEST_TOV);
|
||||
bfa_diag_memtest_done, diag, memtest_tov);
|
||||
diag->timer_active = 1;
|
||||
return BFA_STATUS_OK;
|
||||
}
|
||||
|
|
|
@ -3576,26 +3576,24 @@ bfa_fcport_cfg_speed(struct bfa_s *bfa, enum bfa_port_speed speed)
|
|||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
}
|
||||
|
||||
/* For Mezz card, port speed entered needs to be checked */
|
||||
if (bfa_mfg_is_mezz(fcport->bfa->ioc.attr->card_type)) {
|
||||
if (bfa_ioc_get_type(&fcport->bfa->ioc) == BFA_IOC_TYPE_FC) {
|
||||
/* For CT2, 1G is not supported */
|
||||
if ((speed == BFA_PORT_SPEED_1GBPS) &&
|
||||
(bfa_asic_id_ct2(bfa->ioc.pcidev.device_id)))
|
||||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
/* Port speed entered needs to be checked */
|
||||
if (bfa_ioc_get_type(&fcport->bfa->ioc) == BFA_IOC_TYPE_FC) {
|
||||
/* For CT2, 1G is not supported */
|
||||
if ((speed == BFA_PORT_SPEED_1GBPS) &&
|
||||
(bfa_asic_id_ct2(bfa->ioc.pcidev.device_id)))
|
||||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
|
||||
/* Already checked for Auto Speed and Max Speed supp */
|
||||
if (!(speed == BFA_PORT_SPEED_1GBPS ||
|
||||
speed == BFA_PORT_SPEED_2GBPS ||
|
||||
speed == BFA_PORT_SPEED_4GBPS ||
|
||||
speed == BFA_PORT_SPEED_8GBPS ||
|
||||
speed == BFA_PORT_SPEED_16GBPS ||
|
||||
speed == BFA_PORT_SPEED_AUTO))
|
||||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
} else {
|
||||
if (speed != BFA_PORT_SPEED_10GBPS)
|
||||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
}
|
||||
/* Already checked for Auto Speed and Max Speed supp */
|
||||
if (!(speed == BFA_PORT_SPEED_1GBPS ||
|
||||
speed == BFA_PORT_SPEED_2GBPS ||
|
||||
speed == BFA_PORT_SPEED_4GBPS ||
|
||||
speed == BFA_PORT_SPEED_8GBPS ||
|
||||
speed == BFA_PORT_SPEED_16GBPS ||
|
||||
speed == BFA_PORT_SPEED_AUTO))
|
||||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
} else {
|
||||
if (speed != BFA_PORT_SPEED_10GBPS)
|
||||
return BFA_STATUS_UNSUPP_SPEED;
|
||||
}
|
||||
|
||||
fcport->cfg.speed = speed;
|
||||
|
|
|
@ -2762,9 +2762,16 @@ bfad_im_bsg_vendor_request(struct fc_bsg_job *job)
|
|||
struct bfad_im_port_s *im_port =
|
||||
(struct bfad_im_port_s *) job->shost->hostdata[0];
|
||||
struct bfad_s *bfad = im_port->bfad;
|
||||
struct request_queue *request_q = job->req->q;
|
||||
void *payload_kbuf;
|
||||
int rc = -EINVAL;
|
||||
|
||||
/*
|
||||
* Set the BSG device request_queue size to 256 to support
|
||||
* payloads larger than 512*1024K bytes.
|
||||
*/
|
||||
blk_queue_max_segments(request_q, 256);
|
||||
|
||||
/* Allocate a temp buffer to hold the passed in user space command */
|
||||
payload_kbuf = kzalloc(job->request_payload.payload_len, GFP_KERNEL);
|
||||
if (!payload_kbuf) {
|
||||
|
|
Loading…
Reference in New Issue