X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=drivers%2Fieee1394%2Fsbp2.c;h=1eda11abeb1e0b3cb912cb7e0c9bcac196b79810;hb=99e139126ab2e84be67969650f92eb37c12ab5cd;hp=1b353b964b33fff6c5cfe609c9acc1b6be09f20b;hpb=fb9fc395174138983a49f2da982ed14caabbe741;p=sfrench%2Fcifs-2.6.git diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 1b353b964b33..1eda11abeb1e 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -71,11 +71,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -1466,7 +1466,7 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb, cmd->dma_size = sgpnt[0].length; cmd->dma_type = CMD_DMA_PAGE; cmd->cmd_dma = dma_map_page(hi->host->device.parent, - sgpnt[0].page, sgpnt[0].offset, + sg_page(&sgpnt[0]), sgpnt[0].offset, cmd->dma_size, cmd->dma_dir); orb->data_descriptor_lo = cmd->cmd_dma; @@ -1963,6 +1963,12 @@ static int sbp2scsi_slave_alloc(struct scsi_device *sdev) lu->sdev = sdev; sdev->allow_restart = 1; + /* + * Update the dma alignment (minimum alignment requirements for + * start and end of DMA transfers) to be a sector + */ + blk_queue_update_dma_alignment(sdev->request_queue, 511); + if (lu->workarounds & SBP2_WORKAROUND_INQUIRY_36) sdev->inquiry_len = 36; return 0;