diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9a1dc0cea03c..98da5c8057bf 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1253,14 +1253,13 @@ got_data: | |||
1253 | * Jacques Gelinas (Jacques@solucorp.qc.ca) | 1253 | * Jacques Gelinas (Jacques@solucorp.qc.ca) |
1254 | */ | 1254 | */ |
1255 | int hard_sector = sector_size; | 1255 | int hard_sector = sector_size; |
1256 | sector_t sz = sdkp->capacity * (hard_sector/256); | 1256 | sector_t sz = (sdkp->capacity/2) * (hard_sector/256); |
1257 | request_queue_t *queue = sdp->request_queue; | 1257 | request_queue_t *queue = sdp->request_queue; |
1258 | sector_t mb; | 1258 | sector_t mb = sz; |
1259 | 1259 | ||
1260 | blk_queue_hardsect_size(queue, hard_sector); | 1260 | blk_queue_hardsect_size(queue, hard_sector); |
1261 | /* avoid 64-bit division on 32-bit platforms */ | 1261 | /* avoid 64-bit division on 32-bit platforms */ |
1262 | mb = sz >> 1; | 1262 | sector_div(sz, 625); |
1263 | sector_div(sz, 1250); | ||
1264 | mb -= sz - 974; | 1263 | mb -= sz - 974; |
1265 | sector_div(mb, 1950); | 1264 | sector_div(mb, 1950); |
1266 | 1265 | ||