Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Four small fixes in three drivers.

The mptfusion one has actually caused user visible issues in certain
kernel configurations"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mptfusion: Don't use GFP_ATOMIC for larger DMA allocations
scsi: libfc: Skip additional kref updating work event
scsi: libfc: Handling of extra kref
scsi: qla2xxx: Fix a condition in qla2x00_find_all_fabric_devs()

+29 -27
+20 -21
drivers/message/fusion/mptbase.c
··· 1324 1324 return 0; /* fw doesn't need any host buffers */ 1325 1325 1326 1326 /* spin till we get enough memory */ 1327 - while(host_page_buffer_sz > 0) { 1328 - 1329 - if((ioc->HostPageBuffer = pci_alloc_consistent( 1330 - ioc->pcidev, 1331 - host_page_buffer_sz, 1332 - &ioc->HostPageBuffer_dma)) != NULL) { 1333 - 1327 + while (host_page_buffer_sz > 0) { 1328 + ioc->HostPageBuffer = 1329 + dma_alloc_coherent(&ioc->pcidev->dev, 1330 + host_page_buffer_sz, 1331 + &ioc->HostPageBuffer_dma, 1332 + GFP_KERNEL); 1333 + if (ioc->HostPageBuffer) { 1334 1334 dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT 1335 1335 "host_page_buffer @ %p, dma @ %x, sz=%d bytes\n", 1336 1336 ioc->name, ioc->HostPageBuffer, ··· 2741 2741 sz = ioc->alloc_sz; 2742 2742 dexitprintk(ioc, printk(MYIOC_s_INFO_FMT "free @ %p, sz=%d bytes\n", 2743 2743 ioc->name, ioc->alloc, ioc->alloc_sz)); 2744 - pci_free_consistent(ioc->pcidev, sz, 2745 - ioc->alloc, ioc->alloc_dma); 2744 + dma_free_coherent(&ioc->pcidev->dev, sz, ioc->alloc, 2745 + ioc->alloc_dma); 2746 2746 ioc->reply_frames = NULL; 2747 2747 ioc->req_frames = NULL; 2748 2748 ioc->alloc = NULL; ··· 2751 2751 2752 2752 if (ioc->sense_buf_pool != NULL) { 2753 2753 sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); 2754 - pci_free_consistent(ioc->pcidev, sz, 2755 - ioc->sense_buf_pool, ioc->sense_buf_pool_dma); 2754 + dma_free_coherent(&ioc->pcidev->dev, sz, ioc->sense_buf_pool, 2755 + ioc->sense_buf_pool_dma); 2756 2756 ioc->sense_buf_pool = NULL; 2757 2757 ioc->alloc_total -= sz; 2758 2758 } ··· 2802 2802 "HostPageBuffer free @ %p, sz=%d bytes\n", 2803 2803 ioc->name, ioc->HostPageBuffer, 2804 2804 ioc->HostPageBuffer_sz)); 2805 - pci_free_consistent(ioc->pcidev, ioc->HostPageBuffer_sz, 2805 + dma_free_coherent(&ioc->pcidev->dev, ioc->HostPageBuffer_sz, 2806 2806 ioc->HostPageBuffer, ioc->HostPageBuffer_dma); 2807 2807 ioc->HostPageBuffer = NULL; 2808 2808 ioc->HostPageBuffer_sz = 0; ··· 4497 4497 ioc->name, sz, sz, num_chain)); 4498 4498 4499 4499 total_size += sz; 4500 - mem = pci_alloc_consistent(ioc->pcidev, total_size, &alloc_dma); 4500 + mem = dma_alloc_coherent(&ioc->pcidev->dev, total_size, 4501 + &alloc_dma, GFP_KERNEL); 4501 4502 if (mem == NULL) { 4502 4503 printk(MYIOC_s_ERR_FMT "Unable to allocate Reply, Request, Chain Buffers!\n", 4503 4504 ioc->name); ··· 4575 4574 spin_unlock_irqrestore(&ioc->FreeQlock, flags); 4576 4575 4577 4576 sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); 4578 - ioc->sense_buf_pool = 4579 - pci_alloc_consistent(ioc->pcidev, sz, &ioc->sense_buf_pool_dma); 4577 + ioc->sense_buf_pool = dma_alloc_coherent(&ioc->pcidev->dev, sz, 4578 + &ioc->sense_buf_pool_dma, GFP_KERNEL); 4580 4579 if (ioc->sense_buf_pool == NULL) { 4581 4580 printk(MYIOC_s_ERR_FMT "Unable to allocate Sense Buffers!\n", 4582 4581 ioc->name); ··· 4614 4613 4615 4614 if (ioc->alloc != NULL) { 4616 4615 sz = ioc->alloc_sz; 4617 - pci_free_consistent(ioc->pcidev, 4618 - sz, 4619 - ioc->alloc, ioc->alloc_dma); 4616 + dma_free_coherent(&ioc->pcidev->dev, sz, ioc->alloc, 4617 + ioc->alloc_dma); 4620 4618 ioc->reply_frames = NULL; 4621 4619 ioc->req_frames = NULL; 4622 4620 ioc->alloc_total -= sz; 4623 4621 } 4624 4622 if (ioc->sense_buf_pool != NULL) { 4625 4623 sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); 4626 - pci_free_consistent(ioc->pcidev, 4627 - sz, 4628 - ioc->sense_buf_pool, ioc->sense_buf_pool_dma); 4624 + dma_free_coherent(&ioc->pcidev->dev, sz, ioc->sense_buf_pool, 4625 + ioc->sense_buf_pool_dma); 4629 4626 ioc->sense_buf_pool = NULL; 4630 4627 } 4631 4628
+8 -5
drivers/scsi/libfc/fc_rport.c
··· 133 133 lockdep_assert_held(&lport->disc.disc_mutex); 134 134 135 135 rdata = fc_rport_lookup(lport, port_id); 136 - if (rdata) 136 + if (rdata) { 137 + kref_put(&rdata->kref, fc_rport_destroy); 137 138 return rdata; 139 + } 138 140 139 141 if (lport->rport_priv_size > 0) 140 142 rport_priv_size = lport->rport_priv_size; ··· 483 481 484 482 fc_rport_state_enter(rdata, RPORT_ST_DELETE); 485 483 486 - kref_get(&rdata->kref); 487 - if (rdata->event == RPORT_EV_NONE && 488 - !queue_work(rport_event_queue, &rdata->event_work)) 489 - kref_put(&rdata->kref, fc_rport_destroy); 484 + if (rdata->event == RPORT_EV_NONE) { 485 + kref_get(&rdata->kref); 486 + if (!queue_work(rport_event_queue, &rdata->event_work)) 487 + kref_put(&rdata->kref, fc_rport_destroy); 488 + } 490 489 491 490 rdata->event = event; 492 491 }
+1 -1
drivers/scsi/qla2xxx/qla_init.c
··· 5944 5944 break; 5945 5945 } 5946 5946 5947 - if (NVME_TARGET(vha->hw, fcport)) { 5947 + if (found && NVME_TARGET(vha->hw, fcport)) { 5948 5948 if (fcport->disc_state == DSC_DELETE_PEND) { 5949 5949 qla2x00_set_fcport_disc_state(fcport, DSC_GNL); 5950 5950 vha->fcport_count--;