diff options
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r-- | drivers/message/fusion/mptspi.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 61620144e49c..643a3c6443af 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -300,7 +300,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id) | |||
300 | flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | | 300 | flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | |
301 | (IOCPage4Ptr->Header.PageLength + ii) * 4; | 301 | (IOCPage4Ptr->Header.PageLength + ii) * 4; |
302 | 302 | ||
303 | mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); | 303 | ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); |
304 | 304 | ||
305 | ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 305 | ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
306 | "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n", | 306 | "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n", |
@@ -643,7 +643,7 @@ mptscsih_quiesce_raid(MPT_SCSI_HOST *hd, int quiesce, u8 channel, u8 id) | |||
643 | pReq->Reserved2 = 0; | 643 | pReq->Reserved2 = 0; |
644 | pReq->ActionDataWord = 0; /* Reserved for this action */ | 644 | pReq->ActionDataWord = 0; /* Reserved for this action */ |
645 | 645 | ||
646 | mpt_add_sge((char *)&pReq->ActionDataSGE, | 646 | ioc->add_sge((char *)&pReq->ActionDataSGE, |
647 | MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1); | 647 | MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1); |
648 | 648 | ||
649 | ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n", | 649 | ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n", |
@@ -1423,17 +1423,15 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1423 | * A slightly different algorithm is required for | 1423 | * A slightly different algorithm is required for |
1424 | * 64bit SGEs. | 1424 | * 64bit SGEs. |
1425 | */ | 1425 | */ |
1426 | scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); | 1426 | scale = ioc->req_sz/ioc->SGE_size; |
1427 | if (sizeof(dma_addr_t) == sizeof(u64)) { | 1427 | if (ioc->sg_addr_size == sizeof(u64)) { |
1428 | numSGE = (scale - 1) * | 1428 | numSGE = (scale - 1) * |
1429 | (ioc->facts.MaxChainDepth-1) + scale + | 1429 | (ioc->facts.MaxChainDepth-1) + scale + |
1430 | (ioc->req_sz - 60) / (sizeof(dma_addr_t) + | 1430 | (ioc->req_sz - 60) / ioc->SGE_size; |
1431 | sizeof(u32)); | ||
1432 | } else { | 1431 | } else { |
1433 | numSGE = 1 + (scale - 1) * | 1432 | numSGE = 1 + (scale - 1) * |
1434 | (ioc->facts.MaxChainDepth-1) + scale + | 1433 | (ioc->facts.MaxChainDepth-1) + scale + |
1435 | (ioc->req_sz - 64) / (sizeof(dma_addr_t) + | 1434 | (ioc->req_sz - 64) / ioc->SGE_size; |
1436 | sizeof(u32)); | ||
1437 | } | 1435 | } |
1438 | 1436 | ||
1439 | if (numSGE < sh->sg_tablesize) { | 1437 | if (numSGE < sh->sg_tablesize) { |