SCSI fixes on 20190420
Three minor fixes: two obvious ones in drivers and a fix to the SG_IO path to correctly return status on error. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXLtrDSYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishYh/AQDe6Jf7 jU/VKsir8r74Uy1gHw9wXkmcgzKeTzHErEyvGgD9HqEfAKUWr0YlMqfKqnQZUhUc TPokv5u1u2xc/ba+nuo= =VutB -----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: "Three minor fixes: two obvious ones in drivers and a fix to the SG_IO path to correctly return status on error" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: aic7xxx: fix EISA support Revert "scsi: fcoe: clear FC_RP_STARTED flags when receiving a LOGO" scsi: core: set result when the command cannot be dispatched
This commit is contained in:
commit
a06bc2f241
|
@ -91,6 +91,7 @@ aic7770_probe(struct device *dev)
|
||||||
ahc = ahc_alloc(&aic7xxx_driver_template, name);
|
ahc = ahc_alloc(&aic7xxx_driver_template, name);
|
||||||
if (ahc == NULL)
|
if (ahc == NULL)
|
||||||
return (ENOMEM);
|
return (ENOMEM);
|
||||||
|
ahc->dev = dev;
|
||||||
error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data,
|
error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data,
|
||||||
eisaBase);
|
eisaBase);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
|
|
|
@ -943,6 +943,7 @@ struct ahc_softc {
|
||||||
* Platform specific device information.
|
* Platform specific device information.
|
||||||
*/
|
*/
|
||||||
ahc_dev_softc_t dev_softc;
|
ahc_dev_softc_t dev_softc;
|
||||||
|
struct device *dev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bus specific device information.
|
* Bus specific device information.
|
||||||
|
|
|
@ -860,8 +860,8 @@ int
|
||||||
ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
|
ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
|
||||||
int flags, bus_dmamap_t *mapp)
|
int flags, bus_dmamap_t *mapp)
|
||||||
{
|
{
|
||||||
*vaddr = pci_alloc_consistent(ahc->dev_softc,
|
/* XXX: check if we really need the GFP_ATOMIC and unwind this mess! */
|
||||||
dmat->maxsize, mapp);
|
*vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC);
|
||||||
if (*vaddr == NULL)
|
if (*vaddr == NULL)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -871,8 +871,7 @@ void
|
||||||
ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
|
ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
|
||||||
void* vaddr, bus_dmamap_t map)
|
void* vaddr, bus_dmamap_t map)
|
||||||
{
|
{
|
||||||
pci_free_consistent(ahc->dev_softc, dmat->maxsize,
|
dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map);
|
||||||
vaddr, map);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1123,8 +1122,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
|
||||||
|
|
||||||
host->transportt = ahc_linux_transport_template;
|
host->transportt = ahc_linux_transport_template;
|
||||||
|
|
||||||
retval = scsi_add_host(host,
|
retval = scsi_add_host(host, ahc->dev);
|
||||||
(ahc->dev_softc ? &ahc->dev_softc->dev : NULL));
|
|
||||||
if (retval) {
|
if (retval) {
|
||||||
printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n");
|
printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n");
|
||||||
scsi_host_put(host);
|
scsi_host_put(host);
|
||||||
|
|
|
@ -250,6 +250,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ahc->dev_softc = pci;
|
ahc->dev_softc = pci;
|
||||||
|
ahc->dev = &pci->dev;
|
||||||
error = ahc_pci_config(ahc, entry);
|
error = ahc_pci_config(ahc, entry);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
ahc_free(ahc);
|
ahc_free(ahc);
|
||||||
|
|
|
@ -2162,7 +2162,6 @@ static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp)
|
||||||
FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n",
|
FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n",
|
||||||
fc_rport_state(rdata));
|
fc_rport_state(rdata));
|
||||||
|
|
||||||
rdata->flags &= ~FC_RP_STARTED;
|
|
||||||
fc_rport_enter_delete(rdata, RPORT_EV_STOP);
|
fc_rport_enter_delete(rdata, RPORT_EV_STOP);
|
||||||
mutex_unlock(&rdata->rp_mutex);
|
mutex_unlock(&rdata->rp_mutex);
|
||||||
kref_put(&rdata->kref, fc_rport_destroy);
|
kref_put(&rdata->kref, fc_rport_destroy);
|
||||||
|
|
|
@ -1706,8 +1706,12 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||||
ret = BLK_STS_DEV_RESOURCE;
|
ret = BLK_STS_DEV_RESOURCE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (unlikely(!scsi_device_online(sdev)))
|
||||||
|
scsi_req(req)->result = DID_NO_CONNECT << 16;
|
||||||
|
else
|
||||||
|
scsi_req(req)->result = DID_ERROR << 16;
|
||||||
/*
|
/*
|
||||||
* Make sure to release all allocated ressources when
|
* Make sure to release all allocated resources when
|
||||||
* we hit an error, as we will never see this command
|
* we hit an error, as we will never see this command
|
||||||
* again.
|
* again.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue