diff options
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 674a65c1a130..54943da6e4e5 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) | |||
800 | if (arg < 0 || arg > 1 + (SUPPORT_VLB_SYNC << 1)) | 800 | if (arg < 0 || arg > 1 + (SUPPORT_VLB_SYNC << 1)) |
801 | return -EINVAL; | 801 | return -EINVAL; |
802 | 802 | ||
803 | if (ide_spin_wait_hwgroup(drive)) | ||
804 | return -EBUSY; | ||
805 | |||
803 | drive->io_32bit = arg; | 806 | drive->io_32bit = arg; |
804 | #ifdef CONFIG_BLK_DEV_DTC2278 | 807 | #ifdef CONFIG_BLK_DEV_DTC2278 |
805 | if (HWIF(drive)->chipset == ide_dtc2278) | 808 | if (HWIF(drive)->chipset == ide_dtc2278) |
806 | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; | 809 | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; |
807 | #endif /* CONFIG_BLK_DEV_DTC2278 */ | 810 | #endif /* CONFIG_BLK_DEV_DTC2278 */ |
811 | |||
812 | spin_unlock_irq(&ide_lock); | ||
813 | |||
808 | return 0; | 814 | return 0; |
809 | } | 815 | } |
810 | 816 | ||
@@ -1670,10 +1676,34 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
1670 | return sprintf(buf, "ide:m-%s\n", media_string(drive)); | 1676 | return sprintf(buf, "ide:m-%s\n", media_string(drive)); |
1671 | } | 1677 | } |
1672 | 1678 | ||
1679 | static ssize_t model_show(struct device *dev, struct device_attribute *attr, | ||
1680 | char *buf) | ||
1681 | { | ||
1682 | ide_drive_t *drive = to_ide_device(dev); | ||
1683 | return sprintf(buf, "%s\n", drive->id->model); | ||
1684 | } | ||
1685 | |||
1686 | static ssize_t firmware_show(struct device *dev, struct device_attribute *attr, | ||
1687 | char *buf) | ||
1688 | { | ||
1689 | ide_drive_t *drive = to_ide_device(dev); | ||
1690 | return sprintf(buf, "%s\n", drive->id->fw_rev); | ||
1691 | } | ||
1692 | |||
1693 | static ssize_t serial_show(struct device *dev, struct device_attribute *attr, | ||
1694 | char *buf) | ||
1695 | { | ||
1696 | ide_drive_t *drive = to_ide_device(dev); | ||
1697 | return sprintf(buf, "%s\n", drive->id->serial_no); | ||
1698 | } | ||
1699 | |||
1673 | static struct device_attribute ide_dev_attrs[] = { | 1700 | static struct device_attribute ide_dev_attrs[] = { |
1674 | __ATTR_RO(media), | 1701 | __ATTR_RO(media), |
1675 | __ATTR_RO(drivename), | 1702 | __ATTR_RO(drivename), |
1676 | __ATTR_RO(modalias), | 1703 | __ATTR_RO(modalias), |
1704 | __ATTR_RO(model), | ||
1705 | __ATTR_RO(firmware), | ||
1706 | __ATTR(serial, 0400, serial_show, NULL), | ||
1677 | __ATTR_NULL | 1707 | __ATTR_NULL |
1678 | }; | 1708 | }; |
1679 | 1709 | ||