diff options
Diffstat (limited to 'drivers/message/fusion/mptfc.c')
-rw-r--r-- | drivers/message/fusion/mptfc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index c3c24fdf9fb6..e61df133a59e 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -1251,17 +1251,15 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1251 | * A slightly different algorithm is required for | 1251 | * A slightly different algorithm is required for |
1252 | * 64bit SGEs. | 1252 | * 64bit SGEs. |
1253 | */ | 1253 | */ |
1254 | scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); | 1254 | scale = ioc->req_sz/ioc->SGE_size; |
1255 | if (sizeof(dma_addr_t) == sizeof(u64)) { | 1255 | if (ioc->sg_addr_size == sizeof(u64)) { |
1256 | numSGE = (scale - 1) * | 1256 | numSGE = (scale - 1) * |
1257 | (ioc->facts.MaxChainDepth-1) + scale + | 1257 | (ioc->facts.MaxChainDepth-1) + scale + |
1258 | (ioc->req_sz - 60) / (sizeof(dma_addr_t) + | 1258 | (ioc->req_sz - 60) / ioc->SGE_size; |
1259 | sizeof(u32)); | ||
1260 | } else { | 1259 | } else { |
1261 | numSGE = 1 + (scale - 1) * | 1260 | numSGE = 1 + (scale - 1) * |
1262 | (ioc->facts.MaxChainDepth-1) + scale + | 1261 | (ioc->facts.MaxChainDepth-1) + scale + |
1263 | (ioc->req_sz - 64) / (sizeof(dma_addr_t) + | 1262 | (ioc->req_sz - 64) / ioc->SGE_size; |
1264 | sizeof(u32)); | ||
1265 | } | 1263 | } |
1266 | 1264 | ||
1267 | if (numSGE < sh->sg_tablesize) { | 1265 | if (numSGE < sh->sg_tablesize) { |
@@ -1292,9 +1290,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1292 | 1290 | ||
1293 | /* Clear the TM flags | 1291 | /* Clear the TM flags |
1294 | */ | 1292 | */ |
1295 | hd->tmPending = 0; | ||
1296 | hd->tmState = TM_STATE_NONE; | ||
1297 | hd->resetPending = 0; | ||
1298 | hd->abortSCpnt = NULL; | 1293 | hd->abortSCpnt = NULL; |
1299 | 1294 | ||
1300 | /* Clear the pointer used to store | 1295 | /* Clear the pointer used to store |
@@ -1312,8 +1307,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1312 | hd->timer.data = (unsigned long) hd; | 1307 | hd->timer.data = (unsigned long) hd; |
1313 | hd->timer.function = mptscsih_timer_expired; | 1308 | hd->timer.function = mptscsih_timer_expired; |
1314 | 1309 | ||
1315 | init_waitqueue_head(&hd->scandv_waitq); | ||
1316 | hd->scandv_wait_done = 0; | ||
1317 | hd->last_queue_full = 0; | 1310 | hd->last_queue_full = 0; |
1318 | 1311 | ||
1319 | sh->transportt = mptfc_transport_template; | 1312 | sh->transportt = mptfc_transport_template; |