From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 03:29:01 +0000 Subject: [PATCH] add lvds1024*800 --- kernel/drivers/scsi/csiostor/csio_scsi.c | 36 ++++++++++++++---------------------- 1 files changed, 14 insertions(+), 22 deletions(-) diff --git a/kernel/drivers/scsi/csiostor/csio_scsi.c b/kernel/drivers/scsi/csiostor/csio_scsi.c index 0cb5857..55e74da 100644 --- a/kernel/drivers/scsi/csiostor/csio_scsi.c +++ b/kernel/drivers/scsi/csiostor/csio_scsi.c @@ -933,14 +933,14 @@ * abort for that I/O by the FW crossed each other. * The FW returned FW_EINVAL. The original I/O would have * returned with FW_SUCCESS or any other SCSI error. - * 3. The FW couldnt sent the abort out on the wire, as there + * 3. The FW couldn't sent the abort out on the wire, as there * was an I-T nexus loss (link down, remote device logged * out etc). FW sent back an appropriate IT nexus loss status * for the abort. * 4. FW sent an abort, but abort timed out (remote device * didnt respond). FW replied back with * FW_SCSI_ABORT_TIMEDOUT. - * 5. FW couldnt genuinely abort the request for some reason, + * 5. FW couldn't genuinely abort the request for some reason, * and sent us an error. * * The first 3 scenarios are treated as succesful abort @@ -1783,16 +1783,10 @@ int nsge = 0; int rv = SCSI_MLQUEUE_HOST_BUSY, nr; int retval; - int cpu; struct csio_scsi_qset *sqset; struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); - if (!blk_rq_cpu_valid(cmnd->request)) - cpu = smp_processor_id(); - else - cpu = cmnd->request->cpu; - - sqset = &hw->sqset[ln->portid][cpu]; + sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(cmnd->request)]; nr = fc_remote_port_chkready(rport); if (nr) { @@ -1865,7 +1859,7 @@ spin_unlock_irqrestore(&hw->lock, flags); if (retval != 0) { - csio_err(hw, "ioreq: %p couldnt be started, status:%d\n", + csio_err(hw, "ioreq: %p couldn't be started, status:%d\n", ioreq, retval); CSIO_INC_STATS(scsim, n_busy_error); goto err_put_req; @@ -1993,15 +1987,15 @@ /* FW successfully aborted the request */ if (host_byte(cmnd->result) == DID_REQUEUE) { csio_info(hw, - "Aborted SCSI command to (%d:%llu) serial#:0x%lx\n", + "Aborted SCSI command to (%d:%llu) tag %u\n", cmnd->device->id, cmnd->device->lun, - cmnd->serial_number); + cmnd->request->tag); return SUCCESS; } else { csio_info(hw, - "Failed to abort SCSI command, (%d:%llu) serial#:0x%lx\n", + "Failed to abort SCSI command, (%d:%llu) tag %u\n", cmnd->device->id, cmnd->device->lun, - cmnd->serial_number); + cmnd->request->tag); return FAILED; } } @@ -2283,7 +2277,6 @@ .this_id = -1, .sg_tablesize = CSIO_SCSI_MAX_SGE, .cmd_per_lun = CSIO_MAX_CMD_PER_LUN, - .use_clustering = ENABLE_CLUSTERING, .shost_attrs = csio_fcoe_lport_attrs, .max_sectors = CSIO_MAX_SECTOR_SIZE, }; @@ -2303,7 +2296,6 @@ .this_id = -1, .sg_tablesize = CSIO_SCSI_MAX_SGE, .cmd_per_lun = CSIO_MAX_CMD_PER_LUN, - .use_clustering = ENABLE_CLUSTERING, .shost_attrs = csio_fcoe_vport_attrs, .max_sectors = CSIO_MAX_SECTOR_SIZE, }; @@ -2352,8 +2344,8 @@ } /* Allocate Dma buffers for DDP */ - ddp_desc->vaddr = pci_alloc_consistent(hw->pdev, unit_size, - &ddp_desc->paddr); + ddp_desc->vaddr = dma_alloc_coherent(&hw->pdev->dev, unit_size, + &ddp_desc->paddr, GFP_KERNEL); if (!ddp_desc->vaddr) { csio_err(hw, "SCSI response DMA buffer (ddp) allocation" @@ -2375,8 +2367,8 @@ list_for_each(tmp, &scm->ddp_freelist) { ddp_desc = (struct csio_dma_buf *) tmp; tmp = csio_list_prev(tmp); - pci_free_consistent(hw->pdev, ddp_desc->len, ddp_desc->vaddr, - ddp_desc->paddr); + dma_free_coherent(&hw->pdev->dev, ddp_desc->len, + ddp_desc->vaddr, ddp_desc->paddr); list_del_init(&ddp_desc->list); kfree(ddp_desc); } @@ -2402,8 +2394,8 @@ list_for_each(tmp, &scm->ddp_freelist) { ddp_desc = (struct csio_dma_buf *) tmp; tmp = csio_list_prev(tmp); - pci_free_consistent(hw->pdev, ddp_desc->len, ddp_desc->vaddr, - ddp_desc->paddr); + dma_free_coherent(&hw->pdev->dev, ddp_desc->len, + ddp_desc->vaddr, ddp_desc->paddr); list_del_init(&ddp_desc->list); kfree(ddp_desc); } -- Gitblit v1.6.2