mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
SCSI fixes on 20190125
Six fixes, all of which appear to have user visible consequences. The DMA one is a regression fix from the merge window and of the others, four are driver specific and one specific to the target code. Signed-off-by: James E.J. Bottomley <[email protected]> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXEt6GSYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishbxoAP0R0z0J fdCRn9AMRbZ3xJzD+E6V2gw38Gdgm8rR5mT1gQEAv1VxZwOAb9Qxbcr+l4uybqZr Q55H31I/IvBgNm84jH0= =vkW7 -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six fixes, all of which appear to have user visible consequences. The DMA one is a regression fix from the merge window and of the others, four are driver specific and one specific to the target code" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: Use explicit access size in ufshcd_dump_regs scsi: tcmu: fix use after free scsi: csiostor: fix NULL pointer dereference in csio_vport_set_state() scsi: lpfc: nvmet: avoid hang / use-after-free when destroying targetport scsi: lpfc: nvme: avoid hang / use-after-free when destroying localport scsi: communicate max segment size to the DMA mapping code
This commit is contained in:
commit
7930851ef1
12 changed files with 47 additions and 45 deletions
|
|
@ -915,6 +915,10 @@ static struct scsi_host_template pata_macio_sht = {
|
|||
.sg_tablesize = MAX_DCMDS,
|
||||
/* We may not need that strict one */
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
/* Not sure what the real max is but we know it's less than 64K, let's
|
||||
* use 64K minus 256
|
||||
*/
|
||||
.max_segment_size = MAX_DBDMA_SEG,
|
||||
.slave_configure = pata_macio_slave_config,
|
||||
};
|
||||
|
||||
|
|
@ -1044,11 +1048,6 @@ static int pata_macio_common_init(struct pata_macio_priv *priv,
|
|||
/* Make sure we have sane initial timings in the cache */
|
||||
pata_macio_default_timings(priv);
|
||||
|
||||
/* Not sure what the real max is but we know it's less than 64K, let's
|
||||
* use 64K minus 256
|
||||
*/
|
||||
dma_set_max_seg_size(priv->dev, MAX_DBDMA_SEG);
|
||||
|
||||
/* Allocate libata host for 1 port */
|
||||
memset(&pinfo, 0, sizeof(struct ata_port_info));
|
||||
pmac_macio_calc_timing_masks(priv, &pinfo);
|
||||
|
|
|
|||
|
|
@ -245,8 +245,15 @@ struct inic_port_priv {
|
|||
|
||||
static struct scsi_host_template inic_sht = {
|
||||
ATA_BASE_SHT(DRV_NAME),
|
||||
.sg_tablesize = LIBATA_MAX_PRD, /* maybe it can be larger? */
|
||||
.dma_boundary = INIC_DMA_BOUNDARY,
|
||||
.sg_tablesize = LIBATA_MAX_PRD, /* maybe it can be larger? */
|
||||
|
||||
/*
|
||||
* This controller is braindamaged. dma_boundary is 0xffff like others
|
||||
* but it will lock up the whole machine HARD if 65536 byte PRD entry
|
||||
* is fed. Reduce maximum segment size.
|
||||
*/
|
||||
.dma_boundary = INIC_DMA_BOUNDARY,
|
||||
.max_segment_size = 65536 - 512,
|
||||
};
|
||||
|
||||
static const int scr_map[] = {
|
||||
|
|
@ -868,17 +875,6 @@ static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* This controller is braindamaged. dma_boundary is 0xffff
|
||||
* like others but it will lock up the whole machine HARD if
|
||||
* 65536 byte PRD entry is fed. Reduce maximum segment size.
|
||||
*/
|
||||
rc = dma_set_max_seg_size(&pdev->dev, 65536 - 512);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "failed to set the maximum segment size\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = init_controller(hpriv->mmio_base, hpriv->cached_hctl);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "failed to initialize controller\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue