aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSreekanth Reddy <sreekanth.reddy@avagotech.com>2014-09-19 02:47:27 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-22 10:35:45 -0400
commitf78f694c34ae6fdc29f5e80abb2dbb894f961772 (patch)
tree6fa543f5d076baee2f2efc8a1302e2f4bdd392db
parent3b8155d582968f79a62c79358d5e137f99f04407 (diff)
mpt2sas: fix undefined reference to `__udivdi3' compilation errors
This patch will fix the below compilation errors on i386 ARCH drivers/built-in.o: In function `_scsih_qcmd': mpt2sas_scsih.c:(.text+0x1e7b56): undefined reference to `__udivdi3' mpt2sas_scsih.c:(.text+0x1e7b8a): undefined reference to `__umoddi3' Used sector_div() API to fix above compilation errors. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 992a224e51ee..c80ed0482649 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -3860,7 +3860,7 @@ _scsih_setup_direct_io(struct MPT2SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
3860 struct _raid_device *raid_device, Mpi2SCSIIORequest_t *mpi_request, 3860 struct _raid_device *raid_device, Mpi2SCSIIORequest_t *mpi_request,
3861 u16 smid) 3861 u16 smid)
3862{ 3862{
3863 sector_t v_lba, p_lba, stripe_off, stripe_unit, column, io_size; 3863 sector_t v_lba, p_lba, stripe_off, column, io_size;
3864 u32 stripe_sz, stripe_exp; 3864 u32 stripe_sz, stripe_exp;
3865 u8 num_pds, cmd = scmd->cmnd[0]; 3865 u8 num_pds, cmd = scmd->cmnd[0];
3866 3866
@@ -3888,9 +3888,9 @@ _scsih_setup_direct_io(struct MPT2SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
3888 3888
3889 num_pds = raid_device->num_pds; 3889 num_pds = raid_device->num_pds;
3890 p_lba = v_lba >> stripe_exp; 3890 p_lba = v_lba >> stripe_exp;
3891 stripe_unit = p_lba / num_pds; 3891 column = sector_div(p_lba, num_pds);
3892 column = p_lba % num_pds; 3892 p_lba = (p_lba << stripe_exp) + stripe_off;
3893 p_lba = (stripe_unit << stripe_exp) + stripe_off; 3893
3894 mpi_request->DevHandle = cpu_to_le16(raid_device->pd_handle[column]); 3894 mpi_request->DevHandle = cpu_to_le16(raid_device->pd_handle[column]);
3895 3895
3896 if (cmd == READ_10 || cmd == WRITE_10) 3896 if (cmd == READ_10 || cmd == WRITE_10)