diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9a1dc0cea03c..9de8e186cb69 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 | ||
@@ -1535,8 +1534,8 @@ static int sd_probe(struct device *dev) | |||
1535 | if (sdp->type != TYPE_DISK && sdp->type != TYPE_MOD && sdp->type != TYPE_RBC) | 1534 | if (sdp->type != TYPE_DISK && sdp->type != TYPE_MOD && sdp->type != TYPE_RBC) |
1536 | goto out; | 1535 | goto out; |
1537 | 1536 | ||
1538 | SCSI_LOG_HLQUEUE(3, printk("sd_attach: scsi device: <%d,%d,%d,%d>\n", | 1537 | SCSI_LOG_HLQUEUE(3, sdev_printk(KERN_INFO, sdp, |
1539 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun)); | 1538 | "sd_attach\n")); |
1540 | 1539 | ||
1541 | error = -ENOMEM; | 1540 | error = -ENOMEM; |
1542 | sdkp = kmalloc(sizeof(*sdkp), GFP_KERNEL); | 1541 | sdkp = kmalloc(sizeof(*sdkp), GFP_KERNEL); |
@@ -1608,10 +1607,8 @@ static int sd_probe(struct device *dev) | |||
1608 | dev_set_drvdata(dev, sdkp); | 1607 | dev_set_drvdata(dev, sdkp); |
1609 | add_disk(gd); | 1608 | add_disk(gd); |
1610 | 1609 | ||
1611 | printk(KERN_NOTICE "Attached scsi %sdisk %s at scsi%d, channel %d, " | 1610 | sdev_printk(KERN_NOTICE, sdp, "Attached scsi %sdisk %s\n", |
1612 | "id %d, lun %d\n", sdp->removable ? "removable " : "", | 1611 | sdp->removable ? "removable " : "", gd->disk_name); |
1613 | gd->disk_name, sdp->host->host_no, sdp->channel, | ||
1614 | sdp->id, sdp->lun); | ||
1615 | 1612 | ||
1616 | return 0; | 1613 | return 0; |
1617 | 1614 | ||