diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-21 22:21:08 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-21 22:21:08 +1100 |
commit | c2a7dcad9f0d92d7a96e735abb8bec7b9c621536 (patch) | |
tree | bf9b20fdd5ab07e5b0e4e0b95c6a3dbab1005cb9 /drivers/ide/ide.c | |
parent | 373a6da165ac3012a74fd072da340eabca55d031 (diff) | |
parent | ea67db4cdbbf7f4e74150e71da0984e25121f500 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 674a65c1a13..54943da6e4e 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -800,11 +800,17 @@ int set_io_32bit(ide_drive_t *drive, int arg) if (arg < 0 || arg > 1 + (SUPPORT_VLB_SYNC << 1)) return -EINVAL; + if (ide_spin_wait_hwgroup(drive)) + return -EBUSY; + drive->io_32bit = arg; #ifdef CONFIG_BLK_DEV_DTC2278 if (HWIF(drive)->chipset == ide_dtc2278) HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; #endif /* CONFIG_BLK_DEV_DTC2278 */ + + spin_unlock_irq(&ide_lock); + return 0; } @@ -1670,10 +1676,34 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, return sprintf(buf, "ide:m-%s\n", media_string(drive)); } +static ssize_t model_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + ide_drive_t *drive = to_ide_device(dev); + return sprintf(buf, "%s\n", drive->id->model); +} + +static ssize_t firmware_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + ide_drive_t *drive = to_ide_device(dev); + return sprintf(buf, "%s\n", drive->id->fw_rev); +} + +static ssize_t serial_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + ide_drive_t *drive = to_ide_device(dev); + return sprintf(buf, "%s\n", drive->id->serial_no); +} + static struct device_attribute ide_dev_attrs[] = { __ATTR_RO(media), __ATTR_RO(drivename), __ATTR_RO(modalias), + __ATTR_RO(model), + __ATTR_RO(firmware), + __ATTR(serial, 0400, serial_show, NULL), __ATTR_NULL }; |