diff options
author | Satish Kharat <satishkh@cisco.com> | 2019-01-15 02:09:28 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-01-23 03:18:34 +0100 |
commit | 68e3cc02bcfc4f55a47333ee7d8fe1a9b41d72c3 (patch) | |
tree | e77e7f2c90e80553ad8c607171e433c30ba1b9cb /drivers/scsi/fnic | |
parent | scsi: fnic: delaying vnic dev enable till after req intr (diff) | |
download | linux-68e3cc02bcfc4f55a47333ee7d8fe1a9b41d72c3.tar.xz linux-68e3cc02bcfc4f55a47333ee7d8fe1a9b41d72c3.zip |
scsi: fnic: RQ enable and then post descriptors
Do RQ enable before posting descriptor. This is needed for later hw
revisions.
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fnic')
-rw-r--r-- | drivers/scsi/fnic/fnic_main.c | 5 | ||||
-rw-r--r-- | drivers/scsi/fnic/vnic_devcmd.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 7a5665acf280..25e0414b6cb0 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -654,7 +654,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } err = fnic_dev_wait(fnic->vdev, vnic_dev_open, - vnic_dev_open_done, 0); + vnic_dev_open_done, CMD_OPENF_RQ_ENABLE_THEN_POST); if (err) { shost_printk(KERN_ERR, fnic->lport->host, "vNIC dev open failed, aborting.\n"); @@ -799,6 +799,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* allocate RQ buffers and post them to RQ*/ for (i = 0; i < fnic->rq_count; i++) { + vnic_rq_enable(&fnic->rq[i]); err = vnic_rq_fill(&fnic->rq[i], fnic_alloc_rq_frame); if (err) { shost_printk(KERN_ERR, fnic->lport->host, @@ -873,8 +874,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* Enable all queues */ for (i = 0; i < fnic->raw_wq_count; i++) vnic_wq_enable(&fnic->wq[i]); - for (i = 0; i < fnic->rq_count; i++) - vnic_rq_enable(&fnic->rq[i]); for (i = 0; i < fnic->wq_copy_count; i++) vnic_wq_copy_enable(&fnic->wq_copy[i]); diff --git a/drivers/scsi/fnic/vnic_devcmd.h b/drivers/scsi/fnic/vnic_devcmd.h index 3e2fcbda6aed..1a2a13bd6442 100644 --- a/drivers/scsi/fnic/vnic_devcmd.h +++ b/drivers/scsi/fnic/vnic_devcmd.h @@ -268,6 +268,8 @@ enum vnic_devcmd_cmd { /* flags for CMD_OPEN */ #define CMD_OPENF_OPROM 0x1 /* open coming from option rom */ +#define CMD_OPENF_RQ_ENABLE_THEN_POST 0x2 + /* flags for CMD_INIT */ #define CMD_INITF_DEFAULT_MAC 0x1 /* init with default mac addr */ |