提交 647b2425 编写于 作者: F FUJITA Tomonori 提交者: James Bottomley

[SCSI] aic7xxx: fix IOMMU mapping failure handling

Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 ed5f606f
...@@ -1398,12 +1398,18 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev, ...@@ -1398,12 +1398,18 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY;
} }
nseg = scsi_dma_map(cmd);
if (nseg < 0)
return SCSI_MLQUEUE_HOST_BUSY;
/* /*
* Get an scb to use. * Get an scb to use.
*/ */
scb = ahc_get_scb(ahc); scb = ahc_get_scb(ahc);
if (!scb) if (!scb) {
scsi_dma_unmap(cmd);
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
}
scb->io_ctx = cmd; scb->io_ctx = cmd;
scb->platform_data->dev = dev; scb->platform_data->dev = dev;
...@@ -1464,8 +1470,6 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev, ...@@ -1464,8 +1470,6 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
ahc_set_sense_residual(scb, 0); ahc_set_sense_residual(scb, 0);
scb->sg_count = 0; scb->sg_count = 0;
nseg = scsi_dma_map(cmd);
BUG_ON(nseg < 0);
if (nseg > 0) { if (nseg > 0) {
struct ahc_dma_seg *sg; struct ahc_dma_seg *sg;
struct scatterlist *cur_seg; struct scatterlist *cur_seg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册