Cleanups.

This commit is contained in:
Søren Schmidt 2002-04-05 18:04:05 +00:00
parent 2c1f56d442
commit ede0f136df
2 changed files with 7 additions and 12 deletions

View File

@ -125,8 +125,8 @@ ad_attach(struct ata_device *atadev)
adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors;
bioq_init(&adp->queue);
lbasize = (u_int32_t)atadev->param->lba_size_lo |
((u_int32_t)atadev->param->lba_size_hi << 16);
lbasize = (u_int32_t)atadev->param->lba_size_1 |
((u_int32_t)atadev->param->lba_size_2 << 16);
/* does this device need oldstyle CHS addressing */
if (!ad_version(atadev->param->version_major) ||
@ -137,10 +137,10 @@ ad_attach(struct ata_device *atadev)
if (atadev->param->cylinders == 16383 && adp->total_secs < lbasize)
adp->total_secs = lbasize;
lbasize48 = (u_int64_t)atadev->param->lba_size48_1 |
((u_int64_t)atadev->param->lba_size48_2 << 16) |
((u_int64_t)atadev->param->lba_size48_3 << 32) |
((u_int64_t)atadev->param->lba_size48_4 << 48);
lbasize48 = ((u_int64_t)atadev->param->lba_size48_1) |
((u_int64_t)atadev->param->lba_size48_2 << 16) |
((u_int64_t)atadev->param->lba_size48_3 << 32) |
((u_int64_t)atadev->param->lba_size48_4 << 48);
/* use the 48bit LBA size if valid */
if (atadev->param->support.address48 && lbasize48 > 268435455)

View File

@ -255,22 +255,17 @@ acd_init_lun(struct ata_device *atadev)
return cdp;
}
/*
* Handle dev_clone events, so that acd can be used as root device.
*/
static void
acd_clone(void *arg, char *name, int namelen, dev_t *dev)
{
struct acd_softc *cdp;
struct acd_softc *cdp = arg;
char *p;
int unit;
cdp = arg;
if (*dev != NODEV)
return;
if (!dev_stdclone(name, &p, "acd", &unit))
return;
/* Handle compatability slices. */
if (*p != '\0' && strcmp(p, "a") != 0 && strcmp(p, "c") != 0)
return;
if (unit == cdp->lun)