Message ID | 20190813203034.7354-4-martin.wilck@suse.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | scsi: qla2xxx: fixes for FW trace/dump buffers | expand |
On 8/13/19 10:31 PM, Martin Wilck wrote: > From: Martin Wilck <mwilck@suse.com> > > It seems right to try and calculate the dump size properly > even in the error case, before allocating the dump buffers. > > Cc: Joe Carnuccio <joe.carnuccio@cavium.com> > Cc: Quinn Tran <qutran@marvell.com> > Cc: Himanshu Madhani <hmadhani@marvell.com> > Cc: Bart Van Assche <bvanassche@acm.org> > Signed-off-by: Martin Wilck <mwilck@suse.com> > --- > drivers/scsi/qla2xxx/qla_init.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c > index ca9c3f3..8427436 100644 > --- a/drivers/scsi/qla2xxx/qla_init.c > +++ b/drivers/scsi/qla2xxx/qla_init.c > @@ -3191,7 +3191,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) > EFT_SIZE / 1024); > ha->eft = NULL; > ha->eft_dma = 0; > - goto allocate; > + goto calc_dump_size; > } > > rval = qla2x00_enable_eft_trace(vha, tc_dma, EFT_NUM_BUFFERS); > @@ -3202,7 +3202,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) > tc_dma); > ha->eft = NULL; > ha->eft_dma = 0; > - goto allocate; > + goto calc_dump_size; > } > ql_dbg(ql_dbg_init, vha, 0x00c3, > "Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024); > @@ -3211,6 +3211,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) > ha->eft = tc; > } > > +calc_dump_size: > if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { > struct fwdt *fwdt = ha->fwdt; > uint j; > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index ca9c3f3..8427436 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3191,7 +3191,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) EFT_SIZE / 1024); ha->eft = NULL; ha->eft_dma = 0; - goto allocate; + goto calc_dump_size; } rval = qla2x00_enable_eft_trace(vha, tc_dma, EFT_NUM_BUFFERS); @@ -3202,7 +3202,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) tc_dma); ha->eft = NULL; ha->eft_dma = 0; - goto allocate; + goto calc_dump_size; } ql_dbg(ql_dbg_init, vha, 0x00c3, "Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024); @@ -3211,6 +3211,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ha->eft = tc; } +calc_dump_size: if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { struct fwdt *fwdt = ha->fwdt; uint j;